Credentials In Files
MITRE ATT&CK™ Unsecured Credentials: Credentials In Files - Technique T1552.00
Theory
Practice
Tools
# Scan filesystem / folder
noseyparker scan --datastore np.myDataStore /path/to/folder
# Get results
noseyparker report -d np.myDataStoreHunting for config files
# /s : Recursive search
# /b : Displays a bare list of directories and files, w/o additional information.
# Check for config/password related files
cd C:\folder\to\search\in
dir /s /b *pass* == *cred* == *vnc* == *.config*
# /A:H : display hidden files
dir /A:H /s "c:\program files"
# Check Recycle.bin and SID Folder
dir /s \'$Recycle.Bin'
# Check for juicy extensions
cd C:\folder\to\search\in
dir /s /b *.txt == *.pdf == *.xls == *.xlsx == *.doc == *.docx == *.ini# Files
Get-ChildItem -Force -Path c:\\ -Filter "*pass*" -Recurse 2>$null
# Directories
Get-ChildItem -Force -Path c:\\ -Directory -Filter "*pass*" -Recurse 2>$null
# Check Recycle.bin and SID Folder
Get-ChildItem -Force -Path \'$Recycle.Bin'
# Check for juicy extensions
Get-ChildItem -Path C:\ -Include *.txt,*.pdf,*.xls,*.xlsx,*.doc,*.docx,*.ini -File -Recurse -ErrorAction SilentlyContinueHunting for passwords
Resources
Last updated