{"id":74683,"date":"2022-03-28T09:06:38","date_gmt":"2022-03-28T13:06:38","guid":{"rendered":"https:\/\/staging.checkmarx.com\/?p=74683"},"modified":"2026-04-10T18:50:59","modified_gmt":"2026-04-10T16:50:59","slug":"a-beautiful-factory-for-malicious-packages","status":"publish","type":"zero-post","link":"https:\/\/checkmarx.com\/blog\/a-beautiful-factory-for-malicious-packages\/","title":{"rendered":"A Beautiful Factory for Malicious Packages"},"content":{"rendered":"<p>Checkmarx <a href=\"https:\/\/checkmarx.com\/solutions\/software-supply-chain-security\/\">Supply Chain Security (SCS)<\/a> team has uncovered hundreds of <a href=\"https:\/\/checkmarx.com\/product\/malicious-packages\/\">malicious packages<\/a> attempting to use a dependency confusion attack. Customarily, attackers use an anonymous disposable NPM account from which they launch their attacks. As it seems this time, the attacker has fully-automated the process of NPM account creation and has open dedicated accounts, one per package, making his new malicious packages batch harder to spot.<\/p>\n\n\n\n<p>At the time of writing, the threat actors <strong>RED-LILI<\/strong> is still active at the time of writing and continues to publish malicious packages. So far, the packages listed in this report were detected by Checkmarx\u2019s internal systems and disclosed to NPM.<\/p>\n\n\n\n<h2 class=\"wp-block-heading article-anchor\" id=\"article-anchor-1\">Intro<\/h2>\n\n\n\n<p>About 3 weeks ago <a href=\"https:\/\/checkmarx.com\/blog\/webhook-party-malicious-packages-caught-exfiltrating-data-via-legit-webhook-services\/\" target=\"_blank\" rel=\"noreferrer noopener\">we reported<\/a> in Checkmarx blogpost of an attacker experimenting in several techniques while attempting dependency confusion attacks. In the past week, research teams from <a href=\"https:\/\/jfrog.com\/blog\/large-scale-npm-attack-targets-azure-developers-with-malicious-packages\/\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">JFrog<\/a> and <a href=\"https:\/\/blog.sonatype.com\/this-week-in-malware-400-npm-packages-target-azure-uber-airbnb-developers\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">Sonatype<\/a> have also published blog posts informing the community about hundreds of malicious packages. The 3 reports are all related to the same threat actor.<\/p>\n\n\n\n<p>The same attack actor appears in all reports, tracked as <strong>RED-LILI<\/strong> by Checkmarx SCS research team, has recently automated the process of creating NPM users along with package publication.<\/p>\n\n\n\n<p>Checkmarx SCS research team was tracking <strong>RED-LILI<\/strong>\u2019s activity since it was first discovered internally on 2022-02-23 by its automated <a href=\"https:\/\/checkmarx.com\/learn\/software-supply-chain-management\/what-is-a-software-supply-chain-security-attack\/\">software supply chain attack<\/a> detection systems. During this time, and until today, the team studied this attack actor\u2019s capabilities and techniques, while continuously disclosing the findings to NPM security team.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img decoding=\"async\" src=\"https:\/\/checkmarx.com\/wp-content\/uploads\/2022\/03\/Group-10-1024x570-1.png\" alt=\"\" class=\"wp-image-94481\"><\/figure>\n<\/div>\n\n\n<p class=\"has-text-align-center has-small-font-size\"><strong><em>Multiple disclosure emails sent to NPM security team, informing them about RED-LILI\u2019s activity<\/em><\/strong><\/p>\n\n\n\n<p>Throughout the attacker\u2019s experiments iterations, the packages\u2019 functionality itself remained mostly unchanged. Specifics about the code, its likely origin, and other interesting details can be found in our <a href=\"https:\/\/checkmarx.com\/blog\/webhook-party-malicious-packages-caught-exfiltrating-data-via-legit-webhook-services\/\" target=\"_blank\" rel=\"noreferrer noopener\">previous blog<\/a>.<\/p>\n\n\n\n<p>Today, we want to shed some additional light on this new and intriguing technique. We looked at the attacks, put the pieces and clues together, and tried to assemble a likely outline of the attacker\u2019s automation. In addition, we can report that this threat actor has published ~800 packages via a fully automated system, responsible for creating NPM user accounts, and publishing packages while passing OTP (One Time Passwords) verification requests.<\/p>\n\n\n\n<h2 class=\"wp-block-heading article-anchor\" id=\"article-anchor-2\">Motivation<\/h2>\n\n\n\n<p>As mentioned above, threat actor RED-LILI is experimenting and testing new techniques that might help them to avoid detection and reach bigger distribution.<\/p>\n\n\n\n<p>We cannot, of course, be sure of this attacker&#8217;s intentions, but a possible motivation for this new experiment is to prolong the time the published packages are \u201calive\u201d on the NPM registry before they are detected and taken down.<\/p>\n\n\n\n<p>Customarily, an attacker would open an anonymous NPM account and publish all or most of their packages under this user account. One of the downsides of this is the fact that once one of the malicious packages is detected it is likely that all of the other packages under this user account will be detected as part of an investigation and will be taken down as well. This new technique (user account per package) goes into some effort to avoid a situation where the package is taken down for as long as possible.<\/p>\n\n\n\n<h2 class=\"wp-block-heading article-anchor\" id=\"article-anchor-3\">Picking The Attacker\u2019s Breadcrumbs<\/h2>\n\n\n\n<p>The initial curiosity toward this cluster of malicious packages was in light of the scale and frequency of the attacks. The attacker published ~800 packages, most of them having a unique user account per package, in bursts over the span of roughly a week. While the packages names were methodically picked, the names of the users publishing them were randomly generated strings such as \u201c5t7crz72\u201d and \u201cd4ugwerp\u201d. This is uncommon for the automated attacks we see. Usually, attackers create a single user and burst their attacks over it. From this behavior, we can conclude that the attacker built an automation process from end to end, including registering users and passing the OTP challenges.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">The Server Behind the Scenes<\/h3>\n\n\n\n<p>The first breadcrumb in the first wave of the attack is the domain \u201crt11[.]ml\u201d. It is pointing to the primary server of the attacker and this domain appears in the email address of the dummy users created in order to publish the packages. In addition, this domain is used as the target server address to which the data is being sent to.<\/p>\n\n\n\n<p>Later down the road, a new domain was registered \u201c33mail[.]ga\u201d and took the place of the former domain \u201crt11[.]ml\u201d. It is likely that both domains were acquired free of charge by <a href=\"https:\/\/www.freenom.com\/\" target=\"_blank\" rel=\"noreferrer noopener\">Freenom<\/a> service.<\/p>\n\n\n\n<p>Looking closer at this server reveals that it appears to be hosted in a U.S. hosting company <a href=\"https:\/\/multacom.com\" target=\"_blank\" rel=\"noreferrer noopener\">Multacom<\/a> which is based in California. We disclosed these findings to their NOC team as we believe this is one of their clients\u2019 activities and that Multacom has no relationship to this other than leasing the server to the attacker.<\/p>\n\n\n\n<p>Looking more deeply, this server has interesting ports open:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img decoding=\"async\" src=\"https:\/\/checkmarx.com\/wp-content\/uploads\/2022\/03\/Group-12-2-1024x396-1.png\" alt=\"\" class=\"wp-image-94482\"><\/figure>\n<\/div>\n\n\n<p class=\"has-text-align-center has-small-font-size\"><strong><em>An nmap scan result of the attacker\u2019s server<\/em><\/strong><\/p>\n\n\n\n<p>Since the server is listening to http\/https, we checked what is being returned when browsing into this webserver. The result you are seeing is the root page of the server version of Interactsh tool, hinting to us this is a self-hosted version of the popular open-source tool:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img decoding=\"async\" src=\"https:\/\/checkmarx.com\/wp-content\/uploads\/2022\/03\/Group-16-1024x670-1.png\" alt=\"\" class=\"wp-image-94483\"><\/figure>\n<\/div>\n\n\n<h3 class=\"wp-block-heading\">Interactsh<\/h3>\n\n\n\n<p>Interactsh is an open-source tool for out-of-band \u201cData Extraction\u201d, and is a tool originally designed to detect bugs that cause external interactions. The usage is quite simple, running Interactsh gives the operator a unique URL, which whenever interacted with it, audits the full details to the operator for later inspection. Interactsh supports multiple network protocols, including HTTP, SMTP, DNS, and more.<\/p>\n\n\n\n<p>Interactsh can be used as-is. Zero configuration is needed for inexperienced users via the web application app.interactsh.com. And for the more advanced users, Interactsh is built to run self-hosted on a dedicated server which its operator has the option to customize advanced settings including supporting a custom domain<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Package Name Picking<\/h3>\n\n\n\n<p>At first, the attacker\u2019s name picking puzzled our research team. But after giving it another look, they were able to identify a pattern. The attack actor specifically targeted the <a href=\"https:\/\/www.npmjs.com\/search?q=%40azure\" target=\"_blank\" rel=\"noreferrer noopener\">@azure NPM scope<\/a> under and as it appears, the attacker extracted the package names and altered their names, erasing the scope part (\u2018@azure\/\u2019 in this instance) or replacing it with a similar string (such as \u201cazure-\u201c) and doing their best effort in publishing non-taken packages under scopeless, similar package names.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img decoding=\"async\" src=\"https:\/\/checkmarx.com\/wp-content\/uploads\/2022\/03\/Group-17-969x1024-1.png\" alt=\"\" class=\"wp-image-94484\"><\/figure>\n<\/div>\n\n\n<h2 class=\"wp-block-heading article-anchor\" id=\"article-anchor-4\">The Complete Picture<\/h2>\n\n\n\n<p>Now that we have a deeper understanding of the technology stack and tools used in this attack, we rolled up our sleeves and start reproducing it by ourselves. This exercise was done solely for the purpose of learning the attacker\u2019s challenges in implementing their system.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" src=\"https:\/\/checkmarx.com\/wp-content\/uploads\/2022\/03\/Picture1-1-1.png\" alt=\"\" class=\"wp-image-94485\"><\/figure>\n<\/div>\n\n\n<h3 class=\"wp-block-heading\">Server<\/h3>\n\n\n\n<p>The initial building block is setting up a Virtual Private Server (VPS). This server will run on an AWS EC2 machine. So, we launched one and wrote down its assigned IP and domain address to use in the next DNS configuration.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Custom Domain<\/h3>\n\n\n\n<p>The next ingredient is our own domain. We purchased the \u201c<strong>malpkg.site<\/strong>\u201d domain which we used as the primary domain pointed at our dedicated server.<\/p>\n\n\n\n<p>Setting up the domain\u2019s DNS records was quite straight forward as documents in <a href=\"https:\/\/github.com\/projectdiscovery\/interactsh#interactsh-server\" target=\"_blank\" rel=\"noreferrer noopener\">Interactsh official documentation<\/a>. In addition to the regular <strong>A record,<\/strong> we also configured the <strong>NS record<\/strong> to support the DNS tunneling functionality for data exfiltration.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Interactsh Server<\/h3>\n\n\n\n<p>As mentioned above, <a href=\"https:\/\/github.com\/projectdiscovery\/interactsh\" target=\"_blank\" rel=\"noreferrer noopener\">Interactsh<\/a> is an open-source project written in Go. It has a client application and a server application. The former can be installed from its source code using \u201cgo install\u201d command or by downloading a matching precompiled version from the <a href=\"https:\/\/github.com\/projectdiscovery\/interactsh\/releases\" target=\"_blank\" rel=\"noreferrer noopener\">project\u2019s releases page.<\/a><\/p>\n\n\n\n<p>The configuration of Interactsh server is straight forward. Since our server is hosted on AWS, and is assigned with a private IP address, we had to configure it with the public IP \u201c-ip\u201d. The domain flag \u201c-domain\u201d was also needed to instruct the server what name needed to issue an SSL certificate for. In addition, we wanted to add a token-based authentication between the client and the server, so we defined a token string as we ran the server. While experimenting the connectivity with the client, we saw the default client id was quite long, so changing the \u201c-cidl\u201d and \u201c-cidn\u201d flags made it possible to shorten the client id. Note that this needs to match in both server and client, otherwise the data will not be synchronized properly.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo .\/interactsh-server -domain &lt;domain&gt; -ip &lt;ip address&gt; -e 1 -t &lt;authentication token&gt; -debug -cidl 9 -cidn 4<\/code><\/pre>\n\n\n\n<p>Once we got all the configurations in order, we had our own interactsh server linked to our new domain.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img decoding=\"async\" src=\"https:\/\/checkmarx.com\/wp-content\/uploads\/2022\/03\/Group-18-1024x508-1.png\" alt=\"\" class=\"wp-image-94486\"><\/figure>\n<\/div>\n\n\n<h3 class=\"wp-block-heading\">Interactsh Client<\/h3>\n\n\n\n<p>The next building block was to configure the Interactsh client with proper communication to the server to conclude the infrastructure phase. But before we go on to that, there is one more interesting detail that lies in this server-client connection.<\/p>\n\n\n\n<p>If not specified when running Interactsh server, it will allow connections from clients with no validation. This means that if our attacker ran their server in that manner, we would be able to connect to it and possibly gain access to interesting information. This hope had quickly faded since the attacker seems to use the \u201c-a\u201d or \u201c-t\u201d flags in the server run command, which means that access to it will be granted only to the client providing the correct authentication token.<\/p>\n\n\n\n<p>Setting up the client and its connection to the server is <a href=\"https:\/\/github.com\/projectdiscovery\/interactsh#usage\" target=\"_blank\" rel=\"noreferrer noopener\">fairly simple.<\/a> The following command is what we\u2019ve used to connect to our server:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>interactsh-client -s &lt;domain&gt; -v -t &lt;authentication token&gt; -cidl 9 -cidn 4<\/code><\/pre>\n\n\n\n<p>And that is it! Our infrastructure is up and running. Next building block: Automation script.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">The Main Tool<\/h3>\n\n\n\n<p>The real magic is harnessing Interactsh as a building block with automation. I have written an internal tool in Python for research purposes, simulating the steps done the attack group. Partial code snippets from this tool are referenced below.<\/p>\n\n\n\n<p>Getting started with the development, the following major building blocks came to mind:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Creating NPM accounts<\/li>\n\n\n\n<li>Email OTP Challenges<\/li>\n\n\n\n<li>Publishing NPM packages<\/li>\n\n\n\n<li>Finding candidate package names under the targeted scope<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Finding candidate package names under the targeted scope<\/h3>\n\n\n\n<p>As seen performed by the attacker, I\u2019ve added a functionality to list per given scope name, all packages under it, while manipulating and permutating the package\u2019s name to the best-effort. The function iterates over a search API call to https:\/\/registry.npmjs.com\/-\/v1\/search :<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" src=\"https:\/\/checkmarx.com\/wp-content\/uploads\/2022\/03\/Group-20-1.png\" alt=\"\" class=\"wp-image-94487\"><\/figure>\n<\/div>\n\n\n<h3 class=\"wp-block-heading\">Creating NPM Accounts<\/h3>\n\n\n\n<p>The building block has no intentions to be exposed as API. Think about it \u2013 why would NPM encourage the creation of users automatically?<\/p>\n\n\n\n<p>Here, I had to use some of my browser-based automation hacks, equipped with tools like <a href=\"https:\/\/www.selenium.dev\/\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">Selenium<\/a> and some custom Python code. I was on my way to wrap the signup form, interact with input fields and some buttons, all to simulate user actions in the flow of NPM\u2019s user creation.<\/p>\n\n\n\n<p>Here is the information required in the form to create an NPM user account:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Unique Username \u2013 used Interactsh\u2019s client id<\/li>\n\n\n\n<li>Email Address &#8211; &lt;client id&gt;@&lt;client id&gt;.&lt;my domain&gt;<\/li>\n\n\n\n<li>Strong password \u2013 12 characters random generated<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">One Time Password (OTP) Challenges<\/h3>\n\n\n\n<p>To deal with bots and verify the validity of the email address, NPM added a challenge to the user with an OTP sent to the email address as the last step of the registration process.<\/p>\n\n\n\n<p>The challenge to extract the OTP from the email sent by NPM to the user\u2019s email \u201c&lt;client id&gt;@&lt;client id&gt;.&lt;my domain&gt;\u201d was quite interesting.<\/p>\n\n\n\n<p>Wrapping Interactsh-client executable was quite fun. I chose to tap into the stdout stream as the executable has the option to write JSON structures line-by-line, which can be easily parsed<\/p>\n\n\n\n<p>To help with this task, I\u2019ve created a class called InteractshClient, responsible to wrap the functionality of the executable in a neat way.<\/p>\n\n\n\n<p>Once a session is started, the server generates a client id and from it the username and email address are constructed under our domain \u201cmalpkg.site\u201d. Next is initiate the sign-up process by calling _create_npm_user() function.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" src=\"https:\/\/checkmarx.com\/wp-content\/uploads\/2022\/03\/Group-21-1.png\" alt=\"\" class=\"wp-image-94488\"><\/figure>\n<\/div>\n\n\n<p>During this function, a hidden browser is launched using Selenium and the matching ChromeDriver.&nbsp; After interacting with the form fields, NPM servers sends the OTP email via SMTP protocol to the user\u2019s email address, resulting in the user\u2019s email address being sent to my Interactsh server (e.g.&nbsp; c90ehc8ngyaer@c90ehc8ngyaer.malpkg.site). This data can be queried using the wrapped InteractshClient mentioned above like so:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" src=\"https:\/\/checkmarx.com\/wp-content\/uploads\/2022\/03\/Group-212-1.png\" alt=\"\" class=\"wp-image-94489\"><\/figure>\n<\/div>\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" src=\"https:\/\/checkmarx.com\/wp-content\/uploads\/2022\/03\/Group-23-1.png\" alt=\"\" class=\"wp-image-94490\"><\/figure>\n<\/div>\n\n\n<h3 class=\"wp-block-heading\">Publishing NPM Packages<\/h3>\n\n\n\n<p>Now that we have our brand-new user account on NPM, we can continue to create and publish our malicious package, all automatically of course. Adhering to what the attacker seems to do.<\/p>\n\n\n\n<p>First step is to sign-in with the NPM account, using the \u201cnpm login\u201d command, which creates a global token in the .npmrc file. This token is used when the following command \u201cnpm publish\u201d is being executed.<\/p>\n\n\n\n<p>The flow is quite simple, and interacted with the command stdout-stdin streams. The main concept is to answer 4 questions asked:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Username<\/li>\n\n\n\n<li>Password<\/li>\n\n\n\n<li>Email address<\/li>\n\n\n\n<li>OTP challenge<\/li>\n<\/ul>\n\n\n\n<p>As you may guess, all building blocks already setup and can be re-used. Since the same OTP email is sent, we can use the same function that parses the OTP from interactsh-server incoming email. The function looks like so:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" src=\"https:\/\/checkmarx.com\/wp-content\/uploads\/2022\/03\/Group-19-1.png\" alt=\"\" class=\"wp-image-94491\"><\/figure>\n<\/div>\n\n\n<p>Last step is to create a temporary directory, and drop 2 files there:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>package.json &#8211; simple declaration of the package and instruction to run the main.js file upon installation<\/li>\n\n\n\n<li>index.js &#8211; will contain the JavaScript payload provided by the operator, will execute automatically upon package installation<\/li>\n<\/ul>\n\n\n\n<p>This is accomplished using the following code:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" src=\"https:\/\/checkmarx.com\/wp-content\/uploads\/2022\/03\/Group-2221-1.png\" alt=\"\" class=\"wp-image-94492\"><\/figure>\n<\/div>\n\n\n<p>That\u2019s it! Now we have an automated process of publishing NPM packages, end-to-end, fully automated from NPM accounts generated on the fly.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Access Tokens to Bypass 2FA<\/h3>\n\n\n\n<p>It is worth mentioning that once the NPM user account was created, it is possible to configure it in a way that does not require an email OTP challenge in order to publish a package. This could be done by generating an Access Token in the settings page having the 2FA requirement disabled.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img decoding=\"async\" src=\"https:\/\/checkmarx.com\/wp-content\/uploads\/2022\/03\/Group-2281-969x1024-1.png\" alt=\"\" class=\"wp-image-94493\"><\/figure>\n<\/div>\n\n\n<p class=\"has-text-align-center has-small-font-size\"><em><strong>NPM&#8217;s settings page \u2013 have an option to bypass OTP challenge choice of authentication levels<\/strong><\/em><\/p>\n\n\n\n<p>We presume that this is the way attackers who publish bursts of malicious packages were able to automate their process without setting up the described mechanism.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Timeline<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>November 2021 &#8211; Around 500 malicious packages were published from 4 different NPM user accounts, now identified as related to RED-LILI.<\/li>\n\n\n\n<li>Feb 23 \u2013 package \u201ccspell-version-pin\u201d was uploaded and unpublished a day later (probably by the author).\n<ul class=\"wp-block-list\">\n<li>Uploaded from the username &#8220;the_ghost-1&#8221; with the email address <a href=\"mailto:the_ghost-1@wearehackerone.com\" target=\"_blank\" rel=\"noreferrer noopener\">the_ghost-1@wearehackerone.com<\/a>\n<\/li>\n\n\n\n<li>Exfiltrating information to domain first seen \u201crt11.ml\u201d<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Feb 23 \u2013 A certificate was issued by Let\u2019s Encrypt to \u201drt11.ml\u201d domain<\/li>\n\n\n\n<li>March 1 \u2013 NPM package \u201cglints-sdk\u201d was published\n<ul class=\"wp-block-list\">\n<li>Contains obfuscated malicious code<\/li>\n\n\n\n<li>published under the username \u2018babylon7\u2019<\/li>\n\n\n\n<li>Exfiltrating information to domain \u201crt11.ml\u201d<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>March 6 &#8211; 5 NPM packages and one PyPi package published. A detailed account regarding those packages can be found in <a href=\"https:\/\/checkmarx.com\/blog\/webhook-party-malicious-packages-caught-exfiltrating-data-via-legit-webhook-services\/\" target=\"_blank\" rel=\"noreferrer noopener\">our blog<\/a>. This phase of experiments included code obfuscation and obviously an attempt to act on PyPi as well.<\/li>\n\n\n\n<li>March 10, 11, and 14 &#8211; The attacker used several usernames with the prefix \u201cthe_ghost-\u201c to publish a bulk of packages. In addition to that they used the username \u2018chandannaidu400\u2019 to publish dozens of empty packages.<\/li>\n\n\n\n<li>March 15 \u2013 NPM packages \u201ckusto-language-service\u201d and \u201clorawan-devices\u201d published from two sperate usernames \u201ckusto-lang\u201d and \u201clorawandevices\u201d respectively.<\/li>\n\n\n\n<li>March 20 \u2013 A burst of ~600 NPM packages were published, fully-automated as described above<\/li>\n\n\n\n<li>March 27 \u2013 A certificate was issued by Let\u2019s Encrypt to \u201c33mail.ga\u201d domain and the Interactsh-server app was re-configured from the domain rt11.ml to 33mail.ga<\/li>\n\n\n\n<li>March 27 \u2013 ~90 new versions \u201c99.10.13\u201d to existing NPM packages, The main change was updating the new data exfiltration endpoint (425a2[.]33mail[.]ga)<\/li>\n\n\n\n<li>Across the timeline \u2013 continuous disclosure to NPM, PyPi, Multacom<\/li>\n<\/ul>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img decoding=\"async\" src=\"https:\/\/checkmarx.com\/wp-content\/uploads\/2022\/03\/Group-25-1024x715-1.png\" alt=\"\" class=\"wp-image-94494\"><\/figure>\n<\/div>\n\n\n<p class=\"has-text-align-center has-small-font-size\"><strong><em>Inspection of the SSL certificates used by the attacker<\/em><\/strong><\/p>\n\n\n\n<h2 class=\"wp-block-heading article-anchor\" id=\"article-anchor-5\">RED-LILI\u2019s Profile<\/h2>\n\n\n\n<p>Examining the packages\u2019 code deeply, reveals that there are some obvious unique identifiers to the attacker\u2019s lab that helps distinguish RED-LILI\u2019s packages from others. As it seems, these are the results of checks that are done to avoid running the malicious payload on the attacker\u2019s lab machines, Among these indicators, we found:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>DESKTOP-4E1IS0K (windows computer name, security scanner)<\/li>\n\n\n\n<li>lili-pc (hostname)<\/li>\n\n\n\n<li>aws-7grara913oid5jsexgkq (aws hostname)<\/li>\n\n\n\n<li>D:TRANSFER (path, windows format)<\/li>\n\n\n\n<li>\/root\/node_modules\/ (path, linux format)<\/li>\n\n\n\n<li>\/home\/node (linux username \u201cnode\u201d)<\/li>\n\n\n\n<li>daasadmin (username)<\/li>\n\n\n\n<li>box (hostname, security scanner)<\/li>\n\n\n\n<li>instance (hostname, security scanner)<\/li>\n<\/ul>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" src=\"https:\/\/checkmarx.com\/wp-content\/uploads\/2022\/03\/Group-224-1.png\" alt=\"\" class=\"wp-image-94495\"><\/figure>\n<\/div>\n\n\n<p class=\"has-text-align-center has-small-font-size\"><strong><em>Screenshot of the malicious payload, with the \u201cdo not run\u201d identifiers<\/em><\/strong><\/p>\n\n\n\n<h2 class=\"wp-block-heading article-anchor\" id=\"article-anchor-6\">IOC\u2019s<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"mailto:the_ghost-1@wearehackerone.com\">the_ghost-1@wearehackerone.com<\/a><\/li>\n\n\n\n<li>rt11.ml<\/li>\n\n\n\n<li>rt11.33mail.com<\/li>\n\n\n\n<li>33mail.ga<\/li>\n\n\n\n<li>216.127.184.168<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading article-anchor\" id=\"article-anchor-7\">Conclusion<\/h2>\n\n\n\n<p>In total, Checkmarx SCS team has detected ~1500 malicious packages published by RED-LILI. The packages were all disclosed to the NPM and PyPi security teams as well as to the service provider hosting the attacker infrastructure Multacom.<\/p>\n\n\n\n<p>Until this incident, we\u2019ve witnessed that most attack actors publishing malicious payloads at scale doing things semi-automatically. This one is doing it on FULL-AUTO.<\/p>\n\n\n\n<p>As supply chain attackers improve their skills and make life harder for their defenders, this attack marks another milestone in their progress. By distributing the packages across multiple usernames, the attacker makes it harder for defenders to correlate take them all down with &#8220;one stroke.&#8221; By that, of course, making the chances of infection higher. &nbsp;<\/p>\n\n\n\n<p>IMHO package managers need to set up more security measures such as integrating Captcha to the user creation forms to deal with bots implementing such automation systems.<\/p>\n\n\n\n<h2 class=\"wp-block-heading article-anchor\" id=\"article-anchor-8\">Full list of Packages<\/h2>\n\n\n\n<p>Sharing a <a href=\"https:\/\/gist.github.com\/Aviadg\/3e640afe6dcbc651958c270ff9e57c8d\" target=\"_blank\" rel=\"noreferrer noopener\">full list of the related packages<\/a>, with ~1500 packages.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img decoding=\"async\" src=\"https:\/\/checkmarx.com\/wp-content\/uploads\/2022\/03\/Group-226-1024x582-1.png\" alt=\"\" class=\"wp-image-94496\"><\/figure>\n<\/div>","protected":false},"excerpt":{"rendered":"<p>Checkmarx Supply Chain Security (SCS) team has uncovered hundreds of malicious packages attempting to use a dependency confusion attack. Customarily, attackers use an anonymous disposable NPM account from which they launch their attacks. As it seems this time, the attacker has fully-automated the process of NPM account creation and has open dedicated accounts, one per [&hellip;]<\/p>\n","protected":false},"author":49,"featured_media":74688,"template":"","zero-category":[1067,1104],"zero-tag":[1069,1105,1072,1068,1075,1073,1071],"class_list":["post-74683","zero-post","type-zero-post","status-publish","has-post-thumbnail","hentry","zero-category-blog","zero-category-technical-blog","zero-tag-appsec","zero-tag-article","zero-tag-awareness","zero-tag-checkmarx-security-research-team","zero-tag-developer","zero-tag-english","zero-tag-supply-chain-security"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.1.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>A Beautiful Factory for Malicious Packages - Checkmarx.com<\/title>\n<meta name=\"description\" content=\"Checkmarx SCS research team has been tracking the malicious activity of RED-LILI, which marks a significant milestone in the development of software supply-chain attacks.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/checkmarx.com\/blog\/a-beautiful-factory-for-malicious-packages\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"A Beautiful Factory for Malicious Packages\" \/>\n<meta property=\"og:description\" content=\"In the past month, Checkmarx SCS research team has been tracking the malicious activity of RED-LILI, which marks a significant milestone in the development of software supply-chain attacks. After gathering enough clues, the team has reconstructed this threat actor\u2019s steps in building an end-to-end system for creating NPM users and publishing packages.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/checkmarx.com\/blog\/a-beautiful-factory-for-malicious-packages\/\" \/>\n<meta property=\"og:site_name\" content=\"Checkmarx\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/Checkmarx.Source.Code.Analysis\" \/>\n<meta property=\"article:modified_time\" content=\"2026-04-10T16:50:59+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/checkmarx.com\/wp-content\/uploads\/2022\/03\/thumbnail-1.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1024\" \/>\n\t<meta property=\"og:image:height\" content=\"512\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:title\" content=\"A Beautiful Factory for Malicious Packages\" \/>\n<meta name=\"twitter:description\" content=\"In the past month, Checkmarx SCS research team has been tracking the malicious activity of RED-LILI, which marks a significant milestone in the development of software supply-chain attacks. After gathering enough clues, the team has reconstructed this threat actor\u2019s steps in building an end-to-end system for creating NPM users and publishing packages.\" \/>\n<meta name=\"twitter:image\" content=\"https:\/\/checkmarx.com\/wp-content\/uploads\/2022\/03\/thumbnail-1.png\" \/>\n<meta name=\"twitter:site\" content=\"@checkmarx\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"16 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/checkmarx.com\/blog\/a-beautiful-factory-for-malicious-packages\/\",\"url\":\"https:\/\/checkmarx.com\/blog\/a-beautiful-factory-for-malicious-packages\/\",\"name\":\"A Beautiful Factory for Malicious Packages - Checkmarx.com\",\"isPartOf\":{\"@id\":\"https:\/\/checkmarx.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/checkmarx.com\/blog\/a-beautiful-factory-for-malicious-packages\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/checkmarx.com\/blog\/a-beautiful-factory-for-malicious-packages\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/checkmarx.com\/wp-content\/uploads\/2022\/03\/thumbnail-1.png\",\"datePublished\":\"2022-03-28T13:06:38+00:00\",\"dateModified\":\"2026-04-10T16:50:59+00:00\",\"description\":\"Checkmarx SCS research team has been tracking the malicious activity of RED-LILI, which marks a significant milestone in the development of software supply-chain attacks.\",\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/checkmarx.com\/blog\/a-beautiful-factory-for-malicious-packages\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/checkmarx.com\/blog\/a-beautiful-factory-for-malicious-packages\/#primaryimage\",\"url\":\"https:\/\/checkmarx.com\/wp-content\/uploads\/2022\/03\/thumbnail-1.png\",\"contentUrl\":\"https:\/\/checkmarx.com\/wp-content\/uploads\/2022\/03\/thumbnail-1.png\",\"width\":1024,\"height\":512},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/checkmarx.com\/#website\",\"url\":\"https:\/\/checkmarx.com\/\",\"name\":\"Checkmarx\",\"description\":\"The world runs on code. We secure it.\",\"publisher\":{\"@id\":\"https:\/\/checkmarx.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/checkmarx.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/checkmarx.com\/#organization\",\"name\":\"Checkmarx\",\"url\":\"https:\/\/checkmarx.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/checkmarx.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/checkmarx.com\/wp-content\/uploads\/2024\/02\/logo-dark.svg\",\"contentUrl\":\"https:\/\/checkmarx.com\/wp-content\/uploads\/2024\/02\/logo-dark.svg\",\"width\":1,\"height\":1,\"caption\":\"Checkmarx\"},\"image\":{\"@id\":\"https:\/\/checkmarx.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/Checkmarx.Source.Code.Analysis\",\"https:\/\/x.com\/checkmarx\",\"https:\/\/www.youtube.com\/user\/CheckmarxResearchLab\",\"https:\/\/www.linkedin.com\/company\/checkmarx\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"A Beautiful Factory for Malicious Packages - Checkmarx.com","description":"Checkmarx SCS research team has been tracking the malicious activity of RED-LILI, which marks a significant milestone in the development of software supply-chain attacks.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/checkmarx.com\/blog\/a-beautiful-factory-for-malicious-packages\/","og_locale":"en_US","og_type":"article","og_title":"A Beautiful Factory for Malicious Packages","og_description":"In the past month, Checkmarx SCS research team has been tracking the malicious activity of RED-LILI, which marks a significant milestone in the development of software supply-chain attacks. After gathering enough clues, the team has reconstructed this threat actor\u2019s steps in building an end-to-end system for creating NPM users and publishing packages.","og_url":"https:\/\/checkmarx.com\/blog\/a-beautiful-factory-for-malicious-packages\/","og_site_name":"Checkmarx","article_publisher":"https:\/\/www.facebook.com\/Checkmarx.Source.Code.Analysis","article_modified_time":"2026-04-10T16:50:59+00:00","og_image":[{"width":1024,"height":512,"url":"https:\/\/checkmarx.com\/wp-content\/uploads\/2022\/03\/thumbnail-1.png","type":"image\/png"}],"twitter_card":"summary_large_image","twitter_title":"A Beautiful Factory for Malicious Packages","twitter_description":"In the past month, Checkmarx SCS research team has been tracking the malicious activity of RED-LILI, which marks a significant milestone in the development of software supply-chain attacks. After gathering enough clues, the team has reconstructed this threat actor\u2019s steps in building an end-to-end system for creating NPM users and publishing packages.","twitter_image":"https:\/\/checkmarx.com\/wp-content\/uploads\/2022\/03\/thumbnail-1.png","twitter_site":"@checkmarx","twitter_misc":{"Est. reading time":"16 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/checkmarx.com\/blog\/a-beautiful-factory-for-malicious-packages\/","url":"https:\/\/checkmarx.com\/blog\/a-beautiful-factory-for-malicious-packages\/","name":"A Beautiful Factory for Malicious Packages - Checkmarx.com","isPartOf":{"@id":"https:\/\/checkmarx.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/checkmarx.com\/blog\/a-beautiful-factory-for-malicious-packages\/#primaryimage"},"image":{"@id":"https:\/\/checkmarx.com\/blog\/a-beautiful-factory-for-malicious-packages\/#primaryimage"},"thumbnailUrl":"https:\/\/checkmarx.com\/wp-content\/uploads\/2022\/03\/thumbnail-1.png","datePublished":"2022-03-28T13:06:38+00:00","dateModified":"2026-04-10T16:50:59+00:00","description":"Checkmarx SCS research team has been tracking the malicious activity of RED-LILI, which marks a significant milestone in the development of software supply-chain attacks.","inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/checkmarx.com\/blog\/a-beautiful-factory-for-malicious-packages\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/checkmarx.com\/blog\/a-beautiful-factory-for-malicious-packages\/#primaryimage","url":"https:\/\/checkmarx.com\/wp-content\/uploads\/2022\/03\/thumbnail-1.png","contentUrl":"https:\/\/checkmarx.com\/wp-content\/uploads\/2022\/03\/thumbnail-1.png","width":1024,"height":512},{"@type":"WebSite","@id":"https:\/\/checkmarx.com\/#website","url":"https:\/\/checkmarx.com\/","name":"Checkmarx","description":"The world runs on code. We secure it.","publisher":{"@id":"https:\/\/checkmarx.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/checkmarx.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/checkmarx.com\/#organization","name":"Checkmarx","url":"https:\/\/checkmarx.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/checkmarx.com\/#\/schema\/logo\/image\/","url":"https:\/\/checkmarx.com\/wp-content\/uploads\/2024\/02\/logo-dark.svg","contentUrl":"https:\/\/checkmarx.com\/wp-content\/uploads\/2024\/02\/logo-dark.svg","width":1,"height":1,"caption":"Checkmarx"},"image":{"@id":"https:\/\/checkmarx.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/Checkmarx.Source.Code.Analysis","https:\/\/x.com\/checkmarx","https:\/\/www.youtube.com\/user\/CheckmarxResearchLab","https:\/\/www.linkedin.com\/company\/checkmarx"]}]}},"_links":{"self":[{"href":"https:\/\/checkmarx.com\/wp-json\/wp\/v2\/zero-post\/74683","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/checkmarx.com\/wp-json\/wp\/v2\/zero-post"}],"about":[{"href":"https:\/\/checkmarx.com\/wp-json\/wp\/v2\/types\/zero-post"}],"author":[{"embeddable":true,"href":"https:\/\/checkmarx.com\/wp-json\/wp\/v2\/users\/49"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/checkmarx.com\/wp-json\/wp\/v2\/media\/74688"}],"wp:attachment":[{"href":"https:\/\/checkmarx.com\/wp-json\/wp\/v2\/media?parent=74683"}],"wp:term":[{"taxonomy":"zero-category","embeddable":true,"href":"https:\/\/checkmarx.com\/wp-json\/wp\/v2\/zero-category?post=74683"},{"taxonomy":"zero-tag","embeddable":true,"href":"https:\/\/checkmarx.com\/wp-json\/wp\/v2\/zero-tag?post=74683"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}