Xpaj (Virus:Win32/Xpaj)
Table of Contents
Overview
Xpaj (historically documented as Virus:Win32/Xpaj, W32/Xpaj, and Trojan.Xpaj) is a sophisticated polymorphic parasitic file infector and click-fraud botnet family active since 2009. Unlike simple droppers, Xpaj traverses local hard drives and accessible network shares, searching for Win32 Portable Executable (.exe, .dll, .scr) files and appending its encrypted polymorphic decryption engine into file slack spaces or newly created PE sections. Once executed on an infected machine, Xpaj establishes an encrypted peer-to-peer (P2P) and DNS-based C2 network, executing hidden browser instances to generate fraudulent click-through revenue on advertising networks. Because of its deep polymorphic file infection, disinfecting an endpoint requires dedicated antivirus removal tools or clean re-imaging to avoid binary corruption.
Known aliases
Threat reports may refer to this family under multiple names:
MITRE ATT&CK Techniques
Observed techniques used by this family, mapped to our technical analysis hubs and the official MITRE ATT&CK framework:
| Technique | Name | Tactic | Official Spec |
|---|---|---|---|
T1055 | Process Injection (File Infection) | Defense Evasion | ATT&CK ↗ |
T1014 | Rootkit | Defense Evasion | ATT&CK ↗ |
T1027 | Obfuscated Files or Information: Polymorphism | Defense Evasion | ATT&CK ↗ |
T1090.002 | Connection Proxy: Peer-to-Peer | Command and Control | ATT&CK ↗ |
T1083 | File and Directory Discovery | Discovery | ATT&CK ↗ |
MITRE D3FEND™ Defensive Countermeasures
Defensive techniques mapped to counter the offensive tradecraft observed in this family (via the MITRE D3FEND matrix):
| D3FEND ID | Countermeasure Name | Tactic | Countered ATT&CK | Defensive Guidance |
|---|---|---|---|---|
D3-KMC | Kernel Memory Integrity Checking | Harden | T1014 | Enable Hypervisor-Protected Code Integrity (HVCI) and UEFI Secure Boot to prevent unsigned kernel driver execution. |
D3-BDA | Binary De-obfuscation & Unpacking | Analyze | T1027 | Utilize memory dump scanners and entropy inspection to unpack encrypted stagers during process creation. |
D3-PIAD | Process Injection Analysis & Detection | Detect | T1055 | Monitor cross-process thread creation (CreateRemoteThread) and asynchronous procedure calls (QueueUserAPC). |
D3-FDA | File Directory Access Auditing | Detect | T1083 | Audit and alert on high-frequency recursive directory queries executed by non-system and unclassified binaries. |
D3-OAA | Outbound Network Traffic Filtering | Isolate | T1090.002 | Restrict outbound connections to known external proxy relays and enforce enterprise forward proxy authentication. |
Detection rule examples
These generated examples are starting points for local testing. Their detection rate and false-positive rate have not been measured. Correlate any match with endpoint evidence and the primary reports cited below.
Tier 1 Primitive Artifact Rule (Fast Triage)
Matches raw strings and file markers. Vulnerable to binary repacking and simple obfuscation.
rule MALWARE_WIN_XPAJ_T1_ARTIFACT
{
meta:
description = "Tier 1 Primitive Artifact: Raw string matches for Xpaj (File_Infector)"
category = "File_Infector"
tier = "T1 - Primitive Artifact"
confidence = "Medium (Fast Triage)"
author = "SystemHelpDesk Threat Research Desk"
reference = "https://malware-families-catalog.systemhelpdesk.com/families/xpaj"
date = "2026-11-21"
strings:
$fam_name = "xpaj" ascii wide nocase
$alias_1 = "virus:win32/xpaj" ascii wide nocase
$alias_2 = "w32/xpaj.virus" ascii wide nocase
$alias_3 = "win32/xpaj.b" ascii wide nocase
$alias_4 = "trojan.win32.xpaj" ascii wide nocase
$alias_5 = "xpaj infector" ascii wide nocase
condition:
uint16(0) == 0x5a4d and any of them
}
Tier 2 Behavioral Context Rule (Process Chains & Sigma)
Looks for selected process and command-line patterns. Validate the fields against your event source and review approved administration activity.
title: SystemHelpDesk Detection - Xpaj (File Infector) Execution & Triage
id: 7a1e232c-3fcb-54b6-ab09-7f5b8fe9be76
status: experimental
description: Experimental process-event hunting example associated with Xpaj (Virus:Win32/Xpaj).
Measure detection and false-positive rates in your own environment. Shared administration
behavior needs additional incident evidence.
references:
- https://malware-families-catalog.systemhelpdesk.com/families/xpaj
- https://malware-families-catalog.systemhelpdesk.com/defensive/ransomware-protection
- https://malware-families-catalog.systemhelpdesk.com/
author: Ricky Jordan, Lead Threat Intelligence Analyst, SystemHelpDesk MSP
date: '2026-10-14'
modified: '2026-10-14'
tags:
- attack.file-infector
- author.ricky-jordan
- source.systemhelpdesk-mfc
- attack.t1574_002
- attack.t1027
- attack.t1568_002
- attack.t1071_001
- attack.t1055
- attack.t1083
logsource:
category: process_creation
product: windows
detection:
selection_process:
Image|endswith:
- \cmd.exe
- \powershell.exe
- \cscript.exe
- \wscript.exe
CommandLine|contains:
- AppData\Local\Temp
- -WindowStyle Hidden
- /e:jscript
- bitsadmin /transfer
condition: selection_process
falsepositives:
- Legitimate enterprise administrative scripts during approved change windows
- Authorized IT software deployment utilities and backup management agents
level: medium
Tier 3 String and PE-marker example
Combines a family-name string with common PE markers. A match needs investigation before family attribution.
rule MALWARE_WIN_XPAJ_T3_ATTRIBUTION
{
meta:
description = "Tier 3 Attribution Fingerprint: Heuristic detection for Xpaj tradecraft"
category = "File_Infector"
tier = "T3 - Attribution Fingerprint"
confidence = "Experimental example; validation pending"
author = "SystemHelpDesk Threat Research Desk"
reference = "https://malware-families-catalog.systemhelpdesk.com/families/xpaj"
date = "2026-11-21"
strings:
$attrib_str = "xpaj" ascii wide nocase
$generic_marker1 = "CreateProcess" ascii
$generic_marker2 = "VirtualAlloc" ascii
condition:
uint16(0) == 0x5a4d and $attrib_str and 1 of ($generic_marker*)
}
Containment & Response Steps
Ordered checklist for responders. Adapt to your environment and engage professional support for active incidents.
- Instantly isolate the endpoint from the network to prevent the P2P botnet from issuing commands and to halt potential lateral movement.
- Do NOT attempt to manually delete infected system files (e.g., `hal.dll`, `explorer.exe`), as this will render the system unbootable.
- Boot the system from a clean, read-only rescue environment (e.g., a WinPE Live USB) and run a specialized offline virus removal tool designed specifically to disinfect (rather than delete) Xpaj-altered files.
- Due to the deep rootkit hooks and the risk of incomplete disinfection, a complete bare-metal rebuild of the operating system is the most secure remediation strategy.
What to Avoid
Common mistakes during response to this family that can destroy evidence, spread the infection, or worsen recovery.
- Avoid running standard antivirus remediation while the infected OS is active; the rootkit will actively lie to the AV scanner and protect the infected files.
- Do not trust the integrity of any executable file (`.exe`, `.dll`) extracted from the infected machine, even if it appears to be a legitimate corporate application.
References & External Analysis
- Microsoft Defender Threat Encyclopedia - Virus:Win32/Xpaj
- Kaspersky Threat Intelligence - Virus.Win32.Xpaj Technical Report
- MITRE ATT&CK - Hijack Execution Flow (T1574)
- Search "xpaj" on VirusTotal (External Analysis)
- Search "xpaj" on Any.Run (Sandbox Sandbox)
- Search "xpaj" on MalwareBazaar (Malware Samples)
Frequently Asked Questions
What is Virus:Win32/Xpaj?
Xpaj is a polymorphic parasitic file infector that infects PE executables and operates a click-fraud botnet.
How does Xpaj infect executable files?
It modifies Portable Executable (PE) headers, adding polymorphic encrypted code into slack spaces or new sections.
What was the primary monetization mechanism of the Xpaj botnet?
Click fraud: it spawns invisible browser processes to generate fraudulent clicks on online advertisements.
How does Xpaj communicate with its command-and-control servers?
It uses a hybrid peer-to-peer (P2P) architecture and domain generation algorithms (DGA) to exchange encrypted instructions.
Why is Xpaj infection difficult to clean?
Because it infects core system and third-party executables, requiring careful byte-level disinfection or complete system re-imaging.
How do I remove the Xpaj File_Infector from Windows?
Manual removal of Xpaj is highly discouraged as it may leave persistence mechanisms intact. We recommend disconnecting the device from the internet and utilizing a professional incident response service or enterprise-grade EDR software to conduct a full forensic sweep.
Is Xpaj a virus or a File_Infector?
Xpaj is classified as a File_Infector. Unlike traditional viruses that infect files, modern malware like Xpaj typically operates as a standalone payload designed to compromise systems, steal data, or deploy secondary stage implants.
What are the main symptoms of a Xpaj infection?
Symptoms of Xpaj can include unexpected system slowness, unauthorized outbound network traffic to unknown IP addresses, disabled security software, and suspicious background processes running from AppData or Temp directories.
Protect Your Network Against File Infector Viruss
Want to prevent Xpaj and similar threats from compromising your organization? Read our comprehensive defensive guide: Worm & Virus Protection.
📣 Threat Intel Correction or Update?
Notice an outdated IOC, unlisted alias, or disputed attribution? Threat researchers are invited to propose an update on GitHub or contact the SystemHelpDesk research desk. All community revisions are credited in our public CHANGELOG.
Machine-readable
Get this profile as JSON: https://malware-families-catalog.systemhelpdesk.com/api/xpaj.json
Ecosystem & Interactive Environments
This profile is part of the Malware Families Catalog, a public dataset of 2,982 malware families. The catalog is also published across our ecosystem: Hugging Face, Zenodo, Replit, StackBlitz, CodeSandbox, and CodePen.