CVE-2009-0238 Google Chronicle · YARA-L

Detect Microsoft Office Remote Code Execution (CVE-2009-0238) in Google Chronicle

CVE-2009-0238 is a remote code execution vulnerability in Microsoft Office (addressed in MS09-009) caused by improper handling of specially crafted Excel files, leading to arbitrary code execution in the context of the logged-on user. This vulnerability is listed in the CISA Known Exploited Vulnerabilities catalog and has been actively exploited in the wild via malicious Office documents delivered through phishing campaigns.

MITRE ATT&CK

Tactic
Initial Access Execution TA0059

YARA-L Detection Query

Google Chronicle (YARA-L)
yaral
rule cve_2009_0238_office_rce {
  meta:
    author = "df00tech"
    description = "Detects Microsoft Office spawning suspicious child processes consistent with CVE-2009-0238 exploitation"
    severity = "CRITICAL"
    reference = "https://nvd.nist.gov/vuln/detail/CVE-2009-0238"

  events:
    $e.metadata.event_type = "PROCESS_LAUNCH"
    $e.principal.process.file.full_path = /(?i)(excel|winword|powerpnt)\.exe$/
    $e.target.process.file.full_path = /(?i)(cmd|powershell|wscript|cscript|mshta|regsvr32|rundll32|certutil)\.exe$/

  condition:
    $e
}
critical severity high confidence

Chronicle YARA-L rule detecting Office applications launching shell interpreters or known living-off-the-land binaries, a primary exploitation vector for CVE-2009-0238.

Data Sources

Google Chronicle UDM EventsWindows Endpoint via Chronicle forwarder

Required Tables

udm_events

False Positives & Tuning

  • Legitimate business macros invoking command-line tools on approved endpoints
  • IT automation using Office COM objects that spawn processes
  • Penetration testing activities on authorised systems

Other platforms for CVE-2009-0238


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 1Office Spawning PowerShell Encoded Command

    Expected signal: Sysmon Event ID 1 showing EXCEL.EXE as parent process of powershell.exe with a -EncodedCommand argument; DeviceProcessEvents in MDE capturing the parent-child chain

  2. Test 2Office Spawning CMD with Network Download

    Expected signal: Sysmon Event ID 1 for cmd.exe and certutil.exe processes; Sysmon Event ID 3 (Network Connect) from certutil.exe to 127.0.0.1:8888; Sysmon Event ID 11 for test_artifact.exe creation in TEMP

  3. Test 3Malicious Excel File Macro Execution Simulation via WScript

    Expected signal: Sysmon Event ID 11 for sim_payload.vbs creation; Sysmon Event ID 1 for wscript.exe and subsequently calc.exe process creation; parent chain visible in EDR

Unlock Pro Content

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

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections