Malicious code in cloushaar-poc-exfil-91827 (PyPI)
Description
--- -= Per source details. Do not edit below this line.=-
Source: amazon-inspector (58b36f7c6e3e2e536f43b51acc410985240e6de6d7bb1e1d78126131e888806f)
The package's setup.py, executed automatically during pip install, iterates a hardcoded list of installer-side filesystem paths (/flag, /flag.txt, /app/flag, /root/flag, and similar candidates), reads their contents, and transmits them via urllib.request.urlopen as a query-string parameter to the hardcoded endpoint webhook.site/
Source: kam193 (8ec6abf4fcd51274f6bf53cece87bc47051b0751b117e137c68d964b05753e16)
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.