Detection rules › Elastic
Execution of Commonly Abused Utilities via Explorer Trampoline
Identifies the execution of commonly abused utilities to run DLLs or scripts via a separate Windows Explorer trampoline. Explorer can be abused to launch malicious scripts or executables from a trusted parent process.
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Initial Access | |
| Execution | |
| Stealth |
Rule body
[rule]
description = """
Identifies the execution of commonly abused utilities to run DLLs or scripts via a separate Windows Explorer trampoline.
Explorer can be abused to launch malicious scripts or executables from a trusted parent process.
"""
id = "5e8498bb-8cc0-412f-9017-793d94ab76a5"
license = "Elastic License v2"
name = "Execution of Commonly Abused Utilities via Explorer Trampoline"
os_list = ["windows"]
reference = ["https://lolbas-project.github.io/lolbas/Binaries/Explorer/"]
version = "1.0.36"
query = '''
process where event.action == "start" and
(
process.name : ("cscript.exe", "wscript.exe", "rundll32.exe", "mshta.exe", "regsvr32.exe") or
process.pe.original_file_name :
("cscript.exe",
"wscript.exe",
"rundll32.exe",
"mshta.exe",
"regsvr32.exe")
) and
/* Explorer started via DCOM */
process.parent.name : "explorer.exe" and process.parent.command_line : "*/factory,{75dff2b7-6936-4c06-a8bb-676a7b00b24b}*" and
not
(
process.name : "rundll32.exe" and
process.args : ("rundll32.exe*\\Users\\*\\AppData\\Local\\Cognitas\\CrossLink6\\csathl32.dll*",
/* Issue #340 */
"*dfshim.dll*ShOpenVerbApplication*",
"dfshim.dll,",
"?:\\WINDOWS\\system32\\hotplug.dll,HotPlugSafeRemovalDriveNotification",
"cryptext.dll,CryptExtOpen*",
"cryptext.dll,CryptExtAddCER",
"ndfapi.dll,NdfRunDllDiagnoseWithAnswerFile",
"shwebsvc.dll,AddNetPlaceRunDll",
"?:\\Program Files\\Windows Photo Viewer\\PhotoViewer.dll*",
"?:\\Windows\\system32\\hotplug.dll,HotPlugSafeRemovalDriveNotification",
"devmgr.dll,DeviceProperties_RunDLL",
"printui.dll,PrintUIEntryDPIAware",
"?:\\windows\\System32\\srchadmin.dll",
"fdprint,InvokeTask",
"cryptext.dll,CryptExtAddPFX",
"shell32.dll,SHCreateLocalServerRunDll",
"?:\\WINDOWS\\System32\\SHELL32.dll,RunAsNewUser_RunDLL",
"?:\\WINDOWS\\system32\\spool\\DRIVERS\\x64\\3\\*",
"C:\\Program Files (x86)\\Stardock\\Fences\\FencesMenu64.dll,StartFences",
"C:\\Windows\\System32\\*.cpl")
) and
not (process.name : ("wscript.exe", "cscript.exe") and
process.args : ("\\\\*.vbs", "C:\\Robocopy\\robocopy_Mail_Config_Veeam.vbs", "C:\\Users\\*\\Documents\\*.vbs", "X:\\*.vbs", "W:\\*.vbs"))
'''
min_endpoint_version = "7.15.0"
optional_actions = []
[[actions]]
action = "kill_process"
field = "process.entity_id"
state = 0
[[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
Stage 1: process
process where event.action == "start" and
(
process.name : ("cscript.exe", "wscript.exe", "rundll32.exe", "mshta.exe", "regsvr32.exe") or
process.pe.original_file_name :
("cscript.exe",
"wscript.exe",
"rundll32.exe",
"mshta.exe",
"regsvr32.exe")
) and
process.parent.name : "explorer.exe" and process.parent.command_line : "*/factory,{75dff2b7-6936-4c06-a8bb-676a7b00b24b}*" and
not
(
process.name : "rundll32.exe" and
process.args : ("rundll32.exe*\\Users\\*\\AppData\\Local\\Cognitas\\CrossLink6\\csathl32.dll*",
"*dfshim.dll*ShOpenVerbApplication*",
"dfshim.dll,",
"?:\\WINDOWS\\system32\\hotplug.dll,HotPlugSafeRemovalDriveNotification",
"cryptext.dll,CryptExtOpen*",
"cryptext.dll,CryptExtAddCER",
"ndfapi.dll,NdfRunDllDiagnoseWithAnswerFile",
"shwebsvc.dll,AddNetPlaceRunDll",
"?:\\Program Files\\Windows Photo Viewer\\PhotoViewer.dll*",
"?:\\Windows\\system32\\hotplug.dll,HotPlugSafeRemovalDriveNotification",
"devmgr.dll,DeviceProperties_RunDLL",
"printui.dll,PrintUIEntryDPIAware",
"?:\\windows\\System32\\srchadmin.dll",
"fdprint,InvokeTask",
"cryptext.dll,CryptExtAddPFX",
"shell32.dll,SHCreateLocalServerRunDll",
"?:\\WINDOWS\\System32\\SHELL32.dll,RunAsNewUser_RunDLL",
"?:\\WINDOWS\\system32\\spool\\DRIVERS\\x64\\3\\*",
"C:\\Program Files (x86)\\Stardock\\Fences\\FencesMenu64.dll,StartFences",
"C:\\Windows\\System32\\*.cpl")
) and
not (process.name : ("wscript.exe", "cscript.exe") and
process.args : ("\\\\*.vbs", "C:\\Robocopy\\robocopy_Mail_Config_Veeam.vbs", "C:\\Users\\*\\Documents\\*.vbs", "X:\\*.vbs", "W:\\*.vbs"))
Exclusions
The rule actively suppresses these predicates.
| Field | Kind | Excluded values | Search |
|---|---|---|---|
process.args | wildcard | \\*.vbs, C:\Robocopy\robocopy_Mail_Config_Veeam.vbs, C:\Users\*\Documents\*.vbs, X:\*.vbs, W:\*.vbs | excludes:process.args |
process.name | eq | wscript.exe, cscript.exe | excludes:process.name field:"process.name" value:"wscript.exe" field:"process.name" value:"cscript.exe" |
process.args | wildcard | rundll32.exe*\Users\*\AppData\Local\Cognitas\CrossLink6\csathl32.dll*, *dfshim.dll*ShOpenVerbApplication*, dfshim.dll,, ?:\WINDOWS\system32\hotplug.dll,HotPlugSafeRemovalDriveNotification, cryptext.dll,CryptExtOpen*, cryptext.dll,CryptExtAddCER, ndfapi.dll,NdfRunDllDiagnoseWithAnswerFile, shwebsvc.dll,AddNetPlaceRunDll, ?:\Program Files\Windows Photo Viewer\PhotoViewer.dll*, ?:\Windows\system32\hotplug.dll,HotPlugSafeRemovalDriveNotification, devmgr.dll,DeviceProperties_RunDLL, printui.dll,PrintUIEntryDPIAware, ?:\windows\System32\srchadmin.dll, fdprint,InvokeTask, cryptext.dll,CryptExtAddPFX, shell32.dll,SHCreateLocalServerRunDll, ?:\WINDOWS\System32\SHELL32.dll,RunAsNewUser_RunDLL, ?:\WINDOWS\system32\spool\DRIVERS\x64\3\*, C:\Program Files (x86)\Stardock\Fences\FencesMenu64.dll,StartFences, C:\Windows\System32\*.cpl | excludes:process.args |
process.name | eq | rundll32.exe | excludes:process.name field:"process.name" value:"rundll32.exe" |
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
event.action | eq |
| field:"EventType" kind:eq value:"start" |
process.name | wildcard |
| field:"process_name" kind:wildcard |
process.parent.command_line | wildcard |
| field:"ParentCommandLine" kind:wildcard value:"*/factory,{75dff2b7-6936-4c06-a8bb-676a7b00b24b}*" |
process.parent.name | wildcard |
| field:"parent_process_name" kind:wildcard value:"explorer.exe" |
process.pe.original_file_name | wildcard |
| field:"OriginalFileName" kind:wildcard |