T1059.004 Unix Shell

sub-techniqueEnterprise

Adversaries may abuse Unix shell commands and scripts for execution. Unix shells are the primary command prompt on Linux, macOS, and ESXi systems, though many variations of the Unix shell exist (e.g. sh, ash, bash, zsh, etc.) depending on the specific OS or distribution. Unix shells can control every aspect of a system, with certain commands requiring elevated privileges. Unix shells also support scripts that enable sequential execution of commands as well as other typical programming operations such as conditionals and loops. Common uses of shell scripts include long or repetitive tasks, or the need to run the same set of commands on multiple systems. Adversaries may abuse Unix shells to execute various commands or payloads. Interactive shells may be accessed through command and control channels or during lateral movement such as with SSH. Adversaries may also leverage shell scripts to deliver and execute multiple commands on victims or as part of payloads used for persistence. Some systems, such as embedded devices, lightweight Linux distributions, and ESXi servers, may leverage stripped-down Unix shells via Busybox, a small executable that contains a variety of tools, including a simple shell.

01

platforms

Platforms this applies to.

ESXiLinuxmacOSNetwork Devices
02

tactics

ATT&CK tactics this technique serves.

03

sub-technique of

The broader entity this sits under.

04

mitigations

ATT&CK mitigations that reduce this.

06

NIST CSF 2.0 — areas of relevance (Protect / Detect)

NIST CSF 2.0 areas this most relates to (evidence-ranked).

Derived from MITRE CTID (Apache-2.0) and the NIST 800-53 ↔ CSF crosswalk (public domain). Indicative relevance along the Protect/Detect axis — not a compliance assessment or coverage claim.

07

mitigating controls (11)

Security controls that mitigate this.

08

known-exploited CVEs (14)

Related CVEs.

IDseverity exploitable
CVE-2025-25257UScritical9.8OT criticalKEV
An improper neutralization of special elements used in an SQL command ('SQL Injection') vulnerability [CWE-89] vulnerability in Fortinet FortiWeb 7.6.0 through 7.6.3, FortiWeb 7.4.…
CVE-2024-27443USmedium6.1OT criticalKEV
An issue was discovered in Zimbra Collaboration (ZCS) 9.0 and 10.0. A Cross-Site Scripting (XSS) vulnerability exists in the CalendarInvite feature of the Zimbra webmail classic us…
CVE-2024-24919UShigh8.6OT criticalKEV
Potentially allowing an attacker to read certain information on Check Point Security Gateways once connected to the internet and enabled with remote Access VPN or Mobile Access Sof…
CVE-2023-44221UShigh7.2OT criticalKEV
Improper neutralization of special elements in the SMA100 SSL-VPN management interface allows a remote authenticated attacker with administrative privilege to inject arbitrary comm…
CVE-2023-46604UScritical9.8OT criticalKEV
The Java OpenWire protocol marshaller is vulnerable to Remote Code Execution. This vulnerability may allow a remote attacker with network access to either a Java-based OpenWire b…
CVE-2023-39780UShigh8.8OT criticalKEV
On ASUS RT-AX55 3.0.0.4.386.51598 devices, authenticated attackers can perform OS command injection via the /start_apply.htm qos_bw_rulelist parameter. NOTE: for the similar "token…
CVE-2023-38831UShigh7.8OT criticalKEV
RARLAB WinRAR before 6.23 allows attackers to execute arbitrary code when a user attempts to view a benign file within a ZIP archive. The issue occurs because a ZIP archive may inc…
CVE-2022-20700UScritical9.8OT criticalKEV
Multiple vulnerabilities in Cisco Small Business RV160, RV260, RV340, and RV345 Series Routers could allow an attacker to do any of the following: Execute arbitrary code Elevate pr…
CVE-2022-20699UScritical9.8OT criticalKEV
Multiple vulnerabilities in Cisco Small Business RV160, RV260, RV340, and RV345 Series Routers could allow an attacker to do any of the following: Execute arbitrary code Elevate pr…
CVE-2021-36380UScritical9.8OT criticalKEV
Sunhillo SureLine before 8.7.0.1.1 allows Unauthenticated OS Command Injection via shell metacharacters in ipAddr or dnsAddr /cgi/networkDiag.cgi.
CVE-2019-0708UScritical9.8OT criticalKEV
A remote code execution vulnerability exists in Remote Desktop Services formerly known as Terminal Services when an unauthenticated attacker connects to the target system using RDP…
CVE-2016-10033UScritical9.8OT criticalKEV
The mailSend function in the isMail transport in PHPMailer before 5.2.18 might allow remote attackers to pass extra parameters to the mail command and consequently execute arbitrar…
CVE-2014-7169UScritical9.8OT criticalKEV
GNU Bash through 4.3 bash43-025 processes trailing strings after certain malformed function definitions in the values of environment variables, which allows remote attackers to wri…
CVE-2014-6271UScritical9.8OT criticalKEV
GNU Bash through 4.3 processes trailing strings after function definitions in the values of environment variables, which allows remote attackers to execute arbitrary code via a cra…
09

groups (13)

Threat groups associated with this.

10

software (50)

Malware and tools associated with this.

12

Detected by (Sigma) (19)

Sigma detection rules related to this.

13

source

Where this definition is published.