- The Content-Length header is straightforward: it specifies the length of the message body in bytes. For example:
Content-Type: application/x-www-form-urlencoded
- The Transfer-Encoding header can be used to specify that the message body uses chunked encoding. This means that the message body contains one or more chunks of data. Each chunk consists of the chunk size in bytes (expressed in hexadecimal), followed by a newline, followed by the chunk contents. The message is terminated with a chunk of size zero. For example:
Content-Type: application/x-www-form-urlencoded
Transfer-Encoding: chunked
• CL.TE: the front-end server uses the Content-Length header and the back-end server uses the Transfer-Encoding header.
Host: vulnerable-website.com
Transfer-Encoding: chunked
• TE.CL: the front-end server uses the Transfer-Encoding header and the back-end server uses the Content-Length header.
Host: vulnerable-website.com
Transfer-Encoding: chunked
• TE.TE: 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.
Using Burp Repeater, issue the following request twice:
Host: your-lab-id.web-security-academy.net
Content-Type: application/x-www-form-urlencoded
Transfer-Encoding: chunked
The second response should say: Unrecognized method GPOST.
In Burp Suite, go to the Repeater menu and ensure that the "Update Content-Length" option is unchecked.
Using Burp Repeater, issue the following request twice:
Host: your-lab-id.web-security-academy.net
Content-Type: application/x-www-form-urlencoded
Transfer-Encoding: chunked
Content-Type: application/x-www-form-urlencoded
- TE.TE: obfuscating TE Header
In Burp Suite, go to the Repeater menu and ensure that the "Update Content-Length" option is unchecked.
Using Burp Repeater, issue the following request twice:
Host: your-lab-id.web-security-academy.net
Content-Type: application/x-www-form-urlencoded
Transfer-Encoding: chunked
Content-Type: application/x-www-form-urlencoded