How it works
./config
directory
the ./config
folder is what saves the basic configurations and supports the modules and the functionality of the tool
./config/colors.py
- Helps to output colored text to the terminal. Click here to learn more.
./config/constants.py
- Contains main settings for the tool to refer to and use during its runtime.
./config/manager.py
- Modules inherit from the ModuleManager class to facilitatse console output, logging, file operations easily.
./modules
directory
this is where it all happens
./modules/applications/discord.py
- Display the banner and start using the tool
- Data decryption funcions:
GetData
: A utility function that extracts data from aDATA_BLOB
structureCryptUnprotectData
: Utilizes the Windows API functionCryptUnprotectData
to decrypt encrypted bytesDecryptValue
: Decrypts a given buffer using AES encryption
- Check if
Local State
file exists in the discord's installation directory - Gets the master key from
Local State
file, decrypt it and load it - Search to relevant logs and database files inside the
Local Storage/leveldb
dir - extract and decrypt tokens using the masterkey
- add to our own seperate list to to save if its unique
- all these steps happens for all the discord versions with their own different installation paths (note that the internal structure is the same as they are all based on the same technology)
./modules/applications/zip.py
creates .zip archives of the directories mentioned below (some folders have been excluded in some paths as they are useless)
- Telegram Desktop:
f"{Constant.roaming_dir}\\Telegram Desktop\\tdata"
- What it might have:
- User data such as chat history, settings, and media
- Configuration files related to Telegram Desktop
- Cached files for images, media, and emojis
- Atomic Wallet:
f"{Constant.roaming_dir}\\tomic\\Local Storage\\leveldb"
- What it might have:
- Local storage data for the Atomic Wallet application
- LevelDB files containing user-specific information
- Exodus:
f"{Constant.roaming_dir}\\Exodus\\exodus.wallet"
- What it might have:
- Wallet data and configuration files for the Exodus cryptocurrency wallet
- Information related to cryptocurrency transactions and holdings
- Steam:
"C:\\Program Files (x86)\\Steam\\config"
- What it might have:
- Steam client configuration files
- Settings and preferences for the Steam gaming platform
- NationsGlory:
f"{Constant.roaming_dir}\\NationsGlory\\Local Storage\\leveldb"
- What it might have:
- Local storage data for the NationsGlory application
- LevelDB files containing game-related information
- RiotClient:
f"{Constant.local_dir}\\Riot Games\\Riot Client\\Data"
- What it might have:
- Data related to the RiotClient for games like League of Legends
- Configuration files, logs, or cached data
./modules/browsers/bookmarks.py
- My implementation was slow compared to this awesome python module that can be installed via
pip install browser-history
./modules/browsers/history.py
- My implementation was slow compared to this awesome python module that can be installed via
pip install browser-history
./modules/browsers/chromium.py
- I still have a couple of doubts about how it works...
How ChatGPT (GPT-3.5) explained it:
Query 1: how does it work? im pretty technical, so give me the inner workings / main functionality of how everything works: [code]
Result 1:
This script is a Python program that aims to recover sensitive information (such as passwords, cookies, credit card details, and web history) from Chromium-based browsers. It is adapted and improved from a source provided in the comments.
Let's break down its main functionality:
1. Initialization
- Importing Libraries: The script imports necessary libraries for working with file operations, encryption, and database handling.
- Class Definition: The script defines a class (
ChromiumRecovery
) that inherits fromModuleManager
. It handles the recovery of information from Chromium-based browsers.
2. Configuration and Setup
- Banner Display: The script displays an ASCII art banner to signify the beginning of the tool's execution.
- Browser Paths: It defines paths for various Chromium-based browsers, including Google Chrome, Microsoft Edge, Mozilla Firefox, Brave, etc.
- Initialization: The script sets up the output folder structure and initializes some variables and constants.
3. Information Extraction
- Master Key Extraction: The
__get_master_key
function attempts to extract the master key used for encrypting sensitive information from the browser's local state file. - Password Decryption: The
__decrypt_password
function decrypts the encrypted password using the master key. - Data Retrieval Functions:
__get_login_data
: Retrieves saved login data (URL, username, decrypted password) from the browser's Login Data database.__get_credit_cards
: Retrieves credit card details (name, decrypted card number, expiration date) from the browser's Web Data database.__get_cookies
: Retrieves cookies (host key, cookie name, decrypted cookie value, expiration date) from the browser's Cookies database.__get_web_history
: Retrieves web history (URL, title, last visit time) from the browser's History database (commented out by default due to potential slowness).
4. Results Handling
- Result Saving: The script saves the extracted information into text files organized by browser type, profile, and data type (login, cookies, etc.).
- Folder Creation: It creates folders to organize the saved information.