hypnguyen1209/offensive-claude / skills/exploit-development
exploit-development
VerifiedUse 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
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 9.1 KB |
| references/browser-jit-uaf.md | markdown | 8.3 KB |
| references/exploit-feasibility.md | markdown | 3.2 KB |
| references/format-string-leaks.md | markdown | 7.2 KB |
| references/heap-glibc-fsop.md | markdown | 9.3 KB |
| references/kernel-exploitation.md | markdown | 10.4 KB |
| references/stack-rop-mitigations.md | markdown | 9.7 KB |
| scripts/exploit_context.py | script | 10.5 KB |
| scripts/feasibility_profile.py | script | 9.3 KB |
| scripts/fmtstr_leak.py | script | 3.5 KB |
| scripts/heap_fsop.py | script | 4.5 KB |
| scripts/kernel_lpe_skeleton.c | other | 6.5 KB |
| scripts/offset_finder.py | script | 3.6 KB |
| scripts/rop_autochain.py | script | 4.1 KB |
| scripts/safe_linking.py | script | 2.5 KB |
| scripts/v8_primitives.js | script | 4.7 KB |
references/exploit-feasibility.md
View on GitHub# Exploit Feasibility — empirical mitigation matrix, not static guesswork
Before committing to an exploitation strategy, prove which techniques the target actually permits.
Static reasoning ("checksec says NX, so no shellcode") is a starting point; rebuilding the crash
witness under several mitigation profiles and recording which still fire is **artefact-grade** and is
what `feasibility_profile.py` + `exploit_context.py` produce. The PoC is then forbidden from using a
technique the empirical map marks blocked. Runs in the binary-analysis devcontainer (`.devcontainer/`).
## Flow
```
confirmed memory-corruption finding (with a reachability artifact - see coverage-reachability.md)
│
▼
exploit_context.py build --target ./vuln # cache checksec/libc/arch ONCE (reused per attempt)
│
▼
feasibility_profile.py run --build 'gcc {cflags} -o w witness.c' --witness './w poc' \
--context exploit-context.json # build+replay under N profiles -> empirical map
│
▼
exploit_context.py check --context exploit-context.json <technique> # gate: exit 3 == blocked
```
## Profiles (feasibility_profile.PROFILES)
| Profile | Intent | Key CFLAGS |
|---------|--------|-----------|
| `permissive` | does the bug fire with everything off? | `-fno-stack-protector -z execstack -no-pie -Wl,-z,norelro` |
| `distro` | typical shipped binary | `-D_FORTIFY_SOURCE=2 -fstack-protector-strong -fPIE -pie -Wl,-z,relro` |
| `hardened` | maximally mitigated | `-D_FORTIFY_SOURCE=3 -fstack-protector-all -pie -Wl,-z,relro,-z,now -fcf-protection=full` |
| `asan` | is it a *real* memory bug? | `-fsanitize=address -fno-omit-frame-pointer` |
The **realistic exploitation context** is the strictest standard profile under which the witness still
crashes. The techniques blocked by that profile's mitigations (`TECHNIQUE_BLOCKS` in
`exploit_context.py`) become off-limits. If the bug reproduces under no standard profile, the map
falls back to `distro` mitigations (conservative — blocks more, never fewer).
## Technique-block map (conservative; only provably-prevented pairs)
| Mitigation present | Blocks |
|--------------------|--------|
| NX | `ret2shellcode`, `stack_shellcode`, `exec_stack/heap` |
| Stack canary | `naive_stack_overflow`, `seh_overwrite_naive` |
| PIE | `fixed_address_rop`, `static_got_overwrite` |
| Full RELRO | `got_overwrite` |
| FORTIFY | `unbounded_strcpy_overflow` |
| CET | `backward_edge_rop_unsafe`, `ret2libc_naive` |
A technique is **allowed** unless a present mitigation blocks it *or* the empirical map lists it as
blocked. "Allowed" still means "verify empirically" — it is not a guarantee the technique works.
## Discipline
- The empirical map **overrides** static reasoning: `assert_allowed()` rejects an empirically-blocked
technique even if the static mitigations look permissive.
- Severity uses the demonstrated-vs-inherent + feasibility ladder
(`skills/references/finding-evidence-standards.md`): an empirically-blocked code-exec path caps the
*demonstrated* severity even when the *inherent* ceiling is RCE.
- This never auto-runs an exploit: building/replaying a crash *witness* under profiles is analysis;
any actual exploitation stays behind `action_guard`.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 197k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |