Request Smuggling
HTTP Request smuggling occurs when multiple "things" process a request, but differ on how they determine where the request starts/ends. This disagreement can be used to interfere with another user's request/response or to bypass security controls. It normally occurs due to prioritising different HTTP headers (Content-Length vs Transfer-Encoding), differences in handling malformed headers (eg whether to ignore headers with unexpected whitespace), due to downgrading requests from a newer protocol, or due to differences in when a partial request has timed out and should be discarded.
Summary
Tools
CL.TE vulnerabilities
TE.CL vulnerabilities
TE.TE behavior: obfuscating the TE header
References
Tools
Simple HTTP Smuggler Generator CL.TE TE.CL > this tool does not offer automated exploitation. You have to identify the injection point and exploit it manually!
About CL.TE | TE.CL Vulnerabilities
If you want to exploit HTTP Requests Smuggling manually you will face some problems especially in TE.CL vulnerability you have to calculate the chunk size for the second request(malicious request) as portswigger suggests Manually fixing the length fields in request smuggling attacks can be tricky.
. For that reason you can use the Simple HTTP Smuggler Generator CL.TE TE.CL and exploit the CL.TE TE.CL vulnerabilities manually and learn how this vulnerability works and how you can exploit it. This tool offers you only the second request with a valid chunk size(TE.CL) auto-generated but does not offer automated exploitation. You have to identify the injection point and exploit it manually!
CL.TE vulnerabilities
The front-end server uses the Content-Length header and the back-end server uses the Transfer-Encoding header.
Example:
Challenge: https://portswigger.net/web-security/request-smuggling/lab-basic-cl-te
TE.CL vulnerabilities
The front-end server uses the Transfer-Encoding header and the back-end server uses the Content-Length header.
Example:
Challenge: https://portswigger.net/web-security/request-smuggling/lab-basic-te-cl
TE.TE behavior: obfuscating the TE header
The front-end and back-end servers both support the Transfer-Encoding header, but one of the servers can be induced not to process it by obfuscating the header in some way.
Challenge: https://portswigger.net/web-security/request-smuggling/lab-ofuscating-te-header
HTTP/2 Request Smuggling
HTTP/2 request smuggling can occur if a machine converts your HTTP/2 request to HTTP/1.1, and you can smuggle an invalid content-length header, transfer-encoding header or new lines (CRLF) into the translated request. HTTP/2 request smuggling can also occur in a GET request, if you can hide an HTTP/1.1 request inside an HTTP/2 header
Challenge: https://portswigger.net/web-security/request-smuggling/advanced/response-queue-poisoning/lab-request-smuggling-h2-response-queue-poisoning-via-te-request-smuggling
Client-side desync
On some paths, servers don't expect POST requests, and will treat them as simple GET requests, ignoring the payload, eg:
could be treated as two requests when it should only be one. When the backend server responds twice, the frontend server will assume only the first response is related to this request.
To exploit this, an attacker can use JavaScript to trigger their victim to send a POST to the vulnerable site:
This could be used to:
get the vulnerable site to store a victim's credentials somewhere the attacker can access it
get the victim to send an exploit to a site (eg for internal sites the attacker cannot access, or to make it harder to attribute the attack)
to get the victim to run arbitrary JavaScript as if it were from the site
Eg:
tells the victim browser to send a POST request to www.example.com/redirect. That returns a redirect which is blocked by CORS, and causes the browser to execute the catch block, by going to www.example.com.
www.example.com now incorrectly processes the HEAD request in the POST's body, instead of the browser's GET request, and returns 404 not found with a content-length, before replying to the next misinterpreted third (GET /x?x=<script>...
) request and finally the browser's actual GET request. Since the browser only sent one request, it accepts the response to the HEAD request as the response to its GET request and interprets the third and fourth responses as the body of the response, and thus executes the attacker's script.
Challenge: https://portswigger.net/web-security/request-smuggling/browser/client-side-desync/lab-client-side-desync
References
Last updated