XWorm is a cheap, modular remote access trojan that has become one of the most frequently seen commodity RATs, and its operators reach endpoints through script-heavy delivery chains that many email and endpoint controls still let through. First observed in 2022 and sold as malware-as-a-service, it gives an operator remote control, credential theft, keylogging, clipboard hijacking and optional ransomware and denial of service modules. This guide explains how XWorm versions and leaked builders evolved, the delivery chains researchers have documented, its persistence and stealth behaviour, and the detections and controls that stop it. It is written for SOC analysts, detection engineers, incident responders and email and endpoint engineers. It is strictly defensive: no builder, configuration or payload detail. For the older families XWorm is often compared with, see the AsyncRAT, Remcos and njRAT Commodity RATs Guide; this page does not repeat that material.
Key takeaways
- Leaks multiplied the threat. Trellix reports the original developer disappeared after version 5.6 in late 2024, then a V6.0 appeared in June 2025, was cracked within weeks, and a modified V6.4 builder and source code leaked in August 2025, so many unrelated operators now run variants.
- Scripts carry the infection. Researchers document JavaScript, VBScript, WSF, batch, LNK and HTA files, password-protected archives and ClickFix paste-and-run pages leading to in-memory PowerShell loaders.
- Trusted .NET binaries host the payload. Several analyses show XWorm injected into signed utilities such as RegSvcs.exe or a .NET compiler, so a legitimate process making an outbound connection is a key signal.
- It rarely arrives alone. Cofense found 78% of XWorm campaigns delivered other malware families as well, so finding XWorm should open a hunt for a second RAT or stealer.
- Every infection is a credential and session incident. Browser credentials, session cookies, chat tokens and crypto wallets are targeted, and Trellix documents a reset-survival persistence method, so response must cover identities and recovery partitions, not only the host image.
What XWorm is (names, versions and supply model)
XWorm is a .NET remote access trojan sold through underground markets. MITRE ATT&CK v20 has no software entry for it, so map detections to technique IDs rather than a family ID, and treat vendor names such as "XWorm V6" as labels for configuration and builder versions, not for a single actor. Trellix cites an average price of about $500 for a lifetime subscription and reports that ANY.RUN ranked XWorm third in its 2025 report, ahead of Remcos and Agent Tesla; that ranking is ANY.RUN's sandbox data, not a census of infections.
| Period | Development | Source |
|---|---|---|
| 2022 | XWorm first observed and offered for sale | Trellix, Netskope, Logpoint |
| September 2024 | V5.6 analysed with WSF and PowerShell delivery and Telegram notification of new victims | Netskope Threat Labs |
| Late 2024 | Original developer deletes their account after V5.6; cracked and trojanised builders spread | Trellix |
| 4 June 2025 | A new account posts V6.0 on a hacking forum; authenticity questioned | Trellix |
| 27 June 2025 | Cracked V6.0 builder released | Trellix |
| 24 August 2025 | Modified V6.4 builder and VB.NET source leak, adding rootkit and reset-survival plugins | Trellix |
| March 2026 | V6.4 and V7.x campaigns using invoice and packing list lures, and Discord-distributed archives | SANS ISC, Trellix |
Two consequences follow. First, the builder leak means the same family appears in campaigns of very different skill, from basic batch-file droppers to steganography and in-memory loaders. Second, Trellix notes that some builders circulating on malware repositories are themselves infected with XWorm, which matters for any researcher or red team tempted to obtain one: do not.
Delivery chains
XWorm's delivery varies more than its core behaviour, which is why detection should anchor on the stages that repeat. Cofense counted 22 distinct delivery mechanisms in the campaigns it tracked.
| Chain | How it works (defender view) | Reported by | Best control point |
|---|---|---|---|
| Email attachment with script | ZIP containing JavaScript or WSF, often an invoice, quotation or packing list lure; wscript.exe downloads or decodes a PowerShell stage; a decoy PDF may open | Trellix, Netskope, SANS ISC | Gateway blocking of script files in archives; default-open script files in Notepad |
| Batch and password-protected archives | Batch scripts were the most common mechanism (18%); password-protected archives and legitimate files bundled with the payload each about 17% | Cofense | Detonation of archives with passwords in the email body; block batch files from mail and downloads |
| LNK to WebDAV | Shortcut files that open a WebDAV share through File Explorer; 94% of German-language campaigns Cofense saw | Cofense | Block LNK from mail; monitor WebDAV client traffic |
| ClickFix paste-and-run | A fake verification page copies a PowerShell command and tells the user to paste it into the Run dialog; about 4% of Cofense's campaigns; Microsoft lists XWorm among ClickFix payloads | Microsoft, Cofense, Logpoint | Restrict the Run dialog and PowerShell for standard users |
| Steganography | Images carrying an embedded DLL extracted by a script, about 11% of campaigns | Cofense | Behaviour detection on the script stage, not file scanning |
| Weaponised archives on chat platforms | Archives posing as game mods on Discord abusing WinRAR path traversal CVE-2025-8088, which is in the CISA KEV catalogue | Trellix | Update WinRAR to 7.13 or later; inventory archive tools |
For the paste-and-run pattern in depth, see the ClickFix and Fake CAPTCHA Paste-and-Run Attacks Guide. For shortcut abuse, see the Malicious LNK Files Guide.
Capabilities and plugin architecture
Trellix describes a core client that loads plugins as in-memory DLLs, caching them compressed in the registry under a key derived from host attributes. Capabilities reported across the analyses include:
- Remote control: remote desktop, a hidden command shell, file manager and hidden VNC (HVNC) sessions that operate without a visible desktop.
- Surveillance: keylogging to a hidden file in %TEMP%, screenshots, webcam capture and clipboard monitoring, including "clipper" behaviour that swaps cryptocurrency addresses.
- Credential theft: passwords and cookies from browsers (including plugins aimed at Chromium app-bound encryption), mail and FTP clients, Wi-Fi profiles, Discord and Telegram tokens and crypto wallets.
- System manipulation: hosts file rewriting (which redirects DNS lookups on the host), service and startup management, UAC bypass and power control.
- Disruption: denial of service floods and a ransomware plugin that encrypts files with an .ENC extension, drops a "How To Decrypt" note and changes the wallpaper.
- Stealth: AMSI bypass before the payload runs, protected plugins, WMI checks for security products and virtual machines, and in the leaked V6.4 a rootkit plugin that hides processes.
Netskope also observed a V5.6 loader sending a Telegram message with the victim's public IP address to the operator. Because XWorm steals Telegram and Discord tokens and can use Telegram for notifications, review bot and token hygiene too. See the Discord and Telegram Bot Tokens Security Guide.
Techniques mapped to MITRE ATT&CK
ATT&CK v20 has no XWorm entry, so the mapping below is based on the behaviours vendors document, matched to verified v20 technique IDs. Use it for detection coverage, not for attribution.
| Stage | Technique (ATT&CK v20) | Observed behaviour | Telemetry |
|---|---|---|---|
| Initial access | T1566.001 Spearphishing Attachment; T1566.002 Spearphishing Link | Archives with scripts; links to archives and fake verification pages | Email gateway, proxy |
| Execution | T1204.002 Malicious File; T1204.004 Malicious Copy and Paste; T1059.007 JavaScript; T1059.005 Visual Basic; T1059.001 PowerShell | wscript.exe or the Run dialog launching PowerShell with bypass flags and encoded content | Process creation, PowerShell 4104, RunMRU registry |
| Persistence | T1547.001 Registry Run Keys / Startup Folder; T1053.005 Scheduled Task; T1037.001 Logon Script (Windows) | HKCU Run entries, Startup copies, tasks repeating every 15 minutes, UserInitMprLogonScript | Registry events, Event 4698 |
| Stealth | T1620 Reflective Code Loading; T1055.012 Process Hollowing; T1218.009 Regsvcs/Regasm; T1027.003 Steganography; T1497.001 System Checks | In-memory .NET loading, hollowing into RegSvcs.exe or a .NET compiler, sandbox checks | EDR memory and injection alerts |
| Defence impairment | T1685 Disable or Modify Tools; T1686 Disable or Modify System Firewall | Defender preference changes, firewall disabled, AMSI patching | Defender operational log, firewall events |
| Credential access | T1555.003 Credentials from Web Browsers; T1539 Steal Web Session Cookie; T1056.001 Keylogging | Browser stores, cookies, chat tokens, keystrokes | File access by non-browser processes |
| Collection | T1113 Screen Capture; T1125 Video Capture; T1115 Clipboard Data | Screenshots, webcam, clipboard and wallet address swapping | EDR API and device access |
| Command and control | T1571 Non-Standard Port; T1568 Dynamic Resolution; T1102 Web Service | Persistent TCP sessions to dynamic DNS names on varying high ports; paste sites and Telegram for staging and notifications | Firewall, DNS, proxy |
| Impact | T1486 Data Encrypted for Impact; T1498.001 Direct Network Flood | Optional ransomware plugin; DoS floods from the host | File rename bursts, outbound volume |
Detection engineering
Network indicators change with every operator, and Cofense notes traffic varies between infections, so build detections on behaviour. These are the signals with the best yield, roughly in chain order.
- Script host to PowerShell: wscript.exe, cscript.exe or mshta.exe spawning powershell.exe, especially with execution policy bypass or encoded commands. Enable PowerShell Script Block Logging (Event 4104) and Module Logging, and remove PowerShell v2, as Logpoint recommends.
- Run dialog abuse: new RunMRU values containing powershell, mshta or download cmdlets written by explorer.exe, which Microsoft uses to find ClickFix execution.
- Trusted .NET utilities misbehaving: RegSvcs.exe, RegAsm.exe, InstallUtil.exe or Aspnet_compiler.exe running from user folders, as a child of a script or PowerShell, or making outbound connections.
- Persistence in user-writable paths: Run keys, Startup items, logon scripts and scheduled tasks pointing to AppData, ProgramData or Temp; tasks repeating every few minutes.
- Recovery partition changes: new files in C:\Recovery\OEM or a new ResetConfig.xml on an endpoint, which Trellix ties to reset-survival persistence.
- Beacon pattern: long-lived TCP sessions from an unsigned or .NET process to a dynamic DNS name or raw IP on a high port with keepalives every few seconds; Netskope saw 10 to 15 second intervals.
- Telegram and paste sites from non-browsers: api.telegram.org or paste site requests from PowerShell, wscript.exe or .NET utilities.
- Defence tampering: Defender exclusions added or real-time protection changed, and the Windows Firewall disabled across profiles.
Use a sandbox to extract configurations from samples rather than reverse engineering by hand; SANS ISC recommends this for the obfuscated JavaScript stage. See the EDR Telemetry Guide and the Sigma Rules Guide.
Metrics: percentage of endpoints with script block logging enabled; percentage of mail flow where script and LNK attachments are blocked; median time from first script-host alert to isolation; number of XWorm-family detections where a second family was also found; percentage of confirmed infections followed by credential and session revocation within 24 hours.
Prevention and hardening
| Control | Specific setting or action | Chains it breaks |
|---|---|---|
| Email filtering | Block or detonate JS, VBS, WSF, BAT, HTA, LNK, ISO, IMG and VHD attachments and the same types inside archives, including password-protected ones | Attachment, batch, LNK |
| Script defaults | Associate .js, .vbs and .wsf with Notepad; restrict Windows Script Host for standard users | JavaScript and VBScript loaders |
| Attack surface reduction | Microsoft ASR rules: block execution of potentially obfuscated scripts; block JavaScript or VBScript from launching downloaded executable content; block executables that do not meet prevalence, age or trusted list criteria | Script loaders, droppers |
| Run dialog and paste controls | Remove Run from the Start menu and disable Win+R by Group Policy for users who do not need it; enable the Windows Terminal multi-line paste warning | ClickFix |
| PowerShell policy | AllSigned or RemoteSigned execution policy, Constrained Language Mode through application control, PowerShell v2 removed | PowerShell stages |
| Application control | Block execution from AppData, Temp and Downloads; restrict signed .NET utilities that users do not need | Payload launch, LOLBin hosting |
| Protective DNS and egress | Block newly registered and dynamic DNS domains, paste sites and Telegram API from servers and non-browser processes; restrict outbound high ports | C2 and staging |
| Patching third-party tools | Bring archive utilities into patch management; WinRAR 7.13 or later | Archive path traversal |
Rollout:
- Turn on script block logging and process command line auditing everywhere first: it costs little and gives you visibility for every later step.
- Run ASR rules and script restrictions in audit mode on a pilot ring for two to four weeks, review which business scripts would break, and add narrow exclusions.
- Enforce on the pilot, then on broader rings; keep the audit data to justify each exclusion. Roll back an individual rule to audit mode if it breaks a critical process, rather than disabling the whole policy.
- Apply email attachment blocking and Run dialog restrictions with communication to users and a fast exception route.
- Add egress and protective DNS controls, starting with servers and kiosks where non-browser internet access is rarely legitimate.
Decision guidance: a small organisation without a SOC gets most value from attachment blocking, Notepad as the default script handler, ASR rules or an equivalent EDR policy, and a managed detection service. Larger organisations should add application control, Run dialog restrictions for standard users, and the behaviour detections above. Developers and IT staff who need PowerShell should be a separate policy ring with stronger logging rather than an exemption from controls. See the PowerShell Security Guide and the Application Allowlisting Guide.
Responding to an XWorm infection
- Contain: isolate the host through EDR and block the C2 destination at the egress point. Capture memory before rebooting if you can, because the payload lives in memory.
- Scope: search for the same parent script, task names and RegSvcs or .NET compiler network activity across the estate, and look for a second family, since most campaigns bundle one.
- Revoke identities: reset passwords used on the host, revoke browser sessions and refresh tokens, rotate Discord, Telegram and other API or bot tokens, and move any crypto wallet funds to new keys. See the Infostealer Logs and Session Token Abuse Guide.
- Eradicate fully: remove Run keys, tasks, logon scripts and Startup items; check C:\Recovery\OEM before trusting a factory reset; reimage from known-good media.
- If the ransomware plugin ran: treat it as a ransomware incident with backup restoration and notification review. See the Ransomware Response and Recovery Guide.
Framework mapping
| Defence | NIST SP 800-53 Rev. 5 | NIST CSF 2.0 | CIS Controls v8.1 | ISO/IEC 27001:2022 Annex A |
|---|---|---|---|---|
| Email and attachment filtering | SI-8, SI-3 | PR.PS-05 | Control 9 Email and Web Browser Protections | A.8.7 |
| Application and script control | CM-7, CM-11 | PR.PS-05 | Control 2 Inventory and Control of Software Assets | A.8.19 |
| Endpoint detection and logging | SI-4, AU-12 | DE.CM-01 | Control 8 Audit Log Management, Control 10 Malware Defenses | A.8.15, A.8.16 |
| User awareness for paste-and-run lures | AT-2 | PR.AT-01 | Control 14 Security Awareness and Skills Training | A.6.3 |
| Incident handling and credential revocation | IR-4 | RS.MA-01 | Control 17 Incident Response Management | A.5.26 |
Common failure patterns
- Hash and IP blocking as the main defence: builder leaks mean every operator has new hashes and infrastructure; behaviour detections last longer.
- Reimaging without revoking sessions: stolen cookies and tokens let the operator back into SaaS accounts after the laptop is clean.
- Stopping at the first family: closing the case after removing XWorm when a bundled stealer or second RAT is still running.
- Trusting a factory reset: reset-survival persistence in the recovery folder can reinstall the payload.
- Exempting technical users: broad PowerShell and script exemptions for IT and developers leave the highest-value accounts with the weakest controls.
- Unmanaged archive tools: utilities outside central patching stay vulnerable long after fixes ship.
Practitioner checklist
- Map detections to the technique table and record gaps; do not wait for an ATT&CK family entry.
- Block script, LNK and disk image attachments, including inside archives.
- Set Notepad as the default handler for .js, .vbs and .wsf files.
- Enable PowerShell Script Block Logging and remove PowerShell v2.
- Enforce ASR or equivalent EDR rules for obfuscated scripts and script-launched executables.
- Restrict the Run dialog for standard users and alert on suspicious RunMRU entries.
- Alert on RegSvcs, RegAsm, InstallUtil and .NET compiler processes making network connections.
- Block Telegram API and paste sites from non-browser processes and servers.
- Include session, token and wallet revocation and a recovery folder check in the RAT response runbook.
Standards and references
- Trellix: Malware-as-a-Service redefined, XWorm RAT
- Trellix: XWorm V6, exploring pivotal plugins
- Microsoft Security: Think before you ClickFix
- Netskope Threat Labs: New XWorm stealthy techniques
- Cofense: The rise of XWorm RAT
- Logpoint: XWorm RAT analysis
- SANS Internet Storm Center: Want more XWorm?
- CISA: Known Exploited Vulnerabilities Catalog
Related NHI Mgmt Group resources: AsyncRAT, Remcos and njRAT Commodity RATs Guide · ClickFix and Fake CAPTCHA Paste-and-Run Attacks Guide · Malware Statistics · Remote Access Trojans (RATs) Guide · Malware Loaders and Droppers Guide