ValleyRAT_S2
ValleyRAT_S2 is a second-stage malware payload in the ValleyRAT family and is described as a modular, highly evasive C++ remote access trojan used for cyber-espionage and long-term covert access. It functions as the core backdoor component after an initial Stage 1 infection. Reported targeting includes organizations in mainland China, Hong Kong, Taiwan, and Southeast Asia, with reporting also describing theft of sensitive financial information.
Observed delivery vectors include fake Chinese-language productivity tools marketed as "AI表格生成工具," cracked software, trojanized installers and utilities, targeted phishing emails with malicious .doc, .xls, and .pdf attachments, compressed archives with disguised executables, and abuse of legitimate software update mechanisms. A prominent execution technique is DLL side-loading, in which legitimate signed applications load malicious DLLs from the same directory. Reported masqueraded DLL names include steam_api64.dll and apphelp.dll, and an example drop path is C:\Users\Admin\AppData\Local\Temp\AI自动化办公表格制作生成工具安装包\steam_api64.dll.
Capabilities described in the content include system reconnaissance and host profiling, such as collecting operating system information, locale settings, registry data, installed software details, process listings, and scanning file systems for hidden drives, removable media, and network shares. ValleyRAT_S2 is also reported to support file upload and download, shell command execution, local data exfiltration, credential theft, financial data collection, and keystroke monitoring via Windows hooks. Evasion and post-exploitation behaviors include sandbox detection, process injection using WriteProcessMemory and CreateRemoteThread, thread context manipulation, and use of trusted-looking process names such as Telegra.exe and WhatsApp.exe.
Persistence mechanisms described include Windows Task Scheduler abuse via COM APIs, possible registry run keys, staged files in %TEMP% and AppData paths, and a watchdog mechanism implemented with batch scripts. Reported artifacts include %TEMP%\target.pid, monitor.bat, and a configuration path under %APPDATA%\Promotions\Temp.aps. The malware is said to create temporary staging artifacts in %TEMP% and restart itself if terminated. Command-and-control uses hardcoded infrastructure over a custom TCP-based protocol; a reported C2 endpoint is 27.124.3.175:14852. Additional reported behaviors include initialization that masquerades as Steam-related activity and use of callbacks disguised as legitimate Steam events.
Techniques & procedures
39 distinct techniques documented for this family, organized by ATT&CK tactic.
Initial Access
2 techniques
Initial Access
Software Update Abuse Exploitation of legitimate update mechanisms: Compromise of update channels in popular local Chinese software Injection into software distribution networks Abuse of trusted software vendors’ infrastructure
Deployed through targeted phishing operations: Malicious document attachments (.doc, .xls, .pdf) Compressed archives (.zip, .rar) containing disguised executables
Execution
5 techniques
Execution
“The malware implements advanced persistence techniques through Task Scheduler integration via COM APIs…”
Task Scheduler Integration : Uses COM API for automatic startup
The function launches cmd.exe via ShellExecuteExA ... wait until that shell completes execution
Generated Batch Script Behavior ... cscript //nologo "%VBSPath%"
Fake Software Installers ValleyRAT commonly disguises itself within: Fake productivity tools (e.g., “AI表格生成工具” — AI-based spreadsheet generator) Cracked or unofficial software downloads
Persistence
3 techniques
Persistence
“The malware implements advanced persistence techniques through Task Scheduler integration via COM APIs…”
Task Scheduler Integration : Uses COM API for automatic startup
Evidence : Watchdog batch script for automatic restart Behavior : Monitor.bat ensures malware restarts if killed
Privilege Escalation
7 techniques
Privilege Escalation
“The malware implements advanced persistence techniques through Task Scheduler integration via COM APIs…”
Task Scheduler Integration : Uses COM API for automatic startup
Behavioral Analysis MITRE ATT&CK Mapping Technique ID Observed Behavior ... Process Injection T1055 WriteProcessMemory into explorer.exe
Memory Injection : WriteProcessMemory and CreateRemoteThread for payload delivery
Thread Context Manipulation : Uses SetThreadContext for process hijacking
Evidence : Hooks into Windows messaging APIs via SetWindowsHookEx Behavior : Keystroke monitoring and control hijacking
Evidence : Watchdog batch script for automatic restart Behavior : Monitor.bat ensures malware restarts if killed
Stealth
10 techniques
Stealth
Evidence : Uses software packing to delay sandbox unpacking Behavior : Obfuscated code structure, potential string/section encryption
“Attackers disguise ValleyRAT_S2 within fake productivity tools… alongside cracked software downloads and legitimate-looking Chinese-language utilities.”
Mimics legitimate applications (Telegra.exe, WhatsApp.exe) Behavior : Uses familiar application names to avoid suspicion
Behavioral Analysis MITRE ATT&CK Mapping Technique ID Observed Behavior ... Process Injection T1055 WriteProcessMemory into explorer.exe
Memory Injection : WriteProcessMemory and CreateRemoteThread for payload delivery
Thread Context Manipulation : Uses SetThreadContext for process hijacking
Evidence : Hooks into Windows messaging APIs via SetWindowsHookEx Behavior : Keystroke monitoring and control hijacking
set /p pid=< "%PIDFile%" del "%PIDFile%"
“…sandbox detection heuristics identify analysis environments to evade security researchers.”
Sandbox Detection : Heuristic analysis to detect analysis environments ... custom SEH handler ... known evasion technique in advanced malware
Credential Access
2 techniques
Credential Access
“…Windows Hook integration for keystroke monitoring.”
Windows Hook Integration : SetWindowsHookEx for keystroke monitoring and control
Discovery
10 techniques
Discovery
Registry Analysis : Policy settings, installed software detection
Process Enumeration : Running processes via snapshot APIs
Operating System Information : Version, locale, architecture, environment variables
File System Scanning : Hidden drives, removable media, network shares
Enumerates connected drives Behavior : Discovers removable media and network drives
“…scans file systems for… network shares…”
“…sandbox detection heuristics identify analysis environments to evade security researchers.”
Sandbox Detection : Heuristic analysis to detect analysis environments ... custom SEH handler ... known evasion technique in advanced malware
Loops through the file system and registry Behavior : Identifies installed software and configurations
Geolocation Data : Collection through locale APIs
Collection
5 techniques
Collection
File system scanning capabilities Behavior : Harvests data from local storage devices
“…Windows Hook integration for keystroke monitoring.”
Windows Hook Integration : SetWindowsHookEx for keystroke monitoring and control
“constructs temporary environment staging in system %TEMP% directories… Environmental path resolution targets AppData\Roaming directories for staging malware data…”
Behavioral Analysis MITRE ATT&CK Mapping Technique ID Observed Behavior ... Clipboard Data T1115 AddClipboardFormatListener
Command and Control
5 techniques
Command and Control
Traffic Mimicry : HTTP tunneling and benign traffic patterns
push offset aServiceName; “14852” push offset aNodeName ; “27.124.3.175” call ds:getaddrinfo
“…custom TCP-based protocols…” | “hardcoded endpoints… 27.124.3.175:14852, using custom TCP-based protocols that mimic benign traffic patterns.”
Modular Commands : File upload/download, shell execution, payload injection, credential harvesting
Custom Protocol : TCP-based communication with proprietary format
Exfiltration
1 technique
Exfiltration
Exfiltrates collected data through established C2 channels
Impact
2 techniques
Impact
Evidence : Process monitoring and termination capabilities Behavior : Watchdog script monitors and controls process execution
Volume Shadow Copy Manipulation : WMI and COM APIs for potential ransomware staging
Observables
2 indicators attributed across vendor reports, sandbox runs, and researcher write-ups. Values are masked here and available in full in Mallory.
Recent activity
3 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.