This rule detects adversaries leveraging valid digital certificates to sign malicious executables, thereby evading signature-based defenses by masquerading as trusted software. Proactive hunting in Azure Sentinel is essential to identify these “living off the land” attacks early, preventing potential lateral movement and data exfiltration that might otherwise bypass standard security controls due to their legitimate appearance.
rule cert_blocklist_4fe68d48634893d18de040d8f1c289d2 {
meta:
author = "ReversingLabs"
source = "ReversingLabs"
status = "RELEASED"
sharing = "TLP:WHITE"
category = "INFO"
description = "Certificate used for digitally signing malware."
condition:
uint16(0) == 0x5A4D and
for any i in (0..pe.number_of_signatures): (
pe.signatures[i].subject contains "Xinghua Yile Network Tech Co.,Ltd." and
pe.signatures[i].serial == "4f:e6:8d:48:63:48:93:d1:8d:e0:40:d8:f1:c2:89:d2" and
1371081600 <= pe.signatures[i].not_after
)
}
This YARA rule can be deployed in the following contexts:
Scenario: Automated deployment of security updates via Microsoft System Center Configuration Manager (SCCM) or Windows Update for Business.
Process Name matching known vendor installers (e.g., ccmsetup.exe, msiexec.exe) running under the System or a dedicated service account (NT SERVICE\SCCM). Additionally, exclude specific certificate thumbprints belonging to trusted vendors like Microsoft Corporation and CrowdStrike.Scenario: Execution of scheduled PowerShell scripts for administrative maintenance tasks.
Parent Process being Task Scheduler (svchost.exe) or PowerShell.exe, combined with an exclusion for the specific internal Root CA Subject Name (e.g., “Enterprise-Root-CA”). Ensure the script path matches a known secure directory, such as C:\ProgramData\CorpScripts.Scenario: Deployment of third-party software via Intune or Group Policy.