# DevGating: PyPI Supply-Chain Malware (mailreader/confext, colook/basic-crypt) Withholds Payload Until It Reaches Developer Environments

> Island disclosed on 2026-12-02 a PyPI campaign, active since 2026-09-25 across four waves and eight packages, that keys payload decryption to modules already loaded in the victim's Python process (e.g. requests), so sandboxes that import a package alone see nothing. Payloads are fetched from operator-editable public services and persist via .pth files; the current payload is a placeholder but the operator can swap in arbitrary code at any time.

- **Author:** Threadlinqs Team
- **Published:** 2026-12-02T16:12:43Z
- **Last updated:** 2026-12-02T16:12:43Z
- **Canonical:** https://intel.threadlinqs.com/threat/TL-2026-7293
- **Card image:** https://intel.threadlinqs.com/og/threat/TL-2026-7293.png
- **ID:** TL-2026-7293
- **Severity:** HIGH
- **Category:** SUPPLY_CHAIN
- **Status:** ACTIVE
- **Detections:** 9 (1 shown free below) · **IOCs:** 35 (3 shown free below)

## Description

DevGating is a PyPI supply-chain campaign documented by Island (researcher Ofek Ronen) on 2026-12-02. Since 2026-09-25 the operator has published paired packages from separate single-use PyPI accounts: a working, generically named 'front' package (e.g. mailreader, webreader, resion, colook) and a 'helper'/'loader' package (confext, pafer, pafex, basic-crypt). Splitting the payload across accounts means neither package looks malicious alone. Island counted four waves and eight packages; downloads as of 2026-11-16 were roughly 332/386 (wave 1 front/helper), 106/117 (wave 2), 174/406 (wave 2b, last 30 days) and 137/198 (wave 3). Victim identity and actual targets are unknown.

In the mailreader/confext chain, mailreader 2.7.1 ships default.config (5,715 bytes, checksum header, zlib) containing a 12,051-byte pickle that calls builtins.eval on import. The confext 0.7.2 loader calls pickle.loads() on it before validating the result. The eval expression runs the next stage and still returns a valid config dict as a decoy, and every malicious branch ends in 'except: pass' so failures are silent. The core evasion, which Island calls DevGating, is that the next stage is a 2,774-byte XOR ciphertext with no embedded key. The code iterates sys.modules, hashes each module name (MD5 of the name written twice) and looks for the selector 6a3221b95503aa1ac28f3469f9073016, which matches the module requests.packages.urllib3.util.connection in mailreader. The 42-byte key is that module name plus one derived byte, and decryption is a repeating-key XOR followed by exec. The colook/basic-crypt variant uses a 68 KB native module (basic_crypt._native, .so/.pyd) that waits for the sibling module requests.packages.urllib3.util.request. A sandbox that imports the package without requests already loaded finds no match and exits cleanly; Island notes that sandbox validation imported requests first, which is why routine functional testing can miss the chain.

Persistence uses Python .pth files that run at every interpreter start and survive pip uninstall: mailreader writes py_abi2-log.pth (importing py_log2) into the user site-packages; colook/basic-crypt writes a fake setuptools _distutils_hack package (with a __base__.py loader appended to __init__.py) and distutils-precedence.pth. A single-instance lock is kept in /tmp/pylog.txt (Linux) or %TEMP%\pylog.txt (Windows). On Linux the loader uses memfd_create to hold a copy of python3 (about 6.8 MB) plus a 156-byte fetcher, forks, and runs the interpreter from /proc/self/fd/ via execve, so nothing is written to a regular file. macOS (writes ~/pip3-update.py, then overwrites it after 3 seconds with a real pip upgrade script) and Windows (exec inside a hidden python.exe) behaviour is inferred from code review only. Command-and-control uses reputable public services: a public JSON bin at api.npoint.io (mailreader) and a Supabase edge function (colook). The operator can edit the returned code at will and every installed host runs it on its next Python start.

The current payload is a placeholder (it writes 'hello' to /tmp/file.txt every five seconds) and no data theft was observed. An earlier wave-1 endpoint was captured in October 2026 serving a remote-access trojan that sent data to a Supabase host; Island assesses such a foothold could reach source code, cloud credentials and CI systems. In Island's Linux detonation of mailreader 2.7.1 with requests loaded, 5,353 events over 191 seconds were recorded, including beaconing. mailreader 2.7.2 (2026-12-01) kept the same mechanism, persistence and C2 with a minor Linux launcher change and added email attachment saving. Island reported all still-listed packages on 2026-12-01 and, per the researcher, had no response as of 2026-12-02. No threat actor attribution is made in the sources.

Limits: only the Linux mailreader branch was executed; colook and basic-crypt were analysed statically. The colook sdist's pyvenv.cfg leaks the operator build path C:\Users\Samsung\Desktop\UIPackage\. Severity HIGH is an analyst estimate, not a source-stated rating.

## MITRE ATT&CK

- T1583.006 Web Services
- T1195.001 Compromise Software Dependencies and Development Tools
- T1059.006 Python
- T1204.002 Malicious File
- T1546.018 Python Startup Hooks
- T1480.001 Environmental Keying
- T1497 Virtualization/Sandbox Evasion
- T1027 Obfuscated Files or Information
- T1140 Deobfuscate/Decode Files or Information
- T1620 Reflective Code Loading
- T1036 Masquerading

## Free detection (Splunk SPL, Microsoft KQL, Sigma)

**DevGating PyPI Supply Chain - Install of Campaign Packages (mailreader, confext, colook, basic-crypt)** (`TL-2026-7293-SPL-001`)

Detects pip, uv, poetry or pipenv command lines that install or add one of the eight packages from the DevGating PyPI campaign (mailreader, confext, colook, basic-crypt, webreader, pafer, resion, pafex). The packages ship an unpickle-on-import loader or a native module and withhold the payload until they run inside a developer Python process that already has requests loaded. Install activity is therefore the earliest reliable signal. Removing the package later does not remove the .pth persistence it drops. Tracked as TL-2026-7293 (T1195.001, T1204.002).

- **Languages:** Splunk SPL, Microsoft KQL, Sigma
- **ATT&CK:** T1195.001, T1204.002
- **Data sources:** splunk_cim_endpoint_processes, sysmon_process_creation, edr_process_telemetry
- **Severity:** high
- **Confidence:** high

### Splunk SPL

````spl
| tstats summariesonly=false count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where Processes.process IN ("*mailreader*","*confext*","*colook*","*basic-crypt*","*basic_crypt*","*webreader*","*pafer*","*resion*","*pafex*") by Processes.dest Processes.user Processes.parent_process_name Processes.process_name Processes.process
| rename Processes.* as *
```keep only package-manager invocations that install or add a package```
| regex process="(?i)(^|[^a-z0-9_])(pip[0-9.]*|uv|poetry|pipenv)([^a-z0-9_].*)?[ ](install|add)[ ]"
```keep only whole-token matches of the DevGating package names, including wheel file names such as colook-1.1.3```
| regex process="(?i)(^|[^a-z0-9_.-])(mailreader|confext|colook|basic[-_]crypt|webreader|pafer|resion|pafex)([^a-z0-9_.-]|-[0-9]|$)"
| eval firstTime=strftime(firstTime,"%Y-%m-%dT%H:%M:%SZ"), lastTime=strftime(lastTime,"%Y-%m-%dT%H:%M:%SZ"), threat_id="TL-2026-7293"
| table firstTime lastTime dest user parent_process_name process_name process count threat_id
````

### Microsoft KQL

```kql
// TL-2026-7293 DevGating - install of campaign PyPI packages via pip, uv, poetry or pipenv
DeviceProcessEvents
| where Timestamp > ago(24h)
| where ProcessCommandLine matches regex @"(?i)(^|[^a-z0-9_])(pip[0-9.]*|uv|poetry|pipenv)([^a-z0-9_].*)?[ ](install|add)[ ]"
| where ProcessCommandLine matches regex @"(?i)(^|[^a-z0-9_.-])(mailreader|confext|colook|basic[-_]crypt|webreader|pafer|resion|pafex)([^a-z0-9_.-]|-[0-9]|$)"
| project Timestamp, DeviceName, AccountName, FileName, ProcessCommandLine, InitiatingProcessFileName, InitiatingProcessCommandLine
| order by Timestamp desc
```

### Sigma

```yaml
title: DevGating PyPI Supply Chain - Install of Campaign Packages
id: 3f1c7a52-8d4e-4b6a-9a15-2c0e7b9d61a4
status: experimental
description: Detects pip, uv, poetry or pipenv commands that install one of the DevGating campaign packages (mailreader, confext, colook, basic-crypt, webreader, pafer, resion, pafex). The packages withhold their payload until imported inside a developer Python process, so install activity is the earliest reliable signal.
references:
    - https://www.island.io/blog/devgating-the-pypi-malware-that-stays-silent-until-it-finds-a-developer
    - https://www.infosecurity-magazine.com/news/devgating-pypi-malware-devs/
author: Threadlinqs Team
date: 2026-12-02
tags:
    - attack.initial-access
    - attack.t1195.001
    - attack.execution
    - attack.t1204.002
logsource:
    category: process_creation
detection:
    selection_installer:
        CommandLine|contains:
            - 'pip install '
            - 'pip3 install '
            - 'pip.exe install '
            - 'pip3.exe install '
            - 'uv add '
            - 'poetry add '
            - 'pipenv install '
    selection_pkg:
        CommandLine|contains:
            - ' mailreader'
            - ' confext'
            - ' colook'
            - ' basic-crypt'
            - ' basic_crypt'
            - ' webreader'
            - ' pafer'
            - ' resion'
            - ' pafex'
    condition: selection_installer and selection_pkg
falsepositives:
    - Security researchers or sandbox pipelines intentionally installing the packages for analysis
    - Unrelated internal or third-party packages that share a name prefix such as mailreader-utils
level: high

```

**Known false positives:**

- Security researchers or sandbox pipelines intentionally installing the packages for analysis
- Unrelated internal packages whose names contain one of the listed names as a token, for example a private mailreader fork

**Tuning notes:** Requires the CIM Endpoint.Processes datamodel to be accelerated and populated by Sysmon, EDR or auditd process telemetry. Add private mirror hostnames to an allow-list only after confirming they do not proxy the malicious PyPI projects. Also hunt requirements.txt, poetry.lock and uv.lock files in repositories for the same package names, because installs driven by lock files do not always show the package name on the command line. Treat any hit as a developer-host incident and rotate source-control, cloud and CI credentials.

### 8 more detection rules (Splunk SPL, Microsoft KQL, Sigma), unlock with TL Creds

- DevGating - Known Malicious Package Artifact Hash Match (wheels, sdists, _native.so, __base__.py) (locked: unlock with TL Creds)
- DevGating - Linux Fileless Launch via memfd_create and execve of /proc/self/fd from Python (locked: unlock with TL Creds)
- DevGating - Python Process Connections to Campaign C2 (npoint bin, Supabase edge functions) with Beacon Profile (locked: unlock with TL Creds)
- DevGating - Python Loads basic_crypt Native Module (Key-Gated Dropper) (locked: unlock with TL Creds)
- DevGating - Python Writes Campaign Lock, Placeholder and Launcher Files (pylog.txt, [indicator], pip3-update.py) (locked: unlock with TL Creds)
- DevGating - Proxy Request to Campaign C2 Endpoints (npoint bin df37d3253fff53e2034f, Supabase register/save functions) (locked: unlock with TL Creds)
- DevGating - Python .pth Persistence Artifacts ([indicator], fake _distutils_hack __base__.py) (locked: unlock with TL Creds)
- DevGating - DNS Lookups of Campaign C2 Hosts (Supabase edge functions, api.npoint.io from Python) (locked: unlock with TL Creds)

Sign up free to unlock the detection rules: https://threadlinqs.com/?modal=signup

## Sample indicators (3 of 35)

Defanged, TLP:CLEAR.

- Domain: `tzqrmubxuluyccmiialf[.]supabase[.]co`
- URL: `hxxps://api[.]npoint[.]io/df37d3253fff53e2034f/login`
- File hash: `824b3df224c9052ae9c01f4dc6807014eecb37855fc888b16c9098887f962fb0`

Full set of 35 indicators unlocks with TL Creds: https://threadlinqs.com/tl-creds

## Sources

- [DevGating PyPI Malware Hides Until it Reaches Developers - Infosecurity Magazine](https://www.infosecurity-magazine.com/news/devgating-pypi-malware-devs/)
- [DevGating: The PyPI Malware That Stays Silent Until It Finds a Developer - Island](https://www.island.io/blog/devgating-the-pypi-malware-that-stays-silent-until-it-finds-a-developer)
- [PyPI Malware Hides Pickle Payloads and Gates Execution on Developer Environments - Mallory](https://mallory.ai/stories/01a23753-2ada-7b72-8e2e-4136a416b03a)
- [Malicious attack method on hosted ML models now targets PyPI - ReversingLabs (related 2025 pickle-in-PyPI campaign)](https://www.reversinglabs.com/blog/malicious-attack-method-on-hosted-ml-models-now-targets-pypi)
- [Malicious Machine Learning Model Attack Discovered on PyPI - Infosecurity Magazine (related 2025 campaign)](https://www.infosecurity-magazine.com/news/malicious-machine-learning-model/)
- [The Art of Hide and Seek: Making Pickle-Based Model Supply Chain Poisoning Stealthy Again (background on pickle scanner evasion)](https://arxiv.org/html/2508.19774v1)

## Full data

The other 8 detection rules (Splunk SPL / Microsoft KQL / Sigma) unlock with TL Creds; a free account includes daily creds: https://threadlinqs.com/?modal=signup
Indicator values unlock with TL Creds, at a lower price on Red and Purple; AI agents can query rules and IOCs through the Threadlinqs MCP server (Purple and Gold in full, 2 calls a day on a free account): https://intel.threadlinqs.com/mcp

Canonical: https://intel.threadlinqs.com/threat/TL-2026-7293
