This rule detects the presence of the ChinaProtect dummy file, a known artifact often deployed by APT groups to establish a foothold or facilitate lateral movement within compromised Azure environments. Proactively hunting for this specific file allows the SOC team to identify stealthy persistence mechanisms and potential supply chain compromises that may otherwise go unnoticed by standard behavioral detections.
rule ChinaProtectdummy
{
meta:
author="malware-lu"
strings:
$a0 = { C3 E8 [4] B9 [4] E8 [4] FF 30 C3 B9 [4] E8 [4] FF 30 C3 B9 [4] E8 [4] FF 30 C3 B9 [4] E8 [4] FF 30 C3 56 8B [3] 6A 40 68 00 10 00 00 8D [2] 50 6A 00 E8 [4] 89 30 83 C0 04 5E C3 8B 44 [2] 56 8D [2] 68 00 40 00 00 FF 36 56 E8 [4] 68 00 80 00 00 6A 00 56 E8 [4] 5E C3 }
condition:
$a0
}
This YARA rule can be deployed in the following contexts:
This rule contains 1 string patterns in its detection logic.
Legacy .NET Application Deployment via Group Policy
.dll files are signed with a certificate from a Chinese vendor (e.g., “Beijing XYZ Tech Co., Ltd.”) or contain metadata strings referencing “China” or specific Chinese region codes in the version info, triggering the YARA rule during the initial file write or execution.C:\Program Files\ or C:\Program Files (x86)\ that are signed by a trusted internal CA or a known vendor certificate. Alternatively, exclude paths matching \\<server>\sysvol\domain\sysvol\gpo\ during GPO refresh cycles.Java/JDK Build Tools in CI/CD Pipeline
com.alibaba.fastjson or similar). The YARA rule matches the binary or JAR file due to embedded strings or class names referencing Chinese developers or organizations, especially if the rule is overly broad in matching string patterns like cn. or china in file headers or comments..jar, .war, or .class located in standard build directories like C:\builds\, C:\jenkins\workspace\, or C:\temp\. Additionally, exclude processes running under service accounts like jenkins-service or build-agent when the parent process is java.exe