MITRE ATT&CK CoA - T1059 - Command and Scripting Interpreter
This playbook Remediates the Command and Scripting Interpreter technique using intelligence-driven Courses of Action (COA) defined by Palo Alto Networks Unit 42 team. ***Disclaimer: This playbook does not simulate an attack using the specified technique, but follows the steps to remediation as defined by Palo Alto Networks Unit 42 team’s Actionable Threat Objects and Mitigations (ATOMs). Techniques Handled: - T1059: Command and Scripting Interpreter Kill Chain phases: - Execution MITRE ATT&CK Description: Adversaries may abuse command and script interpreters to execute commands, scripts, or binaries. These interfaces and languages provide ways of interacting with computer systems and are a common feature across many different platforms. Most systems come with some built-in command-line interface and scripting capabilities, for example, macOS and Linux distributions include some flavor of Unix Shell while Windows installations include the Windows Command Shell and PowerShell. There are also cross-platform interpreters such as Python, as well as those commonly associated with client applications such as JavaScript/JScript and Visual Basic. Adversaries may abuse these technologies in various ways as a means of executing arbitrary commands. Commands and scripts can be embedded in Initial Access payloads delivered to victims as lure documents or as secondary payloads downloaded from an existing C2. Adversaries may also execute commands through interactive terminals/shells. Possible playbook uses: - The playbook can be used independently to handle and remediate the specific technique. - The playbook can be used as a part of the “Courses of Action - Defense Evasion” playbook to remediate techniques based on the kill chain phase. - The playbook can be used as a part of the “MITRE ATT&CK - Courses of Action” playbook, which can be triggered by different sources and accepts the technique MITRE ATT&CK ID as an input.
MITRE ATT&CK - Courses of Action · 7 tasks · 0 inputs · 1 output
Details
| ID | MITRE ATT&CK CoA - T1059 - Command and Scripting Interpreter |
|---|---|
| From Version | 6.5.0 |
| Tasks | 7 |
README
This playbook Remediates the Command and Scripting Interpreter technique using intelligence-driven Courses of Action (COA) defined by Palo Alto Networks Unit 42 team.
***Disclaimer: This playbook does not simulate an attack using the specified technique, but follows the steps to remediation as defined by Palo Alto Networks Unit 42 team’s Actionable Threat Objects and Mitigations (ATOMs).
Techniques Handled:
- T1059: Command and Scripting Interpreter
Kill Chain phases:
- Execution
MITRE ATT&CK Description:
Adversaries may abuse command and script interpreters to execute commands, scripts, or binaries. These interfaces and languages provide ways of interacting with computer systems and are a common feature across many different platforms. Most systems come with some built-in command-line interface and scripting capabilities, for example, macOS and Linux distributions include some flavor of Unix Shell while Windows installations include the Windows Command Shell and PowerShell.
There are also cross-platform interpreters such as Python, as well as those commonly associated with client applications such as JavaScript/JScript and Visual Basic.
Adversaries may abuse these technologies in various ways as a means of executing arbitrary commands. Commands and scripts can be embedded in Initial Access payloads delivered to victims as lure documents or as secondary payloads downloaded from an existing C2. Adversaries may also execute commands through interactive terminals/shells.
Possible playbook uses:
- The playbook can be used independently to handle and remediate the specific technique.
- The playbook can be used as a part of the “Courses of Action - Defense Evasion” playbook to remediate techniques based on the kill chain phase.
- The playbook can be used as a part of the “MITRE ATT&CK - Courses of Action” playbook, which can be triggered by different sources and accepts the technique MITRE ATT&CK ID as an input.
Dependencies
This playbook uses the following sub-playbooks, integrations, and scripts.
Sub-playbooks
This playbook does not use any sub-playbooks.
Integrations
This playbook does not use any integrations.
Scripts
- SetGridField
- Set
- IsIntegrationAvailable
Commands
This playbook does not use any commands.
Playbook Inputs
There are no inputs for this playbook.
Playbook Outputs
| Path | Description | Type |
|---|---|---|
| Handled.Techniques | The techniques handled in this playbook | unknown |
Playbook Image

Outputs
Handled.Techniques— The techniques handled in this playbook
Flowchart
description: "This playbook Remediates the Command and Scripting Interpreter technique using intelligence-driven Courses of Action (COA) defined by Palo Alto Networks Unit 42 team.\n \n***Disclaimer: This playbook does not simulate an attack using the specified technique, but follows the steps to remediation as defined by Palo Alto Networks Unit 42 team’s Actionable Threat Objects and Mitigations (ATOMs).\nTechniques Handled:\n- T1059: Command and Scripting Interpreter\n\nKill Chain phases:\n- Execution\n\nMITRE ATT&CK Description:\n\nAdversaries may abuse command and script interpreters to execute commands, scripts, or binaries. These interfaces and languages provide ways of interacting with computer systems and are a common feature across many different platforms. Most systems come with some built-in command-line interface and scripting capabilities, for example, macOS and Linux distributions include some flavor of Unix Shell while Windows installations include the Windows Command Shell and PowerShell.\n\nThere are also cross-platform interpreters such as Python, as well as those commonly associated with client applications such as JavaScript/JScript and Visual Basic.\n\nAdversaries may abuse these technologies in various ways as a means of executing arbitrary commands. Commands and scripts can be embedded in Initial Access payloads delivered to victims as lure documents or as secondary payloads downloaded from an existing C2. Adversaries may also execute commands through interactive terminals/shells.\n\nPossible playbook uses:\n- The playbook can be used independently to handle and remediate the specific technique.\n- The playbook can be used as a part of the “Courses of Action - Defense Evasion” playbook to remediate techniques based on the kill chain phase.\n- The playbook can be used as a part of the “MITRE ATT&CK - Courses of Action” playbook, which can be triggered by different sources and accepts the technique MITRE ATT&CK ID as an input.\n" id: MITRE ATT&CK CoA - T1059 - Command and Scripting Interpreter inputs: [] name: MITRE ATT&CK CoA - T1059 - Command and Scripting Interpreter outputs: - contextPath: Handled.Techniques description: The techniques handled in this playbook type: unknown starttaskid: "0" tasks: "0": id: "0" ignoreworker: false nexttasks: '#none#': - "4" note: false quietmode: 0 separatecontext: false skipunavailable: false task: brand: "" id: 711dd867-66a2-4047-87c2-25dbf5c5b323 iscommand: false name: "" version: -1 description: '' taskid: 711dd867-66a2-4047-87c2-25dbf5c5b323 timertriggers: [] type: start view: |- { "position": { "x": 50, "y": -310 } } "1": id: "1" ignoreworker: false nexttasks: '#none#': - "3" note: false quietmode: 0 separatecontext: false skipunavailable: false task: brand: "" description: Manual - Enable XDR Anti-Exploit and Anti-Malware Protection. id: 99ed5de6-2b8b-4965-8f8f-59a5ac45d413 iscommand: false name: Manual - Enable XDR Anti-Exploit and Anti-Malware Protection type: regular version: -1 taskid: 99ed5de6-2b8b-4965-8f8f-59a5ac45d413 timertriggers: [] type: regular view: |- { "position": { "x": 50, "y": 195 } } "2": id: "2" ignoreworker: false note: false quietmode: 0 separatecontext: false skipunavailable: false task: brand: "" id: 585aff4d-1c92-4428-857e-9290d4897de9 iscommand: false name: Done type: title version: -1 description: '' taskid: 585aff4d-1c92-4428-857e-9290d4897de9 timertriggers: [] type: title view: |- { "position": { "x": 50, "y": 735 } } "3": id: "3" ignoreworker: false nexttasks: '#none#': - "6" note: false quietmode: 0 scriptarguments: append: simple: "true" key: simple: Handled.Techniques stringify: {} value: simple: T1059 separatecontext: false skipunavailable: false task: brand: "" description: Set a value in context under the key you entered. id: eb3e0ea0-6e78-471e-8255-75bb5e4590e6 iscommand: false name: Set technique handled script: Set type: regular version: -1 taskid: eb3e0ea0-6e78-471e-8255-75bb5e4590e6 timertriggers: [] type: regular view: |- { "position": { "x": 50, "y": 370 } } "4": id: "4" ignoreworker: false nexttasks: '#default#': - "5" "yes": - "1" note: false quietmode: 0 scriptarguments: brandname: simple: Cortex XDR - IR separatecontext: false skipunavailable: false task: brand: "" description: Returns 'yes' if integration brand is available. Otherwise returns 'no' id: d5859bf8-b2c5-4d93-8521-1c66d09e0df6 iscommand: false name: Is Cortex XDR integration Enabled? script: IsIntegrationAvailable type: condition version: -1 taskid: d5859bf8-b2c5-4d93-8521-1c66d09e0df6 timertriggers: [] type: condition view: |- { "position": { "x": 50, "y": -150 } } "5": id: "5" ignoreworker: false nexttasks: '#none#': - "1" note: false quietmode: 0 separatecontext: false skipunavailable: false task: brand: "" description: | Enable the Cortex XDR integration to follow this CoA. If needed - please contact your Palo Alto Networks account manager for future guidance and assistance. id: 4f815187-b5d2-4795-86bc-f35429d674e2 iscommand: false name: Manual - Enable Cortex XDR integration type: regular version: -1 taskid: 4f815187-b5d2-4795-86bc-f35429d674e2 timertriggers: [] type: regular view: |- { "position": { "x": 360, "y": 20 } } "6": continueonerror: true id: "6" ignoreworker: false nexttasks: '#none#': - "2" note: false quietmode: 0 scriptarguments: columns: simple: technique context_path: simple: Handled.Techniques grid_id: simple: handledtechniques keys: {} overwrite: {} sort_by: {} unpack_nested_elements: {} separatecontext: false skipunavailable: false task: brand: "" description: Creates a Grid table from items or key-value pairs. id: 17e2aa6b-d468-4d5d-82a6-f1e3f73b5841 iscommand: false name: Set grid field script: SetGridField type: regular version: -1 taskid: 17e2aa6b-d468-4d5d-82a6-f1e3f73b5841 timertriggers: [] type: regular view: |- { "position": { "x": 50, "y": 550 } } version: -1 view: |- { "linkLabelsPosition": {}, "paper": { "dimensions": { "height": 1110, "width": 690, "x": 50, "y": -310 } } } tests: - No tests (auto formatted) fromversion: 6.5.0