Command and Scripting Interpreter: Unix Shell
- ID
- T1059.004
- Tactics
- TA0002 Execution
- Sub-technique of
- T1059 Command and Scripting Interpreter
- Platforms
- ESXi, Linux, macOS, Network Devices
- Data sources
- Process Creation, Network Traffic Flow, Logon Session Creation, Command Execution, Script Execution, Network Connection Creation
- Source
- attack.mitre.org
- MITRE last modified
- 12 May 2026
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.[2][3] 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.
Detection
- DET0384 Behavioral Detection of Unix Shell Execution
Data components: Process Creation, Network Traffic Flow, Logon Session Creation, Command Execution, Script Execution, Network Connection Creation
Mitigations (1)
- M1038 Execution Prevention
Use application control where appropriate. On ESXi hosts, the
execInstalledOnlyfeature prevents binaries from being run unless they have been packaged and signed as part of a vSphere installation bundle (VIB).[1]
Groups (13)
- G0082 APT38
- G0096 APT41
- G0106 Rocke
- G0139 TeamTNT
- G0143 Aquatic Panda
- G1015 Scattered Spider
- G1017 Volt Typhoon
- G1041 Sea Turtle
- G1045 Salt Typhoon
- G1047 Velvet Ant
- G1048 UNC3886
- G1052 Contagious Interview
- G1056 TeamPCP
Software (50)
- S0021 Derusbi
- S0077 CallMe
- S0198 NETWIRE
- S0220 Chaos
- S0265 Kazuar
- S0279 Proton
- S0352 OSX_OCEANLOTUS.D
- S0369 CoinTicker
- S0377 Ebury
- S0401 Exaramel for Linux
- S0402 OSX/Shlayer
- S0410 Fysbis
- S0451 LoudMiner
- S0466 WindTail
- S0468 Skidmap
- S0482 Bundlore
- S0492 CookieMiner
- S0502 Drovorub
- S0504 Anchor
- S0584 AppleJeus
- S0587 Penquin
- S0599 Kinsing
- S0600 Doki
- S0601 Hildegard
- S0641 Kobalos
- S0647 Turian
- S0658 XCSSET
- S0690 Green Lambert
- S1016 MacMa
- S1105 COATHANGER
- S1107 NKAbuse
- S1108 PULSECHECK
- S1109 PACEMAKER
- S1114 ZIPLINE
- S1123 PITSTOP
- S1153 Cuckoo Stealer
- S1161 BPFDoor
- S1163 SnappyTCP
- S1184 BOLDMOVE
- S1198 Gomir
- S1203 J-magic
- S1217 VIRTUALPITA
- S1219 REPTILE
- S1222 RIFLESPINE
- S1224 CASTLETAP
- S9008 Shai-Hulud
- S9015 BRICKSTORM
- S9041 TeamPCP Cloud Stealer
- S9042 CanisterWorm
- S9063 DEEPROOT
References
- Google Cloud Threat Intelligence ESXi Hardening 2023
- DieNet Bash
- Apple ZShell
