Detection rules › Elastic

Microsoft Office Fetching Remote Content

Time window
1m
Sequence by
process.entity_id, process.parent.entity_id
Source
github.com/elastic/protections-artifacts

Identifies when Microsoft Office applications (Word, PowerPoint, Excel) download remote html content followed by spawning a child process. This behavior matches with some common exploits leveraging malicious office documents for delivery.

MITRE ATT&CK coverage

TacticTechniques
Initial Access

Rule body

[rule]
description = """
Identifies when Microsoft Office applications (Word, PowerPoint, Excel) download remote html content followed by
spawning a child process. This behavior matches with some common exploits leveraging malicious office documents for
delivery.
"""
id = "6b3aa7d9-08c6-4091-aa03-715d25b34000"
license = "Elastic License v2"
name = "Microsoft Office Fetching Remote Content"
os_list = ["windows"]
reference = [
    "https://www.elastic.co/security-labs/upping-the-ante-detecting-in-memory-threats-with-kernel-call-stacks",
]
version = "1.0.24"

query = '''
sequence with maxspan=60s
[registry where process.name : ("winword.exe", "excel.exe", "powerpnt.exe") and
 registry.path : "HKEY_USERS\\*\\Software\\Microsoft\\Office\\*\\Common\\Internet\\Server Cache\\http*" and
 not registry.path : "*https://files.slack.com*"] by process.entity_id
[file where event.action == "creation" and
 file.path : "?:\\Users\\*\\AppData\\*\\Content.MSO\\*" and process.name : ("winword.exe", "excel.exe", "powerpnt.exe") and
 (file.extension : "htm*" or file.Ext.header_bytes : "3c21646f63747970652068746d6c3e0a") and file.size >= 4096] by process.entity_id
[process where event.action == "start" and process.parent.name : ("winword.exe", "excel.exe", "powerpnt.exe") and
  not process.executable :
            ("?:\\Windows\\System32\\DWWIN.EXE",
             "?:\\Windows\\SysWOW64\\DWWIN.EXE",
             "?:\\Windows\\System32\\WerFault.exe",
             "?:\\Windows\\SysWOW64\\WerFault.exe",
             "?:\\windows\\splwow64.exe",
             "?:\\Program Files*\\Microsoft Office\\*.EXE",
             "?:\\Program Files*\\Microsoft Office\\root\\vfs\\ProgramFilesCommon*\\Microsoft Shared\\OFFICE??\\ai.exe",
             "?:\\Program Files*\\Microsoft Azure Information Protection\\*.exe",
             "?:\\Program Files\\Adobe\\Acrobat DC\\Acrobat\\acrotray.exe",
             "?:\\Program Files (x86)\\Microsoft\\EdgeWebView\\Application\\*\\msedgewebview2.exe")] by process.parent.entity_id
'''

min_endpoint_version = "7.15.0"
optional_actions = []
[[actions]]
action = "kill_process"
field = "process.entity_id"
state = 2

[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1566"
name = "Phishing"
reference = "https://attack.mitre.org/techniques/T1566/"
[[threat.technique.subtechnique]]
id = "T1566.001"
name = "Spearphishing Attachment"
reference = "https://attack.mitre.org/techniques/T1566/001/"



[threat.tactic]
id = "TA0001"
name = "Initial Access"
reference = "https://attack.mitre.org/tactics/TA0001/"

[internal]
min_endpoint_version = "7.15.0"

Stages and Predicates

Ordered sequence: each step below must occur in order within 1m, correlated by process.entity_id, process.parent.entity_id.

Stage 1: registry

[registry where process.name : ("winword.exe", "excel.exe", "powerpnt.exe") and
 registry.path : "HKEY_USERS\\*\\Software\\Microsoft\\Office\\*\\Common\\Internet\\Server Cache\\http*" and
 not registry.path : "*https://files.slack.com*"] by process.entity_id

Stage 2: file

[file where event.action == "creation" and
 file.path : "?:\\Users\\*\\AppData\\*\\Content.MSO\\*" and process.name : ("winword.exe", "excel.exe", "powerpnt.exe") and
 (file.extension : "htm*" or file.Ext.header_bytes : "3c21646f63747970652068746d6c3e0a") and file.size >= 4096] by process.entity_id

Stage 3: process

[process where event.action == "start" and process.parent.name : ("winword.exe", "excel.exe", "powerpnt.exe") and
  not process.executable :
            ("?:\\Windows\\System32\\DWWIN.EXE",
             "?:\\Windows\\SysWOW64\\DWWIN.EXE",
             "?:\\Windows\\System32\\WerFault.exe",
             "?:\\Windows\\SysWOW64\\WerFault.exe",
             "?:\\windows\\splwow64.exe",
             "?:\\Program Files*\\Microsoft Office\\*.EXE",
             "?:\\Program Files*\\Microsoft Office\\root\\vfs\\ProgramFilesCommon*\\Microsoft Shared\\OFFICE??\\ai.exe",
             "?:\\Program Files*\\Microsoft Azure Information Protection\\*.exe",
             "?:\\Program Files\\Adobe\\Acrobat DC\\Acrobat\\acrotray.exe",
             "?:\\Program Files (x86)\\Microsoft\\EdgeWebView\\Application\\*\\msedgewebview2.exe")] by process.parent.entity_id

Exclusions

The rule actively suppresses these predicates.

FieldKindExcluded valuesSearch
registry.pathmatchhttps://files.slack.comexcludes:registry.path field:"registry.path" value:"https://files.slack.com"
process.executablewildcard?:\Windows\System32\DWWIN.EXE, ?:\Windows\SysWOW64\DWWIN.EXE, ?:\Windows\System32\WerFault.exe, ?:\Windows\SysWOW64\WerFault.exe, ?:\windows\splwow64.exe, ?:\Program Files*\Microsoft Office\*.EXE, ?:\Program Files*\Microsoft Office\root\vfs\ProgramFilesCommon*\Microsoft Shared\OFFICE??\ai.exe, ?:\Program Files*\Microsoft Azure Information Protection\*.exe, ?:\Program Files\Adobe\Acrobat DC\Acrobat\acrotray.exe, ?:\Program Files (x86)\Microsoft\EdgeWebView\Application\*\msedgewebview2.exeexcludes:process.executable

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
event.actioneq
  • creation corpus 58 (elastic 58)
  • start corpus 391 (elastic 391)
field:"EventType" kind:eq
file.Ext.header_byteswildcard
  • 3c21646f63747970652068746d6c3e0a
field:"file.Ext.header_bytes" kind:wildcard value:"3c21646f63747970652068746d6c3e0a"
file.extensionwildcard
  • htm*
field:"file.extension" kind:wildcard value:"htm*"
file.pathwildcard
  • ?:\Users\*\AppData\*\Content.MSO\*
field:"TargetFilename" kind:wildcard value:"?:\Users\*\AppData\*\Content.MSO\*"
file.sizege
  • 4096 transforms: number
field:"file.size" kind:ge value:"4096"
process.namewildcard
  • excel.exe corpus 34 (elastic 34)
  • powerpnt.exe corpus 31 (elastic 31)
  • winword.exe corpus 35 (elastic 35)
field:"process_name" kind:wildcard
process.parent.namewildcard
  • excel.exe corpus 28 (elastic 27, splunk 1)
  • powerpnt.exe corpus 23 (elastic 23)
  • winword.exe corpus 26 (elastic 26)
field:"parent_process_name" kind:wildcard
registry.pathwildcard
  • HKEY_USERS\*\Software\Microsoft\Office\*\Common\Internet\Server Cache\http*
field:"TargetObject" kind:wildcard value:"HKEY_USERS\*\Software\Microsoft\Office\*\Common\Internet\Server Cache\http*"