1200KM / simulation
T1546.018 Python Startup Hooks — Attack Simulation
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 execution of arbitrary code whenever Python is invoked. Path configuration files are designed to extend Python’s module search paths through the use of import…
Technique description
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 execution of arbitrary code whenever Python is invoked. Path configuration files are designed to extend Python’s module search paths through the use of import…
At least one platform-compatible Atomic procedure is documented. Individual review, lab prerequisites, and validation remain required.
Official ATT&CK definition · Detection rules and anomaly models
Documented simulation candidates
- Python Startup Hook - usercustomize.py (Windows)
Procedure 05cc7a2c-ce32-46f2-a358-f27f76718c39; elevation not declared required; cleanup present, not reviewed. Not executed or individually validated.
- Python Startup Hook - atomic_hook.pth (macOS)
Procedure 28ca4f81-fa96-47ff-8555-dde98017e89b; elevation not declared required; cleanup present, not reviewed. Not executed or individually validated.
- Python Startup Hook - atomic_hook.pth (Windows)
Procedure 57289962-21dc-4501-b756-80cd30608d9f; elevation not declared required; cleanup present, not reviewed. Not executed or individually validated.
- Python Startup Hook - usercustomize.py (Linux / MacOS)
Procedure 6e78084a-a433-4702-a838-cc7b765d87e8; elevation not declared required; cleanup present, not reviewed. Not executed or individually validated.
- Python Startup Hook - atomic_hook.pth (Linux)
Procedure a58c066d-f2f0-42a2-ab70-30af73f89e66; elevation not declared required; cleanup present, not reviewed. Not executed or individually validated.
Connected ecosystem references
Linked tags
Detection and collection
Attack tools
No reviewed association in this snapshot.
Existing research
Pinned research references. No browser attack runner, live simulation result or validated detector is asserted. Source mappings and validation limits are preserved. ATT&CK / Atomic provenance · Detection provenance.