# Entra ID Attacks

El nuevo perímetro es la identidad en la nube.

## 1. Enumeración (Recon)

Sin tocar la API, solo con OSINT.

* **MicroBurst**: Scripts de PowerShell para enumerar recursos públicos (Blobs, Subdominios).
* **AADInternals**: `Get-AADIntUserEnumeration` para validar usuarios.

### RoadTools (La navaja suiza)

Framework para autenticarte y volcar toda la info de un tenant.

1. **Auth**: `roadrecon auth -u user@target.onmicrosoft.com -p pass`
2. **Dump**: `roadrecon gather`
3. **GUI**: `roadrecon gui` (Te levanta una web local para explorar el grafo de Azure).

## 2. Initial Access Attacks

### Device Code Phishing

El ataque más efectivo contra MFA.

1. Generas un link de "Device Login" legítimo de Microsoft.
2. La víctima pone el código.
3. Tú obtienes el Token de Acceso en tu terminal.

* **Tool**: `TokenTactics` o simple `az cli`.

### Password Spraying

Contra `login.microsoftonline.com`. Cuidado con los bloqueos inteligentes (`Smart Lockout`).

* **MFASweep**: Detecta si el usuario tiene MFA antes de atacar.

## 3. Post-Exploitation (Cloud)

### PRT Abuse (Primary Refresh Token)

Si comprometes un endpoint unido a Azure AD (Hybrid Join).

* El PRT es el "Golden Ticket" de la nube. Permite SSO.
* **Robo**: Usa `MimiKatz` o `RoadToken` para extraer el PRT de la sesión de Windows.
* **Uso**: Genera una cookie de sesión web y entra al portal de Azure sin MFA.

### Azure AD Connect (On-Prem to Cloud)

Si rompes el servidor AD Connect, puedes extraer las credenciales del usuario `MSOL_xxxx`, que suele ser Global Admin.


---

# 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/12.-cloud-hacking-azure/azure-pentesting.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.
