Exploitation Techniques

Overview

HTTP request smuggling vulnerabilities have high impact because they enable:

Attack Type
Impact

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 IPs

  • Block 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:

CL Value
Result

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 (Cookie header)

  • 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

  1. Send smuggling request

  2. Wait ~10 seconds for victim

  3. 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

  1. Our smuggled request with XSS in Vuln header left in buffer

  2. Victim sends normal request

  3. Victim's request merges with our smuggled request

  4. Back-end processes request with XSS payload

  5. Victim receives response containing XSS

  6. 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

Technique
Vulnerability Type
Goal
Payload Location

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

  1. Test for CL.TE vulnerability (HELLO + 405)

  2. Authenticate with provided credentials

  3. Post a test comment to capture the request format

  4. Craft smuggling payload with comment endpoint

  5. Send and wait for admin to visit

  6. Check comments for leaked admin request

  7. Extract session cookie from comment

  8. Replace your cookie with admin's

  9. Access admin panel


References

Last updated