T1059.007 JavaScript
Executionon attack.mitre.org
ATT&CK Enterprise 20.0 · 20.1 released, update in review
How MITRE detects it
DET0264 Cross-Platform Detection of JavaScript Execution Abuse
AN0733 Windows
Detects JavaScript execution through WSH (wscript.exe, cscript.exe) or HTA (mshta.exe), particularly when spawned from Office macros, web browsers, or abnormal user paths. Correlates script execution with outbound network activity or system modification.
| MITRE log source | In Microsoft Sentinel |
|---|---|
WinEventLog:SysmonEventCode=1 |
Sysmon has no dedicated Sentinel connector: it is collected as a Windows event log into Event or WindowsEvent. |
m365:defenderScriptBlockLogging + AMSI | interpreted
The channels name script-block and AMSI telemetry, which Defender for Endpoint records in DeviceEvents. |
WinEventLog:SysmonEventCode=7 |
Sysmon has no dedicated Sentinel connector: it is collected as a Windows event log into Event or WindowsEvent. |
AN0734 macOS
Detects JavaScript for Automation (JXA) via osascript or compiled scripts using OSAKit APIs. Flags execution involving system modification, inter-process scripting, or browser abuse.
| MITRE log source | In Microsoft Sentinel |
|---|---|
macos:unifiedloglog stream with predicate 'eventMessage CONTAINS "osascript"' | Not mapped to Sentinel yet. |
macos:osqueryprocess_events | Not mapped to Sentinel yet. |
macos:syslog/var/log/system.log | Not mapped to Sentinel yet. |
AN0735 Linux
Detects Node.js or JavaScript interpreter execution from web shells, cron jobs, or local users. Correlates execution with reverse shell behavior, file modifications, or abnormal outbound connections.
| MITRE log source | In Microsoft Sentinel |
|---|---|
auditd:SYSCALLexecve | Not mapped to Sentinel yet. |
linux:syslog/var/log/syslog | Not mapped to Sentinel yet. |
Content Hub rules tagged with it (2)
- Possible Webshell usage attempt related to SpringShell(CVE-2022-22965)
- Potential Maldoc Execution Chain Observed
How the Content Hub rules for T1059.007 are built: their tables, filters, joins, schedules and windows.
In Sigma rules
29 SigmaHQ community rules name it in their tags.
- Adwind RAT / JRAT
- Adwind RAT / JRAT File Artifact
- Csc.EXE Execution Form Potentially Suspicious Parent
- Cscript/Wscript Uncommon Script Extension Execution
- HTML Help HH.EXE Suspicious Child Process
- HackTool - CACTUSTORCH Remote Thread Creation
- HackTool - Koadic Execution
- JXA In-memory Execution Via OSAScript
- MSHTA Execution with Suspicious File Extensions
- Potential Remote SquiblyTwo Technique Execution
- Suspicious HH.EXE Execution
- WScript or CScript Dropper - File
- AppLocker Prevented Application or Script from Running
- Node Process Executions
- Potential Dropper Script Execution Via WScript/CScript/MSHTA
- Potential In-Memory Download And Compile Of Payloads
- Suspicious Installer Package Child Process
- WSF/JSE/JS/VBA/VBE File Execution Via Cscript/Wscript
- XSL Script Execution Via WMIC.EXE
- Script Interpreter Spawning Credential Scanner - Windows
- TanStack Supply-Chain Attack Execution Indicators - Linux
- TanStack Supply-Chain Attack Execution Indicators - Windows
- AppLocker Application Would Have Been Blocked
- New Agent Skills Installation Attempt Via Node.EXE
- Potentially Suspicious Inline JavaScript Execution via NodeJS Binary
Mitigations
M1021Restrict Web-Based ContentM1038Execution PreventionM1040Behavior Prevention on EndpointM1042Disable or Remove Feature or Program
MITRE ATT&CK® is a registered trademark of The MITRE Corporation. VeriKQL is not affiliated with or endorsed by MITRE. ATT&CK data © The MITRE Corporation, used under its terms of use.