TopGit theo dõi BishopFox/h2csmuggler trên GitHub trong nhóm Security, đã đạt 821 sao. HTTP Request Smuggling over HTTP/2 Cleartext (h2c)
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
h2cSmuggler smuggles HTTP traffic past insecure edge-server proxy_pass configurations by establishing HTTP/2 cleartext (h2c) communications with h2c-compatible back-end servers, allowing a bypass of proxy rules and access controls.
Any proxy endpoint that forwards h2c upgrade headers can be affected. Because h2c is intended to be performed only on cleartext channels, detection on HTTPS services often yields true positives.
By contrast, HTTP services may result in false positives. For example, h2c-enabled proxies may respond to the upgrade instead of forwarding it to an h2c back end.
Use the --scan-list option to test one or more web servers to look for affected proxy_pass endpoints. Consider using a list of directories discovered from directory enumeration, such as:
urls.txt
https://www.example.com/
https://www.example.com/api/
https://www.example.com/auth/
https://www.example.com/admin/
https://www.example.com/payments/
...omitted for brevity...
Run h2cSmuggler with the list of endpoints and a total number of threads:
Nuclei-Template (Coming soon! Requires this issue to be fixed)
Exploitation
Once you have identified an affected endpoint that can be used for tunneling, you can now access or brute-force internal endpoints on the back-end server and provide custom verbs or headers. In the demo below, we demonstrate accessing an internal /flag endpoint by using h2c smuggling to bypass proxy deny rules.
To remediate, do not forward user-supplied values for Upgrade or Connection headers. See the technical post for additional guidance.
Install Instructions
The only dependency is the Python hyper-h2 library:
pip3 install h2
Test Environment and Demo
The test environment will allow you to experiment with h2cSmuggler in a controlled environment. docker-compose will simulate three chains of proxies that lead to an h2c-enabled Golang back end:
[1] Generate Certificates and spin up the environment with docker-compose:
# Generate certs
./configs/generate-certificates.sh
# Activate services
docker-compose up
All of the proxies deny access to the /flag endpoint accessible on the h2c back end. Let's attempt to access the forbidden endpoint via the HAProxy server running on port 8001:
We can use h2cSmuggler to confirm the proxy's insecure configuration using --test (or -t):
Now, let's use h2cSmuggler to perform an h2c upgrade, tunnel our HTTP/2 traffic through the proxy, and request the /flag endpoint from the back end, bypassing the proxy's access control:
For a deeper explanation of what is happening, check out the technical writeup.
Usage
h2cSmuggler uses a familiar curl-like syntax for describing the smuggled request:
usage: h2csmuggler.py [-h] [--scan-list SCAN_LIST] [--threads THREADS] [--upgrade-only] [-x PROXY] [-i WORDLIST] [-X REQUEST] [-d DATA] [-H HEADER] [-m MAX_TIME] [-t] [-v]
[url]
Detect and exploit insecure forwarding of h2c upgrades.
positional arguments:
url
optional arguments:
-h, --help show this help message and exit
--scan-list SCAN_LIST
list of URLs for scanning
--threads THREADS # of threads (for use with --scan-list)
--upgrade-only drop HTTP2-Settings from outgoing Connection header
-x PROXY, --proxy PROXY
proxy server to try to bypass
-i WORDLIST, --wordlist WORDLIST
list of paths to bruteforce
-X REQUEST, --request REQUEST
smuggled verb
-d DATA, --data DATA smuggled data
-H HEADER, --header HEADER
smuggled headers
-m MAX_TIME, --max-time MAX_TIME
socket timeout in seconds (type: float; default 10)
-t, --test test a single proxy server
-v, --verbose
Examples
1. Scanning a list of URLs (e.g., https://example.com:443/api/, https://example.com:443/payments, https://sub.example.com:443/) to identify proxy_pass endpoints that are susceptible to smuggling (be careful with thread counts when testing a single server):
./h2csmuggler.py --scan-list urls.txt --threads 5
Or, to redirect output to a file. Use stderr (2>) and stdout (1>). The stderr stream contains errors (e.g., SSL handshake/timeout issues), while stdout contains results.
Q: Why are there multiple responses from the server?
A: The first response is the data response to the original upgrade request initiated in HTTP/1.1, per the h2c upgrade protocol. The following responses are from the smuggled request.
Q: I received a "101 Switching Protocols" but I'm not receiving any data from the remote server.
A: I observed this behavior in my tests and found that some servers respond with a 101 status even if they do not actually support HTTP/2.
Q: Is establishing an h2c tunnel always a vulnerability?
A: No. Consider a TLS-terminating TCP load balancer (e.g., ELB) proxying directly to an h2c-compatible back end. Although you may be able to establish an h2c connection, if there are no access controls being enforced, then there are no access controls to bypass, or privilege gained by initiating this tunnel.
Q: Why does the smuggled request URI require a scheme? What is it used for?
A: The HTTP/2 protocol requires a :scheme psuedo-header. For our use case, http vs. https likely doesn't matter. For more details, see HTTP/2 RFC: Section 8.1.2.3.
Q: What should I use as the hostname for the back-end server?
A: It's best to start with the same hostname as the edge server. Next, try experimenting with alternative hostname values.
BishopFox/h2csmuggler có 821 sao GitHub — tải lại trang để xem số mới nhất, hoặc xem trực tiếp github.com/BishopFox/h2csmuggler. TopGit phản chiếu số sao của GitHub nhưng không cam kết đến từng phút.
BishopFox/h2csmuggler có phải mã nguồn mở không?
Có — BishopFox/h2csmuggler phát hành theo license MIT, nghĩa là mã nguồn mở để đọc, fork và (tùy license) tái sử dụng. Mã: github.com/BishopFox/h2csmuggler.
BishopFox/h2csmuggler có website riêng không?
TopGit chưa ghi nhận URL trang chủ cho BishopFox/h2csmuggler. Phần README ở tab phía trên thường có link demo, hoặc xem mô tả GitHub của repo.
BishopFox/h2csmuggler là gì?
BishopFox/h2csmuggler (BishopFox/h2csmuggler) là dự án Python trên GitHub. Theo mô tả gốc: HTTP Request Smuggling over HTTP/2 Cleartext (h2c)
BishopFox/h2csmuggler so với các dự án Security khác thế nào?
BishopFox/h2csmuggler được TopGit xếp vào nhóm Security, với 821 sao GitHub và viết bằng Python. Xem trang chủ đề Security trên TopGit để so sánh với các dự án tương tự theo số sao và mức độ hoạt động.
Cùng nhóm Security còn repo nào?
BishopFox/h2csmuggler thuộc nhóm Security trên TopGit, cùng 4 topic GitHub. Trang Trending và Topics liệt kê các repo cùng số sao và cùng ngôn ngữ để so sánh.
Đọc thêm về BishopFox/h2csmuggler ở đâu?
Trang TopGit này là một snapshot — tab "Readme" hiển thị nguyên văn README của repo (đã bỏ link, giữ ảnh). Repo GitHub ở github.com/BishopFox/h2csmuggler là nguồn chính thức.
Đọc đầy đủ README ở tab phía trên.
Chưa chắc h2csmuggler có hợp với bạn?
Để ChatGPT, Claude hoặc Perplexity tìm hiểu giúp — bấm bên dưới và xem AI nói gì về h2csmuggler.