XenoRAT
- Type
- RAT
- Capabilities
- Credential theftSession hijackingKeyloggingExfiltrationPersistencePrivilege escalationPost exploitationDefense evasionReconnaissance
- Delivery
- PhishingSpearphishingLure
- Platforms
- Windows
XenoRAT is an open-source remote access trojan written in C# for Windows, including Windows 10 and Windows 11. Its modular architecture loads operator-supplied plugin assemblies into memory and provides remote command execution, file transfer and management, process and registry management, and interactive desktop control. Surveillance functions include online and offline keylogging, screen capture, webcam access, microphone recording, and hidden virtual desktop interaction. Its browser-information collection component steals saved passwords, cookies, browsing history, download records, and stored payment-card information from Chromium-based browsers. A reverse-proxy component tunnels TCP traffic through compromised hosts.
XenoRAT collects host, operating-system, antivirus, and user-activity information and communicates with its controller over TCP using encrypted communications. It supports configurable startup persistence and privilege elevation through UAC-bypass techniques. Persistence is configuration-dependent and is not enabled in every sample. Additional functionality includes shutdown, restart, and disruptive system operations. Observed variants use obfuscation, packing, application impersonation, and in-memory execution; some PowerShell delivery chains reconstruct a .NET assembly and invoke it directly in memory.
Distribution includes phishing and spearphishing, malicious downloads, Excel add-ins, and repositories masquerading as gaming utilities. South Korea-focused espionage campaigns have delivered XenoRAT through document-disguised Windows shortcuts, multistage PowerShell loaders, and dynamically replaceable payloads hosted on public note services. Other campaigns target gamers and developers with fake Roblox scripting tools. LemonDuck has deployed XenoRAT alongside XMRig and vulnerability-scanning scripts on compromised HTTP File Server installations. MoonPeak is a XenoRAT-based variant. Its public availability and use across different campaigns mean the family is not exclusive to a single threat actor.
Associated vulnerabilities
1 CVE Mallory has correlated with this family across public research and vendor advisories. Each card links to the full Mallory page for that vulnerability.
Associated threat actors
8 distinct threat actors Mallory has associated with this family across public reporting. Open in Mallory to see the full evidence chain and overlapping campaigns.
The loader periodically reads a public anotepad.com note page, extracts Base64 code between marker strings, and executes it in memory, letting the actor hot-swap payloads from XenoRAT to Dropbox and MEGA exfiltration scripts and finally NodeLinkRAT, which installs the official Node.js runtime into C:\Users\Public\Music and beacons over Socket.IO with a hardcoded AES-256-GCM key.
최종적으로 설치되는 것은 XMRig 코인 마이너이지만 XenoRAT과 취약점 스캐너 스크립트가 함께 설치되는 것이 특징이다.
"Not Just Spies Anymore: DPRK's Espionage Actors Are Coming for Your Crypto" published by Zscaler. #Kimsuky, #Konni, #macOS, #XenoRAT, #TokenPhantom
Seqrite Labs identified a sophisticated SideCopy XenoRAT malware attack focused directly on government networks.
Seqrite Labs identified a sophisticated SideCopy XenoRAT malware attack focused directly on government networks.
While earlier versions spread the XenoRAT malware, the current version focuses on deep surveillance.
+2 more in the app. View in Mallory
Techniques & procedures
63 distinct techniques documented for this family, organized by ATT&CK tactic.
Reconnaissance
1 technique
Reconnaissance
This level of detail indicates that the threat actors conducted thorough prior reconnaissance.
Resource Development
1 technique
Resource Development
The malicious files were delivered through infrastructure hosted on Afghan government servers, allowing the attackers to blend their traffic with legitimate state communications and evade network-level detection.
Initial Access
3 techniques
Initial Access
Indicators that we observed in our casework overlap with a Trellix report that tied similar activity to spear phishing campaigns against South Korean diplomatic missions
The complex intrusion sequence initiates through a tailored spear-phishing email delivery path. This electronic mail contains a compressed archive enclosing a fraudulent shortcut file.
a possibly linked YouTube account... one of the videos instructing users to disable Windows Defender before installing the Synapse X RAR file. In the same video, several comments vouched for the legitimacy of the files
Execution
13 techniques
Execution
작업 스케줄러를 이용한 지속성을 확보
It executes the malicious script in the C:\ProgramData Path and registers a Task Scheduler entry that is disguised as a OneDrive update... Type C... creates a Task Scheduler task... Type D... registers them with the Task Scheduler.
the operators attempted to use our models to engage in malware and command-and-control (C2) development
The Shell plugin provides remote command execution through cmd.exe or powershell.exe on the remote system.
Starts a new cmd.exe or powershell.exe instance through CreateProc.
That loader DLL downloaded an encoded, GZIP-compressed blob from attacker-controlled URLs and unpacked it entirely in memory.
It executes its primary payload using the command: python runn.py -p new.bin -k a.json
Subsequently, the remote web application processes a heavily obfuscated JavaScript payload within the host memory space.
It then calls the NtRaiseHardError API with the error code 0xC0140002.
The function manages the dynamic loading and execution of external DLL modules received through a remote Node connection... loads it dynamically using Assembly.Load.
MITRE ATT&CK Matrix ... Initial Access ... T1203 – Exploitation for Client Execution
Рис.1 Приклад ланцюга ураження з використанням LNK-файлу ... Рис.2 ... RAR-архіву ... та VBS/BAT файлів ... Документи.pdf.lnk ... Платіжне доручення.vbs ... Порядок денний до суду.bat
The GitHub repository... hosts 10 repositories, most disguised as gaming-related executors and named loader.exe... users to disable Windows Defender before installing the Synapse X RAR file.
Persistence
4 techniques
Persistence
작업 스케줄러를 이용한 지속성을 확보
It executes the malicious script in the C:\ProgramData Path and registers a Task Scheduler entry that is disguised as a OneDrive update... Type C... creates a Task Scheduler task... Type D... registers them with the Task Scheduler.
The deletion of subkeys using DeleteRegistrySubkey and specific Registry values using DeleteRegistryValue is also supported.
StartUp implements a persistence mechanism that allows the malware to execute automatically at Windows startup.
Privilege Escalation
6 techniques
Privilege Escalation
작업 스케줄러를 이용한 지속성을 확보
It executes the malicious script in the C:\ProgramData Path and registers a Task Scheduler entry that is disguised as a OneDrive update... Type C... creates a Task Scheduler task... Type D... registers them with the Task Scheduler.
the malware directly allocates executable memory within the current process using the Windows API VirtualAlloc()... copies the reconstructed shellcode buffer into the allocated region... and transfers execution to the injected buffer through the CreateThread() API.
The decrypted payloads are not written to disk as executables. Instead, they are injected directly into separate instances of explorer.exe using Early Bird APC injection... QueueUserAPC(shellcode_ptr, target_thread, 0)
StartUp implements a persistence mechanism that allows the malware to execute automatically at Windows startup.
The UAC Bypass module allows the client to remotely trigger different UAC elevation and process execution methods.
Stealth
13 techniques
Stealth
The loader script implements a custom Base64 decoding routine to hide its downstream modules.
This staged approach is commonly used in fileless malware... reconstruct the serialized payload entirely in memory without touching disk.
a GitHub repository portraying its software as scripting engine tools for the popular game Roblox... most disguised as gaming-related executors
the malware directly allocates executable memory within the current process using the Windows API VirtualAlloc()... copies the reconstructed shellcode buffer into the allocated region... and transfers execution to the injected buffer through the CreateThread() API.
The decrypted payloads are not written to disk as executables. Instead, they are injected directly into separate instances of explorer.exe using Early Bird APC injection... QueueUserAPC(shellcode_ptr, target_thread, 0)
It launches a hidden cmd.exe process with a Base64-decoded command (/C choice /C Y /N /D Y /T 3 & Del) that waits for a few seconds and then deletes the running executable file from disk.
Type C는 Base64로 인코딩된 데이터를 %temp%에 생성해 실행하고...
Instead of dropping a binary immediately, the shortcut covertly launches the native Windows command tool mshta.exe. This legitimate system binary fetches an externally hosted hypertext application file from a compromised domain.
기존 MoonPeak 사례와 동일한 뮤텍스 문자열을 사용하는 점
PowerShell 기반 스크립트를 이용하여 분석 환경을 확인
The malware runs a mutex called “clouda” to prevent duplicate instances, and it queries installed antivirus products before reporting back to its operators.
The malware creates a directory named USOShared-1de48789-1285 under C:\Users\Public\ to store the next-stage HTA payload... The directory naming convention mimics application-generated cache or profile folders.
Specifically, the malware handles this payload reconstruction phase strictly within volatile memory.
Defense Impairment
2 techniques
Defense Impairment
The deletion of subkeys using DeleteRegistrySubkey and specific Registry values using DeleteRegistryValue is also supported.
Figure 9 shows a screenshot from one of the videos instructing users to disable Windows Defender before installing the Synapse X RAR file.
Credential Access
3 techniques
Credential Access
System-wide keyboard input is captured using the SetWindowsHookEx API ... together with the WH_KEYBOARD_LL hook type.
런타임에 aes.js를 생성하여 Cookie를 획득하고 이를 C&C 통신에 활용
It decrypts the Chromium master key stored in the Local State file using Windows DPAPI.
Discovery
9 techniques
Discovery
The corresponding subkeys and values are read through GetRegInfo.
Username — Displays the name of the user account currently logged into the client.
It collects each process's PID, executable path, and description information through WMI (Win32_Process).
The HWID function combines values such as Environment.ProcessorCount, Environment.UserName, Environment.MachineName, Environment.OSVersion, and the total disk capacity.
FileViewer lists logical drives or the files and subdirectories of a specified directory.
PowerShell 기반 스크립트를 이용하여 분석 환경을 확인
The malware runs a mutex called “clouda” to prevent duplicate instances, and it queries installed antivirus products before reporting back to its operators.
GetAntivirus function retrieves antivirus information from the system using Windows Management Instrumentation (WMI) by querying the AntivirusProduct class under root\SecurityCenter2.
The GetAntivirus function detects installed antivirus products by querying the AntivirusProduct class within SecurityCenter2 through WMI.
Collection
6 techniques
Collection
FileUploader transfers files from the target system to the server in 500,000-byte blocks.
System-wide keyboard input is captured using the SetWindowsHookEx API ... together with the WH_KEYBOARD_LL hook type.
The screenshot is captured by ScreenshotTaker.TakeScreenshot using CopyFromScreen.
Performs keylogging, screen capture, clipboard monitoring, and webcam/microphone surveillance.
The captured audio data is obtained in 44100 Hz, 16-bit, 2-channel format and transmitted directly to the server through MicNode.
It can detect video input devices on the system, capture video from the selected camera, compress the frames in JPEG format, and transmit them to the server.
Command and Control
9 techniques
Command and Control
Command and Control Application Layer Protocol T1071
the use of GitHub-based repositories for C2
Reverse Proxy provides a SOCKS5-like TCP proxy/tunneling mechanism within XenoRAT.
Supports SOCKS5 proxy-based network tunneling.
C&C 서버와 비동기 소켓 통신을 수행
A lightweight HTTP POST beacon (status=success) is transmitted to attacker-controlled infrastructure hosted on TryCloudflare, providing operators confirmation of successful staging and injection.
UPA.ps1 periodically fetching an anotepad.com note page, extracting Base64 between the markers 887wgJs8 and nfJgcBl with a regex, and executing the decoded code with IEX
Type C... distributed XenoRAT-type malware. ... Ultimately, a backdoor capable of executing remote commands and controlling files was activated.
The Encryption class uses the AES algorithm to encrypt and decrypt data exchanged between the client and server.
Exfiltration
2 techniques
Exfiltration
Xworm Capabilities & Impact... Data Theft... Enables attackers to conduct espionage... The infection chain concludes by transmitting a minimal HTTP beacon back to attacker-controlled command-and-control (C2) infrastructure
Instead of relying on their own servers, they use GitHub to move data. Fortinet researchers identified accounts such as motoralis, Pigresy80, and brandonleeodd93-blip, where stolen information is stored in private repositories.
Impact
2 techniques
Impact
Can trigger Windows' critical error mechanism and cause the system to terminate with a bugcheck (BSOD).
Value 1 shuts down the system using the shutdown /s /t 0 command, while value 2 restarts the system using the shutdown /r /t 0 command.
Observables
64 indicators attributed across vendor reports, sandbox runs, and researcher write-ups. Values are masked here and available in full in Mallory.
Recent activity
58 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.