Skip to main content

Overview

The logins command searches for Chromium-based browser ‘Login Data’ files and decrypts saved login credentials including usernames and passwords. This command targets the SQLite databases where browsers store encrypted authentication credentials for websites. SharpChrome uses lockless SQLite database access, meaning target browsers don’t need to be closed during credential extraction. The command automatically handles both legacy DPAPI-protected credentials and newer Chrome 80+ AES-encrypted credentials.

Key Features

  • Extracts saved website login credentials from browser databases
  • Supports multiple decryption methods (CryptUnprotectData, DPAPI masterkeys, domain backup keys)
  • Handles Chrome 80+ AES state key encryption automatically
  • Works while browser is running (lockless database access)
  • Supports local and remote credential extraction
  • Filters output to show only entries with passwords by default

Basic Usage

Command Arguments

Decryption Arguments

flag
Force use of CryptUnprotectData() for decryption. This is the default behavior when running in an unprivileged context. Works only from the user context that saved the credentials.
string
Use a DPAPI domain backup key to decrypt user masterkeys first, then use those to decrypt login credentials.Accepts two formats:
  • Base64-encoded key: /pvk:HvG1sAAAAAABAAAAAAAAAAAAAAACU...
  • File path: /pvk:key.pvk
Requires domain admin rights to obtain the backup key.
string
One or more DPAPI masterkey GUID:SHA1 mappings for decryption.
Obtain these with Mimikatz: sekurlsa::dpapi
file
File containing one or more GUID:SHA1 masterkey mappings (one per line).
string
Decrypt target user’s masterkeys using plaintext password. Works remotely when combined with /server.
string
Decrypt target user’s masterkeys using NTLM hash. Works remotely when combined with /server.
string
Decrypt target user’s masterkeys using DPAPI prekey (domain or local SHA1). Works remotely.
  • Domain users: Use dpapi field from Mimikatz sekurlsa::msv output
  • Local users: Use sha1 field from Mimikatz sekurlsa::msv output
flag
Decrypt target user’s masterkeys by asking the domain controller to decrypt them via RPC.
string
Provide a pre-decrypted AES state key for Chrome 80+ credential decryption.
Obtain the state key first using the statekeys command.

Chrome 80+ State Key Encryption

Starting with Chrome version 80, Google introduced a new encryption mechanism for cookies and login data using AES encryption with a state key stored in the browser’s Local State file.

How It Works

  1. State Key Storage: An AES key is stored in AppData\Local\Google\Chrome\User Data\Local State
  2. DPAPI Protection: The state key itself is encrypted with DPAPI
  3. Credential Encryption: New login entries are encrypted with this AES state key instead of directly with DPAPI

Decryption Process

SharpChrome handles this automatically:
Or manually specify a pre-decrypted state key:

State Key Location

  • Chrome: %LOCALAPPDATA%\Google\Chrome\User Data\Local State
  • Edge: %LOCALAPPDATA%\Microsoft\Edge\User Data\Local State
  • Brave: %LOCALAPPDATA%\BraveSoftware\Brave-Browser\User Data\Local State

Supported Browsers

Google Chrome

Default target browser. Decrypts Login Data from Chrome’s default profile and all additional profiles.Location: %LOCALAPPDATA%\Google\Chrome\User Data\Default\Login Data

Microsoft Edge

Chromium-based Edge browser. Use /browser:edge to target.Location: %LOCALAPPDATA%\Microsoft\Edge\User Data\Default\Login Data

Brave Browser

Privacy-focused Chromium browser. Use /browser:brave to target.Location: %LOCALAPPDATA%\BraveSoftware\Brave-Browser\User Data\Default\Login Data

Slack Desktop

Slack desktop application uses Chromium for credential storage. Use /browser:slack to target.Location: %APPDATA%\Slack\Cookies

Example Workflows

Scenario 1: Local Credential Extraction (Unprivileged)

Extract your own saved credentials without administrative rights:

Scenario 2: Domain-Wide Credential Extraction

As domain admin, extract credentials from all domain workstations:

Scenario 3: Targeted User Extraction with Mimikatz

Combine with Mimikatz for targeted user credential extraction:

Scenario 4: Remote Credential Extraction with Password

Extract credentials from a remote system using a user’s password:

Scenario 5: Chrome 80+ with Pre-Extracted State Key

For Chrome 80+, first extract state keys then use them:

Example Output

CSV Format (Default)

Table Format

Detection Considerations

EDR/AV Detection Vectors

  1. Process Activity
    • SharpChrome.exe spawning and accessing browser SQLite databases
    • Unusual access patterns to Login Data files
    • Multiple user profile enumeration
  2. File Access Patterns
    • Reading Login Data files from multiple user profiles
    • Accessing Local State files for state key extraction
    • Lockless SQLite database access
  3. Network Activity
    • Remote file access to UNC paths for credential databases
    • SMB connections to multiple workstations
    • Domain controller communication for RPC decryption
  4. API Calls
    • CryptUnprotectData API calls
    • DPAPI-related LSA functions
    • SQLite database operations

OPSEC Recommendations

These are defensive detection recommendations. Offensive operators should consider:
  • Running from memory to avoid disk artifacts
  • Using native Windows tools where possible
  • Throttling operations to avoid mass enumeration detection
  • Combining with other lateral movement to blend in
  • Using /consoleoutfile to avoid console logging

Log Sources

  • Windows Event Logs: Look for DPAPI-related Event IDs (4692-4694)
  • Sysmon: File access events to Login Data files (Event ID 11)
  • EDR Telemetry: Process creation, file access, and API call monitoring
  • Network Logs: SMB traffic patterns indicating lateral credential harvesting

SharpChrome Cookies

Extract and decrypt browser cookies for session hijacking

SharpChrome State Keys

Extract AES state keys for Chrome 80+ decryption

Backup Key Retrieval

Retrieve domain DPAPI backup key from domain controller

SharpChrome Overview

Complete SharpChrome documentation and workflows

Tips and Troubleshooting

Common Issues

Possible causes:
  • Browser hasn’t saved any credentials
  • Running as wrong user (credentials are user-specific)
  • Chrome 80+ requires state key decryption
  • Incorrect decryption method selected
Solutions:
  • Verify Login Data file exists and contains data
  • Run as the user who saved the credentials
  • For Chrome 80+, extract and use state key
  • Try alternative decryption methods (/pvk, /password)
Possible causes:
  • Not running as the user who encrypted the data
  • User profile is unloaded
  • DPAPI masterkey not available
Solutions:
  • Run in the correct user context
  • Use /pvk with domain backup key instead
  • Use extracted GUID:SHA1 masterkeys
  • Ensure user is logged in locally
Possible causes:
  • No administrative access to remote system
  • Firewall blocking SMB/RPC
  • Missing decryption key (/pvk or /password not provided)
Solutions:
  • Verify local admin rights on remote system
  • Check firewall rules for SMB (445) and RPC
  • Always use /pvk or /password with /server
Possible causes:
  • State key not automatically decrypted
  • Missing AES state key for decryption
Solutions:
  • Run statekeys command first to extract state key
  • Use /statekey parameter with extracted key
  • Ensure DPAPI decryption method is working

Best Practices

Operational Tips:
  • Always test in a lab environment first
  • Use /format:table for easier manual review
  • Combine with /consoleoutfile for logging
  • Extract state keys separately for Chrome 80+
  • Use domain backup key for maximum coverage
  • Filter credentials by removing /showall flag

Performance Considerations

  • Local extraction: Very fast, typically completes in seconds
  • Remote extraction: Depends on network latency and number of users
  • Lockless access: Browser can remain open during extraction
  • Multi-user systems: Processing time scales with number of user profiles

Additional Resources