Skip to content

Commit 72af00b

Browse files
committed
feat(rules): HTML Application script execution
Identifies the execution of scripts via Microsoft HTML Application Host interpreter. Adversaries can proxy execution of arbitrary script code through a trusted, signed utility to evade defenses.
1 parent fd099e9 commit 72af00b

File tree

1 file changed

+63
-0
lines changed

1 file changed

+63
-0
lines changed
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: HTML Application script execution
2+
id: 4ec64ac2-851d-41b4-b7d2-910c21de334d
3+
version: 1.0.0
4+
Identifies the execution of scripts via Microsoft HTML Application Host interpreter. Adversaries
5+
can proxy execution of arbitrary script code through a trusted, signed utility to evade defenses.
6+
labels:
7+
tactic.id: TA0005
8+
tactic.name: Defense Evasion
9+
tactic.ref: https://attack.mitre.org/tactics/TA0005/
10+
technique.id: T1218
11+
technique.name: System Binary Proxy Execution
12+
technique.ref: https://attack.mitre.org/techniques/T1218/
13+
subtechnique.id: T1218.005
14+
subtechnique.name: Mshta
15+
subtechnique.ref: https://attack.mitre.org/techniques/T1218/005/
16+
references:
17+
- https://redcanary.com/threat-detection-report/techniques/mshta/
18+
- https://www.ired.team/offensive-security/code-execution/t1170-mshta-code-execution
19+
20+
condition: >
21+
spawn_process and (ps.child.name ~= 'mshta.exe' or ps.child.pe.file.name ~= 'mshta.exe')
22+
and
23+
ps.child.cmdline imatches
24+
(
25+
'*WScript.Shell*',
26+
'*mshtml*RunHTMLApplication*',
27+
'*http*',
28+
'*https*',
29+
'*hXXps',
30+
'*ftp*',
31+
'*.run*',
32+
'*window.close*',
33+
'*mshta*',
34+
'*mshtml*',
35+
'*).Exec()*',
36+
'*script*eval(*',
37+
'*script*GetObject*',
38+
'*vbscript*',
39+
'*\\Users\\*\\Downloads\\*.hta*',
40+
'*.rtf*',
41+
'*.bat*',
42+
'*.dll*',
43+
'*.zip*',
44+
'*.jpg*',
45+
'*.png*',
46+
'*.lnk*',
47+
'*.doc*',
48+
'*.xls*'
49+
)
50+
and
51+
not
52+
ps.exe imatches
53+
(
54+
'?:\\Program Files (x86)\\Microsoft Office\\Office*\\MSACCESS.EXE'
55+
)
56+
action:
57+
- name: kill
58+
59+
output: >
60+
Suspicious HTML Application script executed by MSHTA with command line arguments %ps.child.cmdline
61+
severity: high
62+
63+
min-engine-version: 2.2.0

0 commit comments

Comments
 (0)