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
8a39a86a10
commit
57f96be610
@ -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 @@
|
||||
# Lista de verificación - Escalación de privilegios local en Windows
|
||||
# Lista de verificación - Local Windows Privilege Escalation
|
||||
|
||||
{{#include ../banners/hacktricks-training.md}}
|
||||
|
||||
### **Mejor herramienta para buscar vectores de escalación de privilegios locales en Windows:** [**WinPEAS**](https://github.com/carlospolop/privilege-escalation-awesome-scripts-suite/tree/master/winPEAS)
|
||||
### **Mejor herramienta para buscar vectores de escalada de privilegios local en Windows:** [**WinPEAS**](https://github.com/carlospolop/privilege-escalation-awesome-scripts-suite/tree/master/winPEAS)
|
||||
|
||||
### [Información del sistema](windows-local-privilege-escalation/#system-info)
|
||||
### [Información del sistema](windows-local-privilege-escalation/index.html#system-info)
|
||||
|
||||
- [ ] Obtener [**Información del sistema**](windows-local-privilege-escalation/#system-info)
|
||||
- [ ] Buscar **exploits de kernel** [**usando scripts**](windows-local-privilege-escalation/#version-exploits)
|
||||
- [ ] Usar **Google para buscar** **exploits de kernel**
|
||||
- [ ] Usar **searchsploit para buscar** **exploits de kernel**
|
||||
- [ ] ¿Información interesante en [**variables de entorno**](windows-local-privilege-escalation/#environment)?
|
||||
- [ ] ¿Contraseñas en [**historial de PowerShell**](windows-local-privilege-escalation/#powershell-history)?
|
||||
- [ ] ¿Información interesante en [**configuraciones de Internet**](windows-local-privilege-escalation/#internet-settings)?
|
||||
- [ ] ¿[**Unidades**](windows-local-privilege-escalation/#drives)?
|
||||
- [ ] ¿[**Explotación de WSUS**](windows-local-privilege-escalation/#wsus)?
|
||||
- [ ] ¿[**AlwaysInstallElevated**](windows-local-privilege-escalation/#alwaysinstallelevated)?
|
||||
- [ ] Obtener [**System information**](windows-local-privilege-escalation/index.html#system-info)
|
||||
- [ ] Buscar **exploits** de **kernel** [**usando scripts**](windows-local-privilege-escalation/index.html#version-exploits)
|
||||
- [ ] Usar **Google** para buscar **exploits** de kernel
|
||||
- [ ] Usar **searchsploit** para buscar **exploits** de kernel
|
||||
- [ ] ¿Información interesante en [**env vars**](windows-local-privilege-escalation/index.html#environment)?
|
||||
- [ ] ¿Contraseñas en el [**historial de PowerShell**](windows-local-privilege-escalation/index.html#powershell-history)?
|
||||
- [ ] ¿Información interesante en los [**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)?
|
||||
|
||||
### [Enumeración de registros/AV](windows-local-privilege-escalation/#enumeration)
|
||||
### [Enumeración de Logging/AV](windows-local-privilege-escalation/index.html#enumeration)
|
||||
|
||||
- [ ] Verificar [**configuraciones de auditoría**](windows-local-privilege-escalation/#audit-settings) y [**WEF**](windows-local-privilege-escalation/#wef)
|
||||
- [ ] Verificar [**LAPS**](windows-local-privilege-escalation/#laps)
|
||||
- [ ] Verificar si [**WDigest**](windows-local-privilege-escalation/#wdigest) está activo
|
||||
- [ ] ¿[**Protección de LSA**](windows-local-privilege-escalation/#lsa-protection)?
|
||||
- [ ] ¿[**Credentials Guard**](windows-local-privilege-escalation/#credentials-guard)[?](windows-local-privilege-escalation/#cached-credentials)
|
||||
- [ ] ¿[**Credenciales en caché**](windows-local-privilege-escalation/#cached-credentials)?
|
||||
- [ ] Verificar si hay algún [**AV**](https://github.com/carlospolop/hacktricks/blob/master/windows-hardening/windows-av-bypass/README.md)
|
||||
- [ ] ¿[**Política de AppLocker**](https://github.com/carlospolop/hacktricks/blob/master/windows-hardening/authentication-credentials-uac-and-efs/README.md#applocker-policy)?
|
||||
- [ ] Revisar la configuración de [**Audit**](windows-local-privilege-escalation/index.html#audit-settings) y [**WEF**](windows-local-privilege-escalation/index.html#wef)
|
||||
- [ ] Comprobar [**LAPS**](windows-local-privilege-escalation/index.html#laps)
|
||||
- [ ] Comprobar si [**WDigest**](windows-local-privilege-escalation/index.html#wdigest) está activo
|
||||
- [ ] [**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)
|
||||
- [ ] [**Cached Credentials**](windows-local-privilege-escalation/index.html#cached-credentials)?
|
||||
- [ ] Comprobar si hay algún [**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)
|
||||
- [ ] [**Privilegios de usuario**](windows-local-privilege-escalation/#users-and-groups)
|
||||
- [ ] Verificar [**privilegios del usuario actual**](windows-local-privilege-escalation/#users-and-groups)
|
||||
- [ ] ¿Eres [**miembro de algún grupo privilegiado**](windows-local-privilege-escalation/#privileged-groups)?
|
||||
- [ ] Verificar si tienes [cualquiera de estos tokens habilitados](windows-local-privilege-escalation/#token-manipulation): **SeImpersonatePrivilege, SeAssignPrimaryPrivilege, SeTcbPrivilege, SeBackupPrivilege, SeRestorePrivilege, SeCreateTokenPrivilege, SeLoadDriverPrivilege, SeTakeOwnershipPrivilege, SeDebugPrivilege** ?
|
||||
- [ ] ¿[**Sesiones de usuarios**](windows-local-privilege-escalation/#logged-users-sessions)?
|
||||
- [ ] Verificar [**carpetas de usuarios**](windows-local-privilege-escalation/#home-folders) (¿acceso?)
|
||||
- [ ] Verificar [**Política de contraseñas**](windows-local-privilege-escalation/#password-policy)
|
||||
- [ ] ¿Qué hay [**dentro del portapapeles**](windows-local-privilege-escalation/#get-the-content-of-the-clipboard)?
|
||||
- [ ] [**Privilegios de usuario**](windows-local-privilege-escalation/index.html#users-and-groups)
|
||||
- [ ] Comprobar [**privilegios** del **usuario actual**](windows-local-privilege-escalation/index.html#users-and-groups)
|
||||
- [ ] ¿Eres [**miembro de algún grupo privilegiado**](windows-local-privilege-escalation/index.html#privileged-groups)?
|
||||
- [ ] Comprobar si tienes habilitados algunos de estos tokens: **SeImpersonatePrivilege, SeAssignPrimaryPrivilege, SeTcbPrivilege, SeBackupPrivilege, SeRestorePrivilege, SeCreateTokenPrivilege, SeLoadDriverPrivilege, SeTakeOwnershipPrivilege, SeDebugPrivilege** ?
|
||||
- [ ] [**Sesiones de usuarios**](windows-local-privilege-escalation/index.html#logged-users-sessions)?
|
||||
- [ ] Comprobar [**carpetas home** de los usuarios](windows-local-privilege-escalation/index.html#home-folders) (¿acceso?)
|
||||
- [ ] Comprobar la [**Password Policy**](windows-local-privilege-escalation/index.html#password-policy)
|
||||
- [ ] ¿Qué hay [**dentro del Portapapeles**](windows-local-privilege-escalation/index.html#get-the-content-of-the-clipboard)?
|
||||
|
||||
### [Red](windows-local-privilege-escalation/#network)
|
||||
### [Red](windows-local-privilege-escalation/index.html#network)
|
||||
|
||||
- [ ] Verificar **información de red** [**actual**](windows-local-privilege-escalation/#network)
|
||||
- [ ] Verificar **servicios locales ocultos** restringidos al exterior
|
||||
- [ ] Comprobar la [**información de red actual**](windows-local-privilege-escalation/index.html#network)
|
||||
- [ ] Comprobar servicios locales ocultos restringidos al exterior
|
||||
|
||||
### [Procesos en ejecución](windows-local-privilege-escalation/#running-processes)
|
||||
### [Procesos en ejecución](windows-local-privilege-escalation/index.html#running-processes)
|
||||
|
||||
- [ ] Permisos de [**archivos y carpetas de procesos**](windows-local-privilege-escalation/#file-and-folder-permissions)
|
||||
- [ ] [**Minería de contraseñas en memoria**](windows-local-privilege-escalation/#memory-password-mining)
|
||||
- [ ] [**Aplicaciones GUI inseguras**](windows-local-privilege-escalation/#insecure-gui-apps)
|
||||
- [ ] ¿Robar credenciales con **procesos interesantes** a través de `ProcDump.exe`? (firefox, chrome, etc ...)
|
||||
- [ ] Comprobar permisos de archivos y carpetas de los binarios de procesos [**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)
|
||||
- [ ] ¿Robar credenciales con **procesos interesantes** vía `ProcDump.exe`? (firefox, chrome, etc ...)
|
||||
|
||||
### [Servicios](windows-local-privilege-escalation/#services)
|
||||
### [Services](windows-local-privilege-escalation/index.html#services)
|
||||
|
||||
- [ ] ¿Puedes **modificar algún servicio**?
|
||||
- [ ] ¿Puedes **modificar** el **binario** que es **ejecutado** por algún **servicio**?
|
||||
- [ ] ¿Puedes **modificar** el **registro** de algún **servicio**?
|
||||
- [ ] ¿Puedes aprovechar algún **camino de binario de servicio no citado**?
|
||||
- [ ] ¿Puedes **modificar algún servicio**? (windows-local-privilege-escalation/index.html#permissions)
|
||||
- [ ] ¿Puedes **modificar** el **binario** que es **ejecutado** por algún **servicio**? (windows-local-privilege-escalation/index.html#modify-service-binary-path)
|
||||
- [ ] ¿Puedes **modificar** el **registro** de algún **servicio**? (windows-local-privilege-escalation/index.html#services-registry-modify-permissions)
|
||||
- [ ] ¿Puedes aprovechar alguna ruta de binario de servicio **sin comillas**? (windows-local-privilege-escalation/index.html#unquoted-service-paths)
|
||||
|
||||
### [**Aplicaciones**](windows-local-privilege-escalation/#applications)
|
||||
### [**Applications**](windows-local-privilege-escalation/index.html#applications)
|
||||
|
||||
- [ ] **Escribir** [**permisos en aplicaciones instaladas**](windows-local-privilege-escalation/#write-permissions)
|
||||
- [ ] [**Aplicaciones de inicio**](windows-local-privilege-escalation/#run-at-startup)
|
||||
- [ ] **Controladores** [**vulnerables**](windows-local-privilege-escalation/#drivers)
|
||||
- [ ] **Permisos de escritura** en las [**aplicaciones instaladas**](windows-local-privilege-escalation/index.html#write-permissions)
|
||||
- [ ] [**Startup Applications**](windows-local-privilege-escalation/index.html#run-at-startup)
|
||||
- [ ] [**Drivers**](windows-local-privilege-escalation/index.html#drivers) **vulnerables**
|
||||
|
||||
### [Secuestro de DLL](windows-local-privilege-escalation/#path-dll-hijacking)
|
||||
### [DLL Hijacking](windows-local-privilege-escalation/index.html#path-dll-hijacking)
|
||||
|
||||
- [ ] ¿Puedes **escribir en alguna carpeta dentro de PATH**?
|
||||
- [ ] ¿Hay algún binario de servicio conocido que **intente cargar alguna DLL no existente**?
|
||||
- [ ] ¿Hay algún binario de servicio conocido que **intente cargar alguna DLL inexistente**?
|
||||
- [ ] ¿Puedes **escribir** en alguna **carpeta de binarios**?
|
||||
|
||||
### [Red](windows-local-privilege-escalation/#network)
|
||||
### [Red](windows-local-privilege-escalation/index.html#network)
|
||||
|
||||
- [ ] Enumerar la red (comparticiones, interfaces, rutas, vecinos, ...)
|
||||
- [ ] Prestar especial atención a los servicios de red que escuchan en localhost (127.0.0.1)
|
||||
- [ ] Enumerar la red (shares, interfaces, rutas, vecinos, ...)
|
||||
- [ ] Poner especial atención a los servicios de red escuchando en localhost (127.0.0.1)
|
||||
|
||||
### [Credenciales de Windows](windows-local-privilege-escalation/#windows-credentials)
|
||||
### [Windows Credentials](windows-local-privilege-escalation/index.html#windows-credentials)
|
||||
|
||||
- [ ] Credenciales de [**Winlogon**](windows-local-privilege-escalation/#winlogon-credentials)
|
||||
- [ ] ¿Credenciales de [**Windows Vault**](windows-local-privilege-escalation/#credentials-manager-windows-vault) que podrías usar?
|
||||
- [ ] ¿Credenciales [**DPAPI**](windows-local-privilege-escalation/#dpapi) interesantes?
|
||||
- [ ] ¿Contraseñas de redes [**Wifi guardadas**](windows-local-privilege-escalation/#wifi)?
|
||||
- [ ] ¿Información interesante en [**Conexiones RDP guardadas**](windows-local-privilege-escalation/#saved-rdp-connections)?
|
||||
- [ ] ¿Contraseñas en [**comandos ejecutados recientemente**](windows-local-privilege-escalation/#recently-run-commands)?
|
||||
- [ ] ¿Contraseñas del [**Administrador de credenciales de Escritorio Remoto**](windows-local-privilege-escalation/#remote-desktop-credential-manager)?
|
||||
- [ ] ¿Existe [**AppCmd.exe**](windows-local-privilege-escalation/#appcmd-exe)? ¿Credenciales?
|
||||
- [ ] ¿[**SCClient.exe**](windows-local-privilege-escalation/#scclient-sccm)? ¿Carga lateral de DLL?
|
||||
- [ ] Credenciales de [**Winlogon**](windows-local-privilege-escalation/index.html#winlogon-credentials)
|
||||
- [ ] ¿Credenciales del [**Windows Vault**](windows-local-privilege-escalation/index.html#credentials-manager-windows-vault) que podrías usar?
|
||||
- [ ] ¿Credenciales interesantes de [**DPAPI**](windows-local-privilege-escalation/index.html#dpapi)?
|
||||
- [ ] ¿Contraseñas de [**Wifi networks**](windows-local-privilege-escalation/index.html#wifi) guardadas?
|
||||
- [ ] ¿Información interesante en [**saved RDP Connections**](windows-local-privilege-escalation/index.html#saved-rdp-connections)?
|
||||
- [ ] ¿Contraseñas en [**recently run commands**](windows-local-privilege-escalation/index.html#recently-run-commands)?
|
||||
- [ ] ¿Contraseñas del [**Remote Desktop Credentials Manager**](windows-local-privilege-escalation/index.html#remote-desktop-credential-manager)?
|
||||
- [ ] ¿[**AppCmd.exe**](windows-local-privilege-escalation/index.html#appcmd-exe) existe? ¿Credenciales?
|
||||
- [ ] [**SCClient.exe**](windows-local-privilege-escalation/index.html#scclient-sccm)? ¿DLL Side Loading?
|
||||
|
||||
### [Archivos y Registro (Credenciales)](windows-local-privilege-escalation/#files-and-registry-credentials)
|
||||
### [Files and Registry (Credentials)](windows-local-privilege-escalation/index.html#files-and-registry-credentials)
|
||||
|
||||
- [ ] **Putty:** [**Credenciales**](windows-local-privilege-escalation/#putty-creds) **y** [**claves de host SSH**](windows-local-privilege-escalation/#putty-ssh-host-keys)
|
||||
- [ ] ¿[**Claves SSH en el registro**](windows-local-privilege-escalation/#ssh-keys-in-registry)?
|
||||
- [ ] ¿Contraseñas en [**archivos desatendidos**](windows-local-privilege-escalation/#unattended-files)?
|
||||
- [ ] ¿Alguna copia de seguridad de [**SAM & SYSTEM**](windows-local-privilege-escalation/#sam-and-system-backups)?
|
||||
- [ ] ¿[**Credenciales en la nube**](windows-local-privilege-escalation/#cloud-credentials)?
|
||||
- [ ] ¿Archivo de [**McAfee SiteList.xml**](windows-local-privilege-escalation/#mcafee-sitelist.xml)?
|
||||
- [ ] ¿[**Contraseña GPP en caché**](windows-local-privilege-escalation/#cached-gpp-pasword)?
|
||||
- [ ] ¿Contraseña en [**archivo de configuración de IIS Web**](windows-local-privilege-escalation/#iis-web-config)?
|
||||
- [ ] ¿Información interesante en [**registros web**](windows-local-privilege-escalation/#logs)?
|
||||
- [ ] ¿Quieres [**pedir credenciales**](windows-local-privilege-escalation/#ask-for-credentials) al usuario?
|
||||
- [ ] ¿Archivos interesantes dentro de la [**Papelera de reciclaje**](windows-local-privilege-escalation/#credentials-in-the-recyclebin)?
|
||||
- [ ] ¿Otros [**registros que contienen credenciales**](windows-local-privilege-escalation/#inside-the-registry)?
|
||||
- [ ] ¿Dentro de [**datos del navegador**](windows-local-privilege-escalation/#browsers-history) (dbs, historial, marcadores, ...)?
|
||||
- [ ] [**Búsqueda de contraseñas genéricas**](windows-local-privilege-escalation/#generic-password-search-in-files-and-registry) en archivos y registro
|
||||
- [ ] [**Herramientas**](windows-local-privilege-escalation/#tools-that-search-for-passwords) para buscar contraseñas automáticamente
|
||||
- [ ] **Putty:** [**Creds**](windows-local-privilege-escalation/index.html#putty-creds) **y** [**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)?
|
||||
- [ ] ¿Contraseñas en [**unattended files**](windows-local-privilege-escalation/index.html#unattended-files)?
|
||||
- [ ] ¿Alguna copia de seguridad de [**SAM & SYSTEM**](windows-local-privilege-escalation/index.html#sam-and-system-backups)?
|
||||
- [ ] ¿[**Cloud credentials**](windows-local-privilege-escalation/index.html#cloud-credentials)?
|
||||
- [ ] ¿Archivo [**McAfee SiteList.xml**](windows-local-privilege-escalation/index.html#mcafee-sitelist.xml)?
|
||||
- [ ] ¿[**Cached GPP Password**](windows-local-privilege-escalation/index.html#cached-gpp-pasword)?
|
||||
- [ ] ¿Contraseña en el [**IIS Web config file**](windows-local-privilege-escalation/index.html#iis-web-config)?
|
||||
- [ ] ¿Información interesante en los [**web logs**](windows-local-privilege-escalation/index.html#logs)?
|
||||
- [ ] ¿Quieres [**pedir credenciales**](windows-local-privilege-escalation/index.html#ask-for-credentials) al usuario?
|
||||
- [ ] ¿Archivos interesantes dentro de la Papelera [**Recycle Bin**](windows-local-privilege-escalation/index.html#credentials-in-the-recyclebin)?
|
||||
- [ ] Otras [**ramas del registro que contienen credenciales**](windows-local-privilege-escalation/index.html#inside-the-registry)?
|
||||
- [ ] ¿Dentro de los [**Browser data**](windows-local-privilege-escalation/index.html#browsers-history) (dbs, history, bookmarks, ...)?
|
||||
- [ ] [**Búsqueda genérica de contraseñas**](windows-local-privilege-escalation/index.html#generic-password-search-in-files-and-registry) en archivos y registro
|
||||
- [ ] [**Herramientas**](windows-local-privilege-escalation/index.html#tools-that-search-for-passwords) para buscar contraseñas automáticamente
|
||||
|
||||
### [Manejadores filtrados](windows-local-privilege-escalation/#leaked-handlers)
|
||||
### [Leaked Handlers](windows-local-privilege-escalation/index.html#leaked-handlers)
|
||||
|
||||
- [ ] ¿Tienes acceso a algún manejador de un proceso ejecutado por el administrador?
|
||||
- [ ] ¿Tienes acceso a algún handler de un proceso ejecutado por administrador?
|
||||
|
||||
### [Suplantación de cliente de Pipe](windows-local-privilege-escalation/#named-pipe-client-impersonation)
|
||||
### [Impersonación de cliente de Pipe](windows-local-privilege-escalation/index.html#named-pipe-client-impersonation)
|
||||
|
||||
- [ ] Verifica si puedes abusar de ello
|
||||
- [ ] Comprobar si puedes abusarlo
|
||||
|
||||
{{#include ../banners/hacktricks-training.md}}
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,123 @@
|
||||
# Abusing Enterprise Auto-Updaters and Privileged IPC (p. ej., Netskope stAgentSvc)
|
||||
|
||||
{{#include ../../banners/hacktricks-training.md}}
|
||||
|
||||
Esta página generaliza una clase de cadenas de escalada de privilegios locales en Windows encontradas en agentes de endpoint empresariales y updaters que exponen una superficie IPC de baja fricción y un flujo de actualización privilegiado. Un ejemplo representativo es Netskope Client for Windows < R129 (CVE-2025-0309), donde un usuario de bajos privilegios puede forzar el registro en un servidor controlado por el atacante y luego entregar un MSI malicioso que instala el servicio SYSTEM.
|
||||
|
||||
Ideas clave que puedes reutilizar contra productos similares:
|
||||
- Abusar del localhost IPC de un servicio privilegiado para forzar el re‑registro o la reconfiguración hacia un servidor controlado por el atacante.
|
||||
- Implementar los endpoints de actualización del proveedor, entregar una Trusted Root CA maliciosa y apuntar el updater a un paquete malicioso “signed”.
|
||||
- Eludir verificaciones de firmante débiles (CN allow‑lists), flags de digest opcionales y propiedades laxas de MSI.
|
||||
- Si el IPC está “encrypted”, derivar la key/IV a partir de identificadores de máquina legibles por todos almacenados en el registry.
|
||||
- Si el servicio restringe los llamantes por image path/process name, inyectar en un proceso en la allow‑list o spawnear uno suspended y bootstrapear tu DLL vía un parche mínimo de thread‑context.
|
||||
|
||||
---
|
||||
## 1) Forcing enrollment to an attacker server via localhost IPC
|
||||
|
||||
Muchos agentes incluyen un proceso UI en user‑mode que se comunica con un servicio SYSTEM vía localhost TCP usando JSON.
|
||||
|
||||
Observed in Netskope:
|
||||
- UI: stAgentUI (integridad baja) ↔ Service: stAgentSvc (SYSTEM)
|
||||
- Comando IPC ID 148: IDP_USER_PROVISIONING_WITH_TOKEN
|
||||
|
||||
Flujo de explotación:
|
||||
1) Crea un token de registro JWT cuyas claims controlen el host backend (p. ej., AddonUrl). Usa alg=None para que no se requiera firma.
|
||||
2) Envía el mensaje IPC invocando el comando de provisioning con tu JWT y el nombre del tenant:
|
||||
```json
|
||||
{
|
||||
"148": {
|
||||
"idpTokenValue": "<JWT with AddonUrl=attacker-host; header alg=None>",
|
||||
"tenantName": "TestOrg"
|
||||
}
|
||||
}
|
||||
```
|
||||
3) El servicio comienza a contactar tu servidor malicioso para enrollment/config, p. ej.:
|
||||
- /v1/externalhost?service=enrollment
|
||||
- /config/user/getbrandingbyemail
|
||||
|
||||
Notas:
|
||||
- Si la verificación del llamador se basa en ruta/nombre, origina la solicitud desde un binario del proveedor en la lista permitida (ver §4).
|
||||
|
||||
---
|
||||
## 2) Secuestrar el canal de actualizaciones para ejecutar código como SYSTEM
|
||||
|
||||
Una vez que el cliente se comunique con tu servidor, implementa los endpoints esperados y redirígelo a un MSI del atacante. Secuencia típica:
|
||||
|
||||
1) /v2/config/org/clientconfig → Devuelve una configuración JSON con un intervalo de actualización muy corto, p. ej.:
|
||||
```json
|
||||
{
|
||||
"clientUpdate": { "updateIntervalInMin": 1 },
|
||||
"check_msi_digest": false
|
||||
}
|
||||
```
|
||||
2) /config/ca/cert → Devuelve un certificado CA en formato PEM. El servicio lo instala en el Local Machine Trusted Root store.
|
||||
3) /v2/checkupdate → Proporciona metadata que apunta a un MSI malicioso y una versión falsa.
|
||||
|
||||
Bypassing common checks seen in the wild:
|
||||
- Signer CN allow‑list: el servicio puede solo comprobar que el Subject CN sea “netSkope Inc” o “Netskope, Inc.”. Tu CA malintencionada puede emitir un leaf con ese CN y firmar el MSI.
|
||||
- CERT_DIGEST property: incluye una propiedad MSI benigna llamada CERT_DIGEST. No hay aplicación en la instalación.
|
||||
- Optional digest enforcement: un flag de config (p. ej., check_msi_digest=false) deshabilita validación criptográfica adicional.
|
||||
|
||||
Resultado: el servicio SYSTEM instala tu MSI desde
|
||||
C:\ProgramData\Netskope\stAgent\data\*.msi
|
||||
ejecutando código arbitrario como NT AUTHORITY\SYSTEM.
|
||||
|
||||
---
|
||||
## 3) Forging encrypted IPC requests (when present)
|
||||
|
||||
Desde R127, Netskope envolvió el JSON de IPC en un campo encryptData que parece Base64. El reversing mostró AES con key/IV derivados de valores de registro legibles por cualquier usuario:
|
||||
- Key = HKLM\SOFTWARE\NetSkope\Provisioning\nsdeviceidnew
|
||||
- IV = HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProductID
|
||||
|
||||
Los atacantes pueden reproducir la encriptación y enviar comandos encriptados válidos desde un usuario estándar. Consejo general: si un agent de repente “encripta” su IPC, busca device IDs, product GUIDs, install IDs bajo HKLM como material.
|
||||
|
||||
---
|
||||
## 4) Bypassing IPC caller allow‑lists (path/name checks)
|
||||
|
||||
Algunos servicios intentan autenticar al peer resolviendo el PID de la conexión TCP y comparando la ruta/nombre de la imagen contra binarios allow‑listed del vendor ubicados bajo Program Files (p. ej., stagentui.exe, bwansvc.exe, epdlp.exe).
|
||||
|
||||
Dos bypass prácticos:
|
||||
- DLL injection en un proceso allow‑listed (p. ej., nsdiag.exe) y proxear IPC desde dentro de él.
|
||||
- Spawn de un binario allow‑listed en estado suspended y bootstrap de tu proxy DLL sin CreateRemoteThread (ver §5) para satisfacer reglas de tamper impuestas por drivers.
|
||||
|
||||
---
|
||||
## 5) Tamper‑protection friendly injection: suspended process + NtContinue patch
|
||||
|
||||
Los productos suelen incluir un driver con minifilter/OB callbacks (p. ej., Stadrv) para eliminar derechos peligrosos de handles a procesos protegidos:
|
||||
- Process: remueve PROCESS_TERMINATE, PROCESS_CREATE_THREAD, PROCESS_VM_READ, PROCESS_DUP_HANDLE, PROCESS_SUSPEND_RESUME
|
||||
- Thread: restringe a THREAD_GET_CONTEXT, THREAD_QUERY_LIMITED_INFORMATION, THREAD_RESUME, SYNCHRONIZE
|
||||
|
||||
Un loader user‑mode fiable que respeta estas restricciones:
|
||||
1) CreateProcess de un binario del vendor con CREATE_SUSPENDED.
|
||||
2) Obtener handles que aún puedes: PROCESS_VM_WRITE | PROCESS_VM_OPERATION en el proceso, y un thread handle con THREAD_GET_CONTEXT/THREAD_SET_CONTEXT (o solo THREAD_RESUME si parcheas código en un RIP conocido).
|
||||
3) Sobrescribir ntdll!NtContinue (u otro thunk temprano garantizado mapeado) con un stub mínimo que llame a LoadLibraryW sobre la ruta de tu DLL, y luego salte de vuelta.
|
||||
4) ResumeThread para disparar tu stub in‑process, cargando tu DLL.
|
||||
|
||||
Porque nunca usaste PROCESS_CREATE_THREAD o PROCESS_SUSPEND_RESUME sobre un proceso ya protegido (tú lo creaste), la política del driver queda satisfecha.
|
||||
|
||||
---
|
||||
## 6) Practical tooling
|
||||
- NachoVPN (Netskope plugin) automatiza una rogue CA, firma de MSI malicioso, y sirve los endpoints necesarios: /v2/config/org/clientconfig, /config/ca/cert, /v2/checkupdate.
|
||||
- UpSkope es un IPC client custom que crea mensajes IPC arbitrarios (opcionalmente AES‑encriptados) e incluye la inyección por proceso suspendido para originar desde un binario allow‑listed.
|
||||
|
||||
---
|
||||
## 7) Detection opportunities (blue team)
|
||||
- Monitoriza adiciones al Local Machine Trusted Root. Sysmon + registry‑mod eventing (ver SpecterOps guidance) funciona bien.
|
||||
- Marca ejecuciones de MSI iniciadas por el servicio del agent desde rutas como C:\ProgramData\<vendor>\<agent>\data\*.msi.
|
||||
- Revisa logs del agent por hosts/tenants de enrolamiento inesperados, p. ej.: C:\ProgramData\netskope\stagent\logs\nsdebuglog.log – busca addonUrl / tenant anomalies y provisioning msg 148.
|
||||
- Alerta sobre clientes IPC localhost que no sean los binarios firmados esperados, o que se originen desde árboles de procesos inusuales.
|
||||
|
||||
---
|
||||
## Hardening tips for vendors
|
||||
- Ata los hosts de enrolamiento/update a una allow‑list estricta; rechaza dominios no confiables en clientcode.
|
||||
- Autentica peers de IPC con primitivas del OS (ALPC security, named‑pipe SIDs) en lugar de checks por ruta/nombre de imagen.
|
||||
- Mantén material secreto fuera de HKLM legible por el mundo; si IPC debe estar encriptado, deriva keys de secretos protegidos o negocia sobre canales autenticados.
|
||||
- Trata el updater como una superficie de supply‑chain: requiere una cadena completa hacia una CA de confianza que controles, verifica firmas de paquetes contra keys pinned, y falla cerrado si la validación está deshabilitada en la config.
|
||||
|
||||
## 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