[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6F7JMMD6MW41YN1NN576N2N":3,"skill-same:01M6F7JMMD6MW41YN1NN576N2N":72},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":40,"linkOnly":41,"markdownContent":42,"markdownBody":43,"frontMatter":44,"refName":21,"commitSha":52,"skillDirectory":53,"forksCount":54,"repositoryHtmlUrl":55,"repositoryHomepageUrl":6,"ownerHtmlUrl":56,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":57,"install":58,"resources":71},"01M6F7JMMD6MW41YN1NN576N2N","hunt-session",null,"Hunt Session Management vulnerabilities","boisenoise\u002Fskills-collections","boisenoise","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F193180?v=4","01M6CDBDQK6BDN55ZMA6B6PKBM","01M6CDBDVSJ3JPTBYN26FZ7TZK",13,"MIT","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-hunt-session\u002FSKILL.md",[],[18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39],"hunt session","session","hunt","main","2026","for","relevant","helper","session management","offensive","scripts","scope","commands","testing","community","only","Tools","owasp","license","testing tools","research","security","2026-11-10 10:12:30",false,"---\nname: hunt-session\ndescription: Hunt Session Management vulnerabilities\ncategory: security\nrisk: offensive\nsource: https:\u002F\u002Fgithub.com\u002Felementalsouls\u002FClaude-BugHunter\nsource_repo: elementalsouls\u002FClaude-BugHunter\nsource_type: community\ndate_added: '2026-09-20'\nlicense: MIT\nlicense_source: https:\u002F\u002Fgithub.com\u002Felementalsouls\u002FClaude-BugHunter\u002Fblob\u002Fmain\u002FLICENSE\ncompatibility: Requires explicit written authorization for a target scope plus the\n  relevant testing tools for this technique. Docs-only; helper scripts and commands\n  not bundled.\nsources: hackerone_public, portswigger_research, owasp_wstg\nreport_count: 18\n---\n> **⚠️ AUTHORIZED USE ONLY**\n> This skill is for educational purposes or authorized security assessments only.\n> You must have explicit, written permission from the system owner before using this tool.\n> Misuse of this tool is illegal and strictly prohibited.\n\n> **Mandatory confirmation gate**\n> Before running any command that probes, exploits, changes, persists on, extracts data from, or attempts credential access against a target:\n> 1. Ask the user to state the exact target URL, IP, account, or resource.\n> 2. Ask the user to confirm written authorization and the permitted scope.\n> 3. Show the exact command(s) and explain their expected effect.\n> 4. Wait for explicit confirmation in the current conversation.\n>\n> Without that confirmation, remain read-only and provide defensive guidance only. Prefer a sandbox, disposable VM, or controlled lab.\n\n## Autonomous Testing Priority\n\n**Missing HttpOnly on cookies may be detected by separately configured tooling — focus your active testing on lifecycle invalidation (higher impact).**\n\n**Pattern 1 — Session survives logout (most common high-value finding):**\n1. Login and note the session token\u002Fcookie value\n2. Call the logout endpoint (`\u002Flogout`, `POST \u002Fapi\u002Flogout`, etc.)\n3. Try to use the OLD session token to access a protected resource (`\u002Fapi\u002Fme`, `\u002Fdashboard`, `\u002Faccount`)\n4. If protected data remains accessible with the old token after confirmed logout, investigate the revocation boundary and expected policy\n\n**Pattern 2 — Session not regenerated on login (session fixation):**\n1. GET any page to receive a pre-authentication session token\u002Fcookie\n2. POST valid credentials to the login endpoint\n3. Compare the session token BEFORE and AFTER login\n4. If unchanged, verify an attacker can pre-establish\u002Fcontrol the same authenticated session before claiming fixation\n\n**Pattern 3 — Session survives password change:**\n1. Login → record session A value\n2. Change the password via the account settings endpoint\n3. Replay session A on a protected endpoint\n4. If protected data remains accessible, compare the documented session-revocation policy and attack preconditions before assigning impact\n\n**Content-type:** Login and session endpoints vary — use `application\u002Fjson` for REST APIs, `application\u002Fx-www-form-urlencoded` for traditional web forms. Try both if the first returns an unexpected response.\n\n**Proof:** A protected-resource 200 response (with user data) using a session token that should have been invalidated confirms the finding.\n\n---\n\n# HUNT-SESSION — Session Management\n\n## Crown Jewel Targets\n\nSession fixation leading to admin hijack = Critical. Session surviving a password change = High-to-Critical (persistent ATO from a stolen cookie that the victim believes they revoked by resetting their password).\n\n**Highest-value chains:**\n- **Session fixation** — server accepts a session ID set by the client and does NOT regenerate it on login → attacker pre-plants an ID, victim authenticates, attacker rides the now-authenticated session → persistent ATO.\n- **No invalidation on logout** — old token still works after `\u002Flogout` → theft window never closes.\n- **No invalidation on password \u002F email change** — a stolen session survives the victim's \"I think I was hacked, let me reset\" → persistent ATO. Impact and bounty eligibility depend on the program and demonstrated threat model.\n- **Refresh-token reuse without rotation-detection** — a leaked refresh token may mint access tokens within its enforced lifetime; no reuse-detection means the legitimate user's later refresh does NOT revoke the attacker's branch.\n- **Predictable \u002F low-entropy session ID** — sequential, timestamp- or userId-derived IDs → brute-force or compute other users' sessions.\n- **JWT-as-session with no `exp` \u002F no revocation list** — inspect server-enforced lifetime and revocation; claims alone do not establish permanent access.\n\n---\n\n## Grounding — patterns that shaped each phase\n\nNo invented CVE\u002Freport IDs below. These are the *named, publicly-documented* patterns this skill encodes:\n\n- **Session fixation, login-CSRF, no-regeneration-on-auth** — OWASP WSTG-SESS-03 \u002F WSTG-SESS-01; the classic ACROS \u002F Mitja Kolšek session-fixation paper. Highest-impact variant: fixing the session of an SSO\u002Fadmin user.\n- **Same-parent-domain CSRF reaching session state** — Argo CD **CVE-2024-22424** (attacker-controlled HTML on the same parent domain; inspect the advisory’s content-type\u002FCSRF preconditions). Use this when a session cookie relies on `SameSite=Lax` as its only CSRF defence.\n- **Refresh-token rotation & automatic reuse-detection** — the Auth0\u002FIETF OAuth-Security-BCP model: public-client refresh tokens require rotation with replay detection or sender-constraining; test the implemented protection and replay policy.\n- **Device Bound Session Credentials (DBSC)** — the W3C\u002FChrome DBSC draft binds a session to a TPM\u002Fdevice key. Test the *downgrade*: does the server still accept a non-bound cookie when the DBSC challenge is stripped?\n- **Cookie attribute hardening** — OWASP WSTG-SESS-02; `__Host-`\u002F`__Secure-` prefixes per RFC 6265bis. Missing `HttpOnly` can be a hardening finding; high-impact theft claims require an actual applicable attack path (chain with `hunt-xss`\u002F`hunt-dom`).\n- **Entropy** — NIST SP 800-63B-4 requires session-binding secrets from an approved random bit generator and at least 64 bits in length. Decodable claims alone are not a finding: signed\u002Fencrypted tokens can contain predictable claims while preserving integrity and sufficient unpredictable secrets.\n\nCross-refs: ATO chaining → `hunt-ato`; JWT alg\u002Fkid tampering → `hunt-api-misconfig`; OAuth code\u002Fstate flaws → `hunt-oauth`; CSRF mechanics → `hunt-csrf`; cookie-theft sinks → `hunt-xss` \u002F `hunt-dom`.\n\n---\n\n## Attack Surface Signals\n\n```\nSet-Cookie: session=...            # name varies: sid, JSESSIONID, connect.sid,\n                                   # PHPSESSID, ASP.NET_SessionId, laravel_session, _csrf\n\u002Flogin \u002Flogout \u002Fapi\u002Flogin \u002Foauth\u002Ftoken\n\u002Fauth\u002Frefresh \u002Fapi\u002Ftoken\u002Frefresh   # refresh-token rotation surface\n\u002Faccount\u002Fchange-password \u002Fsettings\u002Femail\n?sid= ?session= in URL             # session-in-URL → leaks via Referer\u002Flogs (finding)\n```\n```\n# Header signals worth flagging immediately:\nSet-Cookie: session=abc; Path=\u002F                 # no HttpOnly\u002FSecure\u002FSameSite\nSet-Cookie: session=abc; SameSite=None          # None without Secure = rejected by modern browsers, but flag\nSet-Cookie: __Host-sess=...; Secure; Path=\u002F     # GOOD — hard to fixate\nSec-Session-Registration: ...                   # DBSC in play → test downgrade\n```\n\n---\n\n## Step-by-Step Hunting Methodology\n\n> **Two-session rule.** Every invalidation\u002Ffixation claim is proven with TWO concrete sessions captured by a real flow — attacker **A** and victim **B** — never with hardcoded placeholder strings. Helpers below capture real cookies from `curl`'s Netscape jar.\n\n```bash\nTARGET=target.com\nJAR_A=$(mktemp); JAR_B=$(mktemp)\n\n# Robust session-cookie extractor: handles #HttpOnly_ prefix lines and any\n# cookie name (sid\u002FJSESSIONID\u002Fconnect.sid\u002FPHPSESSID\u002F...). Prints name=value.\nget_cookie () {  # $1=jar  $2=name-regex (default: common session names)\n  local jar=\"$1\" re=\"${2:-session|sid|sess|JSESSIONID|connect\\.sid|PHPSESSID|laravel_session}\"\n  awk -v re=\"$re\" '\n    \u002F^#HttpOnly_\u002F { sub(\u002F^#HttpOnly_\u002F,\"\"); }   # strip jar HttpOnly marker\n    \u002F^#\u002F { next }                              # skip remaining comments\n    NF>=7 && $6 ~ re { print $6\"=\"$7 }         # field6=name field7=value\n  ' \"$jar\" | tail -1\n}\n```\n\n### Phase 1 — Session Fixation (regeneration-on-login)\n```bash\n# Step 1: grab a pre-auth session the SERVER hands an anonymous client.\ncurl -s -L -c \"$JAR_A\" \"https:\u002F\u002F$TARGET\u002Flogin\" -o \u002Fdev\u002Fnull\nPRE=$(get_cookie \"$JAR_A\"); echo \"pre-auth: $PRE\"\n\n# Step 1b (stronger): can we FORCE an arbitrary ID? attacker-chosen value.\nFIX=\"session=AAAAdeadbeefAAAA\"\n\n# Step 2: authenticate while CARRYING the pre-auth\u002Fforced cookie (reuse same jar).\ncurl -s -L -c \"$JAR_A\" -b \"$JAR_A\" -X POST \"https:\u002F\u002F$TARGET\u002Flogin\" \\\n  -d \"username=attacker@example.com&password=CorrectHorse1\" -o \u002Fdev\u002Fnull\nPOST=$(get_cookie \"$JAR_A\"); echo \"post-auth: $POST\"\n\n# DECISION:\n#  - If $POST == $PRE (value unchanged across the auth boundary) AND that value\n#    now returns authenticated data → FIXATION. The server reused the anon ID.\n#  - If the forced $FIX value is accepted and authenticates → CRITICAL fixation\n#    (attacker controls the ID; no email\u002FXSS needed to plant it).\nAUTH=$(curl -s -L -b \"$JAR_A\" \"https:\u002F\u002F$TARGET\u002Fapi\u002Fme\")\necho \"$AUTH\" | head -c 200\n```\n**FP guard:** a value *change* is not automatically safe — some apps rotate the readable cookie but keep a stable server-side session keyed by a second cookie. Diff the FULL `Set-Cookie` set and confirm the *old* value is genuinely dead (Phase 2). Also confirm `\u002Fapi\u002Fme` returns *your* identity, not a generic 200\u002Flanding page.\n\n### Phase 2 — Invalidation on Logout\n```bash\n# A logs in for real (fresh jar), capture A's live session.\ncurl -s -L -c \"$JAR_A\" -X POST \"https:\u002F\u002F$TARGET\u002Fapi\u002Flogin\" \\\n  -H 'Content-Type: application\u002Fjson' \\\n  -d '{\"email\":\"attacker@example.com\",\"password\":\"CorrectHorse1\"}' -o \u002Fdev\u002Fnull\nA=$(get_cookie \"$JAR_A\"); echo \"A=$A\"\n\n# Baseline: what does an authenticated \u002Fapi\u002Fme look like for A? (capture body, not just code)\nBEFORE=$(curl -s -L -b \"$JAR_A\" \"https:\u002F\u002F$TARGET\u002Fapi\u002Fme\")\n\n# Logout A.\ncurl -s -L -b \"$JAR_A\" -X POST \"https:\u002F\u002F$TARGET\u002Fapi\u002Flogout\" -o \u002Fdev\u002Fnull\n\n# Replay A's OLD cookie value explicitly (do NOT reuse the jar — logout may have\n# overwritten it). Compare body + code against the authenticated baseline.\nAFTER=$(curl -s -L -H \"Cookie: $A\" \"https:\u002F\u002F$TARGET\u002Fapi\u002Fme\" -w '\\n[%{http_code}]')\necho \"AFTER: $AFTER\"\n```\n**FP discipline (mandatory):**\n- Don't trust the status code. A cached\u002Fedge 200 or a generic SPA shell returns 200 for everyone. **Body-diff** `AFTER` against `BEFORE` — the finding is only real if `AFTER` still contains A's *unique identity marker* (email, user-id, CSRF token, account name).\n- Confirm with a **negative control**: a random\u002Fgarbage cookie value must NOT return the same authenticated body. If garbage also yields user data, stop and investigate a possible separate unauthenticated disclosure\u002Fcache flaw; it does not prove session replay.\n- Re-test after a **short delay** and from a **different IP** — some servers lazily expire on next access or pin sessions to IP.\n\n### Phase 3 — Invalidation on Password \u002F Email Change (persistent-ATO core)\n```bash\n# This is the real two-session flow. A = attacker holding a stolen\u002Fold session.\n# B = the victim who changes their password believing it revokes access.\n# (In a real engagement A is a session you legitimately captured for a TEST account\n#  that you also control as B — never use a real third party.)\n\n# 1) Log the TEST account in as session A, capture it.\ncurl -s -L -c \"$JAR_A\" -X POST \"https:\u002F\u002F$TARGET\u002Fapi\u002Flogin\" \\\n  -H 'Content-Type: application\u002Fjson' \\\n  -d '{\"email\":\"victim@example.com\",\"password\":\"OldPass!1\"}' -o \u002Fdev\u002Fnull\nSESSION_A=$(get_cookie \"$JAR_A\"); echo \"SESSION_A=$SESSION_A\"\nBEFORE=$(curl -s -L -H \"Cookie: $SESSION_A\" \"https:\u002F\u002F$TARGET\u002Fapi\u002Fprofile\")\n\n# 2) Log the SAME account in as session B (separate jar = \"the victim's browser\").\ncurl -s -L -c \"$JAR_B\" -X POST \"https:\u002F\u002F$TARGET\u002Fapi\u002Flogin\" \\\n  -H 'Content-Type: application\u002Fjson' \\\n  -d '{\"email\":\"victim@example.com\",\"password\":\"OldPass!1\"}' -o \u002Fdev\u002Fnull\n\n# 3) Victim (session B) changes the password.\ncurl -s -L -b \"$JAR_B\" -X POST \"https:\u002F\u002F$TARGET\u002Fapi\u002Fchange-password\" \\\n  -H 'Content-Type: application\u002Fjson' \\\n  -d '{\"old_password\":\"OldPass!1\",\"new_password\":\"BrandNew!2\"}' -o \u002Fdev\u002Fnull\n\n# 4) THE TEST: replay the OLD SESSION_A captured in step 1.\nAFTER=$(curl -s -L -H \"Cookie: $SESSION_A\" \"https:\u002F\u002F$TARGET\u002Fapi\u002Fprofile\" -w '\\n[%{http_code}]')\necho \"AFTER pw-change: $AFTER\"\n```\n**Decision + FP discipline:**\n- Finding is confirmed only if `AFTER` returns 200 **and** the body still carries the account's unique data (body-diff vs `BEFORE`). A bare 200 on a public\u002FSPA route is not proof.\n- Run the **garbage-cookie negative control** again to prove the endpoint is session-gated.\n- Repeat the identical flow for **email-change** (`\u002Fsettings\u002Femail`) and for **logout-all-devices** — apps frequently invalidate the *acting* session (B) but not *sibling* sessions (A). That sibling-survival is the exact persistent-ATO primitive `hunt-ato` chains.\n- **Severity gate:** if the change-password endpoint also lacks a current-password \u002F MFA step-up (per `hunt-mfa-bypass`), A can pivot from read-only to full takeover → escalate.\n\n### Phase 4 — Cookie Attribute Analysis\n```bash\ncurl -sI -L \"https:\u002F\u002F$TARGET\u002F\" | grep -i '^set-cookie'\n```\n- **HttpOnly** missing → cookie reachable via `document.cookie`. A hardening observation whose severity requires context; a demonstrated XSS\u002FDOM sink can establish a theft chain (`hunt-xss`\u002F`hunt-dom`) — note it, don't report standalone as High.\n- **Secure** missing → cookie sent over cleartext HTTP; pair with `hunt-tls-network` (downgrade\u002FHSTS-gap) for a network-attacker chain.\n- **SameSite** missing\u002F`None` → CSRF reachability; sibling subdomains may be same-site, so Lax alone is not sufficient (Argo CD **CVE-2024-22424** class) → hand to `hunt-csrf`.\n- **`__Host-` \u002F `__Secure-` prefix absent** → record cookie scope and transport hardening; absence alone does not prove overwrite or fixation, and presence does not replace lifecycle validation.\n\n### Phase 5 — Session-ID Entropy\n```bash\n# Collect a LARGE sample (200+) of freshly-issued IDs. -L is required: a 302\n# \u002Flogin often sets the cookie on the redirect target, not the first response.\nN=200; SAMP=$(mktemp)\nfor i in $(seq 1 $N); do\n  J=$(mktemp)\n  curl -s -L -c \"$J\" \"https:\u002F\u002F$TARGET\u002Flogin\" -o \u002Fdev\u002Fnull\n  get_cookie \"$J\" | cut -d= -f2- >> \"$SAMP\"\n  rm -f \"$J\"\ndone\nsort \"$SAMP\" | uniq -d | head            # duplicates need investigation: stable sessions\u002Frate limits\u002Ferror responses can repeat without cross-user reuse\nawk '{print length($0)}' \"$SAMP\" | sort -n | uniq -c   # length distribution\n```\nThen analyse, don't eyeball:\n- **Sequential \u002F monotonic** — `sort -n` the decoded values; a steady +1\u002F+N delta = predictable.\n- **Decodable structure** — `base64 -d` \u002F hex-decode each ID and look for embedded `userId`, unix timestamps, or PIDs.\n- **Bit entropy** — feed the raw bytes to `ent` or `dieharder`; Small samples cannot establish cryptographic entropy; review generation design and the applicable standard. 10 samples is far too few to claim anything — gather hundreds.\n- **FP guard:** a long random-*looking* token is not proof of strength; statistical samples cannot prove cryptographic unpredictability; inspect the generation design where possible. Conversely a short token with high per-char entropy may still be fine — measure, don't count characters.\n\n### Phase 6 — JWT-as-Session\n```bash\nJWT=\"eyJ...\"        # captured from Authorization: Bearer or a cookie\n# Decode header + payload safely (base64url padding fix).\nb64url(){ local s=\"${1\u002F\u002F-\u002F+}\"; s=\"${s\u002F\u002F_\u002F\u002F}\"; printf '%s' \"$s===\" | base64 -d 2>\u002Fdev\u002Fnull; }\nb64url \"$(cut -d. -f1 \u003C\u003C\u003C\"$JWT\")\" | jq .   # header: alg, kid\nb64url \"$(cut -d. -f2 \u003C\u003C\u003C\"$JWT\")\" | jq .   # claims: exp, iat, sub, jti\n```\n- **`exp` missing or years out** → inspect enforced server-side lifetime; claims alone do not prove permanent access. **`jti` missing** does not prove absent revocation: servers can revoke by token hash, session, user version or other state.\n- **Revocation test:** logout, then replay the *same* JWT against `\u002Fapi\u002Fme`. If it still returns the user → tokens are not server-revocable; this is the JWT-session persistence finding. Body-diff to avoid a cached 200.\n- **Tampering (alg\u002Fkid\u002Fkey-confusion) is owned by `hunt-api-misconfig`** — hand off `jwt_tool $JWT -T` \u002F `-X a` there rather than duplicating it.\n\n### Phase 7 — Refresh-Token Rotation & Reuse-Detection\n```bash\n# 1) Obtain a refresh token (login or \u002Foauth\u002Ftoken), then rotate it once.\nRT1=$(curl -s -L -X POST \"https:\u002F\u002F$TARGET\u002Fapi\u002Flogin\" \\\n  -H 'Content-Type: application\u002Fjson' \\\n  -d '{\"email\":\"victim@example.com\",\"password\":\"OldPass!1\"}' | jq -r '.refresh_token')\n\n# 2) Use RT1 to mint a new access token — check the configured protection: rotation or sender-constraining; this example tests rotation only.\nR2=$(curl -s -L -X POST \"https:\u002F\u002F$TARGET\u002Fauth\u002Frefresh\" \\\n  -H 'Content-Type: application\u002Fjson' -d \"{\\\"refresh_token\\\":\\\"$RT1\\\"}\")\nRT2=$(jq -r '.refresh_token' \u003C\u003C\u003C\"$R2\"); echo \"rotated? RT1!=RT2 -> $([ \"$RT1\" != \"$RT2\" ] && echo yes || echo NO-ROTATION)\"\n\n# 3) REUSE-DETECTION test: replay the OLD RT1 again (simulating the leaked token).\nREPLAY=$(curl -s -L -X POST \"https:\u002F\u002F$TARGET\u002Fauth\u002Frefresh\" \\\n  -H 'Content-Type: application\u002Fjson' -d \"{\\\"refresh_token\\\":\\\"$RT1\\\"}\" -w '\\n[%{http_code}]')\necho \"RT1 replay: $REPLAY\"\n\n# 4) Then confirm RT2 was KILLED by the replay (correct BCP behaviour invalidates\n#    the whole family). If RT2 still works after RT1 was replayed → no family-revocation.\ncurl -s -L -X POST \"https:\u002F\u002F$TARGET\u002Fauth\u002Frefresh\" \\\n  -H 'Content-Type: application\u002Fjson' -d \"{\\\"refresh_token\\\":\\\"$RT2\\\"}\" -w '\\n[%{http_code}]'\n```\n**Interpretation:** no rotation requires checking sender-constraining and client type; rotation **without** reuse-detection (RT1 replay still mints tokens, or RT2 survives the replay) = the leaked-token-persistence bug per the OAuth Security BCP. **OOB note:** if you suspect a leaked RT via SSRF\u002Flog\u002FJS-bundle, confirm the token's reach with `hunt-ssrf`\u002F`hunt-source-leak`, not by guessing.\n\n### Phase 8 — OAuth\u002FSSO Session Linkage & DBSC Downgrade\n```bash\n# SSO linkage: after IdP callback, is the app session bound to the IdP session?\n#  - Log out at the IdP only; replay the app session cookie. Still 200 with user\n#    data → app session outlives the IdP session (single-logout gap).\n# DBSC downgrade: if responses carry Sec-Session-Registration \u002F Sec-Session-Id,\n#  strip the device-bound proof header and replay the plain cookie:\ncurl -s -L -H \"Cookie: $A\" \"https:\u002F\u002F$TARGET\u002Fapi\u002Fme\" -w '\\n[%{http_code}]'\n#  If the plain (non-bound) cookie is still accepted → device-binding is advisory,\n#  inspect the refresh challenge and cookie lifetime; acceptance alone does not demonstrate a DBSC downgrade.\n```\nHand OAuth `state`\u002F`redirect_uri`\u002Fcode-injection to `hunt-oauth`; this phase only covers the *session-layer* binding.\n\n---\n\n## Chain Table\n\n| Session finding | Chain to | Impact |\n|----------------|----------|--------|\n| Session fixation (forced `__Host-`-less cookie) | Trick admin\u002FSSO user into authenticating on planted ID | Admin session takeover (Critical) |\n| No logout\u002Fpassword-change invalidation | `hunt-xss`\u002F`hunt-dom` cookie theft → replay surviving session | Persistent ATO past victim's reset |\n| Refresh token, no reuse-detection | Leaked RT (SSRF\u002Flog\u002Fbundle) → access-token minting within the demonstrated lifetime | Persistent ATO, survives password change |\n| `SameSite=Lax` only | Sibling-subdomain top-level nav (CVE-2024-22424 class) → CSRF | State change \u002F login-CSRF → fixation |\n| JWT lifetime\u002Frevocation failure | Demonstrated replay after expected expiry\u002Frevocation | Demonstrated post-logout access within observed lifetime |\n| DBSC downgrade accepted | Steal plain cookie despite device-binding | Defeats the only theft mitigation |\n| Predictable ID | Compute\u002Fbrute another user's session | Cross-user ATO |\n\n---\n\n## Validation (house FP discipline)\n\nBefore claiming ANY session finding:\n- **Two real sessions, not placeholders** — every fixation\u002Finvalidation claim uses A and B captured by the `curl` flows above.\n- **Body-diff, never status-only** — a 200 means nothing without the account's unique identity marker present in the body, diffed against the authenticated baseline.\n- **Negative control** — a garbage\u002Frandom cookie must FAIL where your \"surviving\" cookie succeeds; otherwise investigate a separate access-control\u002Fcache issue rather than asserting session replay.\n- **Cache\u002Fedge check** — re-request with a cache-buster and from a second IP; rule out an edge-cached or IP-pinned 200.\n- **OOB for theft chains** — when the impact depends on exfiltrating a cookie\u002Ftoken (XSS, SSRF, log leak), confirm receipt out-of-band (Collaborator) rather than asserting it.\n- **Static-vs-state** — `HttpOnly`\u002F`Secure`\u002F`SameSite` absence is a *policy* observation; only report as High once paired with a real exploit primitive (XSS, network-MITM, CSRF). Standalone attribute gaps are Low\u002FInformational.\n\n**Severity:**\n- Session fixation → admin\u002FSSO takeover: **Critical**\n- No invalidation on password\u002Femail change, or refresh-token reuse without detection: **High → Critical** (escalate if MFA\u002Fstep-up also absent)\n- Predictable\u002Fduplicate session ID: **High**\n- No invalidation on logout: **Medium → High** (depends on theft vector)\n- Missing `HttpOnly`\u002F`SameSite` standalone: **Low\u002FInformational** until chained\n\n## When to Use\n\n- You have explicit, written authorization to assess the target in scope, and the task matches this skill's vulnerability class or technique within a bug-bounty or penetration-test engagement.\n- You need the recon, exploitation, or validation workflow described below — executed strictly inside the approved scope.\n\n## Limitations\n\n- Authorized scope only: the confirmation gate above is mandatory before any probing, exploitation, or credential-access command.\n- Docs-only import: upstream helper scripts, commands, engine, and research assets are not bundled; reinstall tooling from the source repo when needed.\n- Validate every finding (see `triage-validation`) before reporting; report via `report-writing`. Prefer a sandbox, disposable VM, or controlled lab.\n\n### Example\n\n```bash\n# Read-only first step; confirm scope before anything active.\ncat scope.txt  # target list from the authorized engagement brief\n```\n\n> Adapted from [elementalsouls\u002FClaude-BugHunter](https:\u002F\u002Fgithub.com\u002Felementalsouls\u002FClaude-BugHunter) (MIT); frontmatter, When to Use\u002FLimitations, and safety boundaries added for upstream compliance. Docs-only import: executable helpers, commands, engine, and research assets not bundled.\n\n## Interpretation and evidence limits\n\nThese commands are endpoint-specific sketches, not an automatic detector. Use only controlled test accounts and pre-approved routes\u002Frates; do not recruit or trick real users. Keep cookies, credentials and response bodies in private temporary artifacts rather than console\u002Fchat output; redact evidence and clean it up under the engagement retention rules. Do not follow redirects outside the authorized origin or send credential bodies across an unexpected redirect. The cookie extractor ignores domain\u002Fpath and can select the wrong cookie; validate the exact cookie scope and include any companion cookies. A stable pre\u002Fpost cookie, absent cookie prefix, surviving password-change session or absent `jti` is not independently proof of takeover; establish attacker controllability, expected revocation semantics and real protected data access. Sender-constrained refresh tokens can satisfy RFC 9700 without rotation; apply the appropriate client threat model. IdP and RP sessions can be independent unless single logout is promised. DBSC deliberately allows short-lived cookies: plain-cookie acceptance before expiry does not by itself defeat refresh-time device binding. SameSite is site-based, so sibling subdomains may be same-site; do not infer a general Lax bypass from a named CVE without reproducing its actual preconditions. Statistical tests on hundreds of tokens cannot certify entropy or the RNG. Severity is evidence\u002Fprogram dependent, not fixed by these tables.\n","> **⚠️ AUTHORIZED USE ONLY**\n> This skill is for educational purposes or authorized security assessments only.\n> You must have explicit, written permission from the system owner before using this tool.\n> Misuse of this tool is illegal and strictly prohibited.\n\n> **Mandatory confirmation gate**\n> Before running any command that probes, exploits, changes, persists on, extracts data from, or attempts credential access against a target:\n> 1. Ask the user to state the exact target URL, IP, account, or resource.\n> 2. Ask the user to confirm written authorization and the permitted scope.\n> 3. Show the exact command(s) and explain their expected effect.\n> 4. Wait for explicit confirmation in the current conversation.\n>\n> Without that confirmation, remain read-only and provide defensive guidance only. Prefer a sandbox, disposable VM, or controlled lab.\n\n## Autonomous Testing Priority\n\n**Missing HttpOnly on cookies may be detected by separately configured tooling — focus your active testing on lifecycle invalidation (higher impact).**\n\n**Pattern 1 — Session survives logout (most common high-value finding):**\n1. Login and note the session token\u002Fcookie value\n2. Call the logout endpoint (`\u002Flogout`, `POST \u002Fapi\u002Flogout`, etc.)\n3. Try to use the OLD session token to access a protected resource (`\u002Fapi\u002Fme`, `\u002Fdashboard`, `\u002Faccount`)\n4. If protected data remains accessible with the old token after confirmed logout, investigate the revocation boundary and expected policy\n\n**Pattern 2 — Session not regenerated on login (session fixation):**\n1. GET any page to receive a pre-authentication session token\u002Fcookie\n2. POST valid credentials to the login endpoint\n3. Compare the session token BEFORE and AFTER login\n4. If unchanged, verify an attacker can pre-establish\u002Fcontrol the same authenticated session before claiming fixation\n\n**Pattern 3 — Session survives password change:**\n1. Login → record session A value\n2. Change the password via the account settings endpoint\n3. Replay session A on a protected endpoint\n4. If protected data remains accessible, compare the documented session-revocation policy and attack preconditions before assigning impact\n\n**Content-type:** Login and session endpoints vary — use `application\u002Fjson` for REST APIs, `application\u002Fx-www-form-urlencoded` for traditional web forms. Try both if the first returns an unexpected response.\n\n**Proof:** A protected-resource 200 response (with user data) using a session token that should have been invalidated confirms the finding.\n\n---\n\n# HUNT-SESSION — Session Management\n\n## Crown Jewel Targets\n\nSession fixation leading to admin hijack = Critical. Session surviving a password change = High-to-Critical (persistent ATO from a stolen cookie that the victim believes they revoked by resetting their password).\n\n**Highest-value chains:**\n- **Session fixation** — server accepts a session ID set by the client and does NOT regenerate it on login → attacker pre-plants an ID, victim authenticates, attacker rides the now-authenticated session → persistent ATO.\n- **No invalidation on logout** — old token still works after `\u002Flogout` → theft window never closes.\n- **No invalidation on password \u002F email change** — a stolen session survives the victim's \"I think I was hacked, let me reset\" → persistent ATO. Impact and bounty eligibility depend on the program and demonstrated threat model.\n- **Refresh-token reuse without rotation-detection** — a leaked refresh token may mint access tokens within its enforced lifetime; no reuse-detection means the legitimate user's later refresh does NOT revoke the attacker's branch.\n- **Predictable \u002F low-entropy session ID** — sequential, timestamp- or userId-derived IDs → brute-force or compute other users' sessions.\n- **JWT-as-session with no `exp` \u002F no revocation list** — inspect server-enforced lifetime and revocation; claims alone do not establish permanent access.\n\n---\n\n## Grounding — patterns that shaped each phase\n\nNo invented CVE\u002Freport IDs below. These are the *named, publicly-documented* patterns this skill encodes:\n\n- **Session fixation, login-CSRF, no-regeneration-on-auth** — OWASP WSTG-SESS-03 \u002F WSTG-SESS-01; the classic ACROS \u002F Mitja Kolšek session-fixation paper. Highest-impact variant: fixing the session of an SSO\u002Fadmin user.\n- **Same-parent-domain CSRF reaching session state** — Argo CD **CVE-2024-22424** (attacker-controlled HTML on the same parent domain; inspect the advisory’s content-type\u002FCSRF preconditions). Use this when a session cookie relies on `SameSite=Lax` as its only CSRF defence.\n- **Refresh-token rotation & automatic reuse-detection** — the Auth0\u002FIETF OAuth-Security-BCP model: public-client refresh tokens require rotation with replay detection or sender-constraining; test the implemented protection and replay policy.\n- **Device Bound Session Credentials (DBSC)** — the W3C\u002FChrome DBSC draft binds a session to a TPM\u002Fdevice key. Test the *downgrade*: does the server still accept a non-bound cookie when the DBSC challenge is stripped?\n- **Cookie attribute hardening** — OWASP WSTG-SESS-02; `__Host-`\u002F`__Secure-` prefixes per RFC 6265bis. Missing `HttpOnly` can be a hardening finding; high-impact theft claims require an actual applicable attack path (chain with `hunt-xss`\u002F`hunt-dom`).\n- **Entropy** — NIST SP 800-63B-4 requires session-binding secrets from an approved random bit generator and at least 64 bits in length. Decodable claims alone are not a finding: signed\u002Fencrypted tokens can contain predictable claims while preserving integrity and sufficient unpredictable secrets.\n\nCross-refs: ATO chaining → `hunt-ato`; JWT alg\u002Fkid tampering → `hunt-api-misconfig`; OAuth code\u002Fstate flaws → `hunt-oauth`; CSRF mechanics → `hunt-csrf`; cookie-theft sinks → `hunt-xss` \u002F `hunt-dom`.\n\n---\n\n## Attack Surface Signals\n\n```\nSet-Cookie: session=...            # name varies: sid, JSESSIONID, connect.sid,\n                                   # PHPSESSID, ASP.NET_SessionId, laravel_session, _csrf\n\u002Flogin \u002Flogout \u002Fapi\u002Flogin \u002Foauth\u002Ftoken\n\u002Fauth\u002Frefresh \u002Fapi\u002Ftoken\u002Frefresh   # refresh-token rotation surface\n\u002Faccount\u002Fchange-password \u002Fsettings\u002Femail\n?sid= ?session= in URL             # session-in-URL → leaks via Referer\u002Flogs (finding)\n```\n```\n# Header signals worth flagging immediately:\nSet-Cookie: session=abc; Path=\u002F                 # no HttpOnly\u002FSecure\u002FSameSite\nSet-Cookie: session=abc; SameSite=None          # None without Secure = rejected by modern browsers, but flag\nSet-Cookie: __Host-sess=...; Secure; Path=\u002F     # GOOD — hard to fixate\nSec-Session-Registration: ...                   # DBSC in play → test downgrade\n```\n\n---\n\n## Step-by-Step Hunting Methodology\n\n> **Two-session rule.** Every invalidation\u002Ffixation claim is proven with TWO concrete sessions captured by a real flow — attacker **A** and victim **B** — never with hardcoded placeholder strings. Helpers below capture real cookies from `curl`'s Netscape jar.\n\n```bash\nTARGET=target.com\nJAR_A=$(mktemp); JAR_B=$(mktemp)\n\n# Robust session-cookie extractor: handles #HttpOnly_ prefix lines and any\n# cookie name (sid\u002FJSESSIONID\u002Fconnect.sid\u002FPHPSESSID\u002F...). Prints name=value.\nget_cookie () {  # $1=jar  $2=name-regex (default: common session names)\n  local jar=\"$1\" re=\"${2:-session|sid|sess|JSESSIONID|connect\\.sid|PHPSESSID|laravel_session}\"\n  awk -v re=\"$re\" '\n    \u002F^#HttpOnly_\u002F { sub(\u002F^#HttpOnly_\u002F,\"\"); }   # strip jar HttpOnly marker\n    \u002F^#\u002F { next }                              # skip remaining comments\n    NF>=7 && $6 ~ re { print $6\"=\"$7 }         # field6=name field7=value\n  ' \"$jar\" | tail -1\n}\n```\n\n### Phase 1 — Session Fixation (regeneration-on-login)\n```bash\n# Step 1: grab a pre-auth session the SERVER hands an anonymous client.\ncurl -s -L -c \"$JAR_A\" \"https:\u002F\u002F$TARGET\u002Flogin\" -o \u002Fdev\u002Fnull\nPRE=$(get_cookie \"$JAR_A\"); echo \"pre-auth: $PRE\"\n\n# Step 1b (stronger): can we FORCE an arbitrary ID? attacker-chosen value.\nFIX=\"session=AAAAdeadbeefAAAA\"\n\n# Step 2: authenticate while CARRYING the pre-auth\u002Fforced cookie (reuse same jar).\ncurl -s -L -c \"$JAR_A\" -b \"$JAR_A\" -X POST \"https:\u002F\u002F$TARGET\u002Flogin\" \\\n  -d \"username=attacker@example.com&password=CorrectHorse1\" -o \u002Fdev\u002Fnull\nPOST=$(get_cookie \"$JAR_A\"); echo \"post-auth: $POST\"\n\n# DECISION:\n#  - If $POST == $PRE (value unchanged across the auth boundary) AND that value\n#    now returns authenticated data → FIXATION. The server reused the anon ID.\n#  - If the forced $FIX value is accepted and authenticates → CRITICAL fixation\n#    (attacker controls the ID; no email\u002FXSS needed to plant it).\nAUTH=$(curl -s -L -b \"$JAR_A\" \"https:\u002F\u002F$TARGET\u002Fapi\u002Fme\")\necho \"$AUTH\" | head -c 200\n```\n**FP guard:** a value *change* is not automatically safe — some apps rotate the readable cookie but keep a stable server-side session keyed by a second cookie. Diff the FULL `Set-Cookie` set and confirm the *old* value is genuinely dead (Phase 2). Also confirm `\u002Fapi\u002Fme` returns *your* identity, not a generic 200\u002Flanding page.\n\n### Phase 2 — Invalidation on Logout\n```bash\n# A logs in for real (fresh jar), capture A's live session.\ncurl -s -L -c \"$JAR_A\" -X POST \"https:\u002F\u002F$TARGET\u002Fapi\u002Flogin\" \\\n  -H 'Content-Type: application\u002Fjson' \\\n  -d '{\"email\":\"attacker@example.com\",\"password\":\"CorrectHorse1\"}' -o \u002Fdev\u002Fnull\nA=$(get_cookie \"$JAR_A\"); echo \"A=$A\"\n\n# Baseline: what does an authenticated \u002Fapi\u002Fme look like for A? (capture body, not just code)\nBEFORE=$(curl -s -L -b \"$JAR_A\" \"https:\u002F\u002F$TARGET\u002Fapi\u002Fme\")\n\n# Logout A.\ncurl -s -L -b \"$JAR_A\" -X POST \"https:\u002F\u002F$TARGET\u002Fapi\u002Flogout\" -o \u002Fdev\u002Fnull\n\n# Replay A's OLD cookie value explicitly (do NOT reuse the jar — logout may have\n# overwritten it). Compare body + code against the authenticated baseline.\nAFTER=$(curl -s -L -H \"Cookie: $A\" \"https:\u002F\u002F$TARGET\u002Fapi\u002Fme\" -w '\\n[%{http_code}]')\necho \"AFTER: $AFTER\"\n```\n**FP discipline (mandatory):**\n- Don't trust the status code. A cached\u002Fedge 200 or a generic SPA shell returns 200 for everyone. **Body-diff** `AFTER` against `BEFORE` — the finding is only real if `AFTER` still contains A's *unique identity marker* (email, user-id, CSRF token, account name).\n- Confirm with a **negative control**: a random\u002Fgarbage cookie value must NOT return the same authenticated body. If garbage also yields user data, stop and investigate a possible separate unauthenticated disclosure\u002Fcache flaw; it does not prove session replay.\n- Re-test after a **short delay** and from a **different IP** — some servers lazily expire on next access or pin sessions to IP.\n\n### Phase 3 — Invalidation on Password \u002F Email Change (persistent-ATO core)\n```bash\n# This is the real two-session flow. A = attacker holding a stolen\u002Fold session.\n# B = the victim who changes their password believing it revokes access.\n# (In a real engagement A is a session you legitimately captured for a TEST account\n#  that you also control as B — never use a real third party.)\n\n# 1) Log the TEST account in as session A, capture it.\ncurl -s -L -c \"$JAR_A\" -X POST \"https:\u002F\u002F$TARGET\u002Fapi\u002Flogin\" \\\n  -H 'Content-Type: application\u002Fjson' \\\n  -d '{\"email\":\"victim@example.com\",\"password\":\"OldPass!1\"}' -o \u002Fdev\u002Fnull\nSESSION_A=$(get_cookie \"$JAR_A\"); echo \"SESSION_A=$SESSION_A\"\nBEFORE=$(curl -s -L -H \"Cookie: $SESSION_A\" \"https:\u002F\u002F$TARGET\u002Fapi\u002Fprofile\")\n\n# 2) Log the SAME account in as session B (separate jar = \"the victim's browser\").\ncurl -s -L -c \"$JAR_B\" -X POST \"https:\u002F\u002F$TARGET\u002Fapi\u002Flogin\" \\\n  -H 'Content-Type: application\u002Fjson' \\\n  -d '{\"email\":\"victim@example.com\",\"password\":\"OldPass!1\"}' -o \u002Fdev\u002Fnull\n\n# 3) Victim (session B) changes the password.\ncurl -s -L -b \"$JAR_B\" -X POST \"https:\u002F\u002F$TARGET\u002Fapi\u002Fchange-password\" \\\n  -H 'Content-Type: application\u002Fjson' \\\n  -d '{\"old_password\":\"OldPass!1\",\"new_password\":\"BrandNew!2\"}' -o \u002Fdev\u002Fnull\n\n# 4) THE TEST: replay the OLD SESSION_A captured in step 1.\nAFTER=$(curl -s -L -H \"Cookie: $SESSION_A\" \"https:\u002F\u002F$TARGET\u002Fapi\u002Fprofile\" -w '\\n[%{http_code}]')\necho \"AFTER pw-change: $AFTER\"\n```\n**Decision + FP discipline:**\n- Finding is confirmed only if `AFTER` returns 200 **and** the body still carries the account's unique data (body-diff vs `BEFORE`). A bare 200 on a public\u002FSPA route is not proof.\n- Run the **garbage-cookie negative control** again to prove the endpoint is session-gated.\n- Repeat the identical flow for **email-change** (`\u002Fsettings\u002Femail`) and for **logout-all-devices** — apps frequently invalidate the *acting* session (B) but not *sibling* sessions (A). That sibling-survival is the exact persistent-ATO primitive `hunt-ato` chains.\n- **Severity gate:** if the change-password endpoint also lacks a current-password \u002F MFA step-up (per `hunt-mfa-bypass`), A can pivot from read-only to full takeover → escalate.\n\n### Phase 4 — Cookie Attribute Analysis\n```bash\ncurl -sI -L \"https:\u002F\u002F$TARGET\u002F\" | grep -i '^set-cookie'\n```\n- **HttpOnly** missing → cookie reachable via `document.cookie`. A hardening observation whose severity requires context; a demonstrated XSS\u002FDOM sink can establish a theft chain (`hunt-xss`\u002F`hunt-dom`) — note it, don't report standalone as High.\n- **Secure** missing → cookie sent over cleartext HTTP; pair with `hunt-tls-network` (downgrade\u002FHSTS-gap) for a network-attacker chain.\n- **SameSite** missing\u002F`None` → CSRF reachability; sibling subdomains may be same-site, so Lax alone is not sufficient (Argo CD **CVE-2024-22424** class) → hand to `hunt-csrf`.\n- **`__Host-` \u002F `__Secure-` prefix absent** → record cookie scope and transport hardening; absence alone does not prove overwrite or fixation, and presence does not replace lifecycle validation.\n\n### Phase 5 — Session-ID Entropy\n```bash\n# Collect a LARGE sample (200+) of freshly-issued IDs. -L is required: a 302\n# \u002Flogin often sets the cookie on the redirect target, not the first response.\nN=200; SAMP=$(mktemp)\nfor i in $(seq 1 $N); do\n  J=$(mktemp)\n  curl -s -L -c \"$J\" \"https:\u002F\u002F$TARGET\u002Flogin\" -o \u002Fdev\u002Fnull\n  get_cookie \"$J\" | cut -d= -f2- >> \"$SAMP\"\n  rm -f \"$J\"\ndone\nsort \"$SAMP\" | uniq -d | head            # duplicates need investigation: stable sessions\u002Frate limits\u002Ferror responses can repeat without cross-user reuse\nawk '{print length($0)}' \"$SAMP\" | sort -n | uniq -c   # length distribution\n```\nThen analyse, don't eyeball:\n- **Sequential \u002F monotonic** — `sort -n` the decoded values; a steady +1\u002F+N delta = predictable.\n- **Decodable structure** — `base64 -d` \u002F hex-decode each ID and look for embedded `userId`, unix timestamps, or PIDs.\n- **Bit entropy** — feed the raw bytes to `ent` or `dieharder`; Small samples cannot establish cryptographic entropy; review generation design and the applicable standard. 10 samples is far too few to claim anything — gather hundreds.\n- **FP guard:** a long random-*looking* token is not proof of strength; statistical samples cannot prove cryptographic unpredictability; inspect the generation design where possible. Conversely a short token with high per-char entropy may still be fine — measure, don't count characters.\n\n### Phase 6 — JWT-as-Session\n```bash\nJWT=\"eyJ...\"        # captured from Authorization: Bearer or a cookie\n# Decode header + payload safely (base64url padding fix).\nb64url(){ local s=\"${1\u002F\u002F-\u002F+}\"; s=\"${s\u002F\u002F_\u002F\u002F}\"; printf '%s' \"$s===\" | base64 -d 2>\u002Fdev\u002Fnull; }\nb64url \"$(cut -d. -f1 \u003C\u003C\u003C\"$JWT\")\" | jq .   # header: alg, kid\nb64url \"$(cut -d. -f2 \u003C\u003C\u003C\"$JWT\")\" | jq .   # claims: exp, iat, sub, jti\n```\n- **`exp` missing or years out** → inspect enforced server-side lifetime; claims alone do not prove permanent access. **`jti` missing** does not prove absent revocation: servers can revoke by token hash, session, user version or other state.\n- **Revocation test:** logout, then replay the *same* JWT against `\u002Fapi\u002Fme`. If it still returns the user → tokens are not server-revocable; this is the JWT-session persistence finding. Body-diff to avoid a cached 200.\n- **Tampering (alg\u002Fkid\u002Fkey-confusion) is owned by `hunt-api-misconfig`** — hand off `jwt_tool $JWT -T` \u002F `-X a` there rather than duplicating it.\n\n### Phase 7 — Refresh-Token Rotation & Reuse-Detection\n```bash\n# 1) Obtain a refresh token (login or \u002Foauth\u002Ftoken), then rotate it once.\nRT1=$(curl -s -L -X POST \"https:\u002F\u002F$TARGET\u002Fapi\u002Flogin\" \\\n  -H 'Content-Type: application\u002Fjson' \\\n  -d '{\"email\":\"victim@example.com\",\"password\":\"OldPass!1\"}' | jq -r '.refresh_token')\n\n# 2) Use RT1 to mint a new access token — check the configured protection: rotation or sender-constraining; this example tests rotation only.\nR2=$(curl -s -L -X POST \"https:\u002F\u002F$TARGET\u002Fauth\u002Frefresh\" \\\n  -H 'Content-Type: application\u002Fjson' -d \"{\\\"refresh_token\\\":\\\"$RT1\\\"}\")\nRT2=$(jq -r '.refresh_token' \u003C\u003C\u003C\"$R2\"); echo \"rotated? RT1!=RT2 -> $([ \"$RT1\" != \"$RT2\" ] && echo yes || echo NO-ROTATION)\"\n\n# 3) REUSE-DETECTION test: replay the OLD RT1 again (simulating the leaked token).\nREPLAY=$(curl -s -L -X POST \"https:\u002F\u002F$TARGET\u002Fauth\u002Frefresh\" \\\n  -H 'Content-Type: application\u002Fjson' -d \"{\\\"refresh_token\\\":\\\"$RT1\\\"}\" -w '\\n[%{http_code}]')\necho \"RT1 replay: $REPLAY\"\n\n# 4) Then confirm RT2 was KILLED by the replay (correct BCP behaviour invalidates\n#    the whole family). If RT2 still works after RT1 was replayed → no family-revocation.\ncurl -s -L -X POST \"https:\u002F\u002F$TARGET\u002Fauth\u002Frefresh\" \\\n  -H 'Content-Type: application\u002Fjson' -d \"{\\\"refresh_token\\\":\\\"$RT2\\\"}\" -w '\\n[%{http_code}]'\n```\n**Interpretation:** no rotation requires checking sender-constraining and client type; rotation **without** reuse-detection (RT1 replay still mints tokens, or RT2 survives the replay) = the leaked-token-persistence bug per the OAuth Security BCP. **OOB note:** if you suspect a leaked RT via SSRF\u002Flog\u002FJS-bundle, confirm the token's reach with `hunt-ssrf`\u002F`hunt-source-leak`, not by guessing.\n\n### Phase 8 — OAuth\u002FSSO Session Linkage & DBSC Downgrade\n```bash\n# SSO linkage: after IdP callback, is the app session bound to the IdP session?\n#  - Log out at the IdP only; replay the app session cookie. Still 200 with user\n#    data → app session outlives the IdP session (single-logout gap).\n# DBSC downgrade: if responses carry Sec-Session-Registration \u002F Sec-Session-Id,\n#  strip the device-bound proof header and replay the plain cookie:\ncurl -s -L -H \"Cookie: $A\" \"https:\u002F\u002F$TARGET\u002Fapi\u002Fme\" -w '\\n[%{http_code}]'\n#  If the plain (non-bound) cookie is still accepted → device-binding is advisory,\n#  inspect the refresh challenge and cookie lifetime; acceptance alone does not demonstrate a DBSC downgrade.\n```\nHand OAuth `state`\u002F`redirect_uri`\u002Fcode-injection to `hunt-oauth`; this phase only covers the *session-layer* binding.\n\n---\n\n## Chain Table\n\n| Session finding | Chain to | Impact |\n|----------------|----------|--------|\n| Session fixation (forced `__Host-`-less cookie) | Trick admin\u002FSSO user into authenticating on planted ID | Admin session takeover (Critical) |\n| No logout\u002Fpassword-change invalidation | `hunt-xss`\u002F`hunt-dom` cookie theft → replay surviving session | Persistent ATO past victim's reset |\n| Refresh token, no reuse-detection | Leaked RT (SSRF\u002Flog\u002Fbundle) → access-token minting within the demonstrated lifetime | Persistent ATO, survives password change |\n| `SameSite=Lax` only | Sibling-subdomain top-level nav (CVE-2024-22424 class) → CSRF | State change \u002F login-CSRF → fixation |\n| JWT lifetime\u002Frevocation failure | Demonstrated replay after expected expiry\u002Frevocation | Demonstrated post-logout access within observed lifetime |\n| DBSC downgrade accepted | Steal plain cookie despite device-binding | Defeats the only theft mitigation |\n| Predictable ID | Compute\u002Fbrute another user's session | Cross-user ATO |\n\n---\n\n## Validation (house FP discipline)\n\nBefore claiming ANY session finding:\n- **Two real sessions, not placeholders** — every fixation\u002Finvalidation claim uses A and B captured by the `curl` flows above.\n- **Body-diff, never status-only** — a 200 means nothing without the account's unique identity marker present in the body, diffed against the authenticated baseline.\n- **Negative control** — a garbage\u002Frandom cookie must FAIL where your \"surviving\" cookie succeeds; otherwise investigate a separate access-control\u002Fcache issue rather than asserting session replay.\n- **Cache\u002Fedge check** — re-request with a cache-buster and from a second IP; rule out an edge-cached or IP-pinned 200.\n- **OOB for theft chains** — when the impact depends on exfiltrating a cookie\u002Ftoken (XSS, SSRF, log leak), confirm receipt out-of-band (Collaborator) rather than asserting it.\n- **Static-vs-state** — `HttpOnly`\u002F`Secure`\u002F`SameSite` absence is a *policy* observation; only report as High once paired with a real exploit primitive (XSS, network-MITM, CSRF). Standalone attribute gaps are Low\u002FInformational.\n\n**Severity:**\n- Session fixation → admin\u002FSSO takeover: **Critical**\n- No invalidation on password\u002Femail change, or refresh-token reuse without detection: **High → Critical** (escalate if MFA\u002Fstep-up also absent)\n- Predictable\u002Fduplicate session ID: **High**\n- No invalidation on logout: **Medium → High** (depends on theft vector)\n- Missing `HttpOnly`\u002F`SameSite` standalone: **Low\u002FInformational** until chained\n\n## When to Use\n\n- You have explicit, written authorization to assess the target in scope, and the task matches this skill's vulnerability class or technique within a bug-bounty or penetration-test engagement.\n- You need the recon, exploitation, or validation workflow described below — executed strictly inside the approved scope.\n\n## Limitations\n\n- Authorized scope only: the confirmation gate above is mandatory before any probing, exploitation, or credential-access command.\n- Docs-only import: upstream helper scripts, commands, engine, and research assets are not bundled; reinstall tooling from the source repo when needed.\n- Validate every finding (see `triage-validation`) before reporting; report via `report-writing`. Prefer a sandbox, disposable VM, or controlled lab.\n\n### Example\n\n```bash\n# Read-only first step; confirm scope before anything active.\ncat scope.txt  # target list from the authorized engagement brief\n```\n\n> Adapted from [elementalsouls\u002FClaude-BugHunter](https:\u002F\u002Fgithub.com\u002Felementalsouls\u002FClaude-BugHunter) (MIT); frontmatter, When to Use\u002FLimitations, and safety boundaries added for upstream compliance. Docs-only import: executable helpers, commands, engine, and research assets not bundled.\n\n## Interpretation and evidence limits\n\nThese commands are endpoint-specific sketches, not an automatic detector. Use only controlled test accounts and pre-approved routes\u002Frates; do not recruit or trick real users. Keep cookies, credentials and response bodies in private temporary artifacts rather than console\u002Fchat output; redact evidence and clean it up under the engagement retention rules. Do not follow redirects outside the authorized origin or send credential bodies across an unexpected redirect. The cookie extractor ignores domain\u002Fpath and can select the wrong cookie; validate the exact cookie scope and include any companion cookies. A stable pre\u002Fpost cookie, absent cookie prefix, surviving password-change session or absent `jti` is not independently proof of takeover; establish attacker controllability, expected revocation semantics and real protected data access. Sender-constrained refresh tokens can satisfy RFC 9700 without rotation; apply the appropriate client threat model. IdP and RP sessions can be independent unless single logout is promised. DBSC deliberately allows short-lived cookies: plain-cookie acceptance before expiry does not by itself defeat refresh-time device binding. SameSite is site-based, so sibling subdomains may be same-site; do not infer a general Lax bypass from a named CVE without reproducing its actual preconditions. Statistical tests on hundreds of tokens cannot certify entropy or the RNG. Severity is evidence\u002Fprogram dependent, not fixed by these tables.\n",{"name":5,"risk":27,"source":45,"license":14,"sources":46,"category":39,"date_added":47,"description":7,"source_repo":48,"source_type":32,"report_count":49,"compatibility":50,"license_source":51},"https:\u002F\u002Fgithub.com\u002Felementalsouls\u002FClaude-BugHunter","hackerone_public, portswigger_research, owasp_wstg","2026-09-20","elementalsouls\u002FClaude-BugHunter",18,"Requires explicit written authorization for a target scope plus the relevant testing tools for this technique. Docs-only; helper scripts and commands not bundled.","https:\u002F\u002Fgithub.com\u002Felementalsouls\u002FClaude-BugHunter\u002Fblob\u002Fmain\u002FLICENSE","7bf2279c8a65758319526a721d5c4b75683aec9c","skills\u002Fantigravity-hunt-session",3,"https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections","https:\u002F\u002Fgithub.com\u002Fboisenoise","2026-11-14 14:18:11",{"source":8,"skillName":5,"commands":59,"prompt":69,"zipAvailable":70},[60,63,66],{"tool":61,"command":62},"npx","npx skills add boisenoise\u002Fskills-collections --skill hunt-session",{"tool":64,"command":65},"bunx","bunx skills add boisenoise\u002Fskills-collections --skill hunt-session",{"tool":67,"command":68},"pnpm","pnpm dlx skills add boisenoise\u002Fskills-collections --skill hunt-session","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-hunt-session\u002FSKILL.md",true,[],[73,82,90,99,107,115],{"skillNo":74,"name":75,"nameZh":6,"description":76,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":77,"sourceHtmlUrl":78,"categories":79,"keywords":80,"publishedAt":81},"01M7B6HREHB53EHGGVZND7DDXN","scrapely-scrape","Collect web data with ready-made Scrape.ly scrapers: Google Maps places, Amazon products, LinkedIn jobs, reviews, social posts. Use when the user wants structured data from a site.","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-scrapely-scrape\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-scrapely-scrape\u002FSKILL.md",[],[],"2026-11-15 14:19:17",{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":86,"sourceHtmlUrl":87,"categories":88,"keywords":89,"publishedAt":81},"01M7B6GDNNN4HE662KA6KPF7GW","lumify-odds","Lumify's hosted sports MCP\u002FREST API for sportsbook odds, line-movement history, public betting splits, and player props across MLB, NFL, NBA, NHL, soccer, tennis, NCAAF, NCAAB. Read-only market data.","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-lumify-odds\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-lumify-odds\u002FSKILL.md",[],[],{"skillNo":91,"name":92,"nameZh":6,"description":93,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":94,"sourceHtmlUrl":95,"categories":96,"keywords":97,"publishedAt":98},"01M743PZMJW2GEKG5J199GPSK7","sync-lipsync","Lip-sync an existing video of a real person to new audio or a typed script with sync. labs through its hosted MCP server, quoting the cost and waiting for approval first.","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-sync-lipsync\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-sync-lipsync\u002FSKILL.md",[],[],"2026-11-11 15:11:14",{"skillNo":100,"name":101,"nameZh":6,"description":102,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":103,"sourceHtmlUrl":104,"categories":105,"keywords":106,"publishedAt":98},"01M743MMN3CKTJVNRSZMB684E5","music-for-robots","Optional music-inspired creative exercise for multimodal agents. Ingests an unquantized acoustic MP3 composition by Michael Luchtan (Music For Robots) into a private temporary directory, analyzing microtiming and texture to inspire creative writing, brainstorming, or technical tasks.","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-music-for-robots\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-music-for-robots\u002FSKILL.md",[],[],{"skillNo":108,"name":109,"nameZh":6,"description":110,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":111,"sourceHtmlUrl":112,"categories":113,"keywords":114,"publishedAt":98},"01M743KC2GN5WE11BSTWSSWD8B","imagera-media","Generate or edit images, video clips, voiceovers and music through the hosted Imagera MCP server, quoting the credit cost and getting approval before each paid call.","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-imagera-media\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-imagera-media\u002FSKILL.md",[],[],{"skillNo":116,"name":117,"nameZh":6,"description":118,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":119,"sourceHtmlUrl":120,"categories":121,"keywords":122,"publishedAt":98},"01M743HDJNZQA8A4VT68NWGWQJ","deja-history","Search this machine's past AI coding sessions across Claude Code, Codex, Cursor, Gemini CLI and thirty-nine other agents before editing, debugging, or denying something exists.","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-deja-history\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-deja-history\u002FSKILL.md",[],[]]