pypi · Malicious package advisory
Malwarefabtoolkit
GHSA-2j5q-cfcm-6vgm
Malicious code in fabtoolkit (PyPI)
Details
**Severity:** Critical **Affected versions:** `= 0.1.2` ## Source: amazon-inspector (e55333b9d934a04c029943e0e6fbf34fff7c1344e0d1964b6860bc02d322855d) fabtoolkit executes a payload (embedded as a CHILD string run via `subprocess.run([sys.executable,'-I','-c',CHILD],...)`) that fetches a JSON config from https://transfer.archivete.am/H2Uxm/fabdeploycheck-config.json with TLS verification disabled (`ssl._create_unverified_context()`) and dispatches on config-supplied `kind` values: `file` reads arbitrary filesystem paths, `run` executes attacker-supplied argv via subprocess, `http` issues attacker-chosen requests with Bearer tokens chained from previously-read files, `tcp` probes ports, and `revsh` forks a daemon that polls `base+'/'+ident+'-cmd.txt'` and pipes the returned bytes into `/bin/sh -c`, PUTting stdout/stderr back to the same host. Collected file contents, command output, HTTP responses, and probe results are packed into an in-memory zip and PUT to transfer.archivete.am under an attacker-chosen report name. Before daemonizing, the payload walks `/proc/*/cmdline` and SIGKILLs processes whose cmdlines contain `FABDRV3`, `fabdrv2`, or `connection ready`, enforcing single-instance persistence and clearing prior variants. The entry points `python -m fabtoolkit` and any import path reaching `selftest()`/`check()` trigger the payload. The destination is an anonymous public file-transfer host; config-controlled file reads enable harvesting of credentials such as `~/.aws/credentials` and `~/.ssh/*` along with cloud metadata via the `http` kind. The package has no legitimate functionality matching its naming. --- Credit: [OpenSSF](https://github.com/ossf/malicious-packages) ([source](https://github.com/ossf/malicious-packages/blob/5cd0a6ca1c77cbfed09f590f057d985c563428e7/osv/malicious/pypi/fabtoolkit/MAL-2026-17927.json)) **References:** - https://github.com/ossf/malicious-packages/blob/5cd0a6ca1c77cbfed09f590f057d985c563428e7/osv/malicious/pypi/fabtoolkit/MAL-2026-17927.json - https://pypi.org/project/fabtoolkit/0.1.0 - https://pypi.org/project/fabtoolkit/0.1.1 - https://pypi.org/project/fabtoolkit/0.1.2 - https://github.com/ossf/malicious-packages/blob/81ac4155842b3844327d024efe2779bfadf052fd/osv/malicious/pypi/fabtoolkit/MAL-2026-17927.json - https://pypi.org/project/fabtoolkit/0.2.1 - https://github.com/advisories/GHSA-2j5q-cfcm-6vgm
Compromised versions (1)
- = 0.1.2
Any computer that installed or ran a compromised version should be considered fully compromised. Rotate every secret on that machine from a clean environment.