h2rs
Detects request smuggling via HTTP/2 downgrades.
Requirements
- Python 3.x
Python Modules
- base64
- sys
- socket
- ssl
- certifi
- h2.connection
- h2.events
- argparse
Install
$ pip3 install h2rs
Usage
$ h2rs
_ ___
| |_|_ |___ ___
| | _| _|_ -|
|_|_|___|_| |___|
version 0.0.1
Error: requires target parameter.
usage: h2rs [-h] [-t TARGET] [-p PORT] [-m TIMEOUT] [-u USER_AGENT]
Detects request smuggling via HTTP/2 downgrades.
optional arguments:
-h, --help show this help message and exit
-t TARGET, --target TARGET
Target server hostname (eg. www.example.com).
-p PORT, --port PORT Server TCP port to connect over TLS (default 443).
-m TIMEOUT, --timeout TIMEOUT
Set connection timeout for request smuggling test (default 5).
-u USER_AGENT, --user_agent USER_AGENT
Set default User-Agent request header (default "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.69
Safari/537.36").
Example
$ h2rs -t ac971f5e1e77d74fc0555ed900ed00eb.web-security-academy.net
_ ___
| |_|_ |___ ___
| | _| _|_ -|
|_|_|___|_| |___|
version 0.0.1
Making a GET HTTP2 request to ac971f5e1e77d74fc0555ed900ed00eb.web-security-academy.net:443 ...
Got response status code 200.
Detecting H2.CL request smuggling ...
Not potencial vulnerable to H2.CL request smuggling.
Detecting H2.CL (CRLF) request smuggling ...
Not potencial vulnerable to H2.CL (CRLF) request smuggling.
Detecting H2.TE request smuggling ...
Not potencial vulnerable to H2.TE request smuggling.
Detecting H2.TE (CRLF) request smuggling ...
[!] Potencial vulnerable to H2.TE (CRLF) request smuggling.
Detecting HTTP/2 request tunnelling ...
Not potencial vulnerable to HTTP/2 request tunnelling.
Author
Metadata
Release files for h2rs 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| h2rs-0.0.1.tar.gz | 12.4 kB | Without provenance | Details for h2rs-0.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| h2rs-0.0.1-py3-none-any.whl | Python 3 | none | any | Details for h2rs-0.0.1-py3-none-any.whl |
Total release size: 25.0 kB
Release files / h2rs-0.0.1.tar.gz
| Download URL | h2rs-0.0.1.tar.gz |
|---|---|
| Size | 12.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a00031b49871cf249ef0fb67aeba43c71d63edec250d76480bf211dfd41bb80e
|
|
BLAKE2b-256 checksum How to use checksums |
ac51112884c5412e9b76ee66539e4f96935c82df7d557546f22e92298266fff0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.6.0 importlib_metadata/4.6.4 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.9.8
|
Release files / h2rs-0.0.1-py3-none-any.whl
| Download URL | h2rs-0.0.1-py3-none-any.whl |
|---|---|
| Size | 12.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
27155b156ab33521f73a98f2cf9bc34643737f64e87a123269df163efb150fe9
|
|
BLAKE2b-256 checksum How to use checksums |
4df09eb869435ed084bb4c2295721c54f98d7d6ed2d4c61be8574f8e3cfe509e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.6.0 importlib_metadata/4.6.4 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.9.8
|
Security for h2rs 0.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.