Detection rules › Elastic

Untrusted Document Opened via Microsoft Office

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

Identifies the execution of Microsoft Office processes to open a document classified by Microsoft SmartScreen as originating from an unknown source followed by Microsoft Office spawning an unusual child process.

MITRE ATT&CK coverage

TacticTechniques
Initial Access

Rule body

[rule]
description = """
Identifies the execution of Microsoft Office processes to open a document classified by Microsoft SmartScreen as
originating from an unknown source followed by Microsoft Office spawning an unusual child process.
"""
id = "2887ca7c-40b9-4d04-ab9c-65a5c0428ab8"
license = "Elastic License v2"
name = "Untrusted Document Opened via Microsoft Office"
os_list = ["windows"]
reference = [
    "https://docs.microsoft.com/en-us/windows/security/threat-protection/microsoft-defender-smartscreen/microsoft-defender-smartscreen-overview",
]
version = "1.0.31"

query = '''
sequence with maxspan=1m
 [process where event.action == "start" and
  process.name : ("EXCEL.EXE", "WINWORD.EXE", "POWERPNT.EXE") and

  /* probably unknown or potentially unsafe to smartscreen files classification */
  process.Ext.token.security_attributes : "SMARTLOCKER://SMARTSCREENORIGINCLAIM" and

  /* Docs opened from file shares */
  not process.args : "\\\\*"] by process.entity_id

 [process where event.action == "start" and
  process.parent.name : ("EXCEL.EXE", "WINWORD.EXE", "POWERPNT.EXE") and

  /* unknow office doc spawns an unusual child */
  not process.executable :
              ("?:\\Program Files\\*.exe",
               "?:\\Program Files (x86)\\*.exe",
               "?:\\Windows\\System32\\WerFault.exe",
               "?:\\Windows\\SysWOW64\\WerFault.exe",
               "?:\\Windows\\System32\\wermgr.exe",
               "?:\\windows\\splwow64.exe",
               "?:\\Windows\\system32\\dwwin.exe",
               "?:\\Windows\\SysWOW64\\DWWIN.EXE",
               "?:\\Windows\\Microsoft.NET\\*\\csc.exe",
               "?:\\Windows\\system32\\verclsid.exe",
               "?:\\Windows\\SysWOW64\\verclsid.exe",
               "D:\\Microsoft office 2016\\office2016\\Office16\\*.EXE",
               "D:\\Programs\\Foxit Software\\Foxit PhantomPDF\\Plugins\\Creator\\FoxitProxyServer_Socket_PH.exe",
               "\\\\*",
               "\\Device\\Mup\\*",
               "?:\\Adobe\\Acrobat DC\\Acrobat\\AcroTray.exe") and
  not (process.name : "BrowserSubprocess.exe" and process.command_line : "*--type=gpu-process*--no-sandbox*") and
  not (process.code_signature.subject_name :
          ("Zhuhai Kingsoft Office Software Co., Ltd.",
           "Poll Everywhere, Inc.",
           "Xerox Corporation",
           "Mozilla Corporation",
           "Vivaldi Technologies AS",
           "成都艾斯莱德网络科技有限公司",
           "Tencent Technology(Shenzhen) Company Limited",
           "Beijing Sogou Technology Development Co., Ltd.",
           "Beijing Yundong Zhixiao Network Technology Co. , Ltd.",
           "Dell Incorporated",
           "sli.do s. r. o.",
           "CANON INC.",
           "TEAMDEV LTD.",
           "Canon Inc.",
           "HP Inc.",
           "SEIKO EPSON CORPORATION",
           "FOXIT SOFTWARE INC.",
           "Google LLC",
           "Brave Software, Inc.",
           "Opera Norway AS",
           "Bloomberg LP",
           "Microsoft Windows Hardware Compatibility Publisher",
           "Orpheus Technology Ltd",
           "Foxit Software Incorporated",
           "Samsung Electronics CO., LTD.",
           "REFINITIV US LLC",
           "WEPA, INC.",
           "Wolters Kluwer United States INC.") and
       process.code_signature.trusted == true) and
  not (process.name : "rundll32.exe" and
       process.args :
           ("?:\\WINDOWS\\system32\\spool\\DRIVERS\\x64\\*,MonitorPrintJobStatus",
            "ndfapi.dll,NdfRunDllDiagnoseWithAnswerFile",
            "?:\\windows\\system32\\spool\\DRIVERS\\x64\\3\\*.DLL,CheckDevice",
            "?:\\Program Files\\*",
            "?:\\Program Files (x86)\\*")) and
  not (process.pe.original_file_name : ("msedge.exe", "FileCoAuth.exe") and process.code_signature.trusted == true) and
  not process.hash.sha256 : 
             ("e68d9768f1d1c2ef2e614dec47e5f0719030073373533603f3e9a914b5607d85", 
              "ded86974860dd9802db04d92409c05e2ff8b3de7f172c957c34861bbad6a9af3",
              "4a21f9b556046a31878a3f44e1d210baee7663cc5f9d8e980f67e180a6dd3592",
              "bc1ec9584f749b1d264cf1ce040e98f96de680efd74a1dab2de53e8d481c5b79",
              "b72b18af7ed446db1630a2263c76fc3cbde6c189f88ea7ba4e42ecf61cb0ee8b",
              "28c69f2b353a8df70abef0e5f09e1d390ef88e79b08465bc21c0d9fdb3b61f0d",
              "4a06605651958c56e89a468f600c3322e3fdc97c8143bcfd1d8d1ebadb0920fb",
              "b20dff35c0aabb92f2e72d2236d33e3f0d9f150ad8206db9d56c642825775c25",
              "92fd0ed373796efdba340db4345c619d8fa811b90efdd400384bfbf8857f6d6c",
              "e86df8bba04d1d437eaaf913f8252cdee5f4534eae8e730a49ba22681a37e935",
              "083166e1cab8bceec2730682816fbb41be91356fe92bb45d1c860439ee0e52e6") and
  not (process.pe.original_file_name : ("Teams.exe", "msedgewebview2.exe", "BDEUNLOCK.EXE") and process.code_signature.trusted == true) and
  not (process.executable : "?:\\Windows\\Microsoft.NET\\Framework64\\*\\RegAsm.exe" and process.args : "?:\\Program Files (x86)\\Thomson Reuters\\*") and
  not (process.name : "cmd.exe" and process.command_line : "\"CMD.exe\" /C dotnet --list-runtimes")
  ] by process.parent.entity_id
'''

min_endpoint_version = "8.10.0"
reputation = true
[[actions]]
action = "kill_process"
field = "process.entity_id"
state = 1

[[optional_actions]]
action = "rollback"
field = "process.entity_id"
state = 1

[[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 = "8.10.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: process

[process where event.action == "start" and
  process.name : ("EXCEL.EXE", "WINWORD.EXE", "POWERPNT.EXE") and
  process.Ext.token.security_attributes : "SMARTLOCKER://SMARTSCREENORIGINCLAIM" and
  not process.args : "\\\\*"] by process.entity_id

Stage 2: process

[process where event.action == "start" and
  process.parent.name : ("EXCEL.EXE", "WINWORD.EXE", "POWERPNT.EXE") and
  not process.executable :
              ("?:\\Program Files\\*.exe",
               "?:\\Program Files (x86)\\*.exe",
               "?:\\Windows\\System32\\WerFault.exe",
               "?:\\Windows\\SysWOW64\\WerFault.exe",
               "?:\\Windows\\System32\\wermgr.exe",
               "?:\\windows\\splwow64.exe",
               "?:\\Windows\\system32\\dwwin.exe",
               "?:\\Windows\\SysWOW64\\DWWIN.EXE",
               "?:\\Windows\\Microsoft.NET\\*\\csc.exe",
               "?:\\Windows\\system32\\verclsid.exe",
               "?:\\Windows\\SysWOW64\\verclsid.exe",
               "D:\\Microsoft office 2016\\office2016\\Office16\\*.EXE",
               "D:\\Programs\\Foxit Software\\Foxit PhantomPDF\\Plugins\\Creator\\FoxitProxyServer_Socket_PH.exe",
               "\\\\*",
               "\\Device\\Mup\\*",
               "?:\\Adobe\\Acrobat DC\\Acrobat\\AcroTray.exe") and
  not (process.name : "BrowserSubprocess.exe" and process.command_line : "*--type=gpu-process*--no-sandbox*") and
  not (process.code_signature.subject_name :
          ("Zhuhai Kingsoft Office Software Co., Ltd.",
           "Poll Everywhere, Inc.",
           "Xerox Corporation",
           "Mozilla Corporation",
           "Vivaldi Technologies AS",
           "成都艾斯莱德网络科技有限公司",
           "Tencent Technology(Shenzhen) Company Limited",
           "Beijing Sogou Technology Development Co., Ltd.",
           "Beijing Yundong Zhixiao Network Technology Co. , Ltd.",
           "Dell Incorporated",
           "sli.do s. r. o.",
           "CANON INC.",
           "TEAMDEV LTD.",
           "Canon Inc.",
           "HP Inc.",
           "SEIKO EPSON CORPORATION",
           "FOXIT SOFTWARE INC.",
           "Google LLC",
           "Brave Software, Inc.",
           "Opera Norway AS",
           "Bloomberg LP",
           "Microsoft Windows Hardware Compatibility Publisher",
           "Orpheus Technology Ltd",
           "Foxit Software Incorporated",
           "Samsung Electronics CO., LTD.",
           "REFINITIV US LLC",
           "WEPA, INC.",
           "Wolters Kluwer United States INC.") and
       process.code_signature.trusted == true) and
  not (process.name : "rundll32.exe" and
       process.args :
           ("?:\\WINDOWS\\system32\\spool\\DRIVERS\\x64\\*,MonitorPrintJobStatus",
            "ndfapi.dll,NdfRunDllDiagnoseWithAnswerFile",
            "?:\\windows\\system32\\spool\\DRIVERS\\x64\\3\\*.DLL,CheckDevice",
            "?:\\Program Files\\*",
            "?:\\Program Files (x86)\\*")) and
  not (process.pe.original_file_name : ("msedge.exe", "FileCoAuth.exe") and process.code_signature.trusted == true) and
  not process.hash.sha256 :
             ("e68d9768f1d1c2ef2e614dec47e5f0719030073373533603f3e9a914b5607d85",
              "ded86974860dd9802db04d92409c05e2ff8b3de7f172c957c34861bbad6a9af3",
              "4a21f9b556046a31878a3f44e1d210baee7663cc5f9d8e980f67e180a6dd3592",
              "bc1ec9584f749b1d264cf1ce040e98f96de680efd74a1dab2de53e8d481c5b79",
              "b72b18af7ed446db1630a2263c76fc3cbde6c189f88ea7ba4e42ecf61cb0ee8b",
              "28c69f2b353a8df70abef0e5f09e1d390ef88e79b08465bc21c0d9fdb3b61f0d",
              "4a06605651958c56e89a468f600c3322e3fdc97c8143bcfd1d8d1ebadb0920fb",
              "b20dff35c0aabb92f2e72d2236d33e3f0d9f150ad8206db9d56c642825775c25",
              "92fd0ed373796efdba340db4345c619d8fa811b90efdd400384bfbf8857f6d6c",
              "e86df8bba04d1d437eaaf913f8252cdee5f4534eae8e730a49ba22681a37e935",
              "083166e1cab8bceec2730682816fbb41be91356fe92bb45d1c860439ee0e52e6") and
  not (process.pe.original_file_name : ("Teams.exe", "msedgewebview2.exe", "BDEUNLOCK.EXE") and process.code_signature.trusted == true) and
  not (process.executable : "?:\\Windows\\Microsoft.NET\\Framework64\\*\\RegAsm.exe" and process.args : "?:\\Program Files (x86)\\Thomson Reuters\\*") and
  not (process.name : "cmd.exe" and process.command_line : "\"CMD.exe\" /C dotnet --list-runtimes")
  ] by process.parent.entity_id

Exclusions

The rule actively suppresses these predicates.

FieldKindExcluded valuesSearch
process.argsstarts_with\\excludes:process.args field:"process.args" value:"\\"
process.argsstarts_with?:\Program Files (x86)\Thomson Reuters\excludes:process.args field:"process.args" value:"?:\Program Files (x86)\Thomson Reuters\"
process.executablewildcard?:\Windows\Microsoft.NET\Framework64\*\RegAsm.exeexcludes:process.executable field:"process.executable" value:"?:\Windows\Microsoft.NET\Framework64\*\RegAsm.exe"
process.argswildcard?:\WINDOWS\system32\spool\DRIVERS\x64\*,MonitorPrintJobStatus, ndfapi.dll,NdfRunDllDiagnoseWithAnswerFile, ?:\windows\system32\spool\DRIVERS\x64\3\*.DLL,CheckDevice, ?:\Program Files\*, ?:\Program Files (x86)\*excludes:process.args
process.nameeqrundll32.exeexcludes:process.name field:"process.name" value:"rundll32.exe"
process.code_signature.subject_nameeqZhuhai Kingsoft Office Software Co., Ltd., Poll Everywhere, Inc., Xerox Corporation, Mozilla Corporation, Vivaldi Technologies AS, 成都艾斯莱德网络科技有限公司, Tencent Technology(Shenzhen) Company Limited, Beijing Sogou Technology Development Co., Ltd., Beijing Yundong Zhixiao Network Technology Co. , Ltd., Dell Incorporated, sli.do s. r. o., CANON INC., TEAMDEV LTD., Canon Inc., HP Inc., SEIKO EPSON CORPORATION, FOXIT SOFTWARE INC., Google LLC, Brave Software, Inc., Opera Norway AS, Bloomberg LP, Microsoft Windows Hardware Compatibility Publisher, Orpheus Technology Ltd, Foxit Software Incorporated, Samsung Electronics CO., LTD., REFINITIV US LLC, WEPA, INC., Wolters Kluwer United States INC.excludes:process.code_signature.subject_name
process.code_signature.trustedeqtrueexcludes:process.code_signature.trusted field:"process.code_signature.trusted" value:"true"
process.pe.original_file_nameeqTeams.exe, msedgewebview2.exe, BDEUNLOCK.EXEexcludes:process.pe.original_file_name field:"process.pe.original_file_name" value:"Teams.exe" field:"process.pe.original_file_name" value:"msedgewebview2.exe" field:"process.pe.original_file_name" value:"BDEUNLOCK.EXE"
process.pe.original_file_nameeqmsedge.exe, FileCoAuth.exeexcludes:process.pe.original_file_name field:"process.pe.original_file_name" value:"msedge.exe" field:"process.pe.original_file_name" value:"FileCoAuth.exe"
process.command_lineeq"CMD.exe" /C dotnet --list-runtimesexcludes:process.command_line
process.nameeqcmd.exeexcludes:process.name field:"process.name" value:"cmd.exe"
process.command_linewildcard*--type=gpu-process*--no-sandbox*excludes:process.command_line field:"process.command_line" value:"*--type=gpu-process*--no-sandbox*"
process.nameeqBrowserSubprocess.exeexcludes:process.name field:"process.name" value:"BrowserSubprocess.exe"
process.executablewildcard?:\Program Files\*.exe, ?:\Program Files (x86)\*.exe, ?:\Windows\System32\WerFault.exe, ?:\Windows\SysWOW64\WerFault.exe, ?:\Windows\System32\wermgr.exe, ?:\windows\splwow64.exe, ?:\Windows\system32\dwwin.exe, ?:\Windows\SysWOW64\DWWIN.EXE, ?:\Windows\Microsoft.NET\*\csc.exe, ?:\Windows\system32\verclsid.exe, ?:\Windows\SysWOW64\verclsid.exe, D:\Microsoft office 2016\office2016\Office16\*.EXE, D:\Programs\Foxit Software\Foxit PhantomPDF\Plugins\Creator\FoxitProxyServer_Socket_PH.exe, \\*, \Device\Mup\*, ?:\Adobe\Acrobat DC\Acrobat\AcroTray.exeexcludes:process.executable
process.hash.sha256eqe68d9768f1d1c2ef2e614dec47e5f0719030073373533603f3e9a914b5607d85, ded86974860dd9802db04d92409c05e2ff8b3de7f172c957c34861bbad6a9af3, 4a21f9b556046a31878a3f44e1d210baee7663cc5f9d8e980f67e180a6dd3592, bc1ec9584f749b1d264cf1ce040e98f96de680efd74a1dab2de53e8d481c5b79, b72b18af7ed446db1630a2263c76fc3cbde6c189f88ea7ba4e42ecf61cb0ee8b, 28c69f2b353a8df70abef0e5f09e1d390ef88e79b08465bc21c0d9fdb3b61f0d, 4a06605651958c56e89a468f600c3322e3fdc97c8143bcfd1d8d1ebadb0920fb, b20dff35c0aabb92f2e72d2236d33e3f0d9f150ad8206db9d56c642825775c25, 92fd0ed373796efdba340db4345c619d8fa811b90efdd400384bfbf8857f6d6c, e86df8bba04d1d437eaaf913f8252cdee5f4534eae8e730a49ba22681a37e935, 083166e1cab8bceec2730682816fbb41be91356fe92bb45d1c860439ee0e52e6excludes:process.hash.sha256

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
event.actioneq
  • start corpus 391 (elastic 391)
field:"EventType" kind:eq value:"start"
process.Ext.token.security_attributeswildcard
  • SMARTLOCKER://SMARTSCREENORIGINCLAIM corpus 2 (elastic 2)
field:"process.Ext.token.security_attributes" kind:wildcard value:"SMARTLOCKER://SMARTSCREENORIGINCLAIM"
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