Overview
Information stealers like Phantom use specific system behaviors and access patterns that can be detected through behavioral analysis, file system monitoring, and network traffic inspection.Behavioral Detection
File Access Patterns
File Access Patterns
Stealers exhibit distinctive file access patterns that can be detected:
- Browser Database Access: Non-browser processes accessing browser SQLite databases
- Chrome:
%LOCALAPPDATA%\Google\Chrome\User Data\Default\Login Data - Edge:
%LOCALAPPDATA%\Microsoft\Edge\User Data\Default\Login Data - Brave:
%LOCALAPPDATA%\BraveSoftware\Brave-Browser\User Data\Default\Login Data
- Chrome:
- Cookie Database Access: Reading from browser cookie files
%LOCALAPPDATA%\...\Network\Cookies%LOCALAPPDATA%\...\Cookies
- LevelDB Access: Scanning Discord leveldb files from non-Discord processes
%APPDATA%\Discord\Local Storage\leveldb\*.ldb%APPDATA%\Discord\Local Storage\leveldb\*.log
DPAPI Call Detection
DPAPI Call Detection
Monitor for suspicious DPAPI (Data Protection API) usage:
- CryptUnprotectData calls from non-browser processes
- High-frequency DPAPI calls in short time periods
- DPAPI calls combined with SQLite database access
Process Behavior
Process Behavior
Suspicious process behaviors include:
- Copying browser database files to temporary directories
- Accessing
Local Statefiles to extract encryption keys - Reading wallet directories (
%APPDATA%\Exodus,%APPDATA%\Electrum, etc.) - Enumerating browser profiles and crypto wallet extensions
- Accessing Telegram session files (
%APPDATA%\Telegram Desktop\tdata)
Registry Indicators
Check Run Keys
Monitor these registry locations for persistence:Phantom creates entries named “WindowsUpdate” or similar legitimate-sounding names.
Check Startup Folder
Inspect the startup folder for suspicious executables:Look for files with generic names like
svchost.exe or hidden system attributes.Check Scheduled Tasks
Query scheduled tasks for persistence mechanisms:Malicious tasks often use names mimicking legitimate Windows services.
Network Indicators
Webhook Traffic
Webhook Traffic
Information stealers commonly use Discord or Telegram webhooks for data exfiltration:Discord Webhook Detection:
- Monitor HTTPS POST requests to
discord.com/api/webhooks/* - Look for large file uploads (ZIP archives containing stolen data)
- Check for JSON payloads with embedded fields and user information
- Monitor traffic to
api.telegram.org/bot*/sendMessage - Monitor traffic to
api.telegram.org/bot*/sendDocument - Large file uploads to Telegram Bot API endpoints
External IP Lookups
External IP Lookups
Stealers often query external services to identify the victim’s public IP:
- Requests to
api.ipify.org - Requests to
icanhazip.com - Requests to
ifconfig.me/ip
Anti-Analysis Evasion Detection
Phantom implements several anti-analysis techniques. Detecting these behaviors can help identify the malware even when obfuscated.
VM Detection Checks
VM Detection Checks
Monitor for processes checking VM indicators:
- Registry queries for VM-specific keys:
HKLM\SOFTWARE\VMware, Inc.\VMware ToolsHKLM\SOFTWARE\Oracle\VirtualBox Guest AdditionsHKLM\SOFTWARE\Microsoft\Virtual Machine\Guest\Parameters
- Process enumeration looking for:
vmtoolsd.exe,vmwaretray.exe,vmwareuser.exevboxservice.exe,vboxtray.exeqemu-ga.exe,vdagent.exe
- MAC address enumeration via
getmaccommand
Debugger Detection
Debugger Detection
Anti-debugging techniques that can be detected:
- Calls to
IsDebuggerPresentAPI - Calls to
CheckRemoteDebuggerPresentAPI NtQueryInformationProcesswithProcessDebugPortclassNtSetInformationThreadwithThreadHideFromDebuggerflag- Timing checks to detect single-stepping
Memory Patching
Memory Patching
AMSI and ETW patching attempts:
VirtualProtectcalls onamsi.dll!AmsiScanBufferVirtualProtectcalls onntdll.dll!EtwEventWrite- Memory modifications to security monitoring functions
- These should trigger EDR/AV memory protection alerts
EDR/SIEM Detection Rules
File Access Rules
Network Rules
Process Behavior Rules
File System Indicators
Temporary File Artifacts
Temporary File Artifacts
Phantom copies browser databases to temporary locations before reading:
%TEMP%\login_data_*%TEMP%\cookies_*%TEMP%\webdata_*%TEMP%\history_*
Exfiltration Archives
Exfiltration Archives
Look for suspicious ZIP archives in temporary directories:
- Filenames containing computer names and timestamps
- Archives containing folders named:
passwords.txt,cookies.txt,wallets/,discord_tokens.txt - Archives created shortly before network uploads
Memory Forensics
Memory analysis can reveal stealer activity:- Strings containing browser database paths in non-browser processes
- Decrypted credentials in process memory
- Discord/Telegram webhook URLs in memory
- Patterns matching browser master encryption keys
- DPAPI decrypted data structures
System Resource Checks
Phantom includes sandbox evasion based on system resources. Monitoring for these checks can help detect the malware.
- Processes checking total RAM (< 4GB indicates sandbox)
- CPU core count enumeration
- Disk size queries via
GetDiskFreeSpaceExW - Recent files directory enumeration
- System uptime checks via
GetTickCount64
Detection Summary
Enable File System Monitoring
Configure EDR to monitor browser data directories and alert on non-browser access.
Monitor Network Traffic
Inspect HTTPS traffic for webhook patterns and large uploads to messaging platforms.