19.Credential-hunting
Credential Hunting Commands
Search for "password" in common configuration file types
findstr /SIM /C:"password" *.txt *.ini *.cfg *.config *.xmlSearch for "password" in Chrome's Custom Dictionary
gc 'C:\Users\<user>\AppData\Local\Google\Chrome\User Data\Default\Custom Dictionary.txt' | Select-String passwordGet PowerShell history file path
(Get-PSReadLineOption).HistorySavePathRead PowerShell command history
gc (Get-PSReadLineOption).HistorySavePathExtract PowerShell history from all user profiles
foreach($user in (Get-ChildItem C:\users).FullName){
Get-Content "$user\AppData\Roaming\Microsoft\Windows\PowerShell\PSReadline\ConsoleHost_history.txt" -ErrorAction SilentlyContinue
}Credential Extraction from XML
Import credentials from an XML file
Extract username from the credential object
Extract password from the credential object
Key Concepts:
Last updated