Programmer’s Digest #19
02/09/2023-02/15/2023. Clipper Malware Found in 450+ PyPI Packages, HTTP DDoS Attack Hits Record High, 10,000+ WordPress Sites Infected And More
1. Python Developers Beware: Clipper Malware Found in 450+ PyPI Packages!
Malicious actors have published more than 451 unique Python packages on the official Python Package Index (PyPI) repository in an attempt to infect developer systems with clipper malware.
The mechanism of the attacks
- The initial vector entails using typosquatting to mimic popular packages such as beautifulsoup, bitcoinlib, cryptofeed, matplotlib, pandas, pytorch, scikit-learn, scrapy, selenium, solana, and tensorflow, among others.
- After installation, a malicious JavaScript file is dropped to the system and executed in the background of any web browsing session.
- When a developer copies a cryptocurrency address, the address is replaced in the clipboard with the attacker’s address. This is achieved by creating a Chromium web browser extension in the Windows AppData folder and writing to it the rogue Javascript and a manifest.json file that requests users’ permissions to access and modify the clipboard.
The ultimate goal of the attacks is to hijack cryptocurrency transactions initiated by the compromised developer and reroute them to attacker-controlled wallets instead of the intended recipient.
2. OpenSSL Fixes Multiple New Security Flaws with Latest Update
The OpenSSL Project has released fixes to address several security flaws, including a high-severity bug in the open source encryption toolkit that could potentially expose users to malicious attacks. Tracked as CVE-2023-0286, the issue relates to a case of type confusion that may permit an adversary to read memory contents or enact a denial-of-service. The vulnerability is rooted in the way the popular cryptographic library handles X.509 certificates, and is likely to impact only those applications that have a custom implementation for retrieving a certificate revocation list (CRL) over a network. Type confusion flaws could have serious consequences, as they could be weaponized to deliberately force the program to behave in unintended ways, possibly causing a crash or code execution. The issue has been patched in OpenSSL versions 3.0.8, 1.1.1t, and 1.0.2zg.
3. Massive HTTP DDoS Attack Hits Record High of 71 Million Requests/Second
Web infrastructure company Cloudflare disclosed that it thwarted a record-breaking distributed denial-of-service (DDoS) attack that peaked at over 71 million requests per second (RPS). The majority of attacks peaked in the ballpark of 50-70 million requests per second (RPS) with the largest exceeding 71 million. The attacks singled out websites secured by its platform and that they emanated from a botnet comprising more than 30,000 IP addresses that belonged to “numerous” cloud providers. Given a sufficiently high amount of requests, the website’s server will not be able to process all of the attack requests along with the legitimate user requests. Users will experience this as website-load delays, timeouts, and eventually not being able to connect to their desired websites at all.
4. Massive AdSense Fraud Campaign Uncovered – 10,000+ WordPress Sites Infected
The threat actors behind the black hat redirect malware campaign have scaled up their campaign to use more than 70 bogus domains mimicking URL shorteners and infect over 10,800 websites. The main objective is still ad fraud by artificially increasing traffic to pages which contain the AdSense ID which contain Google ads for revenue generation. The campaign is orchestrated to redirect visitors to compromised WordPress sites to fake Q&A portals. It’s possible that these bad actors are simply trying to convince Google that real people from different IPs using different browsers are clicking on their search results. This technique artificially sends Google signals that those pages are performing well in search. What makes the latest campaign significant is the use of Bing search result links and Twitter’s link shortener (t[.]co) service, along with Google, in their redirects, indicating an expansion of the threat actor’s footprint. It’s not known precisely how the WordPress sites become infected in the first place. But once the website is breached, the threat actor injects backdoor PHP code that allows for persistent remote access as well as redirect site visitors.
5. NPM Packages Posing as Speed Testers Install Crypto Miners Instead
A new set of 16 malicious NPM packages are pretending to be internet speed testers but are, in reality, coinminers that hijack the compromised computer’s resources to mine cryptocurrency for the threat actors. The packages were uploaded onto NPM. Most packages feature a name resembling an internet speed tester, but they are all cryptocurrency miners. Although they share the same objective, CheckPoint’s analysts found that each package employs different coding and methods to accomplish its tasks. The “speedtestspa” package downloads a helper from GitLab and uses it to connect to the cryptocurrency mining pool, whereas “speedtestkas” includes the malicious helper file in the package. The “speedtestbom” package goes a step further by attempting to hide the cryptocurrency mining pool address, so instead of hardcoding it, it connects to an external IP to retrieve it.
Recommendation
Software developers can minimize the chances of falling victim to those supply chain attacks by carefully reviewing the code in any packages they add to their projects.
6. Devs Targeted By W4SP Stealer Malware In Malicious PyPi packages
Five malicious packages were found on the Python Package Index (PyPI), stealing passwords, Discord authentication cookies, and cryptocurrency wallets from unsuspecting developers. While the packages have since been removed, they have already been downloaded by hundreds of software developers. These five packages and their download stats are:
- 3m-promo-gen-api – 136 downloads
- Ai-Solver-gen – 132 downloads
- hypixel-coins – 116 downloads
- httpxrequesterv2 – 128 downloads
- httpxrequester – 134 downloads
The mechanism of the attack
- The malware first steals data from web browsers, such as Google Chrome, Opera, Brave Browser, Yandex Browser, and Microsoft Edge.
- It then attempts to steal authentication cookies from Discord, Discord PTB, Discord Canary, and the LightCord client.
- Finally, the malware will attempt to steal the Atomic Wallet and Exodus cryptocurrency wallets and cookies for The Nations Glory online game.
- After gathering all data it finds on the compromised machine, the malware uses its ‘upload’ function to upload the stolen data using a Discord webhook, which posts it to the threat actor’s server.
Recommendation
As package repositories, such as PyPi and NPM, are now commonly used to distribute malware, developers must analyze the code in packages before adding them to their projects.
7. Microsoft WinGet Package Manager Failing From Expired SSL Certificate
Microsoft’s WinGet package manager is currently having problems installing or upgrading packages after WinGet CDN’s SSL/TLS certificate expired. Released in May 2020, the open source Windows Package Manager (WinGet) allows users to install applications directly from the command line.
Windows users began reporting issues when attempting to install or upgrade apps via WinGet. WinGet user shared a screenshot on GitHub of their command line throwing an “InternetOpenUrl() failed” error as they tried running simple WinGet commands. The problem appears to be connected to WinGet CDN’s SSL/TLS certificate that has now expired. Both the warning and the certificate details confirm that WinGet CDN’s certificate stopped being valid over the weekend.
Update, Feb 12th
The issue was resolved hours after publishing. Demitrius Nelon, Microsoft’s Senior Product Manager states a root cause analysis will follow on Monday.