Skip to main content

What is SharpChrome?

SharpChrome is a Chromium-based browser credential extraction tool built as a subproject of SharpDPAPI. It specializes in decrypting saved passwords, cookies, and state keys from Chrome, Edge, Brave, and Slack applications that use Chromium’s credential storage system.
SharpChrome is an adaptation of @djhohnstein’s SharpChrome project with enhancements including lockless SQLite database access and AES state key decryption for Chrome 80+.

Supported Applications

Google Chrome

Original Chromium browser - cookies and login data

Microsoft Edge

Chromium-based Edge browser credentials

Brave Browser

Privacy-focused Chromium browser data

Slack

Slack desktop application credentials

Key Features

Extract Browser Cookies:
  • Decrypt saved session cookies
  • Filter by cookie name or URL with regex
  • Export in EditThisCookie JSON format
  • Set cookies to never expire for persistence

Chrome 80+ Architecture Changes

Starting with Chrome 80, Google changed how credentials are encrypted:
SharpChrome automatically detects Chrome versions and uses the appropriate decryption method. For Chrome 80+, it first decrypts the AES state key, then uses it to decrypt cookies and logins.

Command Overview

logins

Extract and decrypt saved login credentials from Chromium-based browsers.

cookies

Extract and decrypt browser cookies for session hijacking or analysis.

statekeys

Extract and decrypt AES state keys required for Chrome 80+ decryption.

backupkey

Retrieve the domain DPAPI backup key from a domain controller (same as SharpDPAPI).

Decryption Methods

When run from an unelevated context, SharpChrome automatically uses CryptUnprotectData() to decrypt the current user’s data:
Requirements:
  • Running in target user’s context
  • No elevation needed
  • Only decrypts current user’s data

Common Arguments

1

Extract Target Cookies

2

Import into Browser

  1. Install EditThisCookie extension
  2. Navigate to target site (e.g., github.com)
  3. Click EditThisCookie icon
  4. Click import button
  5. Paste JSON output from SharpChrome
3

Access Target Account

Refresh the page - you’re now authenticated as the target user

Typical Workflows

Lockless Database Access

SharpChrome uses a modified C# SQLite library that supports lockless opening of databases. This means Chrome/Edge does not need to be closed, and database files don’t need to be copied to another location before analysis.
Benefits:
  • No need to close browser before extraction
  • Direct access to live databases
  • Reduced forensic footprint
  • Faster operations
Implementation:
  • Uses WAL (Write-Ahead Logging) mode
  • Read-only access to database
  • No interference with running browser

Detection Considerations

SharpChrome operations generate various indicators that can be detected by security monitoring tools.
File Access Indicators:
  • Reading Chrome/Edge/Brave user data directories
  • Accessing Login Data and Cookies SQLite databases
  • Reading Local State files
  • Accessing user DPAPI masterkey folders
Process Indicators:
  • SharpChrome.exe execution
  • Unusual SQLite database access patterns
  • Non-browser processes accessing browser data
  • SMB access to browser data on remote systems
  • MS-BKRP protocol for backup key retrieval
  • DC RPC calls for domain backup key
  • Bulk access to multiple users’ browser data
  • Accessing browser databases while browser is running
  • Reading Local State files for state key extraction
  • Simultaneous access to DPAPI and browser data
Detection:
  • Monitor access to browser data directories
  • Alert on non-browser processes accessing SQLite databases
  • Track DPAPI masterkey folder access
  • Detect domain backup key retrieval
Prevention:
  • Use hardware tokens for critical accounts
  • Implement browser extensions that require re-authentication
  • Monitor for cookie theft/session hijacking
  • Regular credential rotation

SQLite Library

SharpChrome uses a minimized, modified version of a C# SQLite library that supports:
  • Lockless database opening
  • Read-only access mode
  • WAL mode support
  • Direct file access without copying
SharpChrome is built as a separate project in the SharpDPAPI solution due to the size of the SQLite library.

BCrypt Implementation

SharpChrome includes a minimized version of @AArnott’s BCrypt P/Invoke code released under the MIT License for AES state key decryption.

Prerequisites

  • Visual Studio 2019 Community Edition or later
  • .NET Framework 3.5 (default target)
  • Can be retargeted to .NET 4.0 or 4.5
  • Larger binary size due to SQLite library
  • Windows operating system
  • .NET Framework on target
  • Chromium-based browser installed (Chrome, Edge, Brave, or Slack)
Current User Context:
  • No elevation required
  • Can only decrypt current user’s data
Elevated Context:
  • Local Admin: Can decrypt all users on system
  • Domain Admin: Can decrypt any domain user with backup key

Operational Security

Minimize Detection:
  • Use from current user context when possible
  • Avoid dumping all cookies/logins unnecessarily
  • Target specific high-value accounts with filtering
  • Use /consoleoutfile to minimize screen artifacts
Post-Exploitation:
  • Delete temporary files
  • Clear command history
  • Consider in-memory execution
  • Exfiltrate data securely
  • Embed in post-exploitation frameworks
  • Automate with PowerShell wrappers
  • Combine with credential spraying
  • Use for lateral movement via cookie hijacking

Output Formats

Best for: Log analysis, data processing, spreadsheet import

Additional Resources

Original SharpChrome

@djhohnstein’s original SharpChrome project

Chrome Encryption Changes

Details on Chrome 80+ encryption changes

EditThisCookie Extension

Cookie import extension for Chrome

SharpDPAPI Repository

Main SharpDPAPI repository containing SharpChrome

Next Steps

Extract Logins

Start extracting saved passwords

Hijack Cookies

Learn cookie extraction and hijacking

State Keys

Extract AES state keys for offline analysis

Build SharpChrome

Compile SharpChrome from source

License

SharpChrome is part of SharpDPAPI and is licensed under the BSD 3-Clause license.
SharpChrome is adapted from @djhohnstein’s work and incorporates DPAPI functionality from Benjamin Delpy’s Mimikatz project.