Attack technique

Command and Scripting Interpreter

Command and Scripting Interpreter is a technique where an attacker uses the built-in shells and scripting languages of a system to run commands, scripts or programs.

In short

Command and Scripting Interpreter is a technique where an attacker uses the built-in shells and scripting languages of a system to run commands, scripts or programs. Most systems already include these tools, so the activity can look like normal administration.

Profile MapTechnique
  1. Reconnaissance
  2. Resource Development
  3. Initial Access
  4. Execution
  5. Persistence
  6. Privilege Escalation
  7. Stealth
  8. Defense Impairment
  9. Credential Access
  10. Discovery
  11. Lateral Movement
  12. Collection
  13. Command and Control
  14. Exfiltration
  15. Impact

Execution · Step 4 Of 15 In The Attack Chain

  1. MITRE IDT1059ATT&CK technique
  2. Detection4ways to spot itUnusual interpreter launches · Suspicious follow-on activity
  3. Defences4ways to stop itRemove what you do not need · Control what can run

How it works

Most operating systems, cloud services and network devices include a command line or a scripting language. An attacker who gains access can use them to run commands without bringing in much new software.

Commands and scripts can arrive inside an initial access payload, be downloaded from a server the attacker controls, or be typed in through an interactive terminal or a remote service.

MITRE groups this technique into 13 sub-techniques, covering interpreters such as PowerShell, Unix shells, Python, JavaScript, network device command lines and cloud APIs. The sub-techniques are 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 and T1059.013 Container CLI/API.

A real example

  • MITRE ATT&CK lists Empire as using a command-line interface to interact with systems.
  • MITRE ATT&CK lists Donut as able to generate shellcode outputs that run through Ruby.
  • MITRE ATT&CK lists Bonadan as able to create bind and reverse shells on an infected system.
  • MITRE ATT&CK lists APT37 as using Ruby scripts to run payloads.
  • MITRE ATT&CK lists APT39 as using custom scripts to carry out internal reconnaissance.

How to detect

  1. Unusual interpreter launches

    Watch for shells and script engines started outside normal working hours, by unexpected users, or by processes that would not normally start them.

  2. Suspicious follow-on activity

    Look for interpreter use that is followed by encoded or hidden arguments, or by other tools used to download or connect to remote systems.

  3. Unexpected access on special platforms

    On virtualization hosts and network devices, watch for interpreter or command line access by uncommon accounts or from unknown addresses.

  4. Data sources MITRE lists

    Command Execution, Process Creation, User Account Authentication

How to defend

  1. Remove what you do not need

    Turn off or uninstall shells and interpreters that are not required, and block installation of new ones without approval.

  2. Control what can run

    Use application controls and, where possible, allow only signed scripts. Language restriction modes can limit sensitive functions.

  3. Limit who can use them

    Restrict interpreter use and execution policy to administrators where feasible, and keep an inventory of the interpreters on your systems.

  4. Use endpoint protections

    Anti-malware can quarantine suspicious files, and attack surface reduction rules can stop scripts from running harmful downloaded content.

Questions

What is the Command and Scripting Interpreter technique?

T1059 is when an attacker uses built-in shells and scripting languages to run commands, scripts or programs. Most systems already include these tools, so the activity can look like normal administration.

Which interpreters does it cover?

MITRE groups it into 13 sub-techniques, covering PowerShell, Unix shells, Python, JavaScript, network device command lines and cloud APIs. Most systems already include these tools.

How can I detect abuse of interpreters?

Watch for shells and script engines started outside working hours, by unexpected users or by processes that would not normally start them, especially followed by encoded or hidden arguments.

How do I defend against it?

Remove interpreters you do not need, use application controls and signed scripts where possible, restrict interpreter use to administrators, and use anti-malware and attack surface reduction rules.

In our research

  1. GRU targeting of logistics firms: advisory AA25-141A October 2026
  2. Akira ransomware advisory AA24-109A: stages and tools October 2026
  3. ATT&CK groups by attributed origin: what is mapped October 2026
  4. ATT&CK techniques most used across threat groups October 2026
  5. WIRTE: Covert Espionage Actor Targeting the Middle East and Beyond July 2026
  6. Konni (Vedalia / TA406 / Opal Sleet): North Korea’s Steady Hand in Espionage Operations March 2026

Sources

  1. MITRE ATT&CK T1059: Command and Scripting Interpreter MITRE
  2. MITRE ATT&CK Tactic TA0002: Execution MITRE