Skip to content
NewCybercrime Report 2026 · Eight Chapters · A Post Is Not An Incident → Explore The ChaptersCybercrime Report 2026 → Explore

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.

Published
Reading Time
3 min read
Dark glass dark glass console command prompt terminal chevron quill scripting scroll with red glow with red neon lines, cover art for: Command and Scripting Interpreter

Most systems already include these tools, so the activity can look like normal administration.

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. A November 2026 command injection in a remote control tool is covered in our Dameware CVE-2026-28336 alert.

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.

A recent example is CVE-2026-123837, a command injection flaw in IntelliJ IDEA's Tomcat run configurations on WSL.

Who uses it

Seen in incidents

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.

Frequently Asked 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.

Sources

  1. MITRE ATT&CK T1059: Command and Scripting InterpreterMITRE
  2. MITRE ATT&CK Tactic TA0002: ExecutionMITRE
ShareLinkedInX
Brandefense logo

Stay Ahead of Digital Threats.

Take control of your digital security with an exclusive demo of our AI-driven threat intelligence platform.

Open The Full Demo Form →