Overview
The/exploit command generates working proof-of-concept exploit code for identified vulnerabilities. It analyzes findings and creates executable exploits in Python, C, or using pwntools.
Syntax
Parameters
Absolute path to the code repository
SARIF file from previous scan (optional if scanning first)
Skip patch generation (exploit generation only)
Maximum number of exploits to generate
Prerequisites
MANDATORY: Run Feasibility Analysis First
Why Not Use checksec/readelf?
The feasibility analysis provides information that checksec does NOT:- Empirical %n verification (does it actually work on this glibc?)
- Null byte constraints from input handlers (strcpy can’t write full addresses)
- ROP gadget quality (are there enough gadgets to build a chain?)
- Alternative write targets when GOT/hooks are blocked
- Honest difficulty assessment based on all constraints combined
Context Persistence
The analysis survives context compaction. After long conversations:Workflow
Step 1: Find Vulnerabilities
Step 2: Run Feasibility Analysis
Step 3: Generate Exploits
Mitigation Analysis
The feasibility analysis provides authoritative information about what works:Check the Verdict
- Likely exploitable: Clear path to code execution
- Difficult: Primitives exist but hard to chain
- Unlikely: No known path with current mitigations
Read the Chain Breaks
These tell you exactly which techniques are blocked:- “%n format specifier disabled” → Don’t suggest format string writes
- “Full RELRO” → Don’t suggest GOT overwrites OR .fini_array overwrites
- “hooks removed” → Don’t suggest __malloc_hook/__free_hook overwrites
Follow Suggested Paths
- Check “alternative_targets” for viable write targets
- Read “what_would_help” for next steps
- Use “Reality check” for honest assessment
Full RELRO blocks BOTH GOT and .fini_array. Standard linker scripts place them in the same RELRO segment. Don’t waste time on .fini_array writes when Full RELRO is enabled.
Output Structure
When presenting exploitation strategy:- State the verdict from mitigation analysis
- List what IS possible (“What you CAN still do”)
- List what is NOT possible (chain breaks)
- Propose a path using only viable techniques
- Always offer next steps (see below)
Always Offer Next Steps
For “Difficult” Verdict:
- Try alternative targets from the analysis (verify they’re actually viable)
- Focus on info leaks only (useful for chaining with other vulns)
- Run in older environment (Docker with Ubuntu 20.04)
- Move on to other targets
For “Unlikely” Verdict:
- Run in older environment (Docker with Ubuntu 20.04/22.04)
- Look for other vulnerability classes in the binary
- Focus on DoS/crash demonstration only
- Move on to other targets
Examples
Generate Exploits for All Findings
Generate Limited Exploits
From Existing SARIF
Generated Exploit Types
Python Exploits
C Exploits
Pwntools Exploits
Output Directory
Use Cases
- Security research and analysis
- Proof-of-concept development
- Vulnerability validation
- Red team operations
- Bug bounty submissions
- Security training and education
Related Commands
/scan
Find vulnerabilities to exploit
/validate
Validate exploitability before generating exploits
/patch
Generate patches instead of exploits
/agentic
Full workflow including exploit generation
Ethical Usage
Notes
- Does NOT generate patches (use
/patchfor that) - Exploits are saved to
out/*/exploits/ - Nothing is applied to your code
- All exploits require manual review
- Run feasibility analysis first (mandatory)
- Follow mitigation analysis recommendations
- For authorized testing only