Detection rules › Sigma
MSHTA Execution with Suspicious File Extensions
Detects execution of mshta.exe with file types that looks like they do not typically represent HTA (HTML Application) content, such as .png, .jpg, .zip, .pdf, and others, which are often polyglots. MSHTA is a legitimate Windows utility for executing HTML Applications containing VBScript or JScript. Threat actors often abuse this lolbin utility to download and execute malicious scripts disguised as benign files or hosted under misleading extensions to evade detection.
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Execution | T1059.007 Command and Scripting Interpreter: JavaScript |
| Defense Evasion | T1140 Deobfuscate/Decode Files or Information, T1218.005 System Binary Proxy Execution: Mshta |
Event coverage
| Provider | Event ID | Title |
|---|---|---|
| Sysmon | 1 | Process creation |
Stages and Predicates
Stage 1: all of selection_img
or:
Image|endswith: '\mshta.exe'
OriginalFileName: mshta.exe
Stage 2: all of selection_cli
or:
CommandLine|contains: .7z
CommandLine|contains: .avi
CommandLine|contains: .bat
CommandLine|contains: .bmp
CommandLine|contains: .conf
CommandLine|contains: .csv
CommandLine|contains: .dll
CommandLine|contains: .doc
CommandLine|contains: .gif
CommandLine|contains: .gz
CommandLine|contains: .ini
CommandLine|contains: .jpe
CommandLine|contains: .jpg
CommandLine|contains: .json
CommandLine|contains: .lnk
CommandLine|contains: .log
CommandLine|contains: .mkv
CommandLine|contains: .mp3
CommandLine|contains: .mp4
CommandLine|contains: .pdf
CommandLine|contains: .png
CommandLine|contains: .ppt
CommandLine|contains: .rar
CommandLine|contains: .rtf
CommandLine|contains: .svg
CommandLine|contains: .tar
CommandLine|contains: .tmp
CommandLine|contains: .txt
CommandLine|contains: .xls
CommandLine|contains: .xml
CommandLine|contains: .yaml
CommandLine|contains: .yml
CommandLine|contains: .zip
CommandLine|contains: vbscript
Indicators
Each row is a field, operator, and value that the rule matches. The corpus column counts how many other rules in the catalog look for the same combination: high numbers point to widely-used, community-vetted indicators. Blank or 1 shows that the indicator is specific to this rule.
| Field | Kind | Values |
|---|---|---|
CommandLine | match |
|
Image | ends_with |
|
OriginalFileName | eq |
|