Fuzz Master
Overview
Fuzzing throws unexpected, malformed data at software to make it crash — revealing memory corruption, unhandled exceptions, and logic flaws that static analysis and automated scanners miss. This skill covers coverage-guided binary fuzzing (AFL++, LibFuzzer), API fuzzing (RESTler, ffuf), protocol fuzzing (Boofuzz, Scapy), and file-format fuzzing (Radamsa) on a Kali Linux workstation with an RTX 2060 SUPER for parallel multi-instance campaigns.
You are looking for buffer overflows, use-after-free, integer overflows, null-pointer dereferences, infinite loops, and assertion failures — the bugs that pay $10K-$100K on ZDI and make vendors panic-fix.
When to Use
- "Automated scanners found nothing" / "Vulnerability scanners missed it"
- "Test custom/proprietary protocols" / "Reverse engineer protocol and fuzz it"
- "Find buffer overflows, crashes, memory corruption" / "Hunt zero-days"
- "Test file parsers, image decoders, protocol implementations"
- "API endpoint parameter discovery beyond schema"
- "Coverage-guided fuzzing campaign" / "Crash triage and root-cause analysis"
When NOT to Use
- When automated scanner or manual testing already found the bug
- When the target is a black-box binary you cannot instrument with coverage feedback
- When you lack authorization — fuzzing can crash production systems and corrupt databases
- When the client expects "no false positives" — fuzzing generates noise; triage is part of the deliverable
- For pure informational disclosure without exploit potential
Money-Making Overview
Target Buyer: Software vendors (pre-release QA), DevOps/SRE teams (API security), bug bounty hunters, ISVs shipping parsers/protocol stacks.
How You Make Money:
- API Fuzzing — RESTler/ffuf campaigns against client API endpoints. Crash reports with reproduction payloads. ($500-$2K/job)
- Binary Fuzzing — Closed-source binaries (parsers, decoders, daemons) with AFL++ on RTX 2060 SUPER for parallel campaigns. Crashing inputs + root cause. ($1K-$5K/job)
- Protocol Fuzzing — Reverse-engineer custom protocols (IoT, SCADA, gaming, financial) with Boofuzz/Scapy. Wire-format parser bugs. ($2K-$5K/job)
- Fuzzing-as-a-Service — Continuous fuzzing in CI/CD. Weekly crash reports, coverage trends, regression detection. ($2K-$5K/mo retainer)
Service Tiers
| Tier |
Price |
What They Get |
| Basic — API Fuzz |
$750 |
Single endpoint fuzzed with 4 wordlists (150K+ payloads), crash report with reproducible HTTP requests, coverage heatmap |
| Pro — Binary Fuzz |
$2,500 |
Binary instrumented with AFL++, 24-72hr campaign on 4 parallel instances (RTX 2060 SUPER), 10+ unique crashes triaged, root-cause analysis, PoC inputs |
| Enterprise — Retainer |
$3,500/mo |
Monthly 7-day campaign, CI/CD integration, real-time crash alerts, regression detection, coverage trend reports, Slack notifications |
Expected First Dollar: 2-3 weeks (API fuzzing: one spec = one campaign = one report).
First Action in 60 Minutes — API Fuzzing Pipeline
This script runs a multi-tool API fuzzing campaign combining ffuf (high-speed discovery) with custom payload generation for parameter tampering, type confusion, boundary violations, and injection.
#!/bin/bash
# api-fuzz-campaign.sh — Usage: ./api-fuzz-campaign.sh <base_url> [endpoint] [outdir]
# Example: ./api-fuzz-campaign.sh https://api.target.com/v1 /users/validate ./fuzz-output
set -euo pipefail
BASE_URL="${1:?Usage: $0 <base_url> [endpoint] [outdir]}"; ENDPOINT="${2:-/api/v1/process}"
OUTDIR="${3:-./fuzz-campaign-$(date +%Y%m%d_%H%M%S)}"; mkdir -p "$OUTDIR"/{payloads,results,crash-reports}
# Phase 1: Generate payload wordlists
echo "[*] Generating payload wordlists..."
cat > "$OUTDIR/payloads/type-confusion.txt" << 'EOF'
null undefined NaN Infinity -Infinity true false [] {} [1] {"a":1}
"" " " "\n" "\t" "\0" "\x00\x00\x00\x00" "\xff\xff\xff\xff"
1 0 -1 2147483647 -2147483648 2147483648 9223372036854775807
1.0 0.0 -0.0 1e-300 1e300 1e99999
EOF
cat > "$OUTDIR/payloads/boundary.txt" << 'EOF'
$(python3 -c "print('A'*10000)") 2>/dev/null
%00 %2500 %252500 ..%252f..%252f ..%c0%ae%c0%ae/
..%ef%bc%8f ..%e0%80%af///..//..//
EOF
cat > "$OUTDIR/payloads/fuzz-injection.txt" << 'EOF'
' OR '1'='1 {$gt: ''} {$ne: ''} [$ne]
'; system('id');-- $(id) `id` | id ; id &
' UNION SELECT NULL -- ' WAITFOR DELAY '0:0:10' --
EOF
cat > "$OUTDIR/payloads/path-traversal.txt" << 'EOF'
../../../etc/passwd ..\..\..\windows\win.ini
....//....//....//etc/passwd file:///etc/passwd
../../../../../../proc/self/maps
EOF
# Phase 2: ffuf campaigns — header, parameter, POST body fuzzing
echo "[*] Running ffuf campaigns..."
ffuf -u "$BASE_URL$ENDPOINT" -H "Content-Type: FUZZ" \
-w "$OUTDIR/payloads/type-confusion.txt" -mc all -ac \
-o "$OUTDIR/results/ffuf-content-type.json" -of json -s 2>&1 | tail -3 || true
ffuf -u "$BASE_URL$ENDPOINT?param=FUZZ" \
-w "$OUTDIR/payloads/boundary.txt" -mc all -ac \
-o "$OUTDIR/results/ffuf-params.json" -of json -s 2>&1 | tail -3 || true
ffuf -u "$BASE_URL$ENDPOINT" -X POST -H "Content-Type: application/json" \
-d '{"input":"FUZZ"}' -w "$OUTDIR/payloads/fuzz-injection.txt" -mc all -ac \
-o "$OUTDIR/results/ffuf-post.json" -of json -s 2>&1 | tail -3 || true
# Phase 3: RESTler setup (generate minimal OpenAPI spec if RESTler not available)
which restler &>/dev/null && echo "[+] RESTler found" || {
echo "[!] RESTler not found — generating OpenAPI spec for manual use"
}
python3 -c "
import json
spec = {'openapi':'3.0.0','info':{'title':'Fuzz Target','version':'1.0'},
'paths':{'$ENDPOINT':{
'get':{'parameters':[{'name':'param','in':'query','schema':{'type':'string'}}],
'responses':{'200':{'description':'OK'}}},
'post':{'requestBody':{'content':{'application/json':{'schema':{
'type':'object','properties':{'input':{'type':'string'}}}}}},
'responses':{'200':{'description':'OK'}}}}}}
with open('$OUTDIR/payloads/openapi-spec.json','w') as f: json.dump(spec,f,indent=2)
print('[+] OpenAPI spec at $OUTDIR/payloads/openapi-spec.json')
"
# Phase 4: Crash detection & response analysis
echo "[*] Analyzing responses for crash indicators..."
python3 << 'PYEOF'
import json, os, sys, re
from pathlib import Path
outdir = Path(sys.argv[1] if len(sys.argv)>1 else os.environ.get('OUTDIR','.'))
findings = []
re_sev = {'5xx': (r'^5\d{2}$','CRITICAL','Server error — possible crash'),
'timeout': (r'.*','HIGH','Connection timeout — possible crash'),
'large_resp': (r'.*','HIGH','Response >50KB — possible info leak')}
for f in sorted((outdir/'results').glob('ffuf-*.json')):
try:
data = json.loads(f.read_text())
for r in data.get('results',[]):
status,length,url,payload = str(r.get('status','')), r.get('length',0), r.get('url',''), r.get('input',{}).get('FUZZ','')
if status.startswith('5'): findings.append({'severity':'CRITICAL','status':status,'url':url,'payload':payload[:80],'reason':'Server error — possible unhandled exception'})
elif length>50000: findings.append({'severity':'HIGH','status':status,'url':url,'length':length,'reason':f'Unusually large response ({length}B)'})
elif status=='000': findings.append({'severity':'HIGH','status':status,'url':url,'reason':'Connection failed — possible crash'})
except: pass
report = {'target':os.environ.get('BASE_URL',''),'findings':findings,'total':len(findings)}
(outdir/'crash-reports'/'crash-report.json').write_text(json.dumps(report,indent=2))
print(f'[+] Report: {len(findings)} findings ({sum(1 for f in findings if f["severity"]=="CRITICAL")} critical)')
PYEOF
echo "╔══════════════════════════════════════════════╗"
echo "║ Fuzz campaign complete: $OUTDIR"
echo "╚══════════════════════════════════════════════╝"
echo "Review crash-report.json, then try:"
echo " afl-fuzz -i corpus -o findings -- ./target @@"
echo " boofuzz --target host:port --proto tcp"
What This Delivers in 60 Minutes
| Phase |
Tool |
Duration |
Output |
| Payload generation |
heredoc + python3 |
5 min |
4 wordlists (type confusion, boundary, injection, path traversal) |
| Content discovery |
ffuf (3 runs) |
15-20 min |
JSON results per attack surface |
| RESTler setup |
python3 |
10 min |
OpenAPI spec for deeper fuzzing |
| Crash triage |
Python analyzer |
5 min |
Structured crash report with severity scoring |
Deliverable Format
Fuzzing Campaign Report
┌───────────────────────────────────────────────────────────────────┐
│ FUZZING CAMPAIGN REPORT │
│ [Client Name] — [Target] │
└───────────────────────────────────────────────────────────────────┘
1. EXECUTIVE SUMMARY
Campaign type: API / Binary / Protocol
Target: [URL / binary / protocol]
Duration: [hours]
Total inputs: [count]
Unique crashes: [count] ([CRITICAL/HIGH/MEDIUM/INFO])
Coverage gain: [% baseline → % final]
2. CRASH INVENTORY
┌──────┬───────────┬──────────────┬───────────────┬──────────┐
│ ID │ Severity │ Location │ Type │ Reproduc │
├──────┼───────────┼──────────────┼───────────────┼──────────┤
│ CR1 │ CRITICAL │ parse_input()│ Null deref │ 100% │
│ CR2 │ HIGH │ decode_msg() │ Buffer OOB │ 80% │
│ CR3 │ MEDIUM │ validate() │ Assert fail │ 100% │
└──────┴───────────┴──────────────┴───────────────┴──────────┘
3. ROOT-CAUSE ANALYSIS (per crash)
CR1 — Null pointer dereference in parse_input()
Payload: {"value": null, "meta": {"tags": []}}
Stack: parse_input:284 → lookup_field:92 → strlen(NULL)
Root cause: Missing null check on value field
Remediation: Add !value.isNull() guard at line 283
CVSS v3.1: 7.5 (AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H)
4. COVERAGE ANALYSIS
Baseline: ████████████████░░░░░░ 78.2%
Post-campaign: ██████████████████░░░░ 88.1% (+9.9pp)
Uncovered high-risk functions: parseAuthToken(), configLoader()
5. REGRESSION CORPUS
[5 minimized crashing inputs packaged for CI/CD integration]
6. RECOMMENDATIONS
[ ] Add null check in parse_input() (1 hr)
[ ] Enable ASAN/UBSAN in build pipeline (2 days)
[ ] Fuzz decode_msg() with protocol fuzzer (1 week)
API Fuzzing Quick-Start Checklist
[ ] Target identified and authorization confirmed
[ ] OpenAPI spec obtained (or inferred)
[ ] ffuf installed (apt install ffuf)
[ ] RESTler ready (git clone https://github.com/microsoft/restler-fuzzer)
[ ] Wordlists generated or downloaded
[ ] Campaign parameters configured
[ ] Monitoring set up (no crash-blind runs)
[ ] First batch fired
Workflow
1. Reconnaissance & Target Analysis
- Identify attack surface: endpoints, input vectors, file parsers, protocol messages
- Acquire or reverse-engineer specification (OpenAPI, protocol docs, Wireshark captures)
- Instrument binary with coverage feedback (AFL++:
afl-clang-fast, LibFuzzer: -fsanitize=fuzzer, ASAN/UBSAN)
- Compile seed corpus from valid inputs (traffic captures, sample files, API responses)
2. Fuzzing Campaign Execution
# Binary fuzzing with AFL++ — 4 parallel instances on RTX 2060 SUPER
afl-fuzz -i corpus/ -o findings/ -M fuzzer1 -- ./target @@
afl-fuzz -i corpus/ -o findings/ -S fuzzer2 -- ./target @@
afl-fuzz -i corpus/ -o findings/ -S fuzzer3 -- ./target @@
afl-fuzz -i corpus/ -o findings/ -S fuzzer4 -- ./target @@
# API fuzzing with RESTler
restler.exe compile --api-spec spec.json
restler.exe fuzz --grammar_file Compile/grammar.py
# Protocol fuzzing with Boofuzz
python3 -c "
from boofuzz import *
session = Session(target=Target(connection=TCPSocketConnection('$HOST', $PORT)))
s_initialize('Message')
s_static(b'\\xaa\\xbb')
s_word(1, endian='>')
s_byte(0x01)
s_random(b'A'*64, max_len=4096)
s_static(b'\\xcc\\xdd')
session.fuzz()
"
3. Crash Triage & Root Cause Analysis
# Minimize crashing input
afl-tmin -i crash-001 -o crash-001.min -- ./target @@
# Extract coverage map for crash
afl-showmap -o /dev/null -t 5000 -m 256M -- ./target crash-001 2>&1
# Symbolicate with addr2line
addr2line -e ./target -f -C -i 0x402345 0x403abc
# Deduplicate by stack hash
for crash in findings/default/crashes/*; do
hash=$(afl-showmap -o /dev/null -t 5000 -m 256M -- ./target "$crash" 2>&1 | md5sum)
echo "$hash $crash"
done | sort | uniq -w 32
4. Corpus Distillation & Campaign Optimization
# Minimize and deduplicate seed corpus
afl-cmin -i corpus/ -o corpus-min/ -- ./target @@
# Merge coverage from multiple fuzzers
mkdir -p merged-coverage
for f in findings/*/queue/*; do
cp "$f" merged-coverage/ 2>/dev/null
done
# Prune: keep only inputs that increase coverage
afl-cmin -i merged-coverage/ -o final-corpus/ -- ./target @@
# Generate LCOV HTML coverage report
lcov --capture --directory . --output-file coverage.info
genhtml coverage.info --output-directory coverage-report/
5. Common Fuzzing Strategies by Target Type
| Target Type |
Tool |
Strategy |
Stopping Condition |
| REST API |
RESTler + ffuf |
Depth-first stateful fuzzing with garbage mutation |
100K requests or no new 5xx in 10K |
| CLI binary |
AFL++ |
Coverage-guided with ASAN |
24-72hr or 10 unique crashes |
| Network protocol |
Boofuzz |
Block-based structure fuzzing |
Exhaust all message types |
| File parser |
LibFuzzer |
In-process coverage-guided with OOM/ubsan |
1B iterations or no new coverage for 6hr |
| Binary (closed-source) |
AFL++ QEMU-mode |
Whitelist-focus on specific function addresses |
48hr or 5 unique crashes |
| TLS/SSL stack |
tls-attacker + afl |
Differential analysis + coverage-guided |
6hr per cipher suite |
| JavaScript engine |
LibFuzzer + jsfunfuzz |
Coverage-guided with ASAN |
72hr minimum |
6. Reporting & Delivery
- Crash report — JSON + Markdown with per-crash severity, stack trace, payload, root cause
- Coverage report — LCOV HTML or CLI coverage delta (pre vs post campaign)
- Regression corpus — Minimized crashing inputs packaged for CI/CD pipeline
- Remediation guidance — Code-level fixes prioritized by severity with effort estimates
Tools
| Tool |
Purpose |
Install |
| ffuf |
High-speed HTTP fuzzing |
apt install ffuf |
| RESTler |
Stateful REST API fuzzing |
git clone https://github.com/microsoft/restler-fuzzer |
| AFL++ |
Coverage-guided binary fuzzing |
apt install afl++ |
| LibFuzzer |
In-process coverage-guided fuzzing |
(part of Clang) |
| Boofuzz |
Network protocol fuzzing |
pip install boofuzz |
| Radamsa |
Generative/mutational fuzzing |
apt install radamsa |
| Scapy |
Packet-level protocol fuzzing |
apt install python3-scapy |
| afl-tmin |
Crash input minimization |
(part of AFL++) |
| GDB |
Crash analysis, backtracing |
apt install gdb |
| Valgrind |
Memory error detection |
apt install valgrind |
| ASAN/UBSAN |
Compiler sanitizers |
-fsanitize=address,undefined |
| nvtop |
GPU monitoring (RTX 2060 SUPER) |
apt install nvtop |
RTX 2060 SUPER acceleration: 4 parallel AFL++ instances without CPU contention. GPU-monitor with nvtop — 8GB VRAM handles 4 concurrent fuzzer processes plus corpus minimization.
Process
- Prepare — Identify target, acquire spec/binary, instrument with coverage, compile seed corpus, set up tmux panes
- Execute — Launch parallel fuzzer instances, monitor coverage growth, rotate wordlists/strategies
- Triage — Collect crashing inputs, minimize each, extract stack trace, deduplicate by call-site hash
- Analyze — Root cause each unique crash, classify severity, estimate CVSS, identify remediation
- Report — Generate campaign report with findings, coverage data, regression corpus, prioritized fixes
Verification
Anti-Rationalization Table
| Rationalization |
Reality |
| "Fuzzing takes too long — weeks for results" |
A 4-instance AFL++ campaign on RTX 2060 SUPER finds crashes in 4-8 hours. Basic API fuzzing with 4 wordlists completes in under an hour. The time objection is from single-instance CPU-only fuzzing. |
| "Automated tools find everything" |
Automated scanners find KNOWN vulnerabilities. Fuzzing finds UNKNOWN ones — zero-days, memory corruption, edge-case crashes no signature exists for. Different tools, different results. |
| "My software is too simple to have fuzzing bugs" |
Every parser, decoder, deserializer, and network handler has edge cases. SQLite, zlib, and libpng all had critical fuzzing-discovered CVEs. |
| "Coverage-guided fuzzing only works on open source" |
AFL++ works on any binary with QEMU mode (no source needed). RTX 2060 SUPER handles QEMU mode with 4x parallelism. |
| "We fix crashes as they're reported by users" |
A crash in production means an attacker already found it. Fixing pre-release: $1K cost. Incident response: $250K+. |
| "Crash triage is too much noise" |
Stack-hash deduplication + afl-tmin minimization converts 10,000 crashes into 15 unique bugs. Python triage runs in 30 seconds. |
| "Fuzzing is just random data — no skill required" |
Wordlist design, coverage feedback analysis, sanitizer configuration, protocol structure definition, and crash root-causing all require deep expertise. The fuzzer generates inputs; the master finds bugs. |
| "We have a CI/CD pipeline, vulnerabilities are caught early" |
CI/CD tests VALID inputs. Fuzzing tests INVALID ones — malformed JSON, truncated packets, overflow integers. Different failure domain. |
| "Our fuzzing subscription is too expensive" |
$3,500/mo for continuous fuzzing vs $100K average data breach cost. Not fuzzing is the expensive choice. |
| "I need a source code audit, not fuzzing" |
Source audits find logic bugs. Fuzzing finds runtime crashes. You need both — but fuzzing is 10x faster at finding exploitable memory corruption. |
1---2name: fuzz-master3description: Use when advanced fuzzing techniques for finding zero-days and hidden vulnerabilities. Use when automated scanners miss bugs, testing custom protocols, finding memory corruption, or hunting for novel attack vectors.4license: Apache-2.05---678# Fuzz Master910## Overview1112Fuzzing throws unexpected, malformed data at software to make it crash — revealing memory corruption, unhandled exceptions, and logic flaws that static analysis and automated scanners miss. This skill covers **coverage-guided binary fuzzing** (AFL++, LibFuzzer), **API fuzzing** (RESTler, ffuf), **protocol fuzzing** (Boofuzz, Scapy), and **file-format fuzzing** (Radamsa) on a Kali Linux workstation with an RTX 2060 SUPER for parallel multi-instance campaigns.1314You are looking for **buffer overflows, use-after-free, integer overflows, null-pointer dereferences, infinite loops, and assertion failures** — the bugs that pay $10K-$100K on ZDI and make vendors panic-fix.1516## When to Use1718- "Automated scanners found nothing" / "Vulnerability scanners missed it"19- "Test custom/proprietary protocols" / "Reverse engineer protocol and fuzz it"20- "Find buffer overflows, crashes, memory corruption" / "Hunt zero-days"21- "Test file parsers, image decoders, protocol implementations"22- "API endpoint parameter discovery beyond schema"23- "Coverage-guided fuzzing campaign" / "Crash triage and root-cause analysis"2425## When NOT to Use2627- When automated scanner or manual testing already found the bug28- When the target is a black-box binary you cannot instrument with coverage feedback29- When you lack authorization — fuzzing can crash production systems and corrupt databases30- When the client expects "no false positives" — fuzzing generates noise; triage is part of the deliverable31- For pure informational disclosure without exploit potential3233## Money-Making Overview3435**Target Buyer:** Software vendors (pre-release QA), DevOps/SRE teams (API security), bug bounty hunters, ISVs shipping parsers/protocol stacks.3637**How You Make Money:**381. **API Fuzzing** — RESTler/ffuf campaigns against client API endpoints. Crash reports with reproduction payloads. ($500-$2K/job)392. **Binary Fuzzing** — Closed-source binaries (parsers, decoders, daemons) with AFL++ on RTX 2060 SUPER for parallel campaigns. Crashing inputs + root cause. ($1K-$5K/job)403. **Protocol Fuzzing** — Reverse-engineer custom protocols (IoT, SCADA, gaming, financial) with Boofuzz/Scapy. Wire-format parser bugs. ($2K-$5K/job)414. **Fuzzing-as-a-Service** — Continuous fuzzing in CI/CD. Weekly crash reports, coverage trends, regression detection. ($2K-$5K/mo retainer)4243### Service Tiers4445| Tier | Price | What They Get |46|------|-------|---------------|47| **Basic** — API Fuzz | $750 | Single endpoint fuzzed with 4 wordlists (150K+ payloads), crash report with reproducible HTTP requests, coverage heatmap |48| **Pro** — Binary Fuzz | $2,500 | Binary instrumented with AFL++, 24-72hr campaign on 4 parallel instances (RTX 2060 SUPER), 10+ unique crashes triaged, root-cause analysis, PoC inputs |49| **Enterprise** — Retainer | $3,500/mo | Monthly 7-day campaign, CI/CD integration, real-time crash alerts, regression detection, coverage trend reports, Slack notifications |5051**Expected First Dollar:** 2-3 weeks (API fuzzing: one spec = one campaign = one report).5253## First Action in 60 Minutes — API Fuzzing Pipeline5455This script runs a **multi-tool API fuzzing campaign** combining **ffuf** (high-speed discovery) with **custom payload generation** for parameter tampering, type confusion, boundary violations, and injection.5657```bash58#!/bin/bash59# api-fuzz-campaign.sh — Usage: ./api-fuzz-campaign.sh <base_url> [endpoint] [outdir]60# Example: ./api-fuzz-campaign.sh https://api.target.com/v1 /users/validate ./fuzz-output61set -euo pipefail62BASE_URL="${1:?Usage: $0 <base_url> [endpoint] [outdir]}"; ENDPOINT="${2:-/api/v1/process}"63OUTDIR="${3:-./fuzz-campaign-$(date +%Y%m%d_%H%M%S)}"; mkdir -p "$OUTDIR"/{payloads,results,crash-reports}6465# Phase 1: Generate payload wordlists66echo "[*] Generating payload wordlists..."67cat > "$OUTDIR/payloads/type-confusion.txt" << 'EOF'68null undefined NaN Infinity -Infinity true false [] {} [1] {"a":1}69"" " " "\n" "\t" "\0" "\x00\x00\x00\x00" "\xff\xff\xff\xff"701 0 -1 2147483647 -2147483648 2147483648 9223372036854775807711.0 0.0 -0.0 1e-300 1e300 1e9999972EOF73cat > "$OUTDIR/payloads/boundary.txt" << 'EOF'74$(python3 -c "print('A'*10000)") 2>/dev/null75%00 %2500 %252500 ..%252f..%252f ..%c0%ae%c0%ae/76..%ef%bc%8f ..%e0%80%af///..//..//77EOF78cat > "$OUTDIR/payloads/fuzz-injection.txt" << 'EOF'79' OR '1'='1 {$gt: ''} {$ne: ''} [$ne]80'; system('id');-- $(id) `id` | id ; id &81' UNION SELECT NULL -- ' WAITFOR DELAY '0:0:10' --82EOF83cat > "$OUTDIR/payloads/path-traversal.txt" << 'EOF'84../../../etc/passwd ..\..\..\windows\win.ini85....//....//....//etc/passwd file:///etc/passwd86../../../../../../proc/self/maps87EOF8889# Phase 2: ffuf campaigns — header, parameter, POST body fuzzing90echo "[*] Running ffuf campaigns..."91ffuf -u "$BASE_URL$ENDPOINT" -H "Content-Type: FUZZ" \92 -w "$OUTDIR/payloads/type-confusion.txt" -mc all -ac \93 -o "$OUTDIR/results/ffuf-content-type.json" -of json -s 2>&1 | tail -3 || true94ffuf -u "$BASE_URL$ENDPOINT?param=FUZZ" \95 -w "$OUTDIR/payloads/boundary.txt" -mc all -ac \96 -o "$OUTDIR/results/ffuf-params.json" -of json -s 2>&1 | tail -3 || true97ffuf -u "$BASE_URL$ENDPOINT" -X POST -H "Content-Type: application/json" \98 -d '{"input":"FUZZ"}' -w "$OUTDIR/payloads/fuzz-injection.txt" -mc all -ac \99 -o "$OUTDIR/results/ffuf-post.json" -of json -s 2>&1 | tail -3 || true100101# Phase 3: RESTler setup (generate minimal OpenAPI spec if RESTler not available)102which restler &>/dev/null && echo "[+] RESTler found" || {103 echo "[!] RESTler not found — generating OpenAPI spec for manual use"104}105python3 -c "106import json107spec = {'openapi':'3.0.0','info':{'title':'Fuzz Target','version':'1.0'},108 'paths':{'$ENDPOINT':{109 'get':{'parameters':[{'name':'param','in':'query','schema':{'type':'string'}}],110 'responses':{'200':{'description':'OK'}}},111 'post':{'requestBody':{'content':{'application/json':{'schema':{112 'type':'object','properties':{'input':{'type':'string'}}}}}},113 'responses':{'200':{'description':'OK'}}}}}}114with open('$OUTDIR/payloads/openapi-spec.json','w') as f: json.dump(spec,f,indent=2)115print('[+] OpenAPI spec at $OUTDIR/payloads/openapi-spec.json')116"117118# Phase 4: Crash detection & response analysis119echo "[*] Analyzing responses for crash indicators..."120python3 << 'PYEOF'121import json, os, sys, re122from pathlib import Path123outdir = Path(sys.argv[1] if len(sys.argv)>1 else os.environ.get('OUTDIR','.'))124findings = []125re_sev = {'5xx': (r'^5\d{2}$','CRITICAL','Server error — possible crash'),126 'timeout': (r'.*','HIGH','Connection timeout — possible crash'),127 'large_resp': (r'.*','HIGH','Response >50KB — possible info leak')}128for f in sorted((outdir/'results').glob('ffuf-*.json')):129 try:130 data = json.loads(f.read_text())131 for r in data.get('results',[]):132 status,length,url,payload = str(r.get('status','')), r.get('length',0), r.get('url',''), r.get('input',{}).get('FUZZ','')133 if status.startswith('5'): findings.append({'severity':'CRITICAL','status':status,'url':url,'payload':payload[:80],'reason':'Server error — possible unhandled exception'})134 elif length>50000: findings.append({'severity':'HIGH','status':status,'url':url,'length':length,'reason':f'Unusually large response ({length}B)'})135 elif status=='000': findings.append({'severity':'HIGH','status':status,'url':url,'reason':'Connection failed — possible crash'})136 except: pass137report = {'target':os.environ.get('BASE_URL',''),'findings':findings,'total':len(findings)}138(outdir/'crash-reports'/'crash-report.json').write_text(json.dumps(report,indent=2))139print(f'[+] Report: {len(findings)} findings ({sum(1 for f in findings if f["severity"]=="CRITICAL")} critical)')140PYEOF141142echo "╔══════════════════════════════════════════════╗"143echo "║ Fuzz campaign complete: $OUTDIR"144echo "╚══════════════════════════════════════════════╝"145echo "Review crash-report.json, then try:"146echo " afl-fuzz -i corpus -o findings -- ./target @@"147echo " boofuzz --target host:port --proto tcp"148```149150### What This Delivers in 60 Minutes151152| Phase | Tool | Duration | Output |153|-------|------|----------|--------|154| Payload generation | heredoc + python3 | 5 min | 4 wordlists (type confusion, boundary, injection, path traversal) |155| Content discovery | ffuf (3 runs) | 15-20 min | JSON results per attack surface |156| RESTler setup | python3 | 10 min | OpenAPI spec for deeper fuzzing |157| Crash triage | Python analyzer | 5 min | Structured crash report with severity scoring |158159## Deliverable Format160161### Fuzzing Campaign Report162163```164┌───────────────────────────────────────────────────────────────────┐165│ FUZZING CAMPAIGN REPORT │166│ [Client Name] — [Target] │167└───────────────────────────────────────────────────────────────────┘1681691. EXECUTIVE SUMMARY170 Campaign type: API / Binary / Protocol171 Target: [URL / binary / protocol]172 Duration: [hours]173 Total inputs: [count]174 Unique crashes: [count] ([CRITICAL/HIGH/MEDIUM/INFO])175 Coverage gain: [% baseline → % final]1761772. CRASH INVENTORY178 ┌──────┬───────────┬──────────────┬───────────────┬──────────┐179 │ ID │ Severity │ Location │ Type │ Reproduc │180 ├──────┼───────────┼──────────────┼───────────────┼──────────┤181 │ CR1 │ CRITICAL │ parse_input()│ Null deref │ 100% │182 │ CR2 │ HIGH │ decode_msg() │ Buffer OOB │ 80% │183 │ CR3 │ MEDIUM │ validate() │ Assert fail │ 100% │184 └──────┴───────────┴──────────────┴───────────────┴──────────┘1851863. ROOT-CAUSE ANALYSIS (per crash)187 CR1 — Null pointer dereference in parse_input()188 Payload: {"value": null, "meta": {"tags": []}}189 Stack: parse_input:284 → lookup_field:92 → strlen(NULL)190 Root cause: Missing null check on value field191 Remediation: Add !value.isNull() guard at line 283192 CVSS v3.1: 7.5 (AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H)1931944. COVERAGE ANALYSIS195 Baseline: ████████████████░░░░░░ 78.2%196 Post-campaign: ██████████████████░░░░ 88.1% (+9.9pp)197 Uncovered high-risk functions: parseAuthToken(), configLoader()1981995. REGRESSION CORPUS200 [5 minimized crashing inputs packaged for CI/CD integration]2012026. RECOMMENDATIONS203 [ ] Add null check in parse_input() (1 hr)204 [ ] Enable ASAN/UBSAN in build pipeline (2 days)205 [ ] Fuzz decode_msg() with protocol fuzzer (1 week)206```207208### API Fuzzing Quick-Start Checklist209210```211[ ] Target identified and authorization confirmed212[ ] OpenAPI spec obtained (or inferred)213[ ] ffuf installed (apt install ffuf)214[ ] RESTler ready (git clone https://github.com/microsoft/restler-fuzzer)215[ ] Wordlists generated or downloaded216[ ] Campaign parameters configured217[ ] Monitoring set up (no crash-blind runs)218[ ] First batch fired219```220221## Workflow222223### 1. Reconnaissance & Target Analysis224- Identify attack surface: endpoints, input vectors, file parsers, protocol messages225- Acquire or reverse-engineer specification (OpenAPI, protocol docs, Wireshark captures)226- Instrument binary with coverage feedback (AFL++: `afl-clang-fast`, LibFuzzer: `-fsanitize=fuzzer`, ASAN/UBSAN)227- Compile seed corpus from valid inputs (traffic captures, sample files, API responses)228229### 2. Fuzzing Campaign Execution230```bash231# Binary fuzzing with AFL++ — 4 parallel instances on RTX 2060 SUPER232afl-fuzz -i corpus/ -o findings/ -M fuzzer1 -- ./target @@233afl-fuzz -i corpus/ -o findings/ -S fuzzer2 -- ./target @@234afl-fuzz -i corpus/ -o findings/ -S fuzzer3 -- ./target @@235afl-fuzz -i corpus/ -o findings/ -S fuzzer4 -- ./target @@236237# API fuzzing with RESTler238restler.exe compile --api-spec spec.json239restler.exe fuzz --grammar_file Compile/grammar.py240241# Protocol fuzzing with Boofuzz242python3 -c "243from boofuzz import *244session = Session(target=Target(connection=TCPSocketConnection('$HOST', $PORT)))245s_initialize('Message')246s_static(b'\\xaa\\xbb')247s_word(1, endian='>')248s_byte(0x01)249s_random(b'A'*64, max_len=4096)250s_static(b'\\xcc\\xdd')251session.fuzz()252"253```254255### 3. Crash Triage & Root Cause Analysis256257```bash258# Minimize crashing input259afl-tmin -i crash-001 -o crash-001.min -- ./target @@260261# Extract coverage map for crash262afl-showmap -o /dev/null -t 5000 -m 256M -- ./target crash-001 2>&1263264# Symbolicate with addr2line265addr2line -e ./target -f -C -i 0x402345 0x403abc266267# Deduplicate by stack hash268for crash in findings/default/crashes/*; do269 hash=$(afl-showmap -o /dev/null -t 5000 -m 256M -- ./target "$crash" 2>&1 | md5sum)270 echo "$hash $crash"271done | sort | uniq -w 32272```273274### 4. Corpus Distillation & Campaign Optimization275276```bash277# Minimize and deduplicate seed corpus278afl-cmin -i corpus/ -o corpus-min/ -- ./target @@279280# Merge coverage from multiple fuzzers281mkdir -p merged-coverage282for f in findings/*/queue/*; do283 cp "$f" merged-coverage/ 2>/dev/null284done285286# Prune: keep only inputs that increase coverage287afl-cmin -i merged-coverage/ -o final-corpus/ -- ./target @@288289# Generate LCOV HTML coverage report290lcov --capture --directory . --output-file coverage.info291genhtml coverage.info --output-directory coverage-report/292```293294### 5. Common Fuzzing Strategies by Target Type295296| Target Type | Tool | Strategy | Stopping Condition |297|-------------|------|----------|--------------------|298| REST API | RESTler + ffuf | Depth-first stateful fuzzing with garbage mutation | 100K requests or no new 5xx in 10K |299| CLI binary | AFL++ | Coverage-guided with ASAN | 24-72hr or 10 unique crashes |300| Network protocol | Boofuzz | Block-based structure fuzzing | Exhaust all message types |301| File parser | LibFuzzer | In-process coverage-guided with OOM/ubsan | 1B iterations or no new coverage for 6hr |302| Binary (closed-source) | AFL++ QEMU-mode | Whitelist-focus on specific function addresses | 48hr or 5 unique crashes |303| TLS/SSL stack | tls-attacker + afl | Differential analysis + coverage-guided | 6hr per cipher suite |304| JavaScript engine | LibFuzzer + jsfunfuzz | Coverage-guided with ASAN | 72hr minimum |305306### 6. Reporting & Delivery307- **Crash report** — JSON + Markdown with per-crash severity, stack trace, payload, root cause308- **Coverage report** — LCOV HTML or CLI coverage delta (pre vs post campaign)309- **Regression corpus** — Minimized crashing inputs packaged for CI/CD pipeline310- **Remediation guidance** — Code-level fixes prioritized by severity with effort estimates311312## Tools313314| Tool | Purpose | Install |315|------|---------|---------|316| **ffuf** | High-speed HTTP fuzzing | `apt install ffuf` |317| **RESTler** | Stateful REST API fuzzing | `git clone https://github.com/microsoft/restler-fuzzer` |318| **AFL++** | Coverage-guided binary fuzzing | `apt install afl++` |319| **LibFuzzer** | In-process coverage-guided fuzzing | (part of Clang) |320| **Boofuzz** | Network protocol fuzzing | `pip install boofuzz` |321| **Radamsa** | Generative/mutational fuzzing | `apt install radamsa` |322| **Scapy** | Packet-level protocol fuzzing | `apt install python3-scapy` |323| **afl-tmin** | Crash input minimization | (part of AFL++) |324| **GDB** | Crash analysis, backtracing | `apt install gdb` |325| **Valgrind** | Memory error detection | `apt install valgrind` |326| **ASAN/UBSAN** | Compiler sanitizers | `-fsanitize=address,undefined` |327| **nvtop** | GPU monitoring (RTX 2060 SUPER) | `apt install nvtop` |328329**RTX 2060 SUPER acceleration:** 4 parallel AFL++ instances without CPU contention. GPU-monitor with `nvtop` — 8GB VRAM handles 4 concurrent fuzzer processes plus corpus minimization.330331## Process3323331. **Prepare** — Identify target, acquire spec/binary, instrument with coverage, compile seed corpus, set up tmux panes3342. **Execute** — Launch parallel fuzzer instances, monitor coverage growth, rotate wordlists/strategies3353. **Triage** — Collect crashing inputs, minimize each, extract stack trace, deduplicate by call-site hash3364. **Analyze** — Root cause each unique crash, classify severity, estimate CVSS, identify remediation3375. **Report** — Generate campaign report with findings, coverage data, regression corpus, prioritized fixes338339## Verification340341- [ ] All fuzzing campaigns completed with defined stopping criteria (time/coverage/crashes)342- [ ] Unique crashes deduplicated by stack hash, not input hash343- [ ] Every crash reproduced at least twice344- [ ] Crash inputs minimized with afl-tmin345- [ ] Root cause identified for each unique crash346- [ ] False positives (non-reproducible, environment-specific) tagged and excluded347- [ ] Coverage delta calculated and documented348- [ ] No collateral damage — target system verified operational post-campaign349- [ ] Regression corpus prepared in client-requested format350- [ ] Written authorization confirmed and scoped before any destructive testing351352## Anti-Rationalization Table353354| Rationalization | Reality |355|---|---|356| "Fuzzing takes too long — weeks for results" | A 4-instance AFL++ campaign on RTX 2060 SUPER finds crashes in 4-8 hours. Basic API fuzzing with 4 wordlists completes in under an hour. The time objection is from single-instance CPU-only fuzzing. |357| "Automated tools find everything" | Automated scanners find KNOWN vulnerabilities. Fuzzing finds UNKNOWN ones — zero-days, memory corruption, edge-case crashes no signature exists for. Different tools, different results. |358| "My software is too simple to have fuzzing bugs" | Every parser, decoder, deserializer, and network handler has edge cases. SQLite, zlib, and libpng all had critical fuzzing-discovered CVEs. |359| "Coverage-guided fuzzing only works on open source" | AFL++ works on any binary with QEMU mode (no source needed). RTX 2060 SUPER handles QEMU mode with 4x parallelism. |360| "We fix crashes as they're reported by users" | A crash in production means an attacker already found it. Fixing pre-release: $1K cost. Incident response: $250K+. |361| "Crash triage is too much noise" | Stack-hash deduplication + afl-tmin minimization converts 10,000 crashes into 15 unique bugs. Python triage runs in 30 seconds. |362| "Fuzzing is just random data — no skill required" | Wordlist design, coverage feedback analysis, sanitizer configuration, protocol structure definition, and crash root-causing all require deep expertise. The fuzzer generates inputs; the master finds bugs. |363| "We have a CI/CD pipeline, vulnerabilities are caught early" | CI/CD tests VALID inputs. Fuzzing tests INVALID ones — malformed JSON, truncated packets, overflow integers. Different failure domain. |364| "Our fuzzing subscription is too expensive" | $3,500/mo for continuous fuzzing vs $100K average data breach cost. Not fuzzing is the expensive choice. |365| "I need a source code audit, not fuzzing" | Source audits find logic bugs. Fuzzing finds runtime crashes. You need both — but fuzzing is 10x faster at finding exploitable memory corruption. |