Response playbooks, investigation guides, and Atomic Red Team tests are Pro-only. Upgrade to unlock the full detection package for CVE-2025-21298.
Upgrade to ProDetect CVE-2025-21298: Windows OLE RCE via Malicious RTF Document in Splunk
Detects exploitation of CVE-2025-21298, a use-after-free (CWE-416) vulnerability in Windows OLE that allows remote code execution when a user opens a specially crafted RTF document. With a CVSS score of 9.8 and public PoC availability, this is a critical-severity vulnerability affecting Windows 10, 11, and Server 2008-2025. Exploitation typically involves phishing emails with RTF attachments that trigger the OLE subsystem to execute attacker-controlled code in the context of the victim user.
MITRE ATT&CK
SPL Detection Query
index=wineventlog OR index=sysmon sourcetype IN ("xmlwineventlog:microsoft-windows-sysmon/operational", "WinEventLog:Security", "XmlWinEventLog:Microsoft-Windows-Sysmon/Operational")
| eval event_id = coalesce(EventCode, event_id)
| where event_id IN ("1", "11", "7", "3")
| eval parent_lower = lower(ParentImage)
| eval image_lower = lower(Image)
| where (event_id="1" AND
match(parent_lower, "(winword|excel|powerpnt|outlook|wordpad)\.exe$") AND
match(image_lower, "(cmd|powershell|wscript|cscript|mshta|rundll32|regsvr32|certutil|bitsadmin|wmic)\.exe$"))
OR (event_id="1" AND
match(parent_lower, "(winword|excel|powerpnt|outlook|wordpad)\.exe$") AND
match(lower(CommandLine), "(invoke-expression|iex|downloadstring|webclient|-enc|-encodedcommand|bypass|http://|https://|ftp://)"))
OR (event_id="11" AND
match(parent_lower, "(winword|excel|powerpnt|outlook|wordpad)\.exe$") AND
match(TargetFilename, "(?i)(\\AppData\\Local\\Temp|\\AppData\\Roaming|\\ProgramData)"))
OR (event_id="3" AND
match(parent_lower, "(winword|excel|powerpnt|outlook|wordpad)\.exe$") AND
NOT match(DestinationIp, "^(10\\.|172\\.(1[6-9]|2[0-9]|3[01])\\.|192\\.168\\.)"))
| eval detection_reason = case(
event_id="1" AND match(image_lower, "(cmd|powershell|wscript|cscript|mshta|rundll32|regsvr32)\.exe$"), "OLE host spawned suspicious child process",
event_id="1" AND match(lower(CommandLine), "(invoke-expression|downloadstring|-enc)"), "OLE host executed encoded/download command",
event_id="11", "OLE host wrote file to suspicious temp path",
event_id="3", "OLE host made unexpected outbound network connection",
true(), "OLE suspicious activity"
)
| stats count by _time, ComputerName, User, ParentImage, Image, CommandLine, TargetFilename, DestinationIp, detection_reason
| sort - _time Detects CVE-2025-21298 exploitation via Sysmon events: process creation (EID 1) from Office/OLE parent spawning suspicious children, file creation (EID 11) in temp paths, and network connections (EID 3) to external IPs from OLE hosts.
Data Sources
Required Sourcetypes
False Positives & Tuning
- Business macros that spawn cmd.exe for legitimate automation
- IT management tools using OLE for deployment workflows
- Legitimate document conversion processes writing to temp directories
- Security tools performing authorized testing with RTF documents
- Office add-ins making legitimate outbound connections to known-good endpoints
Other platforms for CVE-2025-21298
Testing Methodology
Validate this detection against 4 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.
- Test 1RTF OLE Object Spawning CMD via WordPad
Expected signal: Sysmon EID 1: wordpad.exe spawning cmd.exe with parent-child relationship. DeviceProcessEvents in MDE showing InitiatingProcessFileName=wordpad.exe, FileName=cmd.exe.
- Test 2Simulate OLE Host Encoded PowerShell Download
Expected signal: Sysmon EID 1 with CommandLine containing '-EncodedCommand' or '-enc'. DeviceProcessEvents with ProcessCommandLine matching encoded command patterns.
- Test 3RTF File Drop to INetCache Simulating Email Attachment Open
Expected signal: Sysmon EID 11 (File Create): RTF file written to INetCache path with Outlook or Explorer as initiating process. DeviceFileEvents showing FileName ending in .rtf in INetCache path.
- Test 4OLE Host Unexpected Outbound Network Connection
Expected signal: Sysmon EID 3: Network connection event from powershell.exe (simulating Office host) to external IP on port 80. DeviceNetworkEvents showing InitiatingProcessFileName and DestinationIP for external address.
Unlock playbooks & atomic tests with Pro
Get the full detection package for CVE-2025-21298 — response playbook and atomic red team tests, plus investigation guidance and hunting queries.
df00tech Pro — £29/user/month