This detection identifies the presence of the xpf.sys driver associated with a known Chinese hacktool set, which adversaries may deploy to establish persistence or evade standard security controls within Azure Sentinel. Proactively hunting for this artifact is critical because its low severity rating often leads to alert fatigue, allowing threat actors to maintain undetected footholds in the environment before escalating their activities.
rule dat_xpf {
meta:
description = "Chinese Hacktool Set - file xpf.sys"
author = "Florian Roth"
reference = "http://tools.zjqhr.com/"
date = "2015-06-13"
hash = "761125ab594f8dc996da4ce8ce50deba49c81846"
strings:
$s1 = "UnHook IoGetDeviceObjectPointer ok!" fullword ascii
$s2 = "\\Device\\XScanPF" fullword wide
$s3 = "\\DosDevices\\XScanPF" fullword wide
condition:
uint16(0) == 0x5a4d and filesize < 25KB and all of them
}
This YARA rule can be deployed in the following contexts:
This rule contains 3 string patterns in its detection logic.
Here are 4 specific false positive scenarios for the Chinese Hacktool Set - file xpf.sys detection rule in an enterprise environment:
Scenario: Deployment of Chinese Language Support Packages via SCCM/Intune
xpf.sys as a kernel-mode driver for input method editors (IME) or font rendering.msiexec.exe, ccmsetup.exe, or intune-management-agent.exe) combined with the file path located within standard installation directories (e.g., C:\Program Files\Microsoft Office\Root\VFS\... or C:\Windows\System32\en-US).Scenario: Execution of Antivirus Real-Time Scanning by Enterprise Security Suites
xpf.sys (or similarly named drivers) for their deep inspection modules. When the security agent performs a scheduled scan or updates its signature database, it loads this driver, triggering the detection logic even though the file is benign and signed by the vendor.xpf.sys file path resides within the specific EDR installation folder (e.g., C:\Program Files\CrowdStrike\...) AND the file signature status indicates a valid certificate from the respective security vendor (CrowdStrike, Symantec, etc.).Scenario: Scheduled Maintenance Jobs for Virtualization or Backup Agents