Detection rules › Elastic

Suspicious Execution via ShellBrowserWindow/ShellWindow COM

Time window
5s
Sequence by
user.id
Source
github.com/elastic/protections-artifacts

Identifies suspicious access to the ShellBrowserWindow or ShellWindow COM objects by a Microsoft Office process followed by the execution of commonly abused signed proxy binary. This may indicate an attempt to avoid triggering a suspicious process tree using malicious phishing documents.

MITRE ATT&CK coverage

Rule body

[rule]
description = """
Identifies suspicious access to the ShellBrowserWindow or ShellWindow COM objects by a Microsoft Office process followed
by the execution of commonly abused signed proxy binary. This may indicate an attempt to avoid triggering a suspicious
process tree using malicious phishing documents.
"""
id = "cbbb130f-d9d3-459d-a796-c61ee27f9f70"
license = "Elastic License v2"
name = "Suspicious Execution via ShellBrowserWindow/ShellWindow COM"
os_list = ["windows"]
reference = ["https://blog.f-secure.com/dechaining-macros-and-evading-edr/"]
version = "1.0.30"

query = '''
sequence by user.id with maxspan=5s
  [registry where event.action == "query" and
    process.name : ("WINWORD.EXE", "EXCEL.EXE", "POWERPNT.EXE", "MSACCESS.EXE", "wscript.exe", "mshta.exe", "cscript.exe", "hh.exe") and
    /* COM - ShellWindows and ShellBrowserWindows can be used to exec a
     process via Explorer and avoid susp process tree */
    registry.key :
      (
      "SOFTWARE\\Classes\\CLSID\\{9BA05972-F6A8-11CF-A442-00A0C90A8F39}*",
      "SOFTWARE\\Classes\\CLSID\\{c08afd90-f2a1-11d1-8455-00a0c91f3880}*")]
   [process where event.action == "start" and
     process.args_count >= 2 and
     (process.parent.executable : "?:\\Windows\\explorer.exe" and process.parent.args_count == 1) and
     /* for now limited to common lolbas + combined to maxspan set to 5s to avoid any unexpected high peak in FPs*/
     process.name :
              ("rundll32.exe",
               "powershell.exe",
               "mshta.exe",
               "msbuild.exe",
               "certutil.exe",
               "regsvr32.exe",
               "cscript.exe",
               "wscript.exe",
               "wmic.exe",
               "msxsl.exe",
               "Microsoft.Workflow.Compiler.exe",
               "ieexec.exe",
               "iexpress.exe",
               "installutil.exe",
               "RegSvcs.exe",
               "RegAsm.exe",
               "AddInProcess.exe") and

     not (process.name : "wscript.exe" and process.args :  "\\\\DC\\netlogon\\*.vbs") and
     not (process.name : "rundll32.exe" and process.command_line : "C:\\Windows\\system32\\Rundll32.exe Prnntfy.dll,AsyncUILoaderEntry Local*")]
'''

min_endpoint_version = "7.15.0"
[[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/"
[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1059"
name = "Command and Scripting Interpreter"
reference = "https://attack.mitre.org/techniques/T1059/"
[[threat.technique.subtechnique]]
id = "T1059.001"
name = "PowerShell"
reference = "https://attack.mitre.org/techniques/T1059/001/"

[[threat.technique.subtechnique]]
id = "T1059.007"
name = "JavaScript"
reference = "https://attack.mitre.org/techniques/T1059/007/"



[threat.tactic]
id = "TA0002"
name = "Execution"
reference = "https://attack.mitre.org/tactics/TA0002/"
[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1218"
name = "System Binary Proxy Execution"
reference = "https://attack.mitre.org/techniques/T1218/"
[[threat.technique.subtechnique]]
id = "T1218.005"
name = "Mshta"
reference = "https://attack.mitre.org/techniques/T1218/005/"

[[threat.technique.subtechnique]]
id = "T1218.010"
name = "Regsvr32"
reference = "https://attack.mitre.org/techniques/T1218/010/"

[[threat.technique.subtechnique]]
id = "T1218.011"
name = "Rundll32"
reference = "https://attack.mitre.org/techniques/T1218/011/"



[threat.tactic]
id = "TA0005"
name = "Defense Evasion"
reference = "https://attack.mitre.org/tactics/TA0005/"

[internal]
min_endpoint_version = "7.15.0"

Stages and Predicates

Ordered sequence: each step below must occur in order within 5s, correlated by user.id.

Stage 1: registry

[registry where event.action == "query" and
    process.name : ("WINWORD.EXE", "EXCEL.EXE", "POWERPNT.EXE", "MSACCESS.EXE", "wscript.exe", "mshta.exe", "cscript.exe", "hh.exe") and
    /* COM - ShellWindows and ShellBrowserWindows can be used to exec a
     process via Explorer and avoid susp process tree */
    registry.key :
      (
      "SOFTWARE\\Classes\\CLSID\\{9BA05972-F6A8-11CF-A442-00A0C90A8F39}*",
      "SOFTWARE\\Classes\\CLSID\\{c08afd90-f2a1-11d1-8455-00a0c91f3880}*")]

Stage 2: process

[process where event.action == "start" and
     process.args_count >= 2 and
     (process.parent.executable : "?:\\Windows\\explorer.exe" and process.parent.args_count == 1) and
     process.name :
              ("rundll32.exe",
               "powershell.exe",
               "mshta.exe",
               "msbuild.exe",
               "certutil.exe",
               "regsvr32.exe",
               "cscript.exe",
               "wscript.exe",
               "wmic.exe",
               "msxsl.exe",
               "Microsoft.Workflow.Compiler.exe",
               "ieexec.exe",
               "iexpress.exe",
               "installutil.exe",
               "RegSvcs.exe",
               "RegAsm.exe",
               "AddInProcess.exe") and
     not (process.name : "wscript.exe" and process.args :  "\\\\DC\\netlogon\\*.vbs") and
     not (process.name : "rundll32.exe" and process.command_line : "C:\\Windows\\system32\\Rundll32.exe Prnntfy.dll,AsyncUILoaderEntry Local*")]

Exclusions

The rule actively suppresses these predicates.

FieldKindExcluded valuesSearch
process.argswildcard\\DC\netlogon\*.vbsexcludes:process.args field:"process.args" value:"\\DC\netlogon\*.vbs"
process.nameeqwscript.exeexcludes:process.name field:"process.name" value:"wscript.exe"
process.command_linestarts_withC:\Windows\system32\Rundll32.exe Prnntfy.dll,AsyncUILoaderEntry Localexcludes:process.command_line field:"process.command_line" value:"C:\Windows\system32\Rundll32.exe Prnntfy.dll,AsyncUILoaderEntry Local"
process.nameeqrundll32.exeexcludes:process.name field:"process.name" value:"rundll32.exe"

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
event.actioneq
  • query corpus 6 (elastic 6)
  • start corpus 391 (elastic 391)
field:"EventType" kind:eq
process.args_countge
  • 2 transforms: number corpus 18 (elastic 18)
field:"process.args_count" kind:ge value:"2"
process.namewildcard
  • AddInProcess.exe corpus 4 (elastic 4)
  • EXCEL.EXE corpus 34 (elastic 34)
  • MSACCESS.EXE corpus 19 (elastic 19)
  • Microsoft.Workflow.Compiler.exe corpus 12 (elastic 11, splunk 1)
  • POWERPNT.EXE corpus 31 (elastic 31)
  • RegAsm.exe corpus 26 (elastic 24, splunk 2)
  • RegSvcs.exe corpus 23 (elastic 21, splunk 2)
  • WINWORD.EXE corpus 35 (elastic 35)
  • certutil.exe corpus 44 (elastic 38, splunk 6)
  • cscript.exe corpus 67 (elastic 65, splunk 2)
  • hh.exe corpus 8 (elastic 5, splunk 3)
  • ieexec.exe corpus 10 (elastic 10)
  • iexpress.exe corpus 9 (elastic 9)
  • installutil.exe corpus 37 (elastic 32, splunk 5)
  • msbuild.exe corpus 39 (elastic 36, splunk 3)
  • mshta.exe corpus 84 (elastic 79, splunk 5)
  • msxsl.exe corpus 23 (elastic 22, splunk 1)
  • powershell.exe corpus 184 (elastic 140, splunk 44)
  • regsvr32.exe corpus 73 (elastic 68, splunk 5)
  • rundll32.exe corpus 126 (elastic 100, splunk 26)
  • wmic.exe corpus 66 (elastic 39, splunk 27)
  • wscript.exe corpus 83 (elastic 82, splunk 1)
field:"process_name" kind:wildcard
process.parent.args_counteq
  • 1 transforms: number corpus 5 (elastic 5)
field:"process.parent.args_count" kind:eq value:"1"
process.parent.executablewildcard
  • ?:\Windows\explorer.exe corpus 5 (elastic 5)
field:"ParentImage" kind:wildcard value:"?:\Windows\explorer.exe"
registry.keywildcard
  • SOFTWARE\Classes\CLSID\{9BA05972-F6A8-11CF-A442-00A0C90A8F39}*
  • SOFTWARE\Classes\CLSID\{c08afd90-f2a1-11d1-8455-00a0c91f3880}*
field:"TargetObject" kind:wildcard