Article Details
Scrape Timestamp (UTC): 2024-02-29 08:18:17.739
Source: https://thehackernews.com/2024/02/lazarus-exploits-typos-to-sneak-pypi.html
Original Article Text
Click to Toggle View
Lazarus Exploits Typos to Sneak PyPI Malware into Dev Systems. The notorious North Korean state-backed hacking group Lazarus uploaded four packages to the Python Package Index (PyPI) repository with the goal of infecting developer systems with malware. The packages, now taken down, are pycryptoenv, pycryptoconf, quasarlib, and swapmempool. They have been collectively downloaded 3,269 times, with pycryptoconf accounting for the most downloads at 1,351. "The package names pycryptoenv and pycryptoconf are similar to pycrypto, which is a Python package used for encryption algorithms in Python," JPCERT/CC researcher Shusei Tomonaga said. "Therefore, the attacker probably prepared the malware-containing malicious packages to target users' typos in installing Python packages." The disclosure comes days after Phylum uncovered several rogue packages on the npm registry that have been used to single out software developers as part of a campaign codenamed Contagious Interview. An interesting commonality between the two sets of attacks is that the malicious code is concealed within the test script ("test.py"). In this case, however, the test file is merely a smokescreen for what's an XOR-encoded DLL file, which, in turn, creates two DLL files named IconCache.db and NTUSER.DAT. The attack sequence then uses NTUSER.DAT to load and execute IconCache.db, a malware called Comebacker that's responsible for establishing connections with a command-and-control (C2) server to fetch and run a Windows executable file. JPCERT/CC said the packages are a continuation of a campaign that Phylum first detailed in November 2023 as leveraging crypto-themed npm modules to deliver Comebacker. "Attackers may be targeting users' typos to have the malware downloaded," Tomonaga said. "When you install modules and other kinds of software in your development environment, please do so carefully to avoid installing unwanted packages." ⚡ Free Risk Assessment from Vanta Generate a gap assessment of your security and compliance posture, discover shadow IT, and more.
Daily Brief Summary
North Korean state-backed Lazarus Group uploaded malware-infected packages to Python Package Index (PyPI), potentially compromising developer systems.
The malicious packages, named pycryptoenv, pycryptoconf, quasarlib, and swapmempool, were designed to mimic legitimate packages to exploit typos during installation.
The rogue packages were collectively downloaded 3,269 times before being removed, with 'pycryptoconf' being the most downloaded.
JPCERT/CC identified the malware technique as using a Python test script to hide an XOR-encoded DLL file, which then executes more malicious code.
Two DLL files named IconCache.db and NTUSER.DAT are created, with NTUSER.DAT being used to load and execute the malware Comebacker to establish C2 server connections.
This incident is part of an ongoing trend where malicious npm and PyPI packages are used to single out developers in targeted cyber attacks.
Developers are advised to exercise caution when installing modules to prevent unintentional installation of malicious packages.