Patching
Install Microsoft Security Bulletin MS09-009. This is the only definitive fix.
The vulnerability resides in the way Microsoft Excel processes internal object references. During the parsing of a spreadsheet file, the application fails to properly validate the state of an object before accessing it. This leads to a memory corruption condition, most likely a Use-After-Free (UAF) or a Null Pointer Dereference, where the application attempts to execute logic based on a pointer that no longer refers to a valid object.
When a crafted .xls or .xlsx file is opened, the attacker-controlled data can redirect the execution flow to a shellcode payload embedded within the document. Because the code execution occurs within the context of the excel.exe process, the attacker inherits the permissions of the logged-in user.
From a forensic standpoint, the exploitation of CVE-2009-0238 leaves several distinct markers.
The most immediate indicator is the spawning of anomalous child processes from the Excel process. In a standard corporate environment, excel.exe should not be initiating shell commands.
excel.exe $\rightarrow$ cmd.exeexcel.exe $\rightarrow$ powershell.exeexcel.exe.excel.exe and the exception code is 0xc0000005 (Access Violation).Recent Items and Office Recent Files registry keys to confirm the file path of the crafted spreadsheet.The following rule detects the execution of shells by Excel, a high-fidelity indicator of RCE.
title: Microsoft Excel Remote Code Execution (CVE-2009-0238)id: 12345678-1234-1234-1234-1234567890abdescription: Detects suspicious child processes spawned by excel.exelogsource: category: process_creation product: windowsdetection: selection: ParentImage|contains: 'excel.exe' Image|contains: 'cmd.exe' selection_ps: ParentImage|contains: 'excel.exe' Image|contains: 'powershell.exe' condition: selection or selection_psfalsepositives: - Legitimate Excel macros triggering shell commands (rare in secured environments)level: criticalindex=logs sourcetype=WinEventLog:Security EventCode=4688 ParentProcessName="*excel.exe" (NewProcessName="*cmd.exe" OR NewProcessName="*powershell.exe")Patching
Install Microsoft Security Bulletin MS09-009. This is the only definitive fix.
Attack Surface Reduction
Disable DDE (Dynamic Data Exchange) and restrict the execution of macros via Group Policy.
Email Filtering
Block or sandbox suspicious attachments with .xls or .xlsx extensions from untrusted senders.