Xpaj

Category: file_infector · Aliases: Virus:Win32/Xpaj, W32/Xpaj.virus, Win32/Xpaj.B, Trojan.Win32.Xpaj, Xpaj Infector · Sample count (EMBER 2018): 14 · Enrichment: curated_sourced · Updated: 2026-10-15
Category: File_InfectorStatus: Automated SignaturePlatform: WINDOWS_PEStage: Execution, PersistenceActor: Unknown / CybercriminalIndustry: Global / OpportunisticMotivation: Opportunistic🕸 Explore Relationship Graph⚙ API JSON⚡ Sigma Rule💾 YARA RuleOS: Windows 10, Windows 7, Windows XP
Executive Summary
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.

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:

→ Explore the complete 226-Technique ATT&CK Threat Matrix

MITRE D3FEND™ Defensive Countermeasures

Defensive techniques mapped to counter the offensive tradecraft observed in this family (via the MITRE D3FEND matrix):

D3FEND IDCountermeasure NameTacticCountered ATT&CKDefensive Guidance
D3-KMCKernel Memory Integrity CheckingHardenT1014Enable Hypervisor-Protected Code Integrity (HVCI) and UEFI Secure Boot to prevent unsigned kernel driver execution.
D3-BDABinary De-obfuscation & UnpackingAnalyzeT1027Utilize memory dump scanners and entropy inspection to unpack encrypted stagers during process creation.
D3-PIADProcess Injection Analysis & DetectionDetectT1055Monitor cross-process thread creation (CreateRemoteThread) and asynchronous procedure calls (QueueUserAPC).
D3-FDAFile Directory Access AuditingDetectT1083Audit and alert on high-frequency recursive directory queries executed by non-system and unclassified binaries.
D3-OAAOutbound Network Traffic FilteringIsolateT1090.002Restrict outbound connections to known external proxy relays and enforce enterprise forward proxy authentication.

Tiered Detection Rules (Cisco CAIRN Model)

Modern threat detection requires multi-layered rule engineering. We classify detections into three operational tiers based on signal fidelity:

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"
        tier = "T1 - Primitive Artifact"
        confidence = "Low-Medium (Fast Triage)"
        author = "SystemHelpdesk Threat Research Desk"
        date = "2026-10-14"
    strings:
        $s1 = "xpaj" ascii wide nocase
        $s2 = "virus:win32/xpaj" ascii wide nocase
        $s3 = "w32/xpaj.virus" ascii wide nocase
        $s4 = "win32/xpaj.b" ascii wide nocase
        $s5 = "trojan.win32.xpaj" ascii wide nocase
        $s6 = "xpaj infector" ascii wide nocase
    condition:
        uint16(0) == 0x5a4d and any of them
}

Tier 2 Behavioral Context Rule (Process Chains & Sigma)

Tracks parent-child process anomalies and suspicious scripting telemetry. Resilient against file renames.

title: SystemHelpDesk Detection - Xpaj (File Infector) Execution & Triage
id: 7a1e232c-3fcb-54b6-ab09-7f5b8fe9be76
status: production
description: Detects execution, defense evasion, and persistence behaviors associated
  with the Xpaj malware family. Detects suspicious execution from temporary user directories
  with hidden window flags and background transfer utilities.
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
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 Attribution Fingerprint Rule (High Fidelity)

Deep signature matching distinctive operational fingerprints and payload characteristics.

rule MALWARE_WIN_XPAJ_T3_ATTRIBUTION {
    meta:
        description = "Tier 3 Attribution Fingerprint: Heuristic detection for Xpaj tradecraft"
        tier = "T3 - Attribution Fingerprint"
        confidence = "High (Confirmed Family Signature)"
        author = "SystemHelpdesk Threat Research Desk"
        date = "2026-10-14"
    strings:
        // Core family identifier & heuristic payload signatures
        $attrib_str = "xpaj" ascii wide nocase
        $pe_magic = "MZ" ascii
        $net_marker = "http" ascii nocase
    condition:
        uint16(0) == 0x5a4d and ($attrib_str and $net_marker) and filesize < 15MB
}
SOC & SIEM Rule Downloads: ⬇ Download YARA Rule (.yar) ⬇ Download Sigma Rule (YAML) ⬇ Download Sigma Rule (JSON) ⚙ Threat Profile API (JSON)

Containment & Response Steps

Home Users: If you suspect a malware infection on your personal device, disconnect from the internet immediately and run a full system scan with your antivirus software (see our TotalAV Antivirus & Security Support Guide). The steps below are intended for IT professionals responding to enterprise incidents.

Ordered checklist for responders. Adapt to your environment and engage professional support for active incidents.

  1. Instantly isolate the endpoint from the network to prevent the P2P botnet from issuing commands and to halt potential lateral movement.
  2. Do NOT attempt to manually delete infected system files (e.g., `hal.dll`, `explorer.exe`), as this will render the system unbootable.
  3. 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.
  4. 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.

  1. 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.
  2. 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

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_Infectors

Want to prevent Xpaj and similar threats from compromising your organization? Read our comprehensive defensive guide: Think You've Been Hacked? What To Do First.

📣 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.

Need help with an active incident? Published by the SystemHelpdesk Threat Intelligence Team.

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,899 malware families. The catalog is also published across our ecosystem: Hugging Face, Kaggle, Zenodo, Replit, StackBlitz, CodeSandbox, and CodePen.