The Hotpatching Injector detects potential adversary behavior involving the use of a custom payload to exploit a hotpatching mechanism, which could allow for remote code execution or persistence. SOC teams should proactively hunt for this behavior in Azure Sentinel to identify and mitigate advanced threats that leverage infrastructure-specific vulnerabilities.
YARA Rule
rule Trojan_Win32_PlaSrv
{
meta:
author = "Microsoft"
description = "Hotpatching Injector"
original_sample_sha1 = "ff7f949da665ba8ce9fb01da357b51415634eaad"
unpacked_sample_sha1 = "dff2fee984ba9f5a8f5d97582c83fca4fa1fe131"
activity_group = "Platinum"
version = "1.0"
last_modified = "2016-04-12"
strings:
$Section_name = ".hotp1"
$offset_x59 = { C7 80 64 01 00 00 00 00 01 00 }
condition:
$Section_name and $offset_x59
}
This YARA rule can be deployed in the following contexts:
This rule contains 2 string patterns in its detection logic.
Scenario: Scheduled System Update via Windows Update
Description: A legitimate scheduled task runs Windows Update to apply patches, which may trigger the rule due to process injection or elevated privileges.
Filter/Exclusion: Check for ProcessName = "wuauclt.exe" or CommandLine contains "wusa.exe" and exclude processes associated with Windows Update.
Scenario: Admin Task for Software Deployment via SCCM
Description: A System Center Configuration Manager (SCCM) task deploys software updates, which may involve process injection or elevated execution.
Filter/Exclusion: Filter by ProcessName = "ccmexec.exe" or CommandLine contains "ccmsetup.exe" and exclude tasks associated with SCCM deployments.
Scenario: PowerShell Script Execution for Patch Management
Description: A PowerShell script runs as part of a patch management routine, which may be flagged due to process injection or unusual execution patterns.
Filter/Exclusion: Filter by ProcessName = "powershell.exe" and check for CommandLine contains "patch", Update, or Install in the command line.
Scenario: Database Backup Job with Elevated Privileges
Description: A scheduled SQL Server backup job runs under a high-privilege account, which may trigger the rule due to unusual process behavior.
Filter/Exclusion: Filter by ProcessName = "sqlservr.exe" or ProcessName = "sqlbackup.exe" and check for known backup service accounts.
Scenario: Security Tool for Patch Verification
Description: A third-party security tool runs to verify system patches, which may involve process injection or elevated privileges.
Filter/Exclusion: Filter by ProcessName = "patchver.exe" or ProcessName = "patchcheck.exe" and exclude known security tool processes.