Skip to content

Instantly share code, notes, and snippets.

@bayotop
bayotop / h1-702-web-ctf.md
Created June 20, 2018 20:01
h1-702 CTF 2018 - Web 1
@bayotop
bayotop / hrefs.py
Last active December 4, 2018 08:36
Identify "href" (i.e., free "javascript:" XSS) and dangerouslySetInnerHtml usages in ReactJS SPAs.
import re
import sys
VULNERABLE_HREF = r'href: [^"].+[^\s]?'
DANGEROUSLY_SET_INNER_HTML = r'__html: .+[^\s]?'
STATE_VALUES = r'\.setState\({([\s\S]*?)}\)'
#false_positives = ("this.props.team.", "constants.")
def find_state_candidates(name, states):
@bayotop
bayotop / gauth.py
Last active June 27, 2019 07:38
Programmatic authentication to GCP's Identiy-Aware Proxy
# https://cloud.google.com/iap/docs/authentication-howto
import json
import time
from jwt import JWT, jwk_from_pem
import requests
jwt = JWT()
@bayotop
bayotop / jolokia-1.6.0-csrf.md
Created July 3, 2019 07:21
CVE-2018-10899: CSRF in Jolokia 1.6.0

Summary

Jolokia 1.6.0 is vulnerable to CSRF. This holds true for properly configured instances with strict checking for origin and referrer headers. The issue was fixed in version 1.6.1.

Red Hat Security Advisory: https://access.redhat.com/security/cve/cve-2018-10899

Details

In version 1.2.1 Jolokia introduced a <strict-checking/> option within the Cross-Origin Resource Sharing policy defined in jolokia-access.xml to prevent CSRF (4.1.5).

@bayotop
bayotop / typed.js
Created January 16, 2020 09:33
typed.js
fetch('http://165.227.165.4:8888');