Adversaries may exploit a variant of CVE-2012-0158 to escalate privileges or execute arbitrary code through a buffer overflow vulnerability in legacy software. SOC teams should proactively hunt for this behavior in Azure Sentinel to identify and mitigate potential exploitation of outdated systems before significant damage occurs.
YARA Rule
rule CVE_2012_0158_KeyBoy {
meta:
author = "Etienne Maynier <etienne@citizenlab.ca>"
description = "CVE-2012-0158 variant"
file = "8307e444cad98b1b59568ad2eba5f201"
strings:
$a = "d0cf11e0a1b11ae1000000000000000000000000000000003e000300feff09000600000000000000000000000100000001" nocase // OLE header
$b = "ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff" nocase // junk data
$c = /5(\{\\b0\}|)[ ]*2006F00(\{\\b0\}|)[ ]*6F007(\{\\b0\}|)[ ]*400200045(\{\\b0\}|)[ ]*006(\{\\b0\}|)[ ]*E007(\{\\b0\}|)[ ]*400720079/ nocase
$d = "MSComctlLib.ListViewCtrl.2"
$e = "ac38c874503c307405347aaaebf2ac2c31ebf6e8e3" nocase //decoding shellcode
condition:
all of them
}
This YARA rule can be deployed in the following contexts:
This rule contains 5 string patterns in its detection logic.
Scenario: Scheduled system backup using Veeam Backup & Replication
Filter/Exclusion: Check for process.name containing “Veeam” or “backup” and ensure the process is initiated from a known backup server IP.
Scenario: Windows Update or patching task using Windows Server Update Services (WSUS)
Filter/Exclusion: Filter by process.name containing “wusa” or “wsus” and verify the process is initiated from a trusted WSUS server.
Scenario: Log file rotation using Logrotate on a Linux server
Filter/Exclusion: Look for process.name containing “logrotate” and check if the process is running from a known log management server or within the /etc/logrotate.d/ directory.
Scenario: Database maintenance task using SQL Server Agent Job
Filter/Exclusion: Filter by process.name containing “sqlagent” and ensure the process is initiated from a known SQL Server instance with administrative privileges.
Scenario: Network monitoring tool like Wireshark capturing traffic for analysis
Filter/Exclusion: Check for process.name containing “wireshark” and verify the process is running from a dedicated network analysis workstation.