Command and Scripting Interpreter
- ID
- T1059
- Tactics
- TA0002 Execution
- Platforms
- Containers, ESXi, IaaS, Identity Provider, Linux, macOS, Network Devices, Office Suite, SaaS, Windows
- Data sources
- Process Creation, Command Execution, User Account Authentication
- Source
- attack.mitre.org
- MITRE last modified
- 12 May 2026
Adversaries may abuse command and script interpreters to execute commands, scripts, or binaries. These interfaces and languages provide ways of interacting with computer systems and are a common feature across many different platforms. Most systems come with some built-in command-line interface and scripting capabilities, for example, macOS and Linux distributions include some flavor of Unix Shell while Windows installations include the Windows Command Shell and PowerShell.
There are also cross-platform interpreters such as Python, as well as those commonly associated with client applications such as JavaScript and Visual Basic.
Adversaries may abuse these technologies in various ways as a means of executing arbitrary commands. Commands and scripts can be embedded in Initial Access payloads delivered to victims as lure documents or as secondary payloads downloaded from an existing C2. Adversaries may also execute commands through interactive terminals/shells, as well as utilize various Remote Services in order to achieve remote Execution.[5][6][7]
Sub-techniques (13)
- T1059.001 PowerShell
- T1059.002 AppleScript
- T1059.003 Windows Command Shell
- T1059.004 Unix Shell
- T1059.005 Visual Basic
- T1059.006 Python
- T1059.007 JavaScript
- T1059.008 Network Device CLI
- T1059.009 Cloud API
- T1059.010 AutoHotKey & AutoIT
- T1059.011 Lua
- T1059.012 Hypervisor CLI
- T1059.013 Container CLI/API
Detection
- DET0516 Behavioral Detection of Command and Scripting Interpreter Abuse
Data components: Process Creation, Command Execution, User Account Authentication
Mitigations (9)
- M1021 Restrict Web-Based Content
Script blocking extensions can help prevent the execution of scripts and HTA files that may commonly be used during the exploitation process. For malicious code served up through ads, adblockers can help prevent that code from executing in the first place.
- M1026 Privileged Account Management
When PowerShell is necessary, consider restricting PowerShell execution policy to administrators. Be aware that there are methods of bypassing the PowerShell execution policy, depending on environment configuration.[1]
PowerShell JEA (Just Enough Administration) may also be used to sandbox administration and limit what commands admins/users can execute through remote PowerShell sessions.[2]
- M1033 Limit Software Installation
Prevent user installation of unrequired command and scripting interpreters.
- M1038 Execution Prevention
Use application control where appropriate. For example, PowerShell Constrained Language mode can be used to restrict access to sensitive or otherwise dangerous language elements such as those used to execute arbitrary Windows APIs or files (e.g.,
Add-Type).[3]- M1040 Behavior Prevention on Endpoint
On Windows 10, enable Attack Surface Reduction (ASR) rules to prevent Visual Basic and JavaScript scripts from executing potentially malicious downloaded content [4].
- M1042 Disable or Remove Feature or Program
Disable or remove any unnecessary or unused shells or interpreters.
- M1045 Code Signing
Where possible, only permit execution of signed scripts.
- M1047 Audit
Inventory systems for unauthorized command and scripting interpreter installations.
- M1049 Antivirus/Antimalware
Anti-virus can be used to automatically quarantine suspicious files.
Groups (17)
- G0004 Ke3chang
- G0035 Dragonfly
- G0037 FIN6
- G0038 Stealth Falcon
- G0046 FIN7
- G0049 OilRig
- G0050 APT32
- G0053 FIN5
- G0067 APT37
- G0073 APT19
- G0087 APT39
- G0107 Whitefly
- G0117 Fox Kitten
- G0124 Windigo
- G0129 Mustang Panda
- G1031 Saint Bear
- G1035 Winter Vivern
Software (23)
- S0023 CHOPSTICK
- S0032 gh0st RAT
- S0167 Matryoshka
- S0219 WINERACK
- S0234 Bandook
- S0330 Zeus Panda
- S0334 DarkComet
- S0363 Empire
- S0374 SpeakUp
- S0434 Imminent Monitor
- S0460 Get2
- S0486 Bonadan
- S0487 Kessel
- S0598 P.A.S. Webshell
- S0618 FIVEHANDS
- S0695 Donut
- S1110 SLIGHTPULSE
- S1130 Raspberry Robin
- S1151 ZeroCleare
- S1154 VersaMem
- S1192 NICECURL
- S1227 StarProxy
- S9032 MuddyViper
References
- Netspi PowerShell Execution Policy Bypass
- Microsoft PS JEA
- Microsoft PowerShell CLM
- win10_asr
- Powershell Remote Commands
- Cisco IOS Software Integrity Assurance - Command History
- Remote Shell Execution in Python
