This C# script extracts and decrypts tokens from various applications and browsers by parsing their local storage files. It demonstrates methods used to identify, decrypt, and analyze stored tokens. This project is designed for educational purposes only to highlight the importance of secure token storage.
- .NET Framework
- Newtonsoft.Json (for JSON parsing)
- Org.BouncyCastle (for AES decryption)
- Ensure you have .NET SDK installed on your system.
- Add the required libraries via NuGet:
dotnet add package Newtonsoft.Json dotnet add package BouncyCastle
- Define Paths:
The script defines paths to various applications and browsers where token data might be stored. - Extract Key:
It reads theLocal State
file to obtain the encryption key used for decrypting tokens. - Parse Files:
Searches through LevelDB files and extracts potential tokens using regex patterns. - Decrypt Tokens:
Extracted tokens are decrypted using AES encryption with the obtained key. - Match Tokens:
Tokens are matched against predefined regex patterns to identify valid tokens. - Output:
The script prints out the extracted and decrypted tokens.
- Local State File:
Obtained from application directories to extract the AES encryption key. - LevelDB Files:
Found in application storage folders to extract encrypted tokens.
- Basic Regex: Matches standard token formats (
[\w-]{24}\.[\w-]{6}\.[\w-]{27}
). - New Regex: Matches MFA token formats (
mfa\.[\w-]{84}
). - Encrypted Regex: Matches encrypted tokens (
dQw4w9WgXcQ:...
).
- Clone the repository or download the script.
- Install the required libraries using NuGet.
- Build and run the script:
dotnet build dotnet run
- This script is intended for educational purposes only. Use responsibly and ethically.
This script is provided under the MIT License.
By using this script, you agree to comply with all applicable laws and regulations and use it only for lawful, ethical purposes.
- E-mail: velimir.paleksic@gmail.com.
- VexSystems Github: github.com/vexsystems.
- VexSystems Instagram: @vex.systems.