Detection rules › Elastic

Execution from ZIP File via Explorer

Source
github.com/elastic/protections-artifacts

Identifies process execution from a ZIP file when handled via Explorer. Adversaries often leverage ZIP file to deliver malicious executables and scripts for initial access and execution.

MITRE ATT&CK coverage

Rule body

[rule]
description = """
Identifies process execution from a ZIP file when handled via Explorer. Adversaries often leverage ZIP file to deliver
malicious executables and scripts for initial access and execution.
"""
id = "6631e7e4-ecca-4f34-88e1-b86a4ab711b1"
license = "Elastic License v2"
name = "Execution from ZIP File via Explorer"
os_list = ["windows"]
version = "1.0.11"

query = '''
process where event.action == "start" and
 process.parent.name : "explorer.exe" and process.parent.thread.Ext.call_stack_summary : "*zipfldr.dll*" and
  process.name : ("wscript.exe",
                  "cscript.exe",
                  "rundll32.exe",
                  "regsvr32.exe",
                  "cmstp.exe",
                  "RegAsm.exe",
                  "installutil.exe",
                  "mshta.exe",
                  "RegSvcs.exe",
                  "msbuild.exe",
                  "msxsl.exe",
                  "xwizard.exe",
                  "powershell.exe",
                  "AddInProcess.exe",
                  "AddInProcess32.exe",
                  "AddInUtil.exe",
                  "AppLaunch.exe",
                  "aspnet_compiler.exe") and
 not (process.parent.name : "explorer.exe" and process.executable : "C:\\Windows\\SysWOW64\\mshta.exe") and
 not (process.name : "rundll32.exe" and
          process.args : ("cryptext.dll,CryptExt*",
                          "ImageView_Fullscreen",
                          "?:\\Windows\\System32\\dfshim.dll,ShOpenVerbApplication",
                          "C:\\ProgramData\\FastTrack Software\\Admin By Request\\ShellHelper32.dll,#1"))
'''

min_endpoint_version = "8.7.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.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 = "T1204"
name = "User Execution"
reference = "https://attack.mitre.org/techniques/T1204/"
[[threat.technique.subtechnique]]
id = "T1204.002"
name = "Malicious File"
reference = "https://attack.mitre.org/techniques/T1204/002/"



[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.tactic]
id = "TA0005"
name = "Defense Evasion"
reference = "https://attack.mitre.org/tactics/TA0005/"

[internal]
min_endpoint_version = "8.7.0"

Stages and Predicates

Stage 1: process

process where event.action == "start" and
 process.parent.name : "explorer.exe" and process.parent.thread.Ext.call_stack_summary : "*zipfldr.dll*" and
  process.name : ("wscript.exe",
                  "cscript.exe",
                  "rundll32.exe",
                  "regsvr32.exe",
                  "cmstp.exe",
                  "RegAsm.exe",
                  "installutil.exe",
                  "mshta.exe",
                  "RegSvcs.exe",
                  "msbuild.exe",
                  "msxsl.exe",
                  "xwizard.exe",
                  "powershell.exe",
                  "AddInProcess.exe",
                  "AddInProcess32.exe",
                  "AddInUtil.exe",
                  "AppLaunch.exe",
                  "aspnet_compiler.exe") and
 not (process.parent.name : "explorer.exe" and process.executable : "C:\\Windows\\SysWOW64\\mshta.exe") and
 not (process.name : "rundll32.exe" and
          process.args : ("cryptext.dll,CryptExt*",
                          "ImageView_Fullscreen",
                          "?:\\Windows\\System32\\dfshim.dll,ShOpenVerbApplication",
                          "C:\\ProgramData\\FastTrack Software\\Admin By Request\\ShellHelper32.dll,#1"))

Exclusions

The rule actively suppresses these predicates.

FieldKindExcluded valuesSearch
process.argswildcardcryptext.dll,CryptExt*, ImageView_Fullscreen, ?:\Windows\System32\dfshim.dll,ShOpenVerbApplication, C:\ProgramData\FastTrack Software\Admin By Request\ShellHelper32.dll,#1excludes:process.args
process.nameeqrundll32.exeexcludes:process.name field:"process.name" value:"rundll32.exe"
process.executableeqC:\Windows\SysWOW64\mshta.exeexcludes:process.executable field:"process.executable" value:"C:\Windows\SysWOW64\mshta.exe"
process.parent.nameeqexplorer.exeexcludes:process.parent.name field:"process.parent.name" value:"explorer.exe"

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
event.actioneq
  • start corpus 391 (elastic 391)
field:"EventType" kind:eq value:"start"
process.namewildcard
  • AddInProcess.exe corpus 4 (elastic 4)
  • AddInProcess32.exe corpus 2 (elastic 2)
  • AddInUtil.exe corpus 2 (elastic 2)
  • AppLaunch.exe corpus 2 (elastic 2)
  • RegAsm.exe corpus 26 (elastic 24, splunk 2)
  • RegSvcs.exe corpus 23 (elastic 21, splunk 2)
  • aspnet_compiler.exe corpus 3 (elastic 3)
  • cmstp.exe corpus 25 (elastic 25)
  • cscript.exe corpus 67 (elastic 65, splunk 2)
  • 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)
  • wscript.exe corpus 83 (elastic 82, splunk 1)
  • xwizard.exe corpus 16 (elastic 16)
field:"process_name" kind:wildcard
process.parent.namewildcard
  • explorer.exe corpus 51 (elastic 50, splunk 1)
field:"parent_process_name" kind:wildcard value:"explorer.exe"
process.parent.thread.Ext.call_stack_summarywildcard
  • *zipfldr.dll*
field:"process.parent.thread.Ext.call_stack_summary" kind:wildcard value:"*zipfldr.dll*"