kevmap

TechniquesT1059.006 › AN0173

AN0173 Analytic 0173

macOS · attack.mitre.org · ATT&CK Enterprise v19.2

<p>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.</p>
Detects
T1059.006 Python
Part of
DET0063 Cross-Platform Behavioral Detection of Python Execution

Log sources and channels

Exactly as MITRE states them in x_mitre_log_source_references. Where a channel is vague, it is vague in the source; kevmap does not tidy it.

Log sourceChannelData component
macos:unifiedloglog stream --predicate 'eventMessage contains "python"'DC0029 Script Execution
macos:osqueryprocess_eventsDC0032 Process Creation
macos:syslogsystem.logDC0064 Command Execution

Mutable elements

Parameters MITRE marks as environment-specific. These are the knobs you are expected to tune; they are why an analytic is not a rule.

FieldDescription
ExecutionPathDetects python scripts from ~/Downloads/, /Volumes/, or /tmp/.
ScriptNameObfuscated or high entropy script names.
SpawnChainChained behavior: Python → bash → curl or Python → osascript.