Adversaries may abuse Unix shell commands and scripts for execution. Unix shells are the primary command prompt on Linux and macOS systems, though many variations of the Unix shell exist (e.g. sh, bash, zsh, etc.) depending on the specific OS or distribution.(Citation: DieNet Bash)(Citation: Apple ZShell) 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.
View in MITRE ATT&CK®Capability ID | Capability Description | Mapping Type | ATT&CK ID | ATT&CK Name |
---|---|---|---|---|
CM-7 | Least Functionality | Protects | T1059.004 | Unix Shell |
SI-10 | Information Input Validation | Protects | T1059.004 | Unix Shell |
SI-4 | System Monitoring | Protects | T1059.004 | Unix Shell |
SI-7 | Software, Firmware, and Information Integrity | Protects | T1059.004 | Unix Shell |
CVE-2014-9938 | n/a | uncategorized | T1059.004 | Unix Shell |
CVE-2016-9684 | n/a | uncategorized | T1059.004 | Unix Shell |
CVE-2014-7186 | n/a | uncategorized | T1059.004 | Unix Shell |
CVE-2014-6277 | n/a | uncategorized | T1059.004 | Unix Shell |
CVE-2014-6271 | n/a | uncategorized | T1059.004 | Unix Shell |
CVE-2012-1795 | n/a | uncategorized | T1059.004 | Unix Shell |
action.hacking.variety.Abuse of functionality | Abuse of functionality | related-to | T1059.004 | Command and Scripting Interpreter: Unix Shell |
action.hacking.vector.Command shell | Remote shell | related-to | T1059.004 | Command and Scripting Interpreter: Unix Shell |
aws_web_application_firewall | AWS Web Application Firewall | technique_scores | T1059.004 | Unix Shell |