VeriKQL by Kaushik Saha

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 sourceIn Microsoft Sentinel
WinEventLog:SysmonEventCode=1
  • Windows event logs (Azure Monitor Agent) → Event
    Event | where Source == "Microsoft-Windows-Sysmon" | where EventID in (1)
  • Windows Forwarded Events → WindowsEvent
    WindowsEvent | where Provider == "Microsoft-Windows-Sysmon" | where EventID in (1)

Sysmon has no dedicated Sentinel connector: it is collected as a Windows event log into Event or WindowsEvent.

EDR:huntingAdvanced Hunting: DeviceProcessEvents + DeviceNetworkEventsNot 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 sourceIn Microsoft Sentinel
macos:unifiedloglog stream --predicate 'eventMessage contains "python"'Not mapped to Sentinel yet.
macos:osqueryprocess_eventsNot mapped to Sentinel yet.
macos:syslogsystem.logNot 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 sourceIn Microsoft Sentinel
auditd:SYSCALLexecveNot mapped to Sentinel yet.
linux:syslog/var/log/syslogNot 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 sourceIn Microsoft Sentinel
esxi:vobd/var/log/vobd.logNot mapped to Sentinel yet.
esxi:hostd/var/log/hostd.logNot mapped to Sentinel yet.

Content Hub rules tagged with it (2)

Rules tagged with this technique (or a sub-technique) in their metadata. Whether one fits your connectors is the coverage view (M2).

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.

Community rules, not Microsoft's, and not checked by VeriKQL (Sigma is not KQL). From SigmaHQ/sigma at f083329, under the Detection Rule License (DRL) 1.1; each rule is credited to its author.

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.