// MITRE ATT&CK

T1546.018 · Python Startup Hooks

🎯 Persistence LinuxmacOSWindows Sub-technique

Sub-technique of T1546 · Event Triggered Execution.

Adversaries may achieve persistence by leveraging Python’s startup mechanisms, including path configuration (`.pth`) files and the `sitecustomize.py` or `usercustomize.py` modules. These files are automatically processed during the initialization of the Python interpreter, allowing for the executi...

How to detect & mitigate it

Detecting Python Startup Hooks starts with your SIEM/EDR telemetry. Write a detection rule with the Sigma generator, analyze suspicious logs in the log analyzer, and place the technique on your coverage with the ATT&CK matrix.

Related techniques

Source: MITRE ATT&CK®. ATT&CK is a registered trademark of The MITRE Corporation. Content for educational purposes.