Armando found that basic-crypt v1.5.2, the first release of a PyPI package offering "basic crypto primitives," published on October 21, 2026, ships the same malicious compiled extension as its successor v1.5.3. The prebuilt Linux module decrypts its payloads only when a requests sub-module is loaded, then plants a launcher in a genuine copy of setuptools' _distutils_hack module and runs a stager that executes code fetched from a Supabase edge function. In this first release, however, the author packaged the library under a basic-crypt/ directory with a hyphen, which Python cannot import as basic_crypt. The author published v1.5.3 with the corrected layout 23 minutes later. basic-crypt has recorded 1,727 downloads.
Key Findings
- Malicious version: v1.5.2, published 2026-10-21 07:21 UTC; basic-crypt has no clean release
- Entry point: no install hook -- the payload sits in the compiled extension
_native, which runs when the module is loaded; in this release the package directory is named basic-crypt, so a normal import basic_crypt does not reach it
- Targets: Linux x86_64 and Windows x64 (prebuilt wheels); carries a persistent remote-code loader
- Evasion: payload hidden in a compiled extension whose shipped C source is clean; payloads encrypted with a custom cipher keyed on the name of a
requests sub-module
- Detection: Linux.Trojan.SupplyChain, Win64.Trojan.SupplyChain, Script-Python.Trojan.SupplyChain, Text.Trojan.SupplyChain, Archive-ZIP.Trojan.SupplyChain, Archive-GZIP.Trojan.SupplyChain, Archive-TAR.Trojan.SupplyChain
Package Background
basic-crypt was first published on October 21, 2026 by the PyPI account simendi, which owns no other packages, and declares no source code repository. It offers classroom ciphers -- affine, Atbash, rail fence, ROT13, RC4, XOR and CRC-32 -- with an optional native extension that accelerates xor_bytes and crc32. The package has recorded 1,727 downloads across its releases. Its consumer is colook, a terminal-colors package published later the same morning that requires basic-crypt without a version pin and imports it at package import.
Attack Analysis
Same implant as v1.5.3. The Linux wheel's _native.so in v1.5.2 is byte-identical to the one in v1.5.3, and the Windows wheel's _native.pyd is likewise identical. The source distribution's _native.c implements only xor_bytes and crc32; the compiled modules ship only in the wheels and contain functionality absent from that source.
What the native module does. At initialization the Linux module enumerates sys.modules, uppercases and hashes each name, and looks for REQUESTS.PACKAGES.URLLIB3.UTIL.REQUEST, which exists only once requests is imported. That string is the key for a custom stream cipher protecting three zlib-compressed payloads. Decrypted, they are a genuine setuptools _distutils_hack/__init__.py with a launcher appended, and a stager. The module writes them into _distutils_hack/ under the user site-packages directory, where setuptools' distutils-precedence.pth causes them to load at every Python start. The launcher locks a file in /tmp named after the user and host and starts __base__.py, which runs the Python interpreter from an anonymous in-memory file and executes base64-encoded code returned by https://tzqrmubxuluyccmiialf.supabase.co/functions/v1/register, authenticated with a hard-coded Supabase anonymous-key token.
A broken first attempt. In v1.5.2 the wheel installs the library into a directory called basic-crypt rather than basic_crypt; setup.py and the wheel's RECORD both use the hyphenated name. A hyphen is not valid in a Python import name, so import basic_crypt -- the statement colook uses -- fails and the native module is not loaded by the normal import path. v1.5.3, published at 07:44 UTC the same day, renames the directory and is otherwise built from the same binaries. The release is still malicious: it distributes the implant, and any code that loads the extension from that directory triggers it.
Malicious Files
_native.so (Linux.Trojan.SupplyChain) is the Linux native module, byte-identical to v1.5.3's. It hashes uppercased sys.modules names (key REQUESTS.PACKAGES.URLLIB3.UTIL.REQUEST), decrypts and inflates its payloads, and writes a launcher into the user site-packages _distutils_hack module; the stager runs Python from memory and executes code fetched from a Supabase edge function. In this release it is shipped under the non-importable basic-crypt/ directory.
_native.pyd (Win64.Trojan.SupplyChain) is the Windows build of the same native implant module, byte-identical to v1.5.3's; it enumerates sys.modules through PyImport_GetModuleDict at initialization.
setup.py (Script-Python.Trojan.SupplyChain) and METADATA (Text.Trojan.SupplyChain) are the release's build script and manifest. They contain no malicious logic of their own and are flagged as part of the malicious release.
Recommendations
Developers and security teams should take the following steps:
- Identify exposure: Check whether any basic-crypt release, or colook, appears in your dependency tree.
- Remove the packages: Uninstall basic-crypt and colook. basic-crypt has no clean release.
- Check for persistence: If any basic-crypt release was loaded on a system, inspect
_distutils_hack/__init__.py in the user site-packages directory for appended code, delete _distutils_hack/__base__.py, and remove the lock file in /tmp named after your user and host.
- Inspect affected systems: Look for outbound requests to
tzqrmubxuluyccmiialf.supabase.co and for Python processes executing from /proc/self/fd/ paths, and rotate credentials available to the affected user.
- Scan your software supply chain: Use Spectra Assure Community to check whether packages in your environment have been flagged.
Indicators of Compromise
Malicious Files
| Filename | SHA256 | Detection |
|---|
| _native.so | c7b794f17288e30aeb665530f7f358887a2861889c53f24fa29b7b8e8a69258b | Linux.Trojan.SupplyChain |
| _native.pyd | 67a82b7b16a611d0ff175073e3dcf40025f97301b6874630c07ad1028fa4685b | Win64.Trojan.SupplyChain |
| setup.py | 67dff6f5ebb329c288362938b15be85560d1133d20c72593f67d7465e0bb4974 | Script-Python.Trojan.SupplyChain |
| METADATA | bf7299e7e5cafeeeab443a40f9dc0e87f1216c0b586ac2b5bd1456fcd0aafcb6 | Text.Trojan.SupplyChain |
Network IOCs
| URL / IP | Purpose |
|---|
| https://tzqrmubxuluyccmiialf.supabase.co/functions/v1/register | Command-and-control endpoint; the in-memory stager fetches base64-encoded Python from this Supabase edge function and executes it |
Archive Hashes
| File | SHA256 |
|---|
| basic_crypt-1.5.2-py3-none-manylinux1_x86_64.whl | 11b4d0b03dba22faddd32c7a4a3e9fd7322661ef1ecb4e1620ba55714f075822 |
| basic_crypt-1.5.2-py3-none-win_amd64.whl | 5a529caaf5daa4be09251d66dea82960f7ce1da0d2368c90e47311461032fd92 |
| basic_crypt-1.5.2.tar.gz | 88c3fe090899c5cd20dff5572b616df30f2749900683801279cf126bd890e123 |
| basic_crypt-1.5.2.tar | 75066ff3989cb56c9be6881426fcc24ffd9786290dbc643a806fec0029aafb69 |