|
| 1 | +# Detect potentially malicious .jse launch by File Explorer or Word |
| 2 | + |
| 3 | +This query was originally published in the threat analytics report, *Emulation-evading JavaScripts*. |
| 4 | + |
| 5 | +Attackers in several ransomware campaigns have employed heavily obfuscated JavaScript code, in order to implant malware or execute malicious commands. The obfuscation is intended to help the code evade security systems and potentially escape sandbox environments. |
| 6 | + |
| 7 | +The following query detects when Word or File Explorer have launched files with a *.jse* extension. Attackers involved in various [human-operated campaigns](https://www.microsoft.com/security/blog/2020/03/05/human-operated-ransomware-attacks-a-preventable-disaster/) have been known to embed a heavily obfuscated JavaScript file in malicious Word docs. The loader is used to download and install the banking trojan, Trickbot. |
| 8 | + |
| 9 | +See [Detect .jse file creation events](../Delivery/detect-jscript-file-creation.md) for a similar technique. |
| 10 | + |
| 11 | +## Query |
| 12 | + |
| 13 | +```Kusto |
| 14 | +// Find potentially malicious .jse launch by File Explorer or Word |
| 15 | +DeviceProcessEvents |
| 16 | +| where Timestamp > ago(7d) |
| 17 | +| where InitiatingProcessFileName in~ ("explorer.exe","winword.exe") |
| 18 | +and FileName =~ "wscript.exe" |
| 19 | +and ProcessCommandLine contains ".jse" |
| 20 | +``` |
| 21 | + |
| 22 | +## Category |
| 23 | + |
| 24 | +This query can be used to detect the following attack techniques and tactics ([see MITRE ATT&CK framework](https://attack.mitre.org/)) or security configuration states. |
| 25 | + |
| 26 | +| Technique, tactic, or state | Covered? (v=yes) | Notes | |
| 27 | +|-|-|-| |
| 28 | +| Initial access | v | | |
| 29 | +| Execution | v | | |
| 30 | +| Persistence | | | |
| 31 | +| Privilege escalation | | | |
| 32 | +| Defense evasion | v | | |
| 33 | +| Credential Access | | | |
| 34 | +| Discovery | | | |
| 35 | +| Lateral movement | | | |
| 36 | +| Collection | | | |
| 37 | +| Command and control | | | |
| 38 | +| Exfiltration | | | |
| 39 | +| Impact | | | |
| 40 | +| Vulnerability | | | |
| 41 | +| Misconfiguration | | | |
| 42 | +| Malware, component | | | |
| 43 | + |
| 44 | +## See also |
| 45 | + |
| 46 | +## Contributor info |
| 47 | + |
| 48 | +**Contributor:** Microsoft Threat Protection team |
0 commit comments