T1059.006 Python
Executionon attack.mitre.org
ATT&CK Enterprise 20.0 · 20.1 released, update in review
How MITRE detects it
DET0063 Cross-Platform Behavioral Detection of Python Execution
AN0172 Windows
Detects Python execution via python.exe or py.exe with anomalous parent lineage (e.g., Office macros, LOLBAS), execution from unusual directories, or chained network/PowerShell/system-level activity.
| MITRE log source | In Microsoft Sentinel |
|---|---|
WinEventLog:SysmonEventCode=1 |
Sysmon has no dedicated Sentinel connector: it is collected as a Windows event log into Event or WindowsEvent. |
EDR:huntingAdvanced Hunting: DeviceProcessEvents + DeviceNetworkEvents | Not mapped to Sentinel yet. |
AN0173 macOS
Detects native Python or framework-based execution from Terminal, embedded apps, or launchd jobs. Flags network calls, persistence writes, or system enumeration after Python launch.
| MITRE log source | In Microsoft Sentinel |
|---|---|
macos:unifiedloglog stream --predicate 'eventMessage contains "python"' | Not mapped to Sentinel yet. |
macos:osqueryprocess_events | Not mapped to Sentinel yet. |
macos:syslogsystem.log | Not mapped to Sentinel yet. |
AN0174 Linux
Detects Python execution from non-standard user contexts or cron jobs that invoke outbound traffic, access sensitive files, or perform process injection (e.g., ptrace or /proc memory maps).
| MITRE log source | In Microsoft Sentinel |
|---|---|
auditd:SYSCALLexecve | Not mapped to Sentinel yet. |
linux:syslog/var/log/syslog | Not mapped to Sentinel yet. |
AN0175 ESXi
Detects Python script or interpreter execution on ESXi hosts via embedded BusyBox shells, nested installations, or dropped files via SSH or datastore mount. Flags unusual scripting or post-compromise enumeration behavior.
| MITRE log source | In Microsoft Sentinel |
|---|---|
esxi:vobd/var/log/vobd.log | Not mapped to Sentinel yet. |
esxi:hostd/var/log/hostd.log | Not mapped to Sentinel yet. |
Content Hub rules tagged with it (2)
How the Content Hub rules for T1059.006 are built: their tables, filters, joins, schedules and windows.
In Sigma rules
13 SigmaHQ community rules name it in their tags.
- Emotet Loader Execution Via .LNK File
- Serpent Backdoor Payload Execution Via Scheduled Task
- AppLocker Prevented Application or Script from Running
- Potential CVE-2022-22954 Exploitation Attempt - VMware Workspace ONE Access Remote Code Execution
- Python Path Configuration File Creation - Linux
- Python Path Configuration File Creation - MacOS
- Python Path Configuration File Creation - Windows
- Suspicious File Characteristics Due to Missing Fields
- Axios NPM Compromise Indicators - Linux
- Python One-Liners with Base64 Decoding
- Python One-Liners with Base64 Decoding - Linux
- TanStack Supply-Chain Attack Execution Indicators - Linux
- AppLocker Application Would Have Been Blocked
Mitigations
MITRE ATT&CK® is a registered trademark of The MITRE Corporation. VeriKQL is not affiliated with or endorsed by MITRE. ATT&CK data © The MITRE Corporation, used under its terms of use.