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

# rpcclient (SMB-Tool)

SMB- und Active-Directory-Enumeration mit rpcclient für Benutzer, Gruppen, RIDs, Beschreibungen und Null Sessions.

> Eine **RPCClient** ist ein Programm zum Ausführen entfernter Prozeduraufrufe. Es ermöglicht einem Client, Funktionen oder Methoden auf einem entfernten Server auszuführen, als ob sie lokal ausgeführt würden. Der Client sendet eine Anfrage über ein Netzwerk an den Server, und der Server führt die angeforderte Funktion aus und gibt das Ergebnis an den Client zurück. Diese Kommunikation wird häufig in verteilten Architekturen verwendet, um die Interaktion zwischen verschiedenen Systemen zu erleichtern.

### **Verbindung zum Domänencontroller**

**1. Erster Login ohne Authentifizierung**/ Befehl zum Verbinden mit dem Domänencontroller ohne Angabe eines Passworts. Die `-N` Option teilt `rpcclient` mit, kein Passwort zu senden:

```bash
rpcclient -U "" 10.10.10.175 -N
```

**2. Aufzählung der Domänenbenutzer**/ Zum Auflisten der Domänenbenutzer:

```bash
enumdomusers
```

<figure><img src="https://2955439919-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-8ba2900412473c9125cb98ea67e44eb358aa820b%2Fimage%20(1567).png?alt=media" alt=""><figcaption></figcaption></figure>

**3. Liste der Domänengruppen**/ Befehl zum Auflisten der Domänengruppen:

```bash
rpcclient -U "" 10.10.10.161 -N -c 'enumdomgroups'
```

<figure><img src="https://2955439919-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-a05b4db631f36c83d6747ada6553d52ba4e07944%2Fimage%20(1569).png?alt=media" alt=""><figcaption></figcaption></figure>

### **Erkundung von Benutzern und Gruppen**

**1. Login mit Passwort**/ Verbindung zum Domänencontroller mit einem bestimmten Passwort:

```bash
rpcclient -U "<password>" 10.10.10.10
```

<figure><img src="https://2955439919-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-a8d50175795880762fabaa6e19b27077c6d8b76f%2Fimage%20(2095).png?alt=media" alt=""><figcaption></figcaption></figure>

**2. Mitglieder der Administratorengruppe identifizieren**/ Zum Identifizieren der Mitglieder der Administratorengruppe (RID `0x200`):

```bash
rpcclient -U "<password>" 10.10.10.10 -c 'querygroupmem 0x200'
```

**3. Benutzer in einer bestimmten Gruppe abrufen**/ Um Benutzer in einer bestimmten Gruppe abzurufen (RID `0x1f4`):

```bash
rpcclient -U "<password>" 10.10.10.10 -c 'queryuser 0x1f4'
```

<figure><img src="https://2955439919-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-aea61c2fe124a97485708b74246a6d0827e9a329%2Fimage%20(2096).png?alt=media" alt=""><figcaption></figcaption></figure>

**4. Benutzerbeschreibungen auflisten**/ Zum Auflisten von Beschreibungen für alle Benutzer:

```bash
rpcclient -U "<password>" 10.10.10.10 -c 'querydispinfo'
```

<div data-full-width="true"><figure><img src="https://2955439919-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-31c767e9a21e6717b930a8cdafb9ab30bdc01ae4%2Fimage%20(2097).png?alt=media" alt=""><figcaption></figcaption></figure></div>

### Domänenaufzählung

**1. Anmeldung in der Domäne mit Anmeldeinformationen**/ Verbindung zum Domänencontroller mit Anmeldeinformationen:

```bash
rpcclient -U 'ldap%nvEfEK16^1aM4$e7AclUf8x$tRWxPWO1%lmz' 10.10.11.174
```

**2. Liste der Domänenbenutzer**

Zum Auflisten der Domänenbenutzer:

```
enumdomusers
```

<figure><img src="https://2955439919-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-6b0b35dd85e726addffce56832f56c8a40ea29f4%2Fimage%20(1541).png?alt=media" alt=""><figcaption></figcaption></figure>

**3. Liste der Domänengruppen**/ Um die Gruppen in der Domäne aufzulisten:

```bash
enumdomgroups
```

<figure><img src="https://2955439919-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-db6b248cef31df6216180ce1148c26c917ef9f2a%2Fimage%20(1543).png?alt=media" alt=""><figcaption></figcaption></figure>

**4. Beschreibung von Benutzern**/ Um Benutzerbeschreibungen abzurufen:

```bash
querydispinfo
```

<figure><img src="https://2955439919-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-9a6c088afc83bd590c7cee65ec87e9a5bfd6e8d9%2Fimage%20(1544).png?alt=media" alt=""><figcaption></figcaption></figure>

**5. Einfügen gültiger Benutzer in eine Datei**/ Um alle gültigen Benutzer in eine Datei einzufügen:

```bash
rpcclient -U 'ldap%nvEfEK16^1aM4$e7AclUf8x$tRWxPWO1%lmz' 10.10.11.174 -c 'enumdomusers' | grep -oP '/[.*?/]' | grep -v 0x |tr -d '[]'
```

<figure><img src="https://2955439919-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-8d30a010c21f0ac40cf81716bea9056e3ffe7124%2Fimage%20(1545).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/de/ports-and-services/smb-445/rpcclient-smb-tool.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.
