Skip to content
KitploitKITPLOIT
工具漏洞利用博客
Log in
提交
工具漏洞利用博客
提交

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

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

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

工具目录

分类

查看所有分类
Loading categories
http-garden — 用于 HTTP 实现的差分测试框架 | Kitploit
工具/GitHubGitHub/narfindustries/http-garden
漏洞分析动态代码分析 (DAST)Web安全模糊测试
GitHubnarfindustries/http-garden

http-garden

用于 HTTP 实现的差分测试框架

查看仓库
94184214个月前Kitploit 审核通过

最受欢迎

查看全部 →

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

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享

The HTTP Garden

The HTTP Garden 是一个可组合的 HTTP 服务器和代理的集合,附带用于与它们交互的脚本,让发现漏洞变得容易得多。想看看使用 HTTP Garden 可以发现哪些漏洞的酷炫演示,请查看我们的 ShmooCon 2024 演讲。

致谢

我们感谢 Galois、Trail of Bits、Narf Industries 和 Dartmouth College 的朋友们,让这个项目成为可能。

本材料基于国防高级研究计划局(DARPA)在合同号 HR0011-19-C-0076 下支持的工作。

入门

依赖

  1. The HTTP Garden 运行在 x86_64 和 AArch64 Linux 上,在其他平台上未经测试。
  2. 目标服务器在 Docker 容器中构建和运行,因此你需要 Docker。
  3. 你还需要 Python 3.12+ 和以下 Python 包,你可以从 PyPI(即使用 pip)或系统包管理器获取:
  • docker
    • 用于与 Docker 交互
  • pyyaml
    • 用于解析 yaml
  • tqdm
    • 用于进度条

如果你使用系统包管理器安装 Python 包,请注意包名可能需要根据系统加上 py3-、python3- 或 python- 前缀。

运行

  • 构建并启动一些服务器和代理:
./garden.sh start --build gunicorn hyper nginx haproxy
  • 在另一个 shell 中启动 repl:
./garden.sh repl
  • 通过 HAProxy 发送一个基本的 GET 请求,然后将结果发送到 Gunicorn、Hyper 和 Nginx 源服务器,并显示它们的解释是否一致:
garden> payload 'GET / HTTP/1.1\r\nHOST: a\r\n\r\n' | transduce haproxy | fanout | grid
'GET / HTTP/1.1\r\nHOST: a\r\n\r\n'
⬇️ haproxy
'GET / HTTP/1.1\r\nhost: a\r\n\r\n'
gunicorn: [
    HTTPRequest(
        method=b'GET', uri=b'/', version=b'1.1',
        headers=[
            (b'host', b'a'),
        ],
        body=b'',
    ),
]
hyper: [
    HTTPRequest(
        method=b'GET', uri=b'/', version=b'1.1',
        headers=[
            (b'host', b'a'),
        ],
        body=b'',
    ),
]
nginx: [
    HTTPRequest(
        method=b'GET', uri=b'/', version=b'1.1',
        headers=[
            (b'host', b'a'),
            (b'content-length', b''),
            (b'content-type', b''),
        ],
        body=b'',
    ),
]
         g
         u
         n
         i h n
         c y g
         o p i
         r e n
         n r x
        +-----
gunicorn|✓ ✓ ✓
hyper   |  ✓ ✓
nginx   |    ✓

看起来它们都一致。(请注意,即使 Nginx 添加了 content-length 和 content-type 头,Garden 也能感知这一点,并且不会让这个无关紧要的差异显示在 grid 输出中。)

让我们尝试一个在分块消息体中使用裸 LF 行结尾的 payload。这在规范中是不允许的。

garden> payload 'POST / HTTP/1.1\r\nHost: a\r\nTransfer-Encoding: chunked\r\n\r\n0\n\r\n' | fanout | grid
gunicorn: [
    HTTPResponse(version=b'1.1', method=b'400', reason=b'Bad Request'),
]
hyper: [
]
nginx: [
    HTTPRequest(
        method=b'POST', uri=b'/', version=b'1.1',
        headers=[
            (b'transfer-encoding', b'chunked'),
            (b'host', b'a'),
            (b'content-length', b'0'),
            (b'content-type', b''),
        ],
        body=b'',
    ),
]
         g
         u
         n
         i h n
         c y g
         o p i
         r e n
         n r x
        +-----
gunicorn|✓ ✓ X
hyper   |  ✓ X
nginx   |    ✓

好的,所以 Gunicorn 返回 400,Hyper 没有响应,而 Nginx 接受了。 这是 Nginx 作者对规范的一种违反,而他们并不想修复。

你可能还注意到,即使 Gunicorn 和 Hyper 的响应并不完全相同,它们在之前的 grid 输出中也显示为一致。 这是因为它们的响应本质上等价(都是拒绝该消息),而 Garden 会考虑到这一点。

目录结构

images

images 目录为 Garden 中的每个 HTTP 服务器和转换器(transducer)包含一个子目录。 每个目标都有自己的 Docker 镜像。 所有程序在可能的情况下都会从源码构建。 为了便于构建每个目标的多个版本,所有目标都通过仓库 URL(APP_REPO)、分支名(APP_BRANCH)和提交哈希(APP_VERSION)进行参数化。

tools

tools 目录包含用于与服务器交互的脚本。在其中,你会找到

  • probe_quirks.py:一个用于枚举被测系统中无害的 HTTP 解析怪癖的脚本,以便在模糊测试期间忽略它们,
  • repl.py:HTTP Garden 的主要用户界面,
  • update.py:一个用于更新 docker-compose.yml 中提交哈希的脚本,
  • ……以及一些不面向用户的其他脚本。

目标

HTTP 服务器

|-| | aiohttp | | apache_httpd | | apache_tomcat | | appweb | | aws_c_http | | cpp_httplib | | eclipse_grizzly | | eclipse_jetty | | fasthttp | | go_stdlib | | gunicorn | | h2o | | haproxy_fcgi | | hyper | | hypercorn | | ktor | | libevent | | libmicrohttpd | | libsoup | | lighttpd | | mongoose | | netty | | nginx | | node_stdlib | | openbsd_httpd | | openlitespeed | | openwrt_uhttpd | | protocol_http1 | | puma | | tornado | | twisted | | undertow | | uvicorn | | waitress | | webrick | | yahns |

HTTP 转换器

|-| | apache_httpd_proxy | | apache_traffic_server | | envoy | | go_stdlib_proxy | | h2o_proxy | | haproxy | | lighttpd_proxy | | nghttpx | | nginx_proxy | | openlitespeed_proxy | | pound | | squid | | varnish | | yahns_proxy |

遗漏说明

以下是对 Garden 中几个显著遗漏项的解释:

下载工具