Overview
Phantom Stealer is a Windows information stealer written in Go that demonstrates credential theft techniques for security research. This guide will walk you through cloning, configuring, building, and running the project.Clone the Repository
First, clone the Phantom Stealer repository to your local machine:
Ensure you have Git installed on your system before proceeding.
Install Requirements
Phantom Stealer requires the following dependencies:Required:
- Go 1.21 or higher
- Windows OS (uses Windows-specific APIs)
- GCC compiler (for CGO/SQLite support)
- Git
CGO must be enabled for SQLite support. This is required for browser database decryption.
Configure the Stealer
Edit
config/config.go to customize your build. At minimum, you must set an exfiltration method:Basic Configuration
config/config.go
Module Configuration
Enable or disable features based on your research needs:config/config.go
Build Identification
Customize the build ID to track different campaigns:config/config.go
Build the Binary
Choose a build method based on your needs:
Standard Build
Basic development build with debug symbols:Production Build
Optimized build with stripped symbols and hidden console:Obfuscated Build
For maximum stealth using Garble:PowerShell Build Script
Use the included PowerShell script for automated builds:Run the Stealer
Execute the compiled binary on your test system:
Execution Flow
When executed, Phantom Stealer performs the following operations:-
Environment Checks (Phase 1)
- VM detection (VMware, VirtualBox, Hyper-V)
- Debugger detection
- Sandbox detection
- AMSI/ETW patching
-
Persistence Installation (Phase 2 - if enabled)
- Registry Run key installation
- Startup folder copy
-
Data Collection (Phase 3)
- System reconnaissance
- Browser credential extraction
- Crypto wallet theft
- Token grabbing (Discord, Telegram, Steam)
- File grabbing from Desktop/Documents/Downloads
-
Exfiltration (Phase 4)
- Data archival to ZIP
- Upload to Discord webhook
- Fallback to Telegram if Discord fails
-
Cleanup (Phase 5 - if enabled)
- Self-deletion
main.go
The stealer exits silently (no output) when anti-analysis checks detect a sandbox or debugger environment.
Verify Exfiltration
Check your configured webhook/bot for the stolen data:
Discord Webhook Output
You’ll receive a Discord message with:- System information embed (hostname, IP, OS version)
- Statistics (passwords found, tokens, wallets)
- ZIP archive attachment containing:
system_info.txt- Full system detailspasswords.txt- Extracted browser passwordscookies.txt- Browser cookiestokens.txt- Discord/Telegram/Steam tokenswallets/- Crypto wallet filesfiles/- Grabbed documentsscreenshot.png- Desktop screenshot
Telegram Bot Output
Similar to Discord but sent via Telegram Bot API with document attachment.Data is organized in a ZIP archive named
{hostname}_{timestamp}.zip for easy identification of victims.Targeted Resources
Browsers Supported
Crypto Wallets
Phantom targets 40+ crypto wallets including: Desktop Wallets:- Exodus, Electrum, Atomic, Jaxx, Coinomi, Guarda
- Bitcoin Core, Litecoin Core, Dash Core
- Monero, ZCash, Wasabi Wallet
- MetaMask, Phantom, Trust Wallet, Coinbase Wallet
- TronLink, Binance Chain, Ronin, Keplr
- 30+ additional extension wallets
Tokens & Sessions
- Discord: Desktop client + browser sessions (all channels)
- Telegram: tdata session files
- Steam: SSFN files + config.vdf
Troubleshooting
Build Failures
CGO_ENABLED error
CGO_ENABLED error
Ensure CGO is enabled and GCC is installed:
Garble not found
Garble not found
Install Garble using Go:
SQLite driver errors
SQLite driver errors
The SQLite driver requires CGO. Verify:
Runtime Issues
Stealer exits immediately
Stealer exits immediately
Anti-analysis checks may be triggering. Build with debug mode:
config/config.go
No data exfiltrated
No data exfiltrated
Verify webhook/bot configuration:
- Check Discord webhook URL format
- Verify Telegram bot token and chat ID
- Test webhook manually with curl
Browser passwords not decrypted
Browser passwords not decrypted
DPAPI decryption requires the binary to run as the target user. Browser passwords are encrypted per-user.
Next Steps
Building Guide
Learn about advanced build options, flags, and obfuscation techniques
Core Modules
Understand the module implementations and techniques
Detection & Defense
Learn how to detect and defend against this type of malware
Configuration
Explore configuration options and targets