How maldev-academy/dumpbrowsersecrets works
1. Repository purpose
- This is a Windows C++ project for collecting browser-stored secrets and browsing data from Chromium-family browsers and Firefox.
- The architecture is split between a main extractor executable and a small DLL used only for Chromium App-Bound key recovery.
2. Top-level build and component boundary
- DumpBrowserSecrets.sln ties together three main code areas:
- DumpBrowserSecrets/ — the primary EXE
- DllExtractChromiumSecrets/ — injected DLL payload
- Common/ — shared helpers, data structures, hashing, obfuscation, and file/secret handling
- Fnv1aHasher/ is a separate Python helper project, likely used to generate or validate API hashes used by the native code.
3. Main control plane: DumpBrowserSecrets.exe
- Main.cpp is the entry point and argument dispatcher.
- The EXE decides which browser families to target, whether to spoof process creation, whether to encrypt output, and whether to run extraction or decryption mode.
- It is the central coordinator that ties together process setup, key retrieval, file parsing, and output generation.
4. Chromium App-Bound key retrieval path
- For Chrome, Edge, and Brave, the EXE creates a Chromium process and injects DllExtractChromiumSecrets.dll.
- The DLL runs inside the browser context and extracts the App-Bound decryption material from browser-local state using IElevator COM-related logic.
- The recovered key material is sent back to the EXE, which then performs the actual on-disk data extraction.
5. Non-DLL Chromium path for DPAPI-based browsers
- Opera, Opera GX, and Vivaldi are handled directly by the EXE without DLL injection.
- Their secrets are decrypted using browser-stored DPAPI-protected material rather than App-Bound keys.
- This keeps the browser-specific decryption logic in the extractor, while the injected DLL remains Chromium-App-Bound specific.
6. Firefox path
- Firefox is handled separately from Chromium-based browsers.
- The EXE directly reads Firefox profile files such as logins.json, cookies.sqlite, places.sqlite, and related profile artifacts.
- Firefox uses NSS/AES/3DES-based protection for login data, so its extraction and decryption logic is a distinct subsystem.
7. On-disk data extraction layer
- The files ExtractChromiumData.cpp, ExtractFireFoxData.cpp, and Utilities.cpp implement the per-browser parsing and collection logic.
- Input sources include SQLite databases and JSON files located under browser profile directories.
- The repo supports multiple data categories: cookies, credentials, tokens, autofill, history, bookmarks, and payment data.
8. SQLite and file-access strategy
- The project includes SQLoot/ plus an embedded sqlite-amalgamation-3510100/ directory, indicating custom database parsing support rather than relying purely on system SQLite.
- The README notes handle duplication to bypass browser file locks, so the extractor can read live databases even when browsers are running.
- This layer is responsible for traversing local browser artifacts and turning them into structured records.
9. Output formatting and encrypted pack flow
- FormatOutput.cpp and HandleEncryptedOutput.cpp control how extracted records are serialized.
- Output can be emitted as JSON or wrapped into an encrypted “pack” using a user-supplied signature.
- The EXE also supports a decryption mode that reverses that pack format and restores JSON files.
10. Stealth, process creation, and spoofing subsystem
- ChromiumProcCreation.cpp, CsrssRegistration.cpp, and related headers implement process-launch behavior with PPID/argument spoofing.
- The README calls out NtCreateUserProcess-based creation and manual CSRSS registration, so process setup is treated as its own subsystem rather than a standard CreateProcess flow.
- This layer exists to make the Chromium host process look more legitimate before DLL injection.
11. Shared Common/ library
- Common.cpp, Common.h, Structures.h, ApiHashing.cpp, FetchSecretFiles.cpp, and Obfuscate.hpp provide reusable primitives.
- This area likely contains:
- shared data models for extracted secrets
- API hashing and lookup support
- compile-time string obfuscation
- file discovery helpers for browser profile artifacts
- It is the main utility boundary used by both the EXE and the DLL.
12. DLL payload boundary
- DllMain.cpp in DllExtractChromiumSecrets/ keeps the injected component minimal.
- Its only job is Chromium-side key recovery and returning that material to the host EXE.
- All heavy parsing, decryption, and output generation stays outside the DLL in the main executable.
13. Overall data flow
- Browser profile files on disk are the primary input.
- For Chromium App-Bound browsers, the EXE first obtains a decryption key via the injected DLL.
- The EXE then reads SQLite/JSON artifacts, decrypts protected fields, normalizes them into records, and optionally emits encrypted or decrypted output.
14. Architectural summary
- The repo is organized around a clear separation between:
- orchestration and output in the EXE
- browser-context key recovery in the DLL
- shared helpers in Common/
- browser-specific extraction paths for Chromium-family and Firefox
- That split is the key structural feature to capture in an architecture diagram.
Main entry points: Main.cpp Main · Common.cpp Common · Utilities.cpp Profile parse · DumpBrowserSecrets.sln Solution
Components 18
Solution
Top-level build that ties the native components together.
- Solution · Build entry that connects the main executable, DLL, shared code, and helper project.
DumpBrowserSecrets.sln
Extractor EXE
Main executable that coordinates browser targeting, key recovery, parsing, and output.
- Main · Argument parsing and top-level mode dispatch for extraction, decryption, and browser selection.
DumpBrowserSecrets/Main.cpp - Proc setup · Creates browser host processes with NtCreateUserProcess-style flow and spoofing support.
DumpBrowserSecrets/ChromiumProcCreation.cpp - CSRSS reg · Manual CSRSS registration and process-launch support used during spoofed Chromium startup.
DumpBrowserSecrets/CsrssRegistration.cpp - DLL inject · Loads the Chromium-only DLL into a browser process to recover App-Bound key material.
DumpBrowserSecrets/InjectDllIntoChromium.cpp - Chromium path · Coordinates Chrome, Edge, and Brave handling that depends on injected key recovery.
DumpBrowserSecrets/ExtractChromiumData.cpp - DPAPI path · Direct extraction path for Opera, Opera GX, and Vivaldi using browser-stored protected material.
DumpBrowserSecrets/ExtractChromiumData.cpp - Firefox path · Separate Firefox profile parsing and decryption flow for NSS/AES/3DES-protected data.
DumpBrowserSecrets/ExtractFireFoxData.cpp - Profile parse · Reads browser profile artifacts from SQLite and JSON sources and normalizes records.
DumpBrowserSecrets/Utilities.cpp - Format output · Serializes extracted records to JSON or pack format.
DumpBrowserSecrets/FormatOutput.cpp - Encrypted pack · Wraps output into an encrypted pack and supports reverse decryption back to JSON.
DumpBrowserSecrets/HandleEncryptedOutput.cpp
Shared Code
Reusable helpers and data structures consumed by the EXE and DLL.
- Record model · Shared record structures for cookies, credentials, tokens, autofill, history, bookmarks, and payment data.
Common/Structures.h - Common · Core shared helpers used across the EXE and DLL.
Common/Common.cpp - API hash · API hashing and resolution helpers for obfuscated native lookup paths.
Common/ApiHashing.cpp - File finders · Locates browser profile files and other secret-bearing artifacts.
Common/FetchSecretFiles.cpp - Obfuscation · Compile-time string obfuscation and related helpers.
Common/Obfuscate.hpp
DLL Payload
Injected Chromium-side component for App-Bound key recovery.
- DllMain · Minimal injected entrypoint that stays focused on Chromium-side key recovery.
DllExtractChromiumSecrets/DllMain.cpp
Hash Helper
Separate Python helper for FNV-1a hashing workflows.
- FNV helper · Standalone Python project for generating or validating FNV-1a hashes.
Fnv1aHasher/Fnv1aHasher.py
Connections 24
- Solution → Main: builds · Solution includes the primary extractor executable.
- Solution → DllMain: builds · Solution includes the Chromium key-recovery DLL.
- Solution → Common: shares · Solution wires in the shared native library code.
- Solution → FNV helper: includes · Solution tree also contains the Python hashing helper.
- Main → Proc setup: launches · Main dispatch can create and spoof a browser host process.
- Main → DLL inject: uses · Main coordinates DLL injection for Chromium App-Bound browsers.
- Main → Chromium path: routes · Main selects the Chromium App-Bound extraction flow.
- Main → DPAPI path: routes · Main selects the direct DPAPI-based Chromium-family flow.
- Main → Firefox path: routes · Main selects the Firefox-specific extraction flow.
- Proc setup → CSRSS reg: registers · Process setup uses manual CSRSS registration during spoofed startup.
- DLL inject → DllMain: loads · Injector loads the DLL into the Chromium host process.
- DllMain → Chromium path: returns key · Injected DLL recovers App-Bound material used by the Chromium path.
- Chromium path → Profile parse: reads · Chromium flow reads profile files and local state artifacts for parsing.
- DPAPI path → Profile parse: reads · Direct Chromium-family flow parses browser profile databases and files.
- Firefox path → Profile parse: reads · Firefox flow parses logins, cookies, and history artifacts.
- Profile parse → Record model: fills · Parsed artifacts are normalized into shared secret records.
- Profile parse → Common: uses · Parsing reuses shared file and utility helpers.
- Common → API hash: contains · Shared library includes API hashing support.
- Common → File finders: contains · Shared library includes file discovery helpers.
- Common → Obfuscation: contains · Shared library includes string obfuscation helpers.
- Format output → Encrypted pack: wraps · Serialization can be wrapped into encrypted pack handling.
- Main → Format output: emits · Main orchestrates final output generation.
- Main → Encrypted pack: decrypts · Main can invoke pack decryption mode to recover JSON output.
- API hash → FNV helper: mirrors · Python helper likely supports the same FNV-1a hashing workflow.