VeriKQL by Kaushik Saha

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 sourceIn Microsoft Sentinel
WinEventLog:SysmonEventCode=1
  • Windows event logs (Azure Monitor Agent) → Event
    Event | where Source == "Microsoft-Windows-Sysmon" | where EventID in (1)
  • Windows Forwarded Events → WindowsEvent
    WindowsEvent | where Provider == "Microsoft-Windows-Sysmon" | where EventID in (1)

Sysmon has no dedicated Sentinel connector: it is collected as a Windows event log into Event or WindowsEvent.

m365:defenderScriptBlockLogging + AMSIinterpreted
  • Microsoft Defender XDR → DeviceEvents
    DeviceEvents
  • Microsoft Defender XDR → DeviceProcessEvents
    DeviceProcessEvents

The channels name script-block and AMSI telemetry, which Defender for Endpoint records in DeviceEvents.

WinEventLog:SysmonEventCode=7
  • Windows event logs (Azure Monitor Agent) → Event
    Event | where Source == "Microsoft-Windows-Sysmon" | where EventID in (7)
  • Windows Forwarded Events → WindowsEvent
    WindowsEvent | where Provider == "Microsoft-Windows-Sysmon" | where EventID in (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 sourceIn Microsoft Sentinel
macos:unifiedloglog stream with predicate 'eventMessage CONTAINS "osascript"'Not mapped to Sentinel yet.
macos:osqueryprocess_eventsNot mapped to Sentinel yet.
macos:syslog/var/log/system.logNot 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 sourceIn Microsoft Sentinel
auditd:SYSCALLexecveNot mapped to Sentinel yet.
linux:syslog/var/log/syslogNot mapped to Sentinel yet.

Content Hub rules tagged with it (2)

Rules tagged with this technique (or a sub-technique) in their metadata. Whether one fits your connectors is the coverage view (M2).

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.

Showing 25 of 29: stable rules first, then by level.

Community rules, not Microsoft's, and not checked by VeriKQL (Sigma is not KQL). From SigmaHQ/sigma at f083329, under the Detection Rule License (DRL) 1.1; each rule is credited to its author.

Mitigations

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.