T1059 Command and Scripting Interpreter
Executionon attack.mitre.org
ATT&CK Enterprise 20.0 · 20.1 released, update in review
How MITRE detects it
DET0516 Behavioral Detection of Command and Scripting Interpreter Abuse
AN1428 Windows
Detects the execution of scripting or command interpreters (e.g., powershell.exe, cmd.exe, wscript.exe) outside expected administrative time windows or from abnormal user contexts, often followed by encoded/obfuscated arguments or secondary execution events.
| 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. |
AN1429 Linux
Detects use of shell interpreters (e.g., bash, sh, python, perl) initiated by users or processes not normally executing them, especially when chaining suspicious utilities like netcat, curl, or ssh.
| MITRE log source | In Microsoft Sentinel |
|---|---|
auditd:SYSCALLexecve | Not mapped to Sentinel yet. |
AN1430 macOS
Detects launch of command-line interpreters via Terminal, Automator, or hidden `osascript`, especially when parent process lineage deviates from user-initiated applications.
| MITRE log source | In Microsoft Sentinel |
|---|---|
macos:unifiedloglog stream --info --predicate 'eventMessage CONTAINS "exec"' | Not mapped to Sentinel yet. |
AN1431 ESXi
Detects use of 'esxcli system' or direct interpreter commands (e.g., busybox shell) invoked from SSH or host terminal unexpectedly.
| MITRE log source | In Microsoft Sentinel |
|---|---|
esxi:vobdshell session start | Not mapped to Sentinel yet. |
AN1432 Network Devices
Identifies CLI interpreter access (e.g., Cisco IOS, Juniper JUNOS) via `enable` mode or scripting-capable sessions used by uncommon accounts or from unknown IPs.
| MITRE log source | In Microsoft Sentinel |
|---|---|
networkdevice:clishell command | Not mapped to Sentinel yet. |
networkdevice:syslogauthentication & authorization | Not mapped to Sentinel yet. |
Content Hub rules tagged with it (127)
- ApexOne - Suspicious commandline arguments
- App Gateway WAF - SQLi Detection
- Application Gateway WAF - SQLi Detection
- AWS Security Hub - Detect SSM documents public sharing enabled
- AWSCloudTrail - EC2 Startup Shell Script Changed
- Azure Machine Learning Write Operations
- Azure VM Run Command operations executing a unique PowerShell script
- Base64 encoded Windows process command-lines
- Cisco Cloud Security - Hack Tool User-Agent Detected
- Cisco Cloud Security - Windows PowerShell User-Agent Detected
- CiscoISE - Command executed with the highest privileges by new user
- CiscoISE - Command executed with the highest privileges from new IP
- Contrast ADR - EDR Alert Correlation
- Contrast ADR - Exploited Attack Event
- Contrast ADR - Exploited Attack in Production
- Critical Risks
- Critical Severity Incident
- Cross-Cloud Suspicious Compute resource creation in GCP
- Cross-Cloud Suspicious user activity observed in GCP Envourment
- CYFIRMA - Attack Surface - Configuration High Rule
- CYFIRMA - Attack Surface - Configuration Medium Rule
- CYFIRMA - High Severity Asset based Vulnerabilities Rule Alert
- CYFIRMA - High Severity Attack Surface based Vulnerabilities Rule Alert
- CYFIRMA - High severity File Hash Indicators with Block Action and Malware
- CYFIRMA - High severity Malicious Network Indicators Associated with Malware - Block Recommended Rule
How the Content Hub rules for T1059 are built: their tables, filters, joins, schedules and windows.
In Sigma rules
426 SigmaHQ community rules name it or one of its sub-techniques in their tags.
- Potential QBot Activity
- HackTool - CrackMapExec Execution Patterns
- Potential Emotet Activity
- Potential Powershell ReverseShell Connection
- Remote LSASS Process Access Through Windows Remote Management
- TropicTrooper Campaign November 2018
- Windows Defender AMSI Trigger Detected
- Windows Defender Threat Detected
- Potential WMI Lateral Movement WmiPrvSE Spawned PowerShell
- Bad Opsec Powershell Code Artifacts
- Elise Backdoor Activity
- Greenbug Espionage Group Indicators
- HackTool - Sliver C2 Implant Activity Pattern
- Lazarus Group Activity
- Linux Reverse Shell Indicator
- REvil Kaseya Incident Malware Patterns
- Rorschach Ransomware Execution Activity
- Silence.EDA Detection
- Turla Group Commands May 2020
- Turla Group Lateral Movement
- UNC2452 PowerShell Pattern
- ZxShell Malware
- AWS EC2 Startup Shell Script Change
- AWS IAM S3Browser LoginProfile Creation
- AWS IAM S3Browser Templated S3 Bucket Policy Creation
Mitigations
M1021Restrict Web-Based ContentM1026Privileged Account ManagementM1033Limit Software InstallationM1038Execution PreventionM1040Behavior Prevention on EndpointM1042Disable or Remove Feature or ProgramM1045Code SigningM1047AuditM1049Antivirus/Antimalware
Sub-techniques
T1059.001PowerShellT1059.002AppleScriptT1059.003Windows Command ShellT1059.004Unix ShellT1059.005Visual BasicT1059.006PythonT1059.007JavaScriptT1059.008Network Device CLIT1059.009Cloud APIT1059.010AutoHotKey & AutoITT1059.011LuaT1059.012Hypervisor CLIT1059.013Container CLI/API
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.