T-Reqs: �HTTP Request Smuggling �with Differential Fuzzing
Bahruz Jabiyev1, Steven Sprecher1, Kaan Onarlioglu2, Engin Kirda1
(1 Northeastern University, 2 Akamai Technologies)
HTTP protocol
funny cats
POST /search HTTP/1.1
Host: google.com
Content-Length: 16
query=funny+cats
POST /search HTTP/1.1
Host: google.com
Transfer-Encoding: chunked
6
query=
A
funny+cats
0
X-Header: Value
;foo=bar
HTTP Request Smuggling (HRS)
POST /search HTTP/1.1
Host: google.com
Transfer-Encoding: chunked
6
query=
A ;foo=bar
funny+cats
0
X-Header: Value
POST /search HTTP/1.1
Host: google.com
Content-Length: 16
query=funny+cats
HTTP Request Smuggling (HRS)
POST /search HTTP/1.1
Host: google.com
Transfer-Encoding: chunked
6
query=
A ;foo=bar
funny+cats
0
X-Header: Value
Origin
Reverse Proxy
HTTP Request Smuggling (HRS)
POST /search HTTP/1.1
Host: google.com
Transfer-Encoding: chunked
Content-Length: 64
6
query=
A ;foo=bar
funny+cats
0
X-Header: Value�AAAAAAAAAA
;
Origin
Reverse Proxy
HTTP Request Smuggling (HRS)
POST /search HTTP/1.1
Host: google.com
Transfer-Encoding:;chunked
Content-Length: 64
6
query=
A ;foo=bar
funny+cats
0
X-Header: Value�AAAAAAAAAA
Origin
Reverse Proxy
AAAAAAAAAA
HTTP Request Smuggling (HRS)
GET /blog HTTP/1.1
Host: google.com
AAAAAAAAAA
AAAAAAAAAA
HTTP Request Smuggling (HRS)
GET /blog HTTP/1.1
Host: google.com
GET /js HTTP/1.1
GET /abc HTTP/1.1
Host: google.com�
X:X
Attacks
Attacks
Attacks
Summary 1: Discrepancies in body parsing behavior of servers can be used for HRS, which in turn can pave the way for several attacks.
Research Questions
T-Reqs Fuzzer
POST /abcdef HTTP/1.1
<METHOD><URI><PROTO><VER>
<METHOD> : [GET, POST, TRACE]
<URI> : [/abc, http://a.bc/]
<PROTO> : [HTTP]
<VER> : [0.9, 1.0, 1.1]
Host: example.com
Content-Length: 13
query=bananas
TRACE /abc HTTP/1.0
T-Reqs Fuzzer
Host: example.com
Content-Length: 13
query=bananas
TRACE /abc HTTP/1.0
TR/ACE /abc HTTP/1.0
TR/ACE /a?c HTTP/1.0
TR/ACE /a?c HTTP/10
T-Reqs Fuzzer
Host: example.com
Content-Length: 13
query=bananas
TR/ACE /a?c HTTP/10
TR/ACE /a?c HTTP/a?c/10
HTTP /a?c HTTP/a?c/10
HTTP /a?c HTTP/a?c
<METHOD><URI><PROTO><VER>
Experiment Setup
Apache httpd
NGINX
Apache Tomcat
ATS
HAProxy
Squid
Varnish
Akamai
Cloudflare
CloudFront
Summary 2: T-Reqs Fuzzer and the experiment setup let us systematically analyze the body parsing behavior of servers.
Research Questions
Experiments
Category | Request Line |
Distorted Protocol | GET / PTTP/1.1 |
Mangled Method | . / HTTP/0.9 |
Method Version Comb. | DELETE / HTTP/0.9 |
Multiple Mutations | GET / HTTP//1.1 |
Experiments
Category | Request Header(s) |
Double Transfer-Encoding | Transfer-Encoding: identity�Transfer-Encoding: chunked |
Identity Encoding | Transfer-Encoding: identity |
Manipulated Termination | Transfer-Encoding: chunked {Some-Header}:{Some-Value} |
Experiments
Category | Request Line |
Size Data Mismatch | 4\r\nBBBB\r\n |
Chunk Size Termination | 4\t\nBBBB\r\n |
Chunk Extension Termination | 4;foo=bar\r\nBBBB\r\n |
Chunk Data Termination | 4\r\nBBBB\r\n |
Summary 3: Mutations in all parts of the HTTP request – request line, headers and body – can cause discrepancies between servers.
Research Questions
Testing for HRS
Confirmed HRS
Confirmed HRS
Summary 4: Body parsing discrepancies on popular servers are opening the door to HRS.
Failure Conditions
Failure Conditions
Failure Conditions
Summary 5: Body parsing discrepancies can be exploited for HRS only when certain conditions hold.
Disclosure
Discussion
Conclusion
Thank You!