If this package is installed
Remove it, treat the machine (or CI runner) as compromised, and rotate every secret, token and key it could access — from a different, clean machine.
Details
Source: amazon-inspector (8a271155be7da40cba43376d6a085b75a96c0bb9fed885c421424bc42fd8d07b)
setup.py defines custom build_py and install cmdclasses that, on sdist build and install, POST a JSON payload containing the installer's hostname, current working directory, install path, Python version, and a timestamp to the hardcoded bare-IP URL http://13.140.137.222:8787/_ah/dc over plain HTTP. The destination is a bare IPv4 address on a non-standard port with no TLS and no relation to any declared publisher domain. A source-code comment labels the behavior an 'authorized dependency-confusion canary', but the package is published on public PyPI where any installer who resolves this name will transmit their host identifiers to that endpoint. The sdist is the only distribution file and auto-executes on default pip install for every listed platform.
Source: kam193 (253796cb8693d039c09267f3d6d398031e3ad27640bb70f21f2e75d2578be649)
Installing the package or importing the module exfiltrates basic information about the host, and the package has no other purpose.
---
Category: PROBABLY_PENTEST - Packages looking like typical pentest packages, but also anything that looks like testing, exploring pre-prepared kits, research & co, with clearly low-harm possibilities.
Campaign: GENERIC-standard-pypi-install-pentest
Reasons (based on the campaign):
- The package contains code to exfiltrate basic data from the system, like IP or username. It has a limited risk.
- The package overrides the install command in setup.py to execute malicious code during installation.