> 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/enumeration/remote-sam-enumeration.md).

# Remote-SAM-Enumerierung

### Prinzip

SAM bedeutet **Security Account Manager**.

Es enthält Informationen über:

* lokale Konten;
* lokale Gruppen;
* Mitgliedschaften in lokalen Gruppen.

Auf älteren Windows-Versionen, vor Windows 10 und Windows Server 2016, war es oft möglich, bestimmte SAM-Informationen aus der Ferne ohne erhöhte Berechtigungen aufzulisten.

### Lokale Gruppen eines entfernten Computers auflisten

Mit PowerView:

```powershell
Get-NetLocalGroup -ComputerName WS02
```

Dieser Befehl versucht, die auf `WS02`.

### Alternative ohne PowerView

Mit PowerShell Remoting:

```powershell
Invoke-Command -ScriptBlock { Get-LocalGroupMember -Group Administrators } -ComputerName WS02
```

Dieser Befehl führt `Get-LocalGroupMember` direkt auf `WS02`.

Im Allgemeinen ist dafür erforderlich, dass:

* PowerShell Remoting aktiviert ist;
* der Benutzer die erforderlichen Rechte hat;
* Netzwerk- und Firewallregeln dies zulassen.

### Benutzer anzeigen, die mit einem entfernten Computer verbunden sind

Mit PowerView:

```powershell
Get-NetLoggedon
```

Dieser Befehl identifiziert die Benutzer, die derzeit auf einem Computer authentifiziert sind.

Es ist nützlich zu wissen:

* wo ein Benutzer angemeldet ist;
* ob ein Administrator auf einem Computer aktiv ist;
* welche Computer für eine weitere Analyse interessant sein könnten.

### Die zu Ihrem Computer geöffneten Sitzungen anzeigen

Mit PowerView:

```powershell
Get-NetSession
```

Dieser Befehl zeigt die SMB-Sitzungen an, die zu dem Computer aufgebaut wurden.

Wenn beispielsweise ein Benutzer versucht, auf Folgendes zuzugreifen:

```bash
//WS01/c$
```

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

Dann kann die Verbindung in den sichtbaren Sitzungen erscheinen.


---

# 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/enumeration/remote-sam-enumeration.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.
