A concise, professional usage document for the HTTP Desync (Request Smuggling) Scanner — upgraded. This covers installation, commands, flags, how to run safely (including Burp proxy usage), how to read outputs (JSON + colorized HTML), common errors and troubleshooting, and next steps for verification.
- Purpose: actively test for HTTP desynchronization / request‑smuggling (TE/CL, CL/TE, duplicate headers, chunk tricks).
- Safety: AUTHORIZED TESTING ONLY. The scanner requires an
--auth-filethat contains the stringAUTH. Do not use this tool against systems you do not own or for which you do not have explicit written permission. - Output: JSON (machine readable) and optional colorized HTML (RED / YELLOW / GREEN severity badges).
- Save the scanner (e.g.
http_desync_scanner.py) to your working directory. - Ensure Python 3 installed (3.8+ recommended).
- Make the file executable (optional):
chmod +x http_desync_scanner.pyusage: http_desync_scanner.py [--target TARGET] [--port PORT] [--path PATH] [--ssl]
[--proxy PROXY] [--concurrency N] [--timeout T]
--auth-file FILE [--out FILE] [--html FILE] [--dry-run]
[--indicators STR] [--large-threshold N] [--verbose]
Important flags:
--target(required) — target hostname or IP (e.g.example.com)--port— TCP port (default80)--path— path to use in payload templates (default/)--ssl— use TLS (HTTPS) — triggers TLS mode to target port--proxy— optional HTTP proxyhost:port(use Burp at127.0.0.1:8080)- For HTTPS targets the scanner uses
CONNECTto the proxy and then TLS over the tunnel - For HTTP with a proxy the request start-line will be rewritten to absolute-form so the proxy forwards it
- For HTTPS targets the scanner uses
--concurrency— number of parallel worker threads (default4)--timeout— socket timeout (seconds, default8.0)--auth-file(required) — path to a file that contains the stringAUTHto confirm authorization--out— JSON output file path (defaultdesync_report.json)--html— optional HTML output file path (colorized report)--dry-run— list templates only; do not send network traffic--indicators— comma-separated custom strings to flag (e.g.admin,reset,password)--large-threshold— bytes threshold considered “very large” (default15000)--verbose— enable more logging to stdout
nu11secur1ty:
echo AUTH > permission.txt && python http_desync_scanner.py --target your_domain.com --port 80 --auth-file permission.txt --out desync_report.json --html desync_report.html --concurrency 2 --timeout 10- Burp
python .\burp-http-desync-scanner.py --target your_domain.com --port 80 --auth-file permission.txt --out desync_report.json --html desync_report.html --concurrency 2 --timeout 10 --proxy 127.0.0.1:8080
python .\burp-http-desync-scanner.py --target mheducation.com --port 80 --auth-file permission.txt --out desync_report.json --html desync_report.html --concurrency 2 --timeout 10
Dry-run (show templates only):
python3 http_desync_scanner.py --target example.com --auth-file permission.txt --dry-runSimple scan against port 80 (one‑liner):
python3 http_desync_scanner.py --target example.com --port 80 --auth-file permission.txt --out desync_report.json --html desync_report.htmlScan via Burp running on 127.0.0.1:8080 (HTTP proxy):
python3 http_desync_scanner.py --target example.com --port 80 --auth-file permission.txt --proxy 127.0.0.1:8080 --out desync_report.json --html desync_report.htmlScan an HTTPS target through proxy (scanner will CONNECT first):
python3 http_desync_scanner.py --target example.com --port 443 --ssl --auth-file permission.txt --proxy 127.0.0.1:8080 --out out.json --html out.htmlAdd custom indicators:
python3 http_desync_scanner.py --target app.local --auth-file permission.txt --indicators "admin,login,reset" --out report.jsonIncrease concurrency (be careful on production systems):
python3 http_desync_scanner.py --target example.com --auth-file permission.txt --concurrency 10The JSON file contains a top-level object:
{
"target": "example.com",
"port": 80,
"path": "/",
"use_ssl": false,
"timestamp": 1670000000,
"results": [
{
"template": "te_cl",
"resp_len": 512,
"resp_preview": "...",
"suspected": true,
"reasons": ["multiple_http_markers_in_response"],
"severity": "yellow"
}
]
}Key fields:
template— payload name usedresp_len— bytes received from serverresp_preview— first part of the response (safe to view)suspected— boolean: heuristics flagged something suspiciousreasons— list of indicators that triggered the suspicionseverity—red/yellow/green(see below)
- A colorized, human‑readable report.
- Severity legend:
- RED — HIGH severity: likely sensitive/admin strings found (e.g.
/admin, explicit marker match if used) - YELLOW — MEDIUM severity: suspicious signs (multiple HTTP start-lines, unusually large responses)
- GREEN — LOW severity: no suspicious indicators
- RED — HIGH severity: likely sensitive/admin strings found (e.g.
Open the HTML file in a browser to review the per-template blocks (response preview, reasons, length). Use this as triage — ALWAYS verify suspected findings manually.
- RED: high priority. Manually replay the corresponding request in Burp Repeater (or using saved raw request) to reproduce and investigate. Collect server-side logs or tcpdump if possible.
- YELLOW: medium priority. Re-run the payload, try connection reuse / pipelining / control→test pair (manual) and verify. May be false positives — use Burp to probe further.
- GREEN: likely safe for that payload, but absence of evidence is not proof of absence. Consider more advanced tests if high confidence is required.
Suggested manual verification steps:
- Replay the suspicious template in Burp Repeater (use
--proxyto capture full requests). - Test connection reuse: open a single connection and send a benign control request followed immediately by the suspect payload — observe if responses are interleaved or injected.
- Ask the application owner to check backend logs (tcpdump / web server logs) for evidence. Server-side logs are the authoritative proof.
- Do not scan systems without explicit written permission. Unauthorized scanning is illegal and unethical.
- Ensure you have an engagement scope and schedule. Run tests during maintenance windows where applicable.
- Start with low
--concurrencyand limited--timeoutto minimize disruption. Increase only with permission and monitoring.
-
ERROR: Authorization file invalid or missing.- Ensure
--auth-file permission.txtexists and contains the textAUTH(case-insensitive).
- Ensure
-
Proxy CONNECT failed: ...- The configured proxy rejected the CONNECT request. Verify the proxy host:port and that the proxy allows CONNECT to your destination.
-
Socket errors / timeouts:
- Increase
--timeoutor reduce--concurrency. Network middleboxes (WAFs, IDS) may drop raw-socket traffic — try routing via--proxy(Burp) to observe behavior.
- Increase
-
HTML report shows many
YELLOWflags but nothing obvious:- These are heuristics. Export the raw request into Burp and replay with manual variations (header ordering, casing, chunk sizes) to confirm.
- Use
--proxy 127.0.0.1:8080and run Burp to inspect every raw request/response. This allows manual verification and easier reproduction. - To verify an individual template manually, copy the raw request from the scanner (or construct one in Burp) and test connection reuse scenarios — many desync issues only appear when multiple requests are pipelined on the same TCP connection.
- Consider capturing a packet trace (
tcpdump -w capture.pcap) on the testing host when reproducing suspected behavior — network captures + server logs are the strongest evidence.
A safe, typical command to run from your terminal (authorized test):
echo AUTH > permission.txt && python3 http_desync_scanner.py --target example.com --port 80 --auth-file permission.txt --out desync_report.json --html desync_report.html --proxy 127.0.0.1:8080 --concurrency 2 --timeout 10