Skip to main content
MuonPartners
Services
Architecture

Solution design and technology roadmapping

Solution AssessmentTechnology RoadmapsIntegration DesignSolution ArchitectureTechnical Design
Cyber Security

Security assessments, IAM, and compliance

AssessmentsIAMComplianceSecurity BaselineCyber Innovation
Network and Platform

Network architecture and cloud platforms

Network DesignCloud StrategyModernisation
Enterprise Architecture

Business-technology alignment

Business AlignmentPortfolio AnalysisGovernance
View all services
ProjectsCase StudiesInsightsToolsAbout
Contact Us

Services

Architecture
Solution AssessmentTechnology RoadmapsIntegration DesignSolution ArchitectureTechnical Design
Cyber Security
AssessmentsIAMComplianceSecurity BaselineCyber Innovation
Network and Platform
Network DesignCloud StrategyModernisation
Enterprise Architecture
Business AlignmentPortfolio AnalysisGovernance
ProjectsCase StudiesInsightsToolsAboutContact
Get in Touch
MuonPartners

Strategic technology consulting for Australian organisations navigating complexity.

Services

  • Architecture
  • Cyber Security
  • Network and Platform
  • Enterprise Architecture

Company

  • About
  • Products
  • Frameworks
  • Cross-Framework Mapping
  • Projects
  • Case Studies
  • Insights
  • Contact

Contact

  • [email protected]
  • Australia
  • LinkedIn

© 2026 Muon Partners. All rights reserved.

ABN 50 669 022 315 · A Muon Group company.

Privacy PolicyTerms of Service
  1. Frameworks
  2. >ATTACK
  3. >Execution
  4. >ATTACK-T1059.004
ATTACK-T1059.004Active

Unix Shell

Statement

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.(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.

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.

Location

Tactic
Execution

Technique Details

Identifier
ATTACK-T1059.004
Parent Technique
ATTACK-T1059
ATT&CK Page
View on MITRE

Tactics

Execution

Platforms

ESXiLinuxmacOSNetwork Devices

Detection

Behavioral Detection of Unix Shell Execution

Mitigations

Execution Prevention: Prevent the execution of unauthorized or malicious code on systems by implementing application control, script blocking, and other execution prevention mechanisms. This ensures that only trusted and authorized code is executed, reducing the risk of malware and unauthorized actions. This mitigation can be implemented through the following measures:

Application Control:

  • Use Case: Use tools like AppLocker or Windows Defender Application Control (WDAC) to create whitelists of authorized applications and block unauthorized ones. On Linux, use tools like SELinux or AppArmor to define mandatory access control policies for application execution.
  • Implementation: Allow only digitally signed or pre-approved applications to execute on servers and endpoints. (e.g., New-AppLockerPolicy -PolicyType Enforced -FilePath "C:\Policies\AppLocker.xml")

Script Blocking:

  • Use Case: Use script control mechanisms to block unauthorized execution of scripts, such as PowerShell or JavaScript. Web Browsers: Use browser extensions or settings to block JavaScript execution from untrusted sources.
  • Implementation: Configure PowerShell to enforce Constrained Language Mode for non-administrator users. (e.g., Set-ExecutionPolicy AllSigned)

Executable Blocking:

  • Use Case: Prevent execution of binaries from suspicious locations, such as %TEMP% or %APPDATA% directories.
  • Implementation: Block execution of .exe, .bat, or .ps1 files from user-writable directories.

Dynamic Analysis Prevention:

  • Use Case: Use behavior-based execution prevention tools to identify and block malicious activity in real time.
  • Implemenation: Employ EDR solutions that analyze runtime behavior and block suspicious code execution.
SP 800-53
SP800-53-AC-17relatedvia ctid-attack-to-sp800-53
SP800-53-AC-2relatedvia ctid-attack-to-sp800-53
SP800-53-AC-3relatedvia ctid-attack-to-sp800-53
SP800-53-AC-6relatedvia ctid-attack-to-sp800-53
SP800-53-CM-2relatedvia ctid-attack-to-sp800-53
View in graphReport an issue
← Back to Execution
Execution45 controls
ATTACK-T1047Windows Management InstrumentationATTACK-T1053Scheduled Task/JobATTACK-T1053.002AtATTACK-T1053.003CronATTACK-T1053.005Scheduled TaskATTACK-T1053.006Systemd TimersATTACK-T1053.007Container Orchestration JobATTACK-T1059Command and Scripting InterpreterATTACK-T1059.001PowerShellATTACK-T1059.002AppleScriptATTACK-T1059.003Windows Command ShellATTACK-T1059.004Unix ShellATTACK-T1059.005Visual BasicATTACK-T1059.006PythonATTACK-T1059.007JavaScriptATTACK-T1059.008Network Device CLIATTACK-T1059.009Cloud APIATTACK-T1059.010AutoHotKey & AutoITATTACK-T1059.011LuaATTACK-T1059.012Hypervisor CLIATTACK-T1059.013Container CLI/APIATTACK-T1072Software Deployment ToolsATTACK-T1106Native APIATTACK-T1129Shared ModulesATTACK-T1203Exploitation for Client ExecutionATTACK-T1204User ExecutionATTACK-T1204.001Malicious LinkATTACK-T1204.002Malicious FileATTACK-T1204.003Malicious ImageATTACK-T1204.004Malicious Copy and PasteATTACK-T1204.005Malicious LibraryATTACK-T1559Inter-Process CommunicationATTACK-T1559.001Component Object ModelATTACK-T1559.002Dynamic Data ExchangeATTACK-T1559.003XPC ServicesATTACK-T1569System ServicesATTACK-T1569.001LaunchctlATTACK-T1569.002Service ExecutionATTACK-T1569.003SystemctlATTACK-T1609Container Administration CommandATTACK-T1648Serverless ExecutionATTACK-T1651Cloud Administration CommandATTACK-T1674Input InjectionATTACK-T1675ESXi Administration CommandATTACK-T1677Poisoned Pipeline Execution