VeriKQL by Kaushik Saha

T1059.004 Unix Shell

Executionon attack.mitre.org

ATT&CK Enterprise 20.0 · 20.1 released, update in review

How MITRE detects it

DET0384 Behavioral Detection of Unix Shell Execution

AN1081 Linux

Detects bash, sh, zsh, or BusyBox shell execution initiated via remote sessions, unauthorized users, or embedded within secondary script interpreters. Focus is on chained behavior: shell > suspicious commands > network discovery or persistence indicators.

MITRE log sourceIn Microsoft Sentinel
auditd:SYSCALLexecveNot mapped to Sentinel yet.
linux:osquerysocket_eventsNot mapped to Sentinel yet.
linux:syslogauth.log / secure.logNot mapped to Sentinel yet.

AN1082 macOS

Identifies use of sh/bash/zsh in suspicious context, such as user scripts launched from non-standard apps (e.g., Preview.app), embedded in LaunchDaemons, or executed outside Terminal.app. Looks for misuse in Automator, LaunchAgents, or NSAppleScript-executed shell.

MITRE log sourceIn Microsoft Sentinel
macos:unifiedloglog stream --predicate 'eventMessage contains "exec"'Not mapped to Sentinel yet.
macos:osquerylaunchd + process_eventsNot mapped to Sentinel yet.
macos:syslogsystem.log, asl.logNot mapped to Sentinel yet.

AN1083 ESXi

Detects BusyBox or Ash shell execution from unauthorized logins or remote connections. Focus is on rare shell invocations from DCUI, SSH sessions, or remote management paths. Also watches for payload droppers or persistence artifacts using shell.

MITRE log sourceIn Microsoft Sentinel
esxi:vmkernelDCUI shell start, BusyBox activityNot mapped to Sentinel yet.
esxi:authShell login or escalationNot mapped to Sentinel yet.

AN1084 Network Devices

Detects Unix shell usage on network appliances (e.g., routers, firewalls, embedded Linux) through rare console commands, CLI interfaces, or script injection via exposed APIs or SSH.

MITRE log sourceIn Microsoft Sentinel
networkdevice:syslogCLI Command AuditNot mapped to Sentinel yet.
NSM:Flowremote accessNot mapped to Sentinel yet.

Content Hub rules tagged with it (3)

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.004 are built: their tables, filters, joins, schedules and windows.

In Sigma rules

19 SigmaHQ community rules name it in their tags.

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.