TrojanSpy.Win64.SPARKRAT.B
Win64:MalwareX-gen [Trj] (AVAST)
Windows


Threat Type: Trojan Spy
Destructiveness: No
Encrypted:
In the wild: Yes
OVERVIEW
This Trojan Spy arrives on a system as a file dropped by other malware or as a file downloaded unknowingly by users when visiting malicious sites.
It does not have any propagation routine.
It executes commands from a remote malicious user, effectively compromising the affected system. It connects to a website to send and receive information.
TECHNICAL DETAILS
Arrival Details
This Trojan Spy arrives on a system as a file dropped by other malware or as a file downloaded unknowingly by users when visiting malicious sites.
Installation
This Trojan Spy adds the following folders:
- %AppDataLocal%\q09Host → persistence staging folder housing a replicated copy of the sideloading chain
- %AppDataLocal%\SyncDataf8 → state directory storing execution counter data
- %Application Data%\wc2 → working directory for keystroke logging
- %ProgramData%\AppStore32 → staging directory for privilege-helper IPC, bridge logs, and heartbeat/elevation markers
- %ProgramData%\SyncStore61 → secondary persistence staging folder housing a replicated copy of the sideloading chain
- %User Temp%\wc2prof_{profile} → temporary headless browser profile directory used for Chrome DevTools Protocol (CDP) session extraction
(Note: %AppDataLocal% is the Local Application Data folder, which is usually C:\Documents and Settings\{user name}\Local Settings\Application Data on Windows 2000(32-bit), XP, and Server 2003(32-bit), or C:\Users\{user name}\AppData\Local on Windows Vista, 7, 8, 8.1, 2008(64-bit), 2012(64-bit) and 10(64-bit).. %Application Data% is the current user's Application Data folder, which is usually C:\Documents and Settings\{user name}\Application Data on Windows 2000(32-bit), XP, and Server 2003(32-bit), or C:\Users\{user name}\AppData\Roaming on Windows Vista, 7, 8, 8.1, 2008(64-bit), 2012(64-bit) and 10(64-bit).. %ProgramData% is a version of the Program Files folder where any user on a multi-user computer can make changes to programs. This contains application data for all users. This is usually C:\ProgramData on Windows Vista, 7, 8, 8.1, 2008(64-bit), 2012(64-bit) and 10(64-bit), or C:\Documents and Settings\All Users on Windows Server 2003(32-bit), 2000(32-bit) and XP.. %User Temp% is the current user's Temp folder, which is usually C:\Documents and Settings\{user name}\Local Settings\Temp on Windows 2000(32-bit), XP, and Server 2003(32-bit), or C:\Users\{user name}\AppData\Local\Temp on Windows Vista, 7, 8, 8.1, 2008(64-bit), 2012(64-bit) and 10(64-bit).)
It drops the following files:
- %AppDataLocal%\q09Host\q09Host.exe → copy of the legitimate Microsoft-signed host executable (VSPerf Performance Control Tool) abused for DLL sideloading
- %AppDataLocal%\q09Host\VSPMsg.dll → self-copy
- %AppDataLocal%\q09Host\VSPMsg.i5.dat → copy of the encrypted payload file
- %ProgramData%\SyncStore61\DocService.exe → copy of the legitimate Microsoft-signed host executable (VSPerf Performance Control Tool) abused for DLL sideloading
- %ProgramData%\SyncStore61\VSPMsg.dll → self-copy
- %ProgramData%\SyncStore61\VSPMsg.i5.dat → copy of the encrypted payload file
- %User Startup%\q09Host.exe → copy of the legitimate Microsoft-signed host executable (VSPerf Performance Control Tool) placed in the Startup folder
- %User Startup%\VSPMsg.dll → self-copy placed in the Startup folder
- %User Startup%\VSPMsg.i5.dat → copy of the encrypted payload file placed in the Startup folder
- %AppDataLocal%\applicationform_7a46d727\{random 8 hex characters}\VSPMsg.i5.dat.new → temporary staging file created during self-update checks
- %AppDataLocal%\q09hc.token → 64-byte authentication/healthcheck token file (written atomically via q09hc.token.tmp)
- %AppDataLocal%\SyncDataf8\run.count → execution counter file
- %Application Data%\wc2\keylog.jsonl (and rotated keylog.jsonl.{number}) → JSON-lines keystroke log file created when keylogging is active
- %Application Data%\wc2\keylog.on → marker file indicating persistent keylogger state
- %ProgramData%\AppStore32\bridge.log → local privilege bridge log file
- %ProgramData%\AppStore32\priv.cfg → configuration file for the elevated privilege helper (written atomically via priv.cfg.tmp)
- %ProgramData%\AppStore32\priv.port → local TCP port file for IPC with the elevated privilege helper
- %ProgramData%\AppStore32\system.ok → marker file indicating active SYSTEM-level helper execution
- %ProgramData%\AppStore32\user.ok → heartbeat marker file updated every 30 seconds during active user-level execution
- %Public%\q09creds.json → JSON output file generated by the downloaded credential helper
- %Public%\q09sam.json → JSON output file generated by the downloaded SAM/credential helper
- %User Temp%\q09crash.stamp → crash timestamp marker file
- %User Temp%\q09rdpwrap.log → installation log generated when deploying RDP Wrapper
- %User Temp%\q09walletclip.cfg → configuration file for cryptocurrency wallet clipboard hijacking
- %User Temp%\wa_extractor.log → log file generated during WhatsApp session extraction
(Note: %AppDataLocal% is the Local Application Data folder, which is usually C:\Documents and Settings\{user name}\Local Settings\Application Data on Windows 2000(32-bit), XP, and Server 2003(32-bit), or C:\Users\{user name}\AppData\Local on Windows Vista, 7, 8, 8.1, 2008(64-bit), 2012(64-bit) and 10(64-bit).. %ProgramData% is a version of the Program Files folder where any user on a multi-user computer can make changes to programs. This contains application data for all users. This is usually C:\ProgramData on Windows Vista, 7, 8, 8.1, 2008(64-bit), 2012(64-bit) and 10(64-bit), or C:\Documents and Settings\All Users on Windows Server 2003(32-bit), 2000(32-bit) and XP.. %User Startup% is the current user's Startup folder, which is usually C:\Windows\Profiles\{user name}\Start Menu\Programs\Startup on Windows 98 and ME, C:\WINNT\Profiles\{user name}\Start Menu\Programs\Startup on Windows NT, C:\Documents and Settings\{User name}\Start Menu\Programs\Startup on Windows 2003(32-bit), XP and 2000(32-bit), or C:\Users\{user name}\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup on Windows Vista, 7, 8, 8.1, 2008(64-bit), 2012(64-bit), 10(64-bit).. %Application Data% is the current user's Application Data folder, which is usually C:\Documents and Settings\{user name}\Application Data on Windows 2000(32-bit), XP, and Server 2003(32-bit), or C:\Users\{user name}\AppData\Roaming on Windows Vista, 7, 8, 8.1, 2008(64-bit), 2012(64-bit) and 10(64-bit).. %Public% is the folder that serves as a repository of files or folders common to all users, which is usually C:\Users\Public in Windows Vista, 7, and 8.. %User Temp% is the current user's Temp folder, which is usually C:\Documents and Settings\{user name}\Local Settings\Temp on Windows 2000(32-bit), XP, and Server 2003(32-bit), or C:\Users\{user name}\AppData\Local\Temp on Windows Vista, 7, 8, 8.1, 2008(64-bit), 2012(64-bit) and 10(64-bit).)
It adds the following processes:
- "%AppDataLocal%\applicationform_7a46d727\{random 8 hex characters}\applicationform.exe" → re-launches its own host process with environment variable W2I_STAGE2=1 and CREATE_NO_WINDOW to detach from the parent process before terminating the initial instance
- schtasks.exe /query /tn "q09Host" and schtasks.exe /query /tn "q09Host_boot" → checks whether scheduled task persistence entries already exist
- sc.exe query "q09Host" → checks whether the q09Host Windows service already exists
- "%System%\cmd.exe" /Q /D and "%System%\WindowsPowerShell\v1.0\powershell.exe" -NoLogo -NoProfile → spawned on demand for interactive remote terminal sessions
- "%System%\fodhelper.exe" and "%System%\sdclt.exe" → spawned on demand to trigger UAC bypass and launch --priv-helper
- "%System%\netsh.exe" advfirewall firewall add rule name=SparkRDP-In dir=in action=allow protocol=TCP localport={port} → opens inbound firewall access for RDP (SYS_NETFW / SYS_RDP)
(Note: %AppDataLocal% is the Local Application Data folder, which is usually C:\Documents and Settings\{user name}\Local Settings\Application Data on Windows 2000(32-bit), XP, and Server 2003(32-bit), or C:\Users\{user name}\AppData\Local on Windows Vista, 7, 8, 8.1, 2008(64-bit), 2012(64-bit) and 10(64-bit).. %System% is the Windows system folder, where it usually is C:\Windows\System32 on all Windows operating system versions.)
It adds the following mutexes to ensure that only one of its copies runs at any one time:
- Local\madhecxb_mtx (or Local\madhecxb_mtx-a when running elevated) → DLL loader single-instance mutex
- Local\Wc2C-{16-char SHA-256 prefix of computer name}-{user|admin|system}-q09-mtx → in-memory payload single-instance mutex
Autostart Technique
This Trojan Spy adds the following registry entries to enable its automatic execution at every system startup:
HKEY_CURRENT_USER\Software\Microsoft\
Windows\CurrentVersion\Run
q09Host = "%AppDataLocal%\q09Host\q09Host.exe"
When it receives the `SYS_PERSIST` command, it also supports on-demand persistence management via `RunOnce`, Windows Scheduled Tasks (`q09Host`, `q09Host_boot`), and Windows Services (`q09Host`).
Other System Modifications
When instructed by its C2 server, the in-memory payload modifies the following registry keys and system settings:
- HKEY_CURRENT_USER\Software\Classes\ms-settings\shell\open\command (with DelegateExecute) and HKEY_CURRENT_USER\Software\Classes\mscfile\shell\open\command → UAC bypass privilege escalation via fodhelper.exe and sdclt.exe (SYS_UAC, SYS_ELEVATE)
- HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Defender\Real-Time Protection and HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender\Real-Time Protection (DisableRealtimeMonitoring) → disables Windows Defender real-time protection (SYS_DEFENDER)
- HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Defender\Exclusions\Paths and Exclusions\Processes → Windows Defender exclusion tampering (SYS_DEFENDER)
- HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server (fDenyTSConnections = 0) → enables Remote Desktop Protocol (SYS_RDP)
- HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon (AutoAdminLogon) → modifies automatic logon configuration
- HKEY_CURRENT_USER\Control Panel\Desktop and power configuration (powercfg) → disables screen saver and sleep timeouts (SYS_ANTILOCK)
Propagation
This Trojan Spy does not have any propagation routine.
Backdoor Routine
This Trojan Spy executes the following commands from a remote malicious user:
- Interactive Shell & Execution:
- COMMAND_EXEC
- EXEC_DOWNLOAD_RUN
- TERMINAL_INIT
- TERMINAL_INPUT
- TERMINAL_KILL
- TERMINAL_RESIZE
- File & Archive Operations:
- FILES_COPY
- FILES_DEC
- FILES_ENC
- FILES_FETCH
- FILES_FORCE_RM
- FILES_LIST
- FILES_MOVE
- FILES_REMOVE
- FILES_RUN
- FILES_SEARCH
- FILES_UNZIP
- FILES_UPLOAD
- FILES_ZIP
- PACK_JOB
- Surveillance & Remote Control:
- Hidden desktop / HVNC (DESKTOP_CONTROL, DESKTOP_INIT, DESKTOP_SHOT) and privacy screen overlay
- Screen and webcam capture (SCREENSHOT, CAMERA_LIST via Media Foundation mfplat.dll/mfreadwrite.dll and avicap32.dll)
- Live audio capture and playback (AUDIO_START, AUDIO_TALK_START, SYS_MIC)
- Interactive operator chat via SparkChatWindow (CHAT_INIT, CHAT_LOCK, CHAT_SEND)
- System Administration & Tampering:
- PLUGIN_INVOKE
- PROCESS_KILL
- PROCESSES_LIST
- SYS_ADD_USER
- SYS_CLEAN_HISTORY
- SYS_DEFENDER
- SYS_ELEVATE
- SYS_HOSTS
- SYS_NETFW
- SYS_PERSIST
- SYS_RDP
- SYS_UAC
- SYS_USERS
- Power controls (HIBERNATE, LOGOFF, RESTART, SHUTDOWN, SUSPEND)
- Data Theft & Hijacking:
- CLIPBOARD_OP
- SYS_CREDS
- SYS_KEYLOG
- SYS_MAIL
- SYS_WALLET_DUMP
- SYS_WALLET_SCAN
- WALLET_CLIP_CFG
- WALLET_SEED_SCAN
- Telegram manipulation (TG_CACHE, TG_LIST, TG_PATCH, TG_SETTINGS_GET)
It connects to the following websites to send and receive information:
- wss://{BLOCKED}.my/ws (1{BLOCKED}.31)
- https://{BLOCKED}.my (1{BLOCKED}.31)
Rootkit Capabilities
This Trojan Spy does not have rootkit capabilities.
Download Routine
When triggered by remote commands, the in-memory payload connects to the following URLs to download auxiliary helper tools and packages:
- https://{BLOCKED}.my/p/h/2033b621.bin (1{BLOCKED}.31) → saved to %User Temp%\q09credhelper.exe for credential harvesting
- https://{BLOCKED}.my/p/h/e2490d90.bin (1{BLOCKED}.31) → saved to %User Temp%\q09samhelper.exe for SAM/credential dumping
- https://{BLOCKED}.my/p/h/94f5d79f.bin (1{BLOCKED}.31) → auxiliary helper binary
- https://{BLOCKED}.my/p/rdpwrap.zip (1{BLOCKED}.31) → saved to %User Temp%\q09rdpwrap.zip and extracted to %Program Files%\RDP Wrapper to enable concurrent RDP sessions
It also supports self-updating via https://{BLOCKED}.my/api/client/cupdate.
(Note: %Program Files% is the default Program Files folder, usually C:\Program Files in Windows 2000(32-bit), Server 2003(32-bit), XP, Vista(64-bit), 7, 8, 8.1, 2008(64-bit), 2012(64-bit) and 10(64-bit) , or C:\Program Files (x86) in Windows XP(64-bit), Vista(64-bit), 7(64-bit), 8(64-bit), 8.1(64-bit), 2008(64-bit), 2012(64-bit) and 10(64-bit).)
Information Theft
This Trojan Spy gathers the following data:
- Host & Hardware Profile:
- Architecture and OS version
- Computer name and username
- CPU model, core count, and usage
- GPU information
- Installed antivirus products
- Local IP address and MAC address
- MachineGuid
- Privilege level
- RAM and disk usage
- Startup items
- System uptime and user idle time
- Browser Data:
- Targets the following browsers (including headless Chrome DevTools Protocol session extraction):
- 360Chrome
- Brave
- Google Chrome
- Microsoft Edge
- Opera
- Opera GX
- Extracts the following browser artifacts (decrypting credentials via AES-GCM / ChainingModeGCM and parsing databases via winsqlite3.dll):
- Bookmarks and browsing history
- Cookies (Cookies, Network\Cookies)
- IndexedDB and Local Storage
- Saved credentials (Login Data)
- Web Data
- Targets the following browsers (including headless Chrome DevTools Protocol session extraction):
- Messaging & Email Clients:
- Discord
- LINE
- LINE WORKS (HKCU\Software\LINE WORKS, NAVER\LINE WORKS, WorksMobile)
- Mozilla Thunderbird
- SafeW (SafeW.exe, SafeW Desktop.exe)
- Slack
- Telegram Desktop (Telegram.exe, tdata)
- WhatsApp (@s.whatsapp.net / web.whatsapp.com)
- Windows Live Mail
- Credentials, Keystrokes & Wallets:
- Clipboard contents
- Cryptocurrency wallet files and seed phrases
- Keystrokes (keylog.jsonl)
- Windows Credential Manager entries (CredEnumerateW)
Other Details
This Trojan Spy does the following:
- Masquerades as a legitimate Corsair driver using forged PE version metadata (Corsair Memory, Inc., Corsair Gaming Peripheral Driver Module, Corsair iCUE Service, CorsairHID) without a valid digital signature
- Resolves Windows API functions dynamically using an LCG-XOR string decryption routine to hinder static analysis
- Installs a 12-byte inline hook on ntdll.dll!RtlExitUserProcess to keep the host process alive while the reflectively loaded payload thread executes, and hides the host console window (ShowWindow / FreeConsole)
- Decrypts its embedded configuration (campaign tag wsdesk-20261117-wspack2) in memory using single-byte XOR (0xAF)
- Supports privilege escalation via COM Elevation Moniker (Elevation:Administrator!new:{CLSID}), SeDebugPrivilege/SeBackupPrivilege token manipulation, and winlogon.exe token impersonation to achieve SYSTEM (S-1-5-18) privileges
- Implements two-stage anti-VM and anti-sandbox scoring checks (in both VSPMsg.dll and the unpacked in-memory payload) that terminate execution if the cumulative score exceeds 9. They evaluate the following indicators:
- CPU core count, RAM size, battery status, screen resolution (width ≤ 1280 on a single monitor), timezone (Pacific Standard Time with en-US), Windows 10 Build 15063, sleep timing drift, and system uptime (less than 10 minutes)
- BIOS SystemProductName values containing any of the following strings:
- bochs
- innotek
- kvm
- qemu
- virtualbox
- vmware
- xen
- VM device drivers (HGFS, VBoxGuest, VBoxMouse, vmci, vmx86), VM display adapters (Microsoft Hyper-V Video, QXL, VirtualBox, VMware SVGA), and VM MAC address OUIs (00:0c:29, etc.)
- Loaded sandbox DLLs (api_log, cmdvirth, cuckoomon, dir_watch, sbiedll, snxhk)
- Computer names or usernames containing any of the following strings:
- cuckoo
- malware
- sandbox
- wdagutilityaccount
- Running analysis tools matching any of the following processes:
- apimonitor.exe
- autoruns.exe
- dumpcap.exe
- fiddler.exe
- httpdebuggerui.exe
- ida.exe
- ida64.exe
- ollydbg.exe
- procexp.exe
- procexp64.exe
- processhacker.exe
- procmon.exe
- procmon64.exe
- systeminformer.exe
- tcpview.exe
- wireshark.exe
- x32dbg.exe
- x64dbg.exe
It accepts the following parameters:
- --bridge-server
- --camera-stream-test
- --camera-test
- --gate-check
- --guard
- --mk-local
- --priv-helper
- --sam-run
- --spawn-if-missing
- --system-keepalive
- --update
- --update-delay
It does not exploit any vulnerability.
SOLUTION
Step 1
Before doing any scans, Windows 7, Windows 8, Windows 8.1, and Windows 10 users must disable System Restore to allow full scanning of their computers.
Step 2
Note that not all files, folders, and registry keys and entries are installed on your computer during this malware's/spyware's/grayware's execution. This may be due to incomplete installation or other operating system conditions. If you do not find the same files/folders/registry information, please proceed to the next step.
Step 3
Restart in Safe Mode
Step 4
Delete this registry value
Important: Editing the Windows Registry incorrectly can lead to irreversible system malfunction. Please do this step only if you know how or you can ask assistance from your system administrator. Else, check this Microsoft article first before modifying your computer's registry.
- In HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run
- q09Host = %AppDataLocal%\q09Host\q09Host.exe
- q09Host = %AppDataLocal%\q09Host\q09Host.exe
Step 5
Restore these modified registry values
Important:Editing the Windows Registry incorrectly can lead to irreversible system malfunction. Please do this only if you know how to or you can seek your system administrator's help. You may also check out this Microsoft article first before modifying your computer's registry.
- In HKEY_CURRENT_USER\Software\Classes\ms-settings\shell\open\command
- (Default) = "{command_to_execute}"
- (Default) = "{command_to_execute}"
- In HKEY_CURRENT_USER\Software\Classes\ms-settings\shell\open\command
- DelegateExecute = ""
- DelegateExecute = ""
- In HKEY_CURRENT_USER\Software\Classes\mscfile\shell\open\command
- (Default) = "{command_to_execute}"
- (Default) = "{command_to_execute}"
- In HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Defender\Real-Time Protection
- DisableRealtimeMonitoring = {1}
- DisableRealtimeMonitoring = {1}
- In HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender\Real-Time Protection
- DisableRealtimeMonitoring = {1}
- DisableRealtimeMonitoring = {1}
- In HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Defender\Exclusions\Paths
- "{excluded_path}" = {0}
- "{excluded_path}" = {0}
- In HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Defender\Exclusions\Processes
- "{excluded_process}" = {0}
- "{excluded_process}" = {0}
- In HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server
- fDenyTSConnections = 0
- fDenyTSConnections = 0
- In HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon
- AutoAdminLogon = "{1}"
- AutoAdminLogon = "{1}"
- In HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon
- DefaultUserName = "{username}"
- DefaultUserName = "{username}"
- In HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon
- DefaultPassword = "{password}"
- DefaultPassword = "{password}"
- In HKEY_CURRENT_USER\Control Panel\Desktop
- ScreenSaveActive = "0"
- ScreenSaveActive = "0"
- In HKEY_CURRENT_USER\Control Panel\Desktop
- ScreenSaverIsSecure = "0"
- ScreenSaverIsSecure = "0"
- In HKEY_CURRENT_USER\Control Panel\Desktop
- ScreenSaveTimeOut = "0"
- ScreenSaveTimeOut = "0"
Step 6
Search and delete this file
- %AppDataLocal%\applicationform_7a46d727\{random 8 hex characters}\VSPMsg.i5.dat.new
- %AppDataLocal%\q09hc.token
- %AppDataLocal%\SyncDataf8\run.count
- %Application Data%\wc2\keylog.jsonl
- %Application Data%\wc2\keylog.jsonl.{number}
- %Application Data%\wc2\keylog.on
- %ProgramData%\AppStore32\bridge.log
- %ProgramData%\AppStore32\priv.cfg
- %ProgramData%\AppStore32\priv.port
- %ProgramData%\AppStore32\system.ok
- %ProgramData%\AppStore32\user.ok
- %Public%\q09creds.json
- %Public%\q09sam.json
- %User Temp%\q09crash.stamp
- %User Temp%\q09rdpwrap.log
- %User Temp%\q09walletclip.cfg
- %User Temp%\wa_extractor.log
Step 7
Search and delete this folder
- %AppDataLocal%\q09Host
- %AppDataLocal%\SyncDataf8
- %Application Data%\wc2
- %ProgramData%\AppStore32
- %ProgramData%\SyncStore61
- %User Temp%\wc2prof_{profile}
Step 8
Restart in normal mode and scan your computer with your Trend Micro product for files detected as TrojanSpy.Win64.SPARKRAT.B. If the detected files have already been cleaned, deleted, or quarantined by your Trend Micro product, no further step is required. You may opt to simply delete the quarantined files. Please check this Knowledge Base page for more information.
Did this description help? Tell us how we did.

