Skip to content
KitploitKITPLOIT
工具博客
提交
工具博客
提交

黑客、渗透测试和网络安全工具,武装您的安全武器库!

Kitploit 是一个黑客、网络安全和渗透测试工具的目录。发现最新的项目更新,查找漏洞、分析系统、自动化测试并加强你的安全。

··订阅源·联系·隐私·© 2026 Kitploit

工具目录

分类

查看所有分类
Loading categories
smuggler — 基于Python的HTTP请求走私和反同步测试工具,使用可配置的变异载荷和自动化扫描检测CL.TE和TE.CL漏洞。 | Kitploit
工具/GitHubGitHub/defparam/smuggler
漏洞扫描器Web应用程序漏洞利用Web安全渗透测试
GitHubdefparam/smuggler

smuggler

基于Python的HTTP请求走私和反同步测试工具,使用可配置的变异载荷和自动化扫描检测CL.TE和TE.CL漏洞。

查看仓库
2.1k3265年前Kitploit 审核通过

最受欢迎

查看全部 →

发现我们社区最常用的工具。

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享
root@kitploit:~
  ______                         _              
 / _____)                       | |             
( (____  ____  _   _  ____  ____| | _____  ____ 
 \____ \|    \| | | |/ _  |/ _  | || ___ |/ ___)
 _____) ) | | | |_| ( (_| ( (_| | || ____| |    
(______/|_|_|_|____/ \___ |\___ |\_)_____)_|    

     @defparam

Smuggler

一个用 Python 3 编写的 HTTP 请求走私/反序列测试工具

致谢

特别感谢 James Kettle 在 HTTP 反序列 方面的研究和方法。

同样特别感谢 Ben Sadeghipour 为 Smuggler 进行 Beta 测试,并允许我在 Nahamcon 2020 上讨论我的工作。

重要提示

本工具不保证无假阳性或假阴性。某次变异可能报告正常,并不意味着不存在反序列问题;反之,工具提示存在潜在反序列问题,也不代表确实存在。脚本可能遇到大型实体(如 Google/AWS/Yahoo/Akamai 等)的请求处理器,从而显示假阳性结果。

安装

  1. git clone https://github.com/defparam/smuggler.git
  2. cd smuggler
  3. python3 smuggler.py -h

使用示例

单个主机:

root@kitploit:~
python3 smuggler.py -u <URL>

主机列表:

root@kitploit:~
cat list_of_hosts.txt | python3 smuggler.py

选项

root@kitploit:~
usage: smuggler.py [-h] [-u URL] [-v VHOST] [-x] [-m METHOD] [-l LOG] [-q]
                   [-t TIMEOUT] [--no-color] [-c CONFIGFILE]

optional arguments:
  -h, --help            show this help message and exit
  -u URL, --url URL     Target URL with Endpoint
  -v VHOST, --vhost VHOST
                        Specify a virtual host
  -x, --exit_early      Exit scan on first finding
  -m METHOD, --method METHOD
                        HTTP method to use (e.g GET, POST) Default: POST
  -l LOG, --log LOG     Specify a log file
  -q, --quiet           Quiet mode will only log issues found
  -t TIMEOUT, --timeout TIMEOUT
                        Socket timeout value Default: 5
  --no-color            Suppress color codes
  -c CONFIGFILE, --configfile CONFIGFILE
                        Filepath to the configuration file of payloads

Smuggler 至少需要一个通过 -u/--url 参数指定的 URL,或通过标准输入管道传入的 URL 列表。 如果 URL 包含 https://,Smuggler 将使用 SSL/TLS 连接到主机:端口。如果 URL 包含 http://,则完全不使用 SSL/TLS。如果仅指定主机,脚本默认使用 https://。

使用 -v/--vhost <host> 可指定与服务器地址不同的 Host 头。

使用 -x/--exit_early 可在发现潜在问题时退出当前服务器的扫描。在管道模式下,smuggler 将继续处理列表中的下一个主机。

使用 -m/--method <method> 可指定不同于 POST 的 HTTP 方法(例如 GET/PUT/PATCH/OPTIONS/CONNECT/TRACE/DELETE/HEAD 等)。

使用 -l/--log <file> 可将输出同时写入文件和控制台。

使用 -q/--quiet 可减少输出冗余,仅记录发现的问题。

使用 -t/--timeout <value> 可指定套接字超时时间。该值应足够高以判断套接字是否挂起,但又足够低以加快测试速度(默认:5)。

使用 --no-color 可抑制输出到控制台的颜色代码(日志默认不包含颜色代码)。

使用 -c/--configfile <configfile> 可指定你自己的 Smuggler 变异配置文件(默认:default.py)。

配置文件

配置文件是位于 smuggler 目录下 ./config 目录中的 Python 文件。这些文件描述了 HTTP 请求的内容以及要测试的传输编码变异。

以下是 default.py 的示例内容:

root@kitploit:~
def render_template(gadget):
	RN = "\r\n"
	p = Payload()
	p.header  = "__METHOD__ __ENDPOINT__?cb=__RANDOM__ HTTP/1.1" + RN
	# p.header += "Transfer-Encoding: chunked" +RN	
	p.header += gadget + RN
	p.header += "Host: __HOST__" + RN
	p.header += "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.87 Safari/537.36" + RN
	p.header += "Content-type: application/x-www-form-urlencoded; charset=UTF-8" + RN
	p.header += "Content-Length: __REPLACE_CL__" + RN
	return p


mutations["nameprefix1"] = render_template(" Transfer-Encoding: chunked")
mutations["tabprefix1"] = render_template("Transfer-Encoding:\tchunked")
mutations["tabprefix2"] = render_template("Transfer-Encoding\t:\tchunked")
mutations["space1"] = render_template("Transfer-Encoding : chunked")

for i in [0x1,0x4,0x8,0x9,0xa,0xb,0xc,0xd,0x1F,0x20,0x7f,0xA0,0xFF]:
	mutations["midspace-%02x"%i] = render_template("Transfer-Encoding:%cchunked"%(i))
	mutations["postspace-%02x"%i] = render_template("Transfer-Encoding%c: chunked"%(i))
	mutations["prespace-%02x"%i] = render_template("%cTransfer-Encoding: chunked"%(i))
	mutations["endspace-%02x"%i] = render_template("Transfer-Encoding: chunked%c"%(i))
	mutations["xprespace-%02x"%i] = render_template("X: X%cTransfer-Encoding: chunked"%(i))
	mutations["endspacex-%02x"%i] = render_template("Transfer-Encoding: chunked%cX: X"%(i))
	mutations["rxprespace-%02x"%i] = render_template("X: X\r%cTransfer-Encoding: chunked"%(i))
	mutations["xnprespace-%02x"%i] = render_template("X: X%c\nTransfer-Encoding: chunked"%(i))
	mutations["endspacerx-%02x"%i] = render_template("Transfer-Encoding: chunked\r%cX: X"%(i))
	mutations["endspacexn-%02x"%i] = render_template("Transfer-Encoding: chunked%c\nX: X"%(i))

目前还没有输入参数用于指定自定义头部和用户代理。建议基于 default.py 创建自己的配置文件,并根据需要进行修改。

Smuggler 附带 3 个配置文件:default.py(快速)、doubles.py(小众、慢速)、exhaustive.py(非常慢)。 default.py 速度最快,因为它包含的变异较少。

使用命令行选项 -c/--configfile <configfile> 指定配置文件。

Payloads 目录

Smuggler 目录下有一个 payloads 目录。当 Smuggler 发现潜在的 CLTE 或 TECL 反序列问题时,它会自动将有问题的 payload 以二进制 txt 文件形式转储到 payloads 目录中。所有 payload 文件名都带有主机名、反序列类型和变异类型的注释。可以使用这些 payload 直接通过 netcat 连接到服务器,或导入到其他分析工具。

辅助脚本

找到反序列问题后,可以随意使用我在 https://github.com/defparam/tiscripts 上找到的 Turbo Intruder 反序列脚本。 DesyncAttack_CLTE.py 和 DesyncAttack_TECL.py 是帮助进行反序列攻击的绝佳脚本。

许可证

这些脚本基于 MIT 许可证发布。参见 LICENSE。

下载工具