Detection rules › Elastic

Suspicious Command and Control via Internet Explorer

Time window
5m
Sequence by
process.Ext.effective_parent.entity_id, process.entity_id
Source
github.com/elastic/protections-artifacts

Identifies instances of Internet Explorer being started via the Component Object Model (COM) from an unusual caller such as scripting interpreters or RunDLL32. Adversaries could abuse Internet Explorer via COM to avoid suspicious processes making network connections and bypass host-based firewall restrictions.

MITRE ATT&CK coverage

Rule body

[rule]
description = """
Identifies instances of Internet Explorer being started via the Component Object Model (COM) from an unusual caller such
as scripting interpreters or RunDLL32. Adversaries could abuse Internet Explorer via COM to avoid suspicious processes
making network connections and bypass host-based firewall restrictions.
"""
id = "5e9fdd8b-5412-483c-a2e6-58de59990ae6"
license = "Elastic License v2"
name = "Suspicious Command and Control via Internet Explorer"
os_list = ["windows"]
reference = ["https://www.fortinet.com/blog/threat-research/new-variant-of-ursnif-continuously-targeting-italy"]
version = "1.0.31"

query = '''
sequence with maxspan=5m

 [process where event.action == "start" and
  (
   process.name : ("regsvr32.exe", "rundll32.exe", "wscript.exe", "cscript.exe", "powershell.exe", "mshta.exe",
                   "msbuild.exe", "installutil.exe") or
   process.pe.original_file_name : ("regsvr32.exe", "rundll32.exe", "wscript.exe", "cscript.exe", "powershell.exe",
                                    "mshta.exe", "msbuild.exe", "installutil.exe")
  ) and

  not (process.name : "wscript.exe" and process.args : ("\\\\*", "?:\\Program Files\\*", "?:\\Program Files (x86)\\*")) and
  not (process.name : "rundll32.exe" and
       process.args : ("?:\\Windows\\System32\\inetcpl.cpl",
                       "?:\\Windows\\System32\\LogiLDA.dll,LogiFetch",
                       "inetcpl.cpl,,?")) and
  not (process.name : "wscript.exe" and process.working_directory : "\\\\*") and 

  not (process.name : "wscript.exe" and process.parent.name : "explorer.exe" and 
       process.command_line : ("*\\Users\\*\\Desktop\\*", "*\\Users\\*\\OneDrive*")) and

  not (process.name : "wscript.exe" and process.args : "C:\\inetpub\\wwwroot\\wtsp\\systemtasks\\*.vbs" and process.parent.name : "svchost.exe") and

  not (process.name : "mshta.exe" and process.args : ("?:\\Program Files\\*.hta", "?:\\Program Files (x86)\\*.hta", "?:\\PROGRA~?\\*")) and
  not (process.name : "cscript.exe" and process.parent.executable : "C:\\Program Files\\AppSense\\Environment Manager\\Agent\\EmUser.exe")
  ] by process.entity_id

 [process where event.action == "start" and process.name : "ielowutil.exe" and

  /* ProgId - InternetExplorer.Application.1 */
  process.args : "-CLSID:{0002DF01-0000-0000-C000-000000000046}"] by process.Ext.effective_parent.entity_id
'''

min_endpoint_version = "8.4.0"
[[actions]]
action = "kill_process"
field = "process.entity_id"
state = 0

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

[[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.005"
name = "Visual Basic"
reference = "https://attack.mitre.org/techniques/T1059/005/"

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


[[threat.technique]]
id = "T1559"
name = "Inter-Process Communication"
reference = "https://attack.mitre.org/techniques/T1559/"
[[threat.technique.subtechnique]]
id = "T1559.001"
name = "Component Object Model"
reference = "https://attack.mitre.org/techniques/T1559/001/"



[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/"
[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1071"
name = "Application Layer Protocol"
reference = "https://attack.mitre.org/techniques/T1071/"

[[threat.technique]]
id = "T1102"
name = "Web Service"
reference = "https://attack.mitre.org/techniques/T1102/"


[threat.tactic]
id = "TA0011"
name = "Command and Control"
reference = "https://attack.mitre.org/tactics/TA0011/"

[internal]
min_endpoint_version = "8.4.0"

Stages and Predicates

Ordered sequence: each step below must occur in order within 5m, correlated by process.Ext.effective_parent.entity_id, process.entity_id.

Stage 1: process

[process where event.action == "start" and
  (
   process.name : ("regsvr32.exe", "rundll32.exe", "wscript.exe", "cscript.exe", "powershell.exe", "mshta.exe",
                   "msbuild.exe", "installutil.exe") or
   process.pe.original_file_name : ("regsvr32.exe", "rundll32.exe", "wscript.exe", "cscript.exe", "powershell.exe",
                                    "mshta.exe", "msbuild.exe", "installutil.exe")
  ) and

  not (process.name : "wscript.exe" and process.args : ("\\\\*", "?:\\Program Files\\*", "?:\\Program Files (x86)\\*")) and
  not (process.name : "rundll32.exe" and
       process.args : ("?:\\Windows\\System32\\inetcpl.cpl",
                       "?:\\Windows\\System32\\LogiLDA.dll,LogiFetch",
                       "inetcpl.cpl,,?")) and
  not (process.name : "wscript.exe" and process.working_directory : "\\\\*") and 

  not (process.name : "wscript.exe" and process.parent.name : "explorer.exe" and 
       process.command_line : ("*\\Users\\*\\Desktop\\*", "*\\Users\\*\\OneDrive*")) and

  not (process.name : "wscript.exe" and process.args : "C:\\inetpub\\wwwroot\\wtsp\\systemtasks\\*.vbs" and process.parent.name : "svchost.exe") and

  not (process.name : "mshta.exe" and process.args : ("?:\\Program Files\\*.hta", "?:\\Program Files (x86)\\*.hta", "?:\\PROGRA~?\\*")) and
  not (process.name : "cscript.exe" and process.parent.executable : "C:\\Program Files\\AppSense\\Environment Manager\\Agent\\EmUser.exe")
  ] by process.entity_id

Stage 2: process

[process where event.action == "start" and process.name : "ielowutil.exe" and
  process.args : "-CLSID:{0002DF01-0000-0000-C000-000000000046}"] by process.Ext.effective_parent.entity_id

Exclusions

The rule actively suppresses these predicates.

FieldKindExcluded valuesSearch
process.argseq?:\Windows\System32\inetcpl.cpl, ?:\Windows\System32\LogiLDA.dll,LogiFetch, inetcpl.cpl,,?excludes:process.args field:"process.args" value:"?:\Windows\System32\inetcpl.cpl" field:"process.args" value:"?:\Windows\System32\LogiLDA.dll,LogiFetch" field:"process.args" value:"inetcpl.cpl,,?"
process.nameeqrundll32.exeexcludes:process.name field:"process.name" value:"rundll32.exe"
process.argsstarts_with\\, ?:\Program Files\, ?:\Program Files (x86)\excludes:process.args field:"process.args" value:"\\" field:"process.args" value:"?:\Program Files\" field:"process.args" value:"?:\Program Files (x86)\"
process.nameeqwscript.exeexcludes:process.name field:"process.name" value:"wscript.exe"
process.argswildcard?:\Program Files\*.hta, ?:\Program Files (x86)\*.hta, ?:\PROGRA~?\*excludes:process.args field:"process.args" value:"?:\Program Files\*.hta" field:"process.args" value:"?:\Program Files (x86)\*.hta" field:"process.args" value:"?:\PROGRA~?\*"
process.nameeqmshta.exeexcludes:process.name field:"process.name" value:"mshta.exe"
process.argswildcardC:\inetpub\wwwroot\wtsp\systemtasks\*.vbsexcludes:process.args field:"process.args" value:"C:\inetpub\wwwroot\wtsp\systemtasks\*.vbs"
process.parent.nameeqsvchost.exeexcludes:process.parent.name field:"process.parent.name" value:"svchost.exe"
process.command_linewildcard*\Users\*\Desktop\*, *\Users\*\OneDrive*excludes:process.command_line field:"process.command_line" value:"*\Users\*\Desktop\*" field:"process.command_line" value:"*\Users\*\OneDrive*"
process.parent.nameeqexplorer.exeexcludes:process.parent.name field:"process.parent.name" value:"explorer.exe"
process.nameeqcscript.exeexcludes:process.name field:"process.name" value:"cscript.exe"
process.parent.executableeqC:\Program Files\AppSense\Environment Manager\Agent\EmUser.exeexcludes:process.parent.executable field:"process.parent.executable" value:"C:\Program Files\AppSense\Environment Manager\Agent\EmUser.exe"
process.working_directorystarts_with\\excludes:process.working_directory field:"process.working_directory" value:"\\"

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
event.actioneq
  • start corpus 391 (elastic 391)
field:"EventType" kind:eq value:"start"
process.argswildcard
  • -CLSID:{0002DF01-0000-0000-C000-000000000046}
field:"process.args" kind:wildcard value:"-CLSID:{0002DF01-0000-0000-C000-000000000046}"
process.namewildcard
  • cscript.exe corpus 67 (elastic 65, splunk 2)
  • ielowutil.exe
  • installutil.exe corpus 37 (elastic 32, splunk 5)
  • msbuild.exe corpus 39 (elastic 36, splunk 3)
  • mshta.exe corpus 84 (elastic 79, splunk 5)
  • powershell.exe corpus 184 (elastic 140, splunk 44)
  • regsvr32.exe corpus 73 (elastic 68, splunk 5)
  • rundll32.exe corpus 126 (elastic 100, splunk 26)
  • wscript.exe corpus 83 (elastic 82, splunk 1)
field:"process_name" kind:wildcard
process.pe.original_file_namewildcard
  • cscript.exe corpus 32 (sigma 17, elastic 15)
  • installutil.exe corpus 21 (elastic 11, sigma 6, splunk 4)
  • msbuild.exe corpus 20 (elastic 15, splunk 4, sigma 1)
  • mshta.exe corpus 40 (elastic 21, sigma 13, splunk 6)
  • powershell.exe corpus 138 (sigma 84, splunk 30, elastic 24)
  • regsvr32.exe corpus 37 (sigma 17, elastic 15, splunk 5)
  • rundll32.exe corpus 78 (sigma 35, elastic 22, splunk 21)
  • wscript.exe corpus 38 (elastic 21, sigma 17)
field:"OriginalFileName" kind:wildcard