m43

Superagent skill m43 — CTF Web Exploitation

SKILL.md

GitHub

m43 — CTF Web Exploitation

Load ONLY when: CTF web, web challenge, SQLi, SSTI, SSRF, IDOR, XXE, deserialization, JWT, prototype pollution, race condition, web exploit, dispatched by m32 web


SCOPE (baca dulu)

Sub-skill kategori web buat CTF/bug-bounty. Cuma jalan setelah m32 + scope_guard.py konfirmasi target in-scope (whitehat line). Out-of-scope → R9 gate, tahan. Eksploitasi jalan di dalam Docker sandbox (tools/ctf/sandbox).

TOOLBOX (di sandbox)

  • Intercept: mitmproxy/Burp · Content discovery: feroxbuster/ffuf/gobuster
  • Vuln scan ringan: nuclei (verify manual) · Injection: sqlmap (--batch setelah konfirmasi manual)
  • JWT: jwt_tool · Custom: Python requests/httpx (mayoritas solve = script bespoke)

RECON (wajib sebelum exploit)

curl -sI "$TARGET"                 # header, cookie, CSP
whatweb "$TARGET" 2>/dev/null
feroxbuster -u "$TARGET" -w raft-medium-words.txt -x php,txt,bak,zip -q
curl -s "$TARGET/robots.txt"; curl -s "$TARGET/.git/HEAD"

Kalau source dikasih (app.zip) → baca dulu, grep sink sebelum fuzz:

grep -rniE "system|exec|eval|pickle|yaml.load|render_template_string|jwt|md5|secret|query\(" .

PLAYBOOK (urut by frekuensi CTF)

  • SQLi — bypass ' OR 1=1-- -, UNION extraction, blind boolean/time. Cari tabel flag.
  • SSTI — test {{7*7}}/${7*7}. Jinja2 RCE: {{ cycler.__init__.__globals__.os.popen('cat /flag').read() }}.
  • SSRF — internal svc, cloud metadata 169.254.169.254, file://, gopher://.
  • IDOR / broken access — iterate ID, swap JWT sub, mass-assign role=admin. Cek duluan di app multi-user.
  • JWT — alg:none, weak HMAC (crack jwt_tool+rockyou), kid injection, RS256→HS256 confusion.
  • XXE — <!ENTITY x SYSTEM "file:///flag">; OOB/param XXE kalau blind.
  • Deserialization — PHP unserialize, Python pickle, Java/ysoserial, Node node-serialize.
  • Prototype pollution (Node) — __proto__ di JSON body → gadget RCE/auth bypass.
  • Race condition — limit-overrun (coupon/balance/one-time token), fire N request paralel.

SCOPE & DELEGATION

Butuh m43 Delegasi
Konfirmasi target authorized — m32 + tools/ctf/scope_guard.py
HTTP recon/script playbook m6 (httpx) + m11
Validasi flag — tools/ctf/flag_validator.py
Run full-auto swarm — tools/ctf/run.py (coordinator)
Writeup reward — m8 (PDF) / m26 (spec)

SAFETY RAILS

  • Cuma target in-scope. Simpan leak (cookie/token/cred/host internal) ke findings.json, jangan salahgunakan.
  • Flag wajib lewat flag_validator.py (full-match, anti-placeholder). Jangan submit dari m43 — balik ke m32, HITL submit.
  • secret_tripwire aktif di output.

🔧 Upgrade: wire ke coordinator solver.py system prompt biar kategori web auto-dispatch.