CVE-2012-1854 IBM QRadar · QRadar

Detect CVE-2012-1854 - Microsoft VBA Insecure Library Loading (DLL Hijacking) in IBM QRadar

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

QRadar Detection Query

IBM QRadar (QRadar)
sql
SELECT DATEFORMAT(devicetime,'yyyy-MM-dd HH:mm:ss') AS EventTime, LOGSOURCENAME(logsourceid) AS LogSource, username, "Process Name", "Image Loaded", hostname
FROM events
WHERE LOGSOURCETYPENAME(devicetype) = 'Microsoft Windows Security Event Log'
  AND "Process Name" ILIKE ANY ('%WINWORD.EXE', '%EXCEL.EXE', '%POWERPNT.EXE', '%OUTLOOK.EXE', '%MSACCESS.EXE', '%MSPUB.EXE', '%VISIO.EXE')
  AND "Image Loaded" ILIKE ANY ('%vbe7.dll', '%vba7.dll', '%vbe6.dll', '%vba6.dll', '%msvbvm60.dll', '%msvbvm50.dll')
  AND ("Image Loaded" ILIKE '%\Users\%' OR "Image Loaded" ILIKE '%\AppData\%' OR "Image Loaded" ILIKE '%\Temp\%' OR "Image Loaded" ILIKE '%\Downloads\%')
LAST 7 DAYS
high severity medium confidence

QRadar AQL query identifying Office application DLL loads of VBA libraries from non-standard user-writable paths, consistent with CVE-2012-1854 DLL hijacking exploitation.

Data Sources

IBM QRadarWindows Event Logs via Sysmon

Required Tables

events

False Positives & Tuning

  • Legitimate Office deployments using non-default installation paths
  • Managed software distribution temporarily staging DLLs in AppData
  • Office Click-to-Run streaming installations with virtualized paths
  • IT automation scripts deploying Office components to user 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