Python Network Traffic During Package Build
The following analytic detects a Python process making an outbound network connection during package installation. Adversaries can abuse `setup.py` build scripts by leveraging `distutils`/`setuptools` command classes…
Description
The following analytic detects a Python process making an outbound network connection during package installation. Adversaries can abuse `setup.py` build scripts by leveraging `distutils`/`setuptools` command classes to execute arbitrary code, including network beacons to third-party domains, the moment a malicious Python package is installed. This activity is significant because it allows adversaries to establish a foothold or exfiltrate data without any direct interaction from the victim beyond running `pip install`. If confirmed malicious, this could indicate a successful software supply chain compromise.
Detection logic
Detection requirements
- Platform
- ESXiLinuxmacOSWindows
The rule states no platform. This is derived from the 2 ATT&CK techniques it maps to.
- Log source category
- sysmon_eventid_1_and_sysmon_eventid_3
Known benign triggers
- Python packages may contact software repositories, mirror sites during build time. Investigate the destination and package content to determine legitimacy.
MITRE ATT&CK mappings
0 exclusive techniques.This is coverage no other published rule has; it is not this rule's total technique count.
References
| Reference | Cited by |
|---|---|
| blog.talosintelligence.com/the-serpents-tongue-luring-the-python-out-of-its-den/ | 4 |
From the source
- At source
- Open at source
- Upstream identifier
- 03c9c504-2294-44da-8180-beefe1ca8ba8
- Tagged by the source as
- Command And ControlCompromised Windows HostIngress Tool TransferMalicious Python Package InstallationEndpointendpointSplunk CloudSplunk EnterpriseSplunk Enterprise Securityendpoint
Licence
- Published under
- Apache License 2.0Read the licence
- Attribution
- Required
- Obtained under
- Apache-2.0Read the origin licence
Authorship
- Written by
- Published
- Sep 4, 2026
- Version
- 2