$npx -y skills add hypnguyen1209/offensive-claude --skill exploit-developmentUse when turning a memory-corruption bug into a working PoC — stack/ROP, glibc heap & FSOP, format strings, browser/JIT type confusion & UAF, Linux/Windows kernel LPE against ASLR/DEP/CFG/CET/V8-Sandbox
| 1 | # Exploit Development |
| 2 | |
| 3 | End-to-end weaponization: turn a confirmed bug class into a reliable, version-pinned PoC, then a primitive chain (leak -> R/W -> control flow), against current mitigations. Every cluster pairs the offensive path with detection telemetry and OPSEC. |
| 4 | |
| 5 | ## When to Activate |
| 6 | |
| 7 | - A confirmed vulnerability needs a working, reliable PoC (>=90% success target). |
| 8 | - Userland binary exploitation: stack overflow, heap (UAF/overflow/double-free), format string. |
| 9 | - Defeating modern mitigations: ASLR/PIE, NX/DEP, stack canaries, Full RELRO, CFG, Intel CET shadow stack, V8 Sandbox/pointer compression. |
| 10 | - Browser/JIT engine exploitation (V8 type confusion, addrof/fakeobj, WASM jump-table pivot). |
| 11 | - Local privilege escalation via Linux/Windows kernel memory corruption. |
| 12 | - Converting a crash into a stable read/write/execute primitive chain. |
| 13 | |
| 14 | ## Technique Map |
| 15 | |
| 16 | | Technique | ATT&CK | CWE | Reference | Script | |
| 17 | |-----------|--------|-----|-----------|--------| |
| 18 | | Stack overflow -> ret2libc/ROP | T1203 | CWE-121 | references/stack-rop-mitigations.md | scripts/offset_finder.py | |
| 19 | | ret2csu / SROP / stack pivot | T1203 | CWE-121 | references/stack-rop-mitigations.md | scripts/rop_autochain.py | |
| 20 | | ret2dlresolve (leakless) | T1203 | CWE-121 | references/stack-rop-mitigations.md | scripts/rop_autochain.py | |
| 21 | | CET/CFG-aware control-flow hijack | T1203 | CWE-1419 | references/stack-rop-mitigations.md | scripts/rop_autochain.py | |
| 22 | | tcache/fastbin poisoning + safe-linking | T1203 | CWE-416 | references/heap-glibc-fsop.md | scripts/safe_linking.py | |
| 23 | | House of Botcake / Einherjar / Apple2 | T1203 | CWE-415 | references/heap-glibc-fsop.md | scripts/heap_fsop.py | |
| 24 | | FSOP (stdout leak, House of Apple 2) | T1203 | CWE-787 | references/heap-glibc-fsop.md | scripts/heap_fsop.py | |
| 25 | | Format string leak + arbitrary write | T1203 | CWE-134 | references/format-string-leaks.md | scripts/fmtstr_leak.py | |
| 26 | | V8 type confusion -> addrof/fakeobj | T1203 | CWE-843 | references/browser-jit-uaf.md | scripts/v8_primitives.js | |
| 27 | | V8 Sandbox escape (WASM jump table) | T1203 | CWE-843 | references/browser-jit-uaf.md | scripts/v8_primitives.js | |
| 28 | | UAF heap-spray reclaim | T1203 | CWE-416 | references/browser-jit-uaf.md | scripts/v8_primitives.js | |
| 29 | | Linux kernel UAF -> cross-cache | T1068 | CWE-416 | references/kernel-exploitation.md | scripts/kernel_lpe_skeleton.c | |
| 30 | | Dirty Pagetable / Pagedirectory | T1068 | CWE-416 | references/kernel-exploitation.md | scripts/kernel_lpe_skeleton.c | |
| 31 | | msg_msg infoleak / spray | T1068 | CWE-125 | references/kernel-exploitation.md | scripts/kernel_lpe_skeleton.c | |
| 32 | | Windows PreviousMode / I/O Ring R/W | T1068 | CWE-787 | references/kernel-exploitation.md | scripts/kernel_lpe_skeleton.c | |
| 33 | | Empirical mitigation matrix (build witness under N profiles) | T1203 | CWE-693 | references/exploit-feasibility.md | scripts/feasibility_profile.py | |
| 34 | | Cached context + blocked-technique gate for /exploit | T1203 | CWE-693 | references/exploit-feasibility.md | scripts/exploit_context.py | |
| 35 | |
| 36 | ## Quick Start |
| 37 | |
| 38 | ```bash |
| 39 | # 0. Fingerprint target + libc (pin every version) |
| 40 | file ./target; pwn checksec ./target |
| 41 | strings -a libc.so.6 | grep -m1 'release version' # exact glibc build |
| 42 | patchelf --set-interpreter ./ld.so --replace-needed libc.so.6 ./libc.so.6 ./target |
| 43 | |
| 44 | # 1. Crash + offset (cyclic) — see scripts/offset_finder.py |
| 45 | python3 scripts/offset_finder.py ./target # auto pattern_create/offset |
| 46 | |
| 47 | # 2. Gadgets + one_gadget |
| 48 | ROPgadget --binary ./libc.so.6 > gadgets.txt |
| 49 | ropper -f ./libc.so.6 --search 'pop rdi; ret' |
| 50 | one_gadget ./libc.so.6 |
| 51 | |
| 52 | # 3. Build chain (leak -> base |