Alternative extensions by server (Apache/Nginx/IIS), MIME spoofing, magic bytes, GIF+PHP polyglots, and path traversal upload. Adapts to active filters.
Binary search for blind boolean SQLi: 7 queries per character instead of 95. Interactive TRUE/FALSE simulator, MySQL/PostgreSQL/MSSQL/Oracle/SQLite queries, full Python automation script.
Blind SQLi Binary Search Oracle
Extract data character by character via boolean blind SQLi. Binary search = 7 queries per char instead of 95. Configure target, simulate the oracle, or copy the Python script.
Paste a WAF regex rule or pick an example scenario. The generator extracts blocked terms and produces bypass payloads: comment injection, URL encoding, case variation, versioned comments.
Regex WAF Bypass Generator
Pick an example WAF rule or paste your own regex. The generator extracts blocked keywords and produces bypass payloads.
Authorization Code, PKCE, Implicit and Client Credentials flows with attack points at each step: open redirect, CSRF state bypass, code interception, secret exposure, JWT attacks, token theft, SSRF via jwks_uri.
OAuth 2.0 / OIDC Flow
PKCE (Proof Key for Code Exchange): Client generates a code_verifier (random 43-128 char string), hashes it as code_challenge=BASE64URL(SHA256(verifier)), sends challenge in auth request. Exchanges verifier (not secret) in token request. Designed for public clients (SPAs, mobile) where a client_secret cannot be stored safely.
Implicit Flow (deprecated): Access token returned directly in the URL fragment after user auth - no authorization code exchange. Tokens exposed in browser history, referrer headers, and logs. RFC 9700 recommends using Authorization Code + PKCE instead.
Client Credentials Flow: Machine-to-machine only. No user involved. Client authenticates with client_id + client_secret and receives an access token directly. Steps 2-3 (user auth/code) are skipped. Primary risk is secret leakage.
If the AS validates redirect_uri only as a prefix match or accepts wildcards, an attacker can register a URL that begins with the allowed prefix but redirects to their controlled server. The AS sends the authorization code to the attacker's endpoint.
The state parameter binds the request to the user's session and prevents CSRF. If the client does not generate a cryptographically random state or does not verify the returned value, an attacker can trick a victim into completing an OAuth flow that logs them into the attacker's account (account takeover) or links a social identity to the attacker's account.
# Attack flow:
# 1. Attacker starts OAuth flow, captures auth URL with state=ATTACKER_STATE
# 2. Stops before completing; sends that URL to victim
# 3. Victim authenticates, code binds to attacker's pre-set state
# 4. Attacker's session now has victim's token
2
User AuthenticationUser → AS
User enters credentials (+ MFA if configured) at the Authorization Server's login page. Consent screen shows requested scopes.
Phishing / Consent Phishing
Attacker registers a malicious OAuth app on a legitimate platform (Azure AD, Google) with a convincing name ("IT Helpdesk", "O365 Update"). App requests broad scopes: Mail.ReadWrite, Files.ReadWrite.All, offline_access. User clicks "Accept" thinking it's legitimate. Attacker gets a refresh token with persistent access - no password needed, bypasses MFA entirely.
Three main vectors: (1) Referrer header leakage - if the callback page loads external resources, the full URL (including code=) is sent in the Referer header. (2) Open redirector on the client domain - the AS redirects to app.com/redirect?url=attacker.com. (3) Malicious redirect_uri via lax validation. The code is single-use but has a short window (typically 60-600s) - automated interception is practical.
# PKCE mitigation: even if code intercepted, attacker lacks code_verifier
# Without PKCE: code alone is enough to get tokens if client_secret known/absent
4
Token RequestClient → AS (back-channel POST)
POST /token: grant_type=authorization_code&code=AUTH_CODE&redirect_uri=...&client_id=...&client_secret=...
PKCE adds code_verifier to the token request. Public clients omit client_secret.
Client Secret Exposure
Client secrets are frequently leaked via: hardcoded in mobile apps (extractable with apktool/frida), checked into git repos (detectable with trufflehog/gitleaks), embedded in compiled JS bundles (grep the bundle), or visible in CI/CD logs. An attacker with the secret + a stolen code can exchange it for tokens without the client's involvement.
alg:none - if the library accepts unsigned tokens, forge a JWT with "alg":"none" and strip the signature. RS256->HS256 confusion - if server uses public key as HMAC secret, sign with the public key and set alg to HS256. jwks_uri injection - if the jku/x5u header is not pinned, point to attacker-hosted JWKS.
Tokens can leak via: Referer header if token stored in URL (implicit flow), application logs that record Authorization headers, browser history if token in fragment/query param, or postMessage leakage in SPAs sending tokens to iframes from wrong origins.
# Hunt for tokens in logs:
grep -r "Bearer eyJ" /var/log/nginx/
# Check postMessage origin validation - look for:
window.addEventListener('message', function(e) {
// if e.origin not validated -> token theft from cross-origin iframe
})
6
API RequestClient → Resource Server
GET /api/data HTTP/1.1 Authorization: Bearer <access_token>
Token Theft via XSS / MITM
Bearer tokens stored in localStorage or sessionStorage are accessible to any JS on the page - XSS instantly yields the token. Tokens in memory are safer but lost on refresh. Without HTTPS, MITM captures the Authorization header. Access tokens are not revocable at most RPs - a stolen token is valid until expiry.
If the resource server does not enforce fine-grained scope checks on each endpoint, a token granted for read:profile may succeed on /admin endpoints. Test by using a low-privilege token against all documented (and undocumented) API routes. Also test if refresh token exchanges silently upgrade scopes.
# Brute API endpoints with low-scope token:
ffuf -u https://api.target.com/FUZZ -H "Authorization: Bearer LOW_TOKEN" \
-w /usr/share/wordlists/api-paths.txt -mc 200,201,204
7
Resource ResponseResource Server → Client
Server validates token (locally via JWT sig, or introspects at AS), checks scopes, returns protected data.
SSRF via OAuth Metadata
If the resource server fetches jwks_uri, userinfo_endpoint, or issuer values from within the JWT header or from a token introspection response without validation, an attacker can point these to internal services. The server then makes requests to http://169.254.169.254/ (IMDS) or internal APIs on behalf of the RS.
# Forge JWT with attacker-controlled jku:
header = {"alg":"RS256","typ":"JWT","jku":"https://attacker.com/jwks.json"}
# Server fetches attacker's JWKS, validates sig with attacker key -> accepted
# SSRF variant: jku = http://169.254.169.254/latest/meta-data/
# Detect: jwks_uri must be pinned in server config, not read from token
Grant Types Reference
Grant Type
Use Case
Token Return
Security Notes
Auth Code
Server-side web apps
Back-channel only
Best for confidential clients; requires client_secret
PKCE
SPAs, mobile apps
Back-channel only
No client_secret; code_verifier replaces it; RFC 7636
Implicit (deprecated)
Legacy SPAs
Token in URL fragment
Token exposed in browser; no refresh tokens; avoid
Client Credentials
Machine-to-machine
Back-channel only
No user context; secret must be rotated; no MFA
Device Flow
CLI tools, smart TVs
Polling back-channel
Phishing via device code (attacker sends code, victim authorizes)