# 暴力破解攻击和防御

#### 博客作者：联系请[点击](https://hezhiqiang.gitbook.io/about-the-author/lian-xi-zuo-zhe)，搬运不易，希望请作者喝咖啡，可以点击[联系博客作者](https://hezhiqiang.gitbook.io/about-the-author/lian-xi-zuo-zhe)

#### 什么是暴力破解攻击 <a href="#h3-u4ec0u4e48u662fu66b4u529bu7834u89e3u653bu51fb" id="h3-u4ec0u4e48u662fu66b4u529bu7834u89e3u653bu51fb"></a>

暴力破解攻击是指攻击者通过系统地组合并尝试所有的可能性以破解用户的用户名、密码等敏感信息，攻击者往往借助自动化脚本工具来发动暴力破解攻击。

**攻击行为类型**

根据暴力破解的穷举方式，其攻击行为可以分为：

* **字典攻击法**。大多攻击者并没有高性能的破解算法和CPU/GPU，为节省时间和提高效率，会利用社会工程学或其它方式建立破译字典，使用字典中已存在的用户名、密码进行猜破。
* **穷举法**。攻击者首先列出密码组合的可能性（如数字、大写字母、小写字母、特殊字符等），然后按密码长度从1位、2位….构成不同的账号和密码对，然后逐个猜试。该方法需要高性能的破解算法和CPU/GPU作支持。
* **组合式攻击法**。使用字典攻击和穷举法的组合攻击方式。

理论上，只要拥有性能足够强的计算机和足够长的时间，大多密码均可以被破解出来。

**攻击业务类型**

* 针对Windows操作系统的远程桌面管理协议（RDP）、Linux操作系统的管理协议（SSH）的暴力破解攻击
* 针对具有登录认证机制的软件服务（如Mysql、SQLserver、FTP、Web前后端登录接口等应用服务）的暴力破解攻击

对于防御者而言，给攻击者留得时间越长，其组合出正确的用户名和密码的可能性就越大，因此，时间在检测暴力破解攻击时很重要。

#### 暴力破解攻击有什么危害 <a href="#h3-u66b4u529bu7834u89e3u653bu51fbu6709u4ec0u4e48u5371u5bb3" id="h3-u66b4u529bu7834u89e3u653bu51fbu6709u4ec0u4e48u5371u5bb3"></a>

通过自动化工具发起的暴力破解攻击可以获取用户账号和密码。

#### 如何防御暴力破解攻击 <a href="#h3-u5982u4f55u9632u5fa1u66b4u529bu7834u89e3u653bu51fb" id="h3-u5982u4f55u9632u5fa1u66b4u529bu7834u89e3u653bu51fb"></a>

* 制定密码复杂度策略，并进行服务加固。密码的长度要大于 8 位，且最好大于 20 位；密码应由数字、大小写字母和特殊符号混合组成；密码的最长有效期为 90 天。
* 配置好网络访问控制。严格限制将高危服务管理端口直接发布到互联网；建议您使用 VPN 和堡垒机的方式集中管理和审计。
* 提高内部全员安全意识，禁止借用或共享使用账号。


---

# Agent Instructions: 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:

```
GET https://hezhiqiang.gitbook.io/about-the-author/xi-tong-an-quan-jia-gu/bao-li-po-jie-gong-ji-he-fang-yu.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
