> 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/smbmap-smb-tool.md).

# SMBMap（SMB 工具）

> SMBMap 是一个用于与 SMB 共享交互并评估可用文件权限和内容的实用工具。它允许你列出文件、浏览目录、搜索特定文件并下载感兴趣的文件。以下是一些常用命令：

### 使用空会话列出文件

要在未经身份验证的情况下列出 SMB 主机上可用的文件：

```bash
smbmap -H <ip> -u 'null'
smbmap -H <ip> -u none
```

<figure><img src="/files/9515c3a2af34dfab3f5455c90c47df7d1b8a40d1" alt=""><figcaption></figcaption></figure>

### 列出权限

要查看主机上的权限概况：

```bash
smbmap -H <ip>
```

<figure><img src="/files/914bc469e14826636aeb4e413679525149dd7bf6" alt=""><figcaption></figcaption></figure>

### 搜索特定文件

要浏览目录并搜索特定文件：

```bash
smbmap -H <ip> -r <directory>
```

<figure><img src="/files/a841e71adf995b645d1da7ece96d5a7c9ddd1cd3" alt=""><figcaption></figcaption></figure>

### 下载文件

要下载相关文件，例如 `Groups.xml`，其中可能包含敏感信息：

```bash
smbmap -H <ip> --download <path_to_file>/Groups.xml
```

```bash
smbmap -H 10.10.10.100 --download Replication/active.htb/Policies/{31B2F340-016D-11D2-945F-00C04FB984F9}/MACHINE/Preferences/Groups/Groups.xml
```

<div data-full-width="true"><figure><img src="/files/44ddd6e13511fe6b5f3cbcb2031db5935c6b4dff" alt=""><figcaption></figcaption></figure></div>


---

# 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/ports-and-services/smb-445/smbmap-smb-tool.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.
