Cybersecurity researchers have identified two malicious packages on the Python Package Index (PyPI) repository, NP6HelperHttptest and NP6HelperHttper, employing dynamic-link library (DLL) side-loading to evade detection by security software and execute nefarious code. These packages, downloaded hundreds of times before their removal, masqueraded as legitimate tools associated with ChapsVision’s marketing automation solution, NP6. By leveraging a technique called typosquatting, the attackers aimed to deceive developers searching for NP6HelperHttp and NP6HelperConfig into unwittingly downloading their rogue counterparts, highlighting the growing sophistication of supply chain threats.
Within the malicious packages lies a setup.py script designed to download two files: an executable vulnerable to DLL side-loading from Kingsoft Corporation and a malicious DLL to be side-loaded. This technique aims to avoid detection of the malicious code, reminiscent of previous instances such as the npm package aabquerys, which deployed a remote access trojan using a similar method. The DLL, once side-loaded, communicates with an attacker-controlled domain to retrieve a disguised GIF file, which in reality contains shellcode for a Cobalt Strike Beacon, a tool commonly used for post-exploitation activities in red teaming scenarios.
The discovery suggests a broader campaign targeting software supply chains, possibly orchestrated by threat actors seeking to exploit vulnerabilities in open-source package repositories. Security researchers emphasize the critical importance for development organizations to remain vigilant and implement robust supply chain security measures. Even for those not utilizing open-source package repositories, the risk of impersonation by threat actors underscores the need for proactive defense strategies to mitigate the evolving threat landscape. This incident serves as a poignant reminder of the imperative for heightened awareness and diligence in safeguarding against supply chain attacks within the software development ecosystem.