A malicious PyPI package named graphlibx was identified as part of the graphalgo fake crypto developer recruitment campaign targeting Python developers. Armando's analysis of graphlibx v3.5.12 found two dropper files -- load_libraries.py and graph_config.py -- both executing a reverse-base64-zlib stub that decodes to a payload referencing the johns92 GitHub C2 stager account. The package attracted 759 downloads before removal. No publisher identity was recovered from PyPI.
Key Findings
- Malicious version: 3.5.12 (only version on PyPI)
- Entry point: Build hook in
pyproject.toml executes dropper stubs at install time
- Dual droppers: Both
load_libraries.py and graph_config.py contain reverse-base64-zlib dropper stubs
- C2 staging: Decoded payload fetches from
https://raw.githubusercontent.com/johns92/blog_app/refs/heads/main/server/.env.example to derive the C2 address
- Publisher: Unknown -- no profile, handle, or email recoverable
- Detection: Script-Python.Dropper.SupplyChain (both files), Archive-ZIP.Dropper.SupplyChain
Package Background
graphlibx presents itself as "Python package for creating and manipulating graphs and networks," using the same description template seen across all campaign PyPI packages. The package homepage points to graphlibx.org, a fake domain created for campaign legitimacy. Total downloads: 759. First published June 18, 2025.
Attack Analysis
At install time, the build hook in pyproject.toml invokes both load_libraries.py and graph_config.py. Each file contains the campaign's Python dropper pattern: a reversed, base64-encoded, zlib-compressed payload decoded and executed via exec(). The decoded payload then contacts the johns92 GitHub stager repository (johns92/blog_app) to derive the command-and-control address -- the same stager GitHub account used by the npm graphlibcore and netstruct packages, and by the npm graphalgo versions in the OLD-johns92 pattern.
This makes graphlibx one of the most significant PyPI packages in the campaign: while most PyPI packages are pure droppers (self-contained payload), graphlibx is a dual-dropper with cross-ecosystem C2 infrastructure reuse -- the outer dropper stubs decode to a downloader that reaches back to the same GitHub account used by the JavaScript C2 stager chain.
Malicious Files
load_libraries.py classified as Script-Python.Dropper.SupplyChain. Reverse-base64-zlib stub, one of two build-hook droppers.
graph_config.py classified as Script-Python.Dropper.SupplyChain. Second build-hook dropper with identical stub pattern, decoded payload contacts johns92 GitHub stager.
pyproject.toml classified as Text.Dropper.SupplyChain -- registers the build hook that triggers both dropper files.
Recommendations
- Identify exposure: Check for graphlibx at version 3.5.12.
- Update immediately: No clean version. Remove graphlibx entirely.
- Check lateral exposure: Also audit for npm graphlibcore, npm netstruct, and npm graphalgo -- all use the same johns92 C2 account.
- Scan your software supply chain: Use Spectra Assure Community (https://secure.software/pypi/packages/graphlibx).
Network IOCs
| IOC | Type |
|---|
| graphlibx.org | Attacker-registered fake homepage declared in the package metadata |
| https://raw.githubusercontent.com/johns92/blog_app/refs/heads/main/server/.env.example | C2 staging URL |
| https://raw.githubusercontent.com/johns92/blog_app/refs/heads/main/server/.nvmrc | C2 auxiliary URL |
Indicators of Compromise
Malicious Files
| Filename | SHA256 | Detection |
|---|
| graphlibx-3.5.12-py3-none-any.whl | 47d531e1af4220263a555681e2165aabc86ceaf3f4f2aeabd0d98e59b93d9975 | Archive-ZIP.Dropper.SupplyChain |
| load_libraries.py | aa81f2344a3ce688ad336f5517ebdd6eb369108aa16fc16df89c235c1cdc7cab | Script-Python.Dropper.SupplyChain |
| graph_config.py | 19dcb3d1d881fc1a423e31941b786bf2968970903f792d34d8f1be013946a02d | Script-Python.Dropper.SupplyChain |
| pyproject.toml | 78a541df5478b4d6bebb9d7eb14104dbadd929b410f99ceda618af14d649c1b8 | Text.Dropper.SupplyChain |
Archive Hashes
| File | SHA256 |
|---|
| graphlibx-3.5.12.tar.gz | a2d7b0ec16be3fff4bbc5124987a940d50ac5a19ca82a1536168fb6ebc51700b |
| graphlibx-3.5.12.tar | c4d821162bb8731858398f09d78a1c6211f478e56ec5ea8505a5fb828617e0fa |