Command and Scripting Interpreter: Python
- ID
- T1059.006
- Tactics
- TA0002 Execution
- Sub-technique of
- T1059 Command and Scripting Interpreter
- Platforms
- ESXi, Linux, macOS, Windows
- Data sources
- Process Creation, Network Traffic Content, Script Execution, Command Execution
- Source
- attack.mitre.org
- MITRE last modified
- 12 May 2026
Adversaries may abuse Python commands and scripts for execution. Python is a very popular scripting/programming language, with capabilities to perform many functions. Python can be executed interactively from the command-line (via the python.exe interpreter) or via scripts (.py) that can be written and distributed to different systems. Python code can also be compiled into binary executables.[1]
Python comes with many built-in packages to interact with the underlying system, such as file operations and device I/O. Adversaries can use these libraries to download and execute commands or other scripts as well as perform various malicious behaviors.
Detection
- DET0063 Cross-Platform Behavioral Detection of Python Execution
Data components: Process Creation, Network Traffic Content, Script Execution, Command Execution
Mitigations (4)
- M1033 Limit Software Installation
Prevent users from installing Python where not required.
- M1038 Execution Prevention
Denylist Python where not required.
- M1047 Audit
Inventory systems for unauthorized Python installations.
- M1049 Antivirus/Antimalware
Anti-virus can be used to automatically quarantine suspicious files.
Groups (21)
- G0010 Turla
- G0016 APT29
- G0035 Dragonfly
- G0060 BRONZE BUTLER
- G0067 APT37
- G0069 MuddyWater
- G0082 APT38
- G0087 APT39
- G0094 Kimsuky
- G0095 Machete
- G0106 Rocke
- G0128 ZIRCONIUM
- G0131 Tonto Team
- G1006 Earth Lusca
- G1021 Cinnamon Tempest
- G1039 RedCurl
- G1045 Salt Typhoon
- G1048 UNC3886
- G1052 Contagious Interview
- G1055 VOID MANTICORE
- G1056 TeamPCP
Software (40)
- S0154 Cobalt Strike
- S0192 Pupy
- S0196 PUNCHBUGGY
- S0234 Bandook
- S0276 Keydnap
- S0332 Remcos
- S0369 CoinTicker
- S0374 SpeakUp
- S0377 Ebury
- S0387 KeyBoy
- S0409 Machete
- S0428 PoetRAT
- S0459 MechaFlounder
- S0482 Bundlore
- S0492 CookieMiner
- S0547 DropBook
- S0581 IronNetInjector
- S0583 Pysa
- S0631 Chaes
- S0647 Turian
- S0681 Lizar
- S0692 SILENTTRINITY
- S0695 Donut
- S1032 PyDCrypt
- S1035 Small Sieve
- S1120 FRAMESTING
- S1164 UPSTYLE
- S1187 reGeorg
- S1189 Neo-reGeorg
- S1213 Lumma Stealer
- S1217 VIRTUALPITA
- S1218 VIRTUALPIE
- S1223 THINCRUST
- S1245 InvisibleFerret
- S9013 DRYHOOK
- S9024 SPAWNCHIMERA
- S9035 LAMEHUG
- S9041 TeamPCP Cloud Stealer
- S9042 CanisterWorm
- S9043 Mini Shai-Hulud
