Ethical Hacking News
Malicious PyPI Packages Unleash DevGating: A Novel Technique of Python Dependency-Based Malware Activation. Security researchers have discovered a novel technique used by attackers to unleash malware payloads from Python packages installed via PyPI. The campaign, dubbed "DevGating," uses Python dependencies as keys to unlock hidden malware payloads, highlighting the need for developers to exercise caution when installing packages and for security professionals to stay vigilant and proactive in the face of emerging threats.
Security researchers have discovered a campaign targeting the Python Package Index (PyPI) repository, dubbed "DevGating". The campaign uses a novel technique to unlock hidden malware payloads by utilizing the victim's Python dependencies as keys. The campaign has been active since September 25, 2026, and spans four waves, with eight malicious packages identified. The attackers use iterative evasion techniques and a new attack vector in the second wave, making it harder to detect. The malware establishes persistence and fetches code from a one-way JSON store, "npoint.io", to execute Python directly from memory. The campaign has been linked to another rootkit, GhostMap, and is a reminder of the ever-evolving threat landscape. Developers are advised to exercise extreme caution when installing packages from PyPI, and security professionals should stay up-to-date with the latest threat intelligence.
In a recent discovery, security researchers at Island have uncovered an active and evolving campaign targeting the Python Package Index (PyPI) repository. This campaign, dubbed "DevGating," employs a novel technique that utilizes the victim's Python dependencies as keys to unlock hidden malware payloads. The campaign has been active since September 25, 2026, and spans four waves, with eight malicious packages identified. The use of Python dependencies as a key to unlock malware payloads is not new, but the source of the decryption key and the iterative evasion techniques employed by the attackers are unprecedented.
The campaign's first wave, released in September 2026, added legitimate functionality to the malicious package, further increasing the sophistication of the attack. This is a clear indication of the attackers' intentions to evade detection and persist in the system. The campaign's second wave introduced a new attack vector, leveraging the name of a module loaded alongside the popular "requests" package to decrypt the payload.
The malware, once activated, establishes persistence by creating a .pth file that runs on every Python start, irrespective of whether the package exists or has been uninstalled. This ensures that the malware runs automatically, even if the package is removed or uninstalled. The payload then fetches code from a one-way JSON store, "npoint.io," which can be rewritten at any time, further increasing the attackers' flexibility and stealth.
The end goal of the attack is to execute Python directly from memory on Linux and retrieve code from "npoint.io." The attackers have also attempted to deliver a remote access trojan (RAT) in an earlier wave, further emphasizing the potential risks associated with this campaign. The list of identified packages includes "mailreader," "confext," "webreader," "pafer," "resion," "pafex," "colook," and "basic-crypt," all of which have been found to be vulnerable to this campaign.
Central to DevGating is the fact that the main payload is split across two packages from two different PyPI accounts. This design ensures that a scanner that analyzes any one of them in isolation fails to detect the malicious behavior. The attackers have implemented a novel technique, using the victim's Python dependencies as a key to unlock the payload. This technique exposes a significant gap between how security tools analyze packages and how developers actually use them.
The campaign has also been linked to another rootkit, GhostMap, which has been found to be distributed via an evolved variant of the Shai-Hulud worm, IronWorm. This highlights the interconnected nature of the threat landscape and the need for security professionals to stay vigilant and proactive in the face of emerging threats.
Furthermore, unknown threat actors have been observed using stolen GitHub tokens to push a credential stealer into tens of thousands of repositories since November 10, 2026. This attack has proliferated into at least one Packagist and one Golang package through automated publishing triggers. The stolen data is then exfiltrated to a specific IP address, and the attackers attempt to abuse the collected credentials to obtain deeper access to AWS, Google Cloud, and Microsoft Azure.
In light of these findings, it is essential for developers to exercise extreme caution when installing packages from PyPI. It is also crucial for security professionals to stay up-to-date with the latest threat intelligence and to conduct regular vulnerability assessments and penetration testing to identify potential weaknesses in their systems.
The discovery of the DevGating campaign serves as a reminder of the ever-evolving threat landscape and the need for security professionals to remain vigilant and proactive in the face of emerging threats.
Related Information:
https://www.ethicalhackingnews.com/articles/Malicious-PyPI-Packages-Unleash-DevGating-A-Novel-Technique-of-Python-Dependency-Based-Malware-Activation-ehn.shtml
https://thehackernews.com/2026/12/8-malicious-pypi-packages-use-python.html
Published: Thu Dec 3 16:05:11 2026 by llama3.2 3B Q4_K_M