CVE-2012-1854 Google Chronicle · YARA-L

Detect CVE-2012-1854 - Microsoft VBA Insecure Library Loading (DLL Hijacking) in Google Chronicle

Detects exploitation of CVE-2012-1854, a DLL hijacking vulnerability in Microsoft Visual Basic for Applications (VBA). Attackers can place a malicious DLL in a directory searched before the legitimate library path, causing Office applications loading VBA to execute attacker-controlled code. This vulnerability is listed in CISA's Known Exploited Vulnerabilities catalog.

MITRE ATT&CK

Tactic
Execution Persistence Privilege Escalation

YARA-L Detection Query

Google Chronicle (YARA-L)
yaral
rule cve_2012_1854_vba_dll_hijacking {
  meta:
    author = "df00tech Detection Engineering"
    description = "Detects VBA DLL hijacking via CVE-2012-1854 - Office apps loading VBA DLLs from non-standard paths"
    severity = "HIGH"
    priority = "HIGH"
    reference = "https://nvd.nist.gov/vuln/detail/CVE-2012-1854"

  events:
    $e.metadata.event_type = "PROCESS_MODULE_LOAD"
    $e.principal.process.file.full_path = /(?i)(WINWORD|EXCEL|POWERPNT|OUTLOOK|MSACCESS|MSPUB|VISIO)\.EXE$/
    $e.target.process.file.full_path = /(?i)(vbe7|vba7|vbe6|vba6|msvbvm60|msvbvm50)\.dll$/
    $e.target.process.file.full_path = /(?i)\\(Users|AppData|Temp|Downloads|Desktop)\\/

  condition:
    $e
}
high severity high confidence

Chronicle YARA-L rule detecting CVE-2012-1854 exploitation by monitoring PROCESS_MODULE_LOAD events where Office applications load VBA DLLs from suspicious user-writable directories.

Data Sources

Google ChronicleWindows Endpoint Telemetry

Required Tables

PROCESS_MODULE_LOAD

False Positives & Tuning

  • Legitimate portable Office installations with non-standard base paths
  • Developer environments with custom Office component deployments
  • Automated QA environments loading Office DLLs from test directories
  • Enterprise deployments using non-default Office installation directories

Other platforms for CVE-2012-1854


Testing Methodology

Validate this detection against 3 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are available with Pro.

  1. Test 1VBA DLL Hijack - Place Malicious DLL in Temp Directory

    Expected signal: Sysmon Event ID 7 showing WINWORD.EXE loading vbe7.dll from %TEMP% path; DeviceImageLoadEvents in MDE showing FolderPath containing \Temp\

  2. Test 2VBA DLL Hijack - Place Malicious DLL in Downloads Directory

    Expected signal: Sysmon ImageLoad event with ImageLoaded path in \Downloads\; Windows Security log showing file creation event in Downloads directory followed by Office process DLL load

  3. Test 3VBA DLL Hijack - Simulate Document-Triggered DLL Load via PowerShell

    Expected signal: Sysmon Event ID 7 with POWERPNT.EXE as initiating process and vba7.dll loaded from TEMP\vba_hijack_test path; process creation event showing PowerShell as parent of POWERPNT

Unlock Pro Content

Get the full detection package for CVE-2012-1854 including response playbook, investigation guide, and atomic red team tests.

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections