Course contentsShow
← Security
Lesson 1107 of 3,05223. Web Security - Modern Web AttacksFree lesson

TE.TE Obfuscation Attacks

Using multiple or malformed Transfer-Encoding headers to cause parsing inconsistencies in server chains.

TE.TE Obfuscation Attacks

You'll learn how attackers exploit ambiguous Transfer-Encoding headers to desynchronize requests between proxy and backend servers.


What Is TE.TE Obfuscation?

In the previous lesson, you learned about CL.TE and TE.CL desync attacks where the frontend and backend disagree about which header to trust (Content-Length vs. Transfer-Encoding). But what if both servers prefer Transfer-Encoding?

TE.TE attacks exploit this by sending multiple or malformed Transfer-Encoding headers. One server processes the header correctly while the other rejects, ignores, or misinterprets it—causing them to disagree on where one request ends and the next begins.

Think of it like two librarians sorting books. Both prefer sorting by ISBN, but one ignores books with damaged barcodes while the other tries to scan them anyway. They end up grouping books differently.


How It Works

Attackers craft requests with obfuscated Transfer-Encoding headers:

POST / HTTP/1.1
Transfer-Encoding: chunked
Transfer-Encoding: chunked-invalid
Content-Length: 4

5c
SMUGGLED
0

Or using whitespace/encoding tricks:

Transfer-Encoding: chunked
Transfer-Encoding: xchunked

The frontend might accept the first valid chunked header, while the backend rejects all of them and falls back to Content-Length. This creates a desync: the frontend thinks it's processing chunked data, while the backend reads a fixed-length body.


Why This Matters

Even when both systems "prefer" the same header type, subtle parsing differences enable smuggling attacks that can bypass security controls, poison caches, or hijack user sessions.

Key Takeaway:
TE.TE attacks exploit subtle parsing differences in how servers handle multiple or malformed Transfer-Encoding headers, causing desynchronization even when both systems nominally support the same protocol.