Knowledge is Power

Sitewide Search

Search Bare Metal Cyber

Search exact control and technique identifiers, Cyber Wiki articles, framework records, playbooks, books, podcasts, Academy courses, individual lessons, and BMC Cyber Challenge activities.

ATT&CK technique profileIntermediate

Command and Scripting Interpreter (T1059)

An adversary uses a shell, command interpreter, scripting language, or administrative console to execute instructions and automate activity.

Framework mapping

MITRE ATT&CK® Enterprise mapping

Catalog v19.2
techniqueT1059 — Command and Scripting Interpreter

Tactics: Execution

Platforms: Windows, Linux, macOS, Network Devices, ESXi, IaaS, Containers

Relationship: canonical educational profile

Open the official ATT&CK object ↗

Canonical Bare Metal Cyber educational profile for the active Enterprise ATT&CK technique or sub-technique.

MITRE D3FEND connection

Related defensive techniques

Inferred and experimental: These relationships are generated from D3FEND graph paths. They are hypotheses for analysis, not proof of prevention, detection, or control effectiveness.

T1059 · D3-DFDecoy FileDeceive · inferredT1059 · D3-DODecoy ObjectDeceive · inferredT1059 · D3-DADynamic AnalysisDetect · inferredT1059 · D3-EFAEmulated File AnalysisDetect · inferredT1059 · D3-FAFile AnalysisDetect · inferredT1059 · D3-FCOAFile Content AnalysisDetect · inferredT1059 · D3-FCRFile Content RulesDetect · inferredT1059 · D3-FHFile HashingDetect · inferredT1059 · D3-FIMFile Integrity MonitoringDetect · inferredT1059 · D3-PMPlatform MonitoringDetect · inferredT1059 · D3-FEVFile EvictionEvict · inferredT1059 · D3-OEObject EvictionEvict · inferredT1059 · D3-FEFile EncryptionHarden · inferredT1059 · D3-PHPlatform HardeningHarden · inferredT1059 · D3-AMEDAccess MediationIsolate · inferredT1059 · D3-APAAccess Policy AdministrationIsolate · inferredT1059 · D3-CNEContent ExcisionIsolate · inferredT1059 · D3-CFContent FilteringIsolate · inferredT1059 · D3-CFCContent Format ConversionIsolate · inferredT1059 · D3-CMContent ModificationIsolate · inferredT1059 · D3-CQContent QuarantineIsolate · inferredT1059 · D3-CNRContent RebuildIsolate · inferredT1059 · D3-CNSContent SubstitutionIsolate · inferredT1059 · D3-CVContent ValidationIsolate · inferredT1059 · D3-EALExecutable AllowlistingIsolate · inferredT1059 · D3-EDLExecutable DenylistingIsolate · inferredT1059 · D3-EIExecution IsolationIsolate · inferredT1059 · D3-FCDCFile Content Decompression CheckingIsolate · inferredT1059 · D3-FFVFile Format VerificationIsolate · inferredT1059 · D3-FISVFile Internal Structure VerificationIsolate · inferred

Showing 30 of 38 inferred defensive relationships.

MITRE D3FEND™ and the D3FEND logo are trademarks of The MITRE Corporation. MITRE ATT&CK® and ATT&CK® are registered trademarks of The MITRE Corporation.

Plain-language definition

An adversary uses a shell, command interpreter, scripting language, or administrative console to execute instructions and automate activity.

MITRE ATT&CK® identifies this behavior as T1059. In the Enterprise knowledge base it is associated with the Execution tactical objective and is represented here for the following platform scope: Windows, Linux, macOS, Network Devices, ESXi, IaaS, Containers.

The identifier describes behavior, not intent, actor identity, malware family, or severity by itself. A defensible mapping requires evidence that the observed action matches the behavior in the affected environment.

How the behavior fits an intrusion

Command and Scripting Interpreter can appear as one step in a longer chain of activity. The adversary’s access, privileges, objectives, and technology choices determine whether the behavior succeeds and what follows it.

For the Execution objective, the important analytic question is not simply whether a tool or command exists. It is whether the action changed the adversary’s capability, knowledge, access, concealment, control, collection, transfer, or effect in a way supported by the evidence.

Analysts should record attempted and failed behavior as well as successful actions. Failed attempts can expose targeting, tool choice, assumptions, and future paths even when a preventive control worked.

Preconditions and attack path

Before assigning this technique, identify what the adversary already needed: access, network reachability, credentials, permissions, user interaction, vulnerable software, trusted infrastructure, or knowledge of the environment. Those preconditions often reveal the most effective place to interrupt the path.

Then identify the output of the behavior. The output may be information, code execution, a durable configuration, a secret, a new connection, staged data, or operational disruption. Connecting precondition to output makes the mapping useful for architecture and response.

  • Required access or exposure for Command and Scripting Interpreter
  • Identity, privilege, and trust assumptions
  • Affected asset, workload, application, or external surface
  • Expected legitimate behavior that could look similar
  • The follow-on action made possible by success

Defensive design and mitigation

Defending against command and scripting interpreter requires controls at the decision points that make the behavior possible. A control relationship should be treated as a hypothesis to validate, not proof that purchasing or enabling one feature resolves the technique.

Use independent layers where consequence is high. Prevention should be paired with protected evidence, bounded privileges, exception governance, and recovery. Document where the control applies and where the platform, identity, or workload remains outside its scope.

  • Constrain scripting and administrative interpreters.
  • Use application control and least privilege.
  • Harden document, browser, and user-execution paths.
  • Capture process lineage and high-value script telemetry.
  • Define which legitimate roles, tools, and workflows may perform activity resembling command and scripting interpreter.
  • Test controls against both a benign simulation of command and scripting interpreter and a representative administrative use case.

Detection engineering and evidence

A useful detection for command and scripting interpreter describes the observable sequence, required data, analytic logic, expected benign behavior, and response action. The ATT&CK identifier is metadata for the analytic; it is not the analytic itself.

Validate field meaning, timestamps, parsing, retention, and source health before claiming coverage. When host evidence may be altered, correlate it with identity, network, application, cloud-control-plane, or centralized security records.

  • Process creation and parent-child relationships
  • Command-line and script-content logging
  • Module, library, and API invocation
  • WMI, task scheduler, and shell activity
  • Events that attribute command and scripting interpreter to a specific process, account, host, workload, application, or external destination
  • Time-synchronized context from at least one independent evidence source

Investigation questions

Investigators should begin with the event and affected object, then expand backward to enabling access and forward to consequences. The questions below are intended to reveal both the behavior and the conditions that made it possible.

  • What observation most directly supports T1059 Command and Scripting Interpreter?
  • Which identity, process, service, application, or external infrastructure initiated it?
  • Was the activity expected for that actor, asset, location, and time?
  • What access, privilege, or configuration was required?
  • What information or capability did the behavior produce?
  • Which related actions occurred immediately before and after it?
  • What evidence might be missing, impaired, or controlled by the adversary?
  • What must be revoked, contained, restored, or monitored before recovery?

Safe practitioner lab

Use benign commands and test-only accounts. Do not deploy malware, bypass controls on production devices, or attempt unapproved privilege escalation.

Record the starting state, expected event sequence, timestamps, and rollback method. The purpose is to understand evidence and control behavior, not to recreate harmful tradecraft or evade detection.

  • Create a snapshot of a disposable virtual machine or test tenant.
  • Perform a harmless administrative action that resembles command and scripting interpreter while using clearly labeled test artifacts.
  • Observe process, identity, configuration, and centralized log evidence.
  • Remove the test artifact, restore the snapshot, and confirm the environment returns to baseline.
  • Compare the observed evidence with the fields required by a proposed analytic.
  • Document one false-positive condition and one telemetry gap.
  • Restore the lab and verify the baseline before retaining sanitized notes.

Common misconceptions

  • Seeing a tool associated with T1059 proves that Command and Scripting Interpreter occurred. Tools have many functions; map the observed behavior.
  • A technique occurs only once in a linear attack. Behaviors can repeat, overlap tactics, and appear in different orders.
  • A vendor rule mapped to the ID proves organization-wide coverage. Local data quality, scope, testing, tuning, and response determine coverage.
  • A preventive control eliminates the need for detection. Attempts and control failures still provide valuable evidence.
  • The platform list proves applicability to every product in that category. Validate the actual architecture and configuration.

Attribution, version, and scope

© 2026 The MITRE Corporation. This work is reproduced and distributed with the permission of The MITRE Corporation.

MITRE ATT&CK® and ATT&CK® are registered trademarks of The MITRE Corporation. Bare Metal Cyber is not affiliated with or endorsed by MITRE.

This is an original Bare Metal Cyber educational profile reviewed against Enterprise ATT&CK catalog v19.2. The official T1059 page controls current object name, status, relationships, procedure examples, and source citations.

Certification relevance

This subject appears in or supports the following certification bodies of knowledge:

CompTIA CySA+GIAC GCTIISC2 CISSP

Authoritative sources