Exploitation Techniques
Overview
HTTP request smuggling vulnerabilities have high impact because they enable:
WAF Bypass
Access restricted paths/endpoints
Session Hijacking
Steal user cookies/tokens
Forced Actions
Make users perform unintended actions
Data Theft
Capture personal/sensitive data
XSS Amplification
Exploit otherwise unexploitable XSS
1. Bypassing Security Controls (WAFs)
How WAFs Work
WAFs examine:
URL paths and query parameters
Request headers
Request body content
Compute maliciousness scores
Blocking rules examples:
Block requests to
/internal/from external IPsBlock requests containing SQL injection patterns
Block requests with XSS payloads
Why Smuggling Bypasses WAFs
The smuggled request is never treated as a query string by the WAF!
CL.TE WAF Bypass Payload
WAF sees: POST to / (allowed) Back-end sees: POST to /internal/index.php (executed!)
TE.CL WAF Bypass Payload
WAF sees: GET to / (allowed) Back-end sees: GET to /internal/index.php (executed!)
2. Stealing User Data
The Technique
Force victims to submit their request data to a location you control (e.g., comment section, log file, API endpoint).
Scenario
Web app has comment functionality
Comments are publicly visible
App is vulnerable to CL.TE
Comment POST Request (Normal)
Data Stealing Payload
What Happens
Admin's normal request:
Back-end sees smuggled request + admin's request appended:
Result
The comment section now contains:
Session cookie stolen! π―
TCP Stream Analysis - Data Theft
Reverse Proxy View
Web Server View
The smuggled request ends with comment=test - admin's entire request becomes the comment value!
Critical Considerations
Content-Length Tuning
The Content-Length in smuggled request is crucial:
Too small
Only partial data captured
Too large
Timeout waiting for more data
Just right
Full request captured
Strategy: Trial and error, start with ~300 and adjust.
Required Parameters
When smuggling authenticated actions, include:
Your session cookie (
Cookieheader)CSRF tokens (if required)
All mandatory form fields
Parameter Ordering
Place CSRF tokens at the beginning of smuggled body:
If CSRF is at the end, appended victim data may invalidate it.
Practical Exploitation Flow
Step 1: Confirm Vulnerability
Test for CL.TE with HELLO + 405 technique.
Step 2: Authenticate (if needed)
Log in to get valid session cookie and CSRF token.
Step 3: Identify Data Sink
Find where victim data can be captured:
Comment sections
Profile updates
Log files
API responses
Step 4: Craft Payload
Step 5: Send and Wait
Send smuggling request
Wait ~10 seconds for victim
Check data sink for captured data
Step 6: Use Stolen Credentials
Replace your cookie with victim's stolen cookie:
3. Mass Exploitation of Reflected XSS
The Problem with Header-Based XSS
Reflected XSS in HTTP headers (e.g., Host, custom headers) is usually unexploitable:
You cannot force a victim's browser to send custom headers!
Solution: Request Smuggling + XSS
Smuggle a request that injects XSS payload into victim's response.
XSS Exploitation Payload (CL.TE)
What Happens
Our smuggled request with XSS in
Vulnheader left in bufferVictim sends normal request
Victim's request merges with our smuggled request
Back-end processes request with XSS payload
Victim receives response containing XSS
XSS executes in victim's browser!
Attack Flow
Impact
No user interaction required (unlike normal reflected XSS)
Mass exploitation - affects all users visiting after your payload
Exploit "unexploitable" header-based XSS vulnerabilities
Summary: Exploitation Matrix
WAF Bypass
CL.TE / TE.CL
Access restricted paths
Smuggled URL
Data Theft
CL.TE
Steal cookies/tokens
Comment parameter
Forced Actions
CL.TE
Make user perform action
Smuggled request
XSS Amplification
CL.TE / TE.CL
Execute XSS on victims
Smuggled header
Lab Walkthrough Summary
Data Theft Scenario
Test for CL.TE vulnerability (HELLO + 405)
Authenticate with provided credentials
Post a test comment to capture the request format
Craft smuggling payload with comment endpoint
Send and wait for admin to visit
Check comments for leaked admin request
Extract session cookie from comment
Replace your cookie with admin's
Access admin panel
References
Last updated