Attacker Adds Evasive Technique to Their Ongoing Attacks on NPM


A few weeks ago, we wrote about a new threat actor we called RED-LILI and described their capabilities, including an in-depth walkthrough of the automated system for publishing malicious NPM packages from automatically created user accounts.
After our publication, we have seen this same attacker changing their techniques and adding new exfiltration targets, enhancing evasive abilities in an attempt to slow down researchers, and even trying to communicate with the researchers using package names (such as “fuckyouscanner”).

RED-LILI Tracker

To keep track of RED-LILI as they deliver more malicious packages, our research team has launched RED-LILI Tracker ( - an open source mini-project tracking the attacker's packages over time, while sharing analysis findings. website package details

RED-LILI has continued to publish packages similar to the ones we described in our previous blog. Since then, they published more than 60 malicious packages from over 50 unique accounts. This automated behavior has subsided recently and cleared the way for several changes. In this blog, we describe our new observations regarding this attacker’s TTPs.

Message in a bottle

Shortly after our publication, and probably in light of the community’s joint efforts in taking down RED-LILI’s malicious packages, we started seeing that some of the package’s names diverging from the normal pattern and seem to try and relay messages such as:

  • dontbelikethat
  • notsobrilliant
  • dontgothereever
  • dontblowthisoff
  • heisnotwhatyousee
  • helloboy634
  • nosoawesome232
  • fuckyouscanner

Hidden Malicious Code in Text Files

Most of these “message in a bottle” packages such as the package “dontgothereever” introduced a new tactic. Instead of the normal preinstall script:

  "test":"echo 'error no test specified' && exit 1",
  "preinstall":"node index.js"

They move the malicious code to “lib/” or “”, obfuscated it, and run it from the preinstall script as before:

  "test":"echo 'error no test specified' && exit 1",
  "preinstall":"node lib/"


Stolen Package Description

Another experiment with the package description files in RED-LILI’s recent attacks, which we saw in the “wf_storage” package for example, is the attacker stealing another project’s description ( In an attempt to make the package look more credible.

Stolen project description appears in the malicious package, taken from a random GitHub page

eval() & hexilify() a match made in hell

Another new obfuscation technique we observed, in “turbine_helper” for example, is a combined usage of the nefarious built-in function “eval()” and the “hexilify()” function written by the package’s developer.

We saw two different usages of this combination:

function render(image){



the “hexilify()” function’s main purpose is to decode hexadecimal string into the original code.

function hexilify(pack,data) {
    const bufferText = Buffer.from(data, 'hex');
    const text = bufferText.toString('ascii');
    return text.replace('%%%%%%',pack);

The hex encoded input to this function varies slightly between the different packages using it, but it looks roughly as follows:


the “hexilify()” is also used in other parts of the code to hinder defenders using static analysis by obfuscating strings that may use to identify this attacker’s activity.

function isValid(hostname, path, username) {
    if (hostname == unhexify("4445534b544f502d3445314953304b") && username == unhexify("6461617361646d696e")) {
        return false;
    } else if (hostname == unhexify('626f78')) {
        return false;
    } else if (checkhex(hostname)) {
        return false;
    } else if (checkuuid(hostname)) {
        return false;
    else if (hostname == unhexify('6c696c692d7063')) {
        return false;
    } else if (hostname == unhexify('6177732d3767726172613931336f6964356a736578676b71')) {
        return false;
    else if (hostname == unhexify('696e7374616e6365')) {
        return false;
    } else {
        return true;
    return true;

Usage of the hexilify function

isValid() adjustments

In the field of security scanners’ detection, we saw a minor change in the “isValid()” function, which is meant to detect hostnames and usernames belonging to scanners or other machines the attacker want to avoid from running on.

In the package “bfs-hello-world” for example, we saw a new regex which was made to detect “uuid”s (Universal Unique Identifier) and keep the code from running in these environments. This is possibly because the attacker noticed security scanners with “uuid”s as hostnames and tried to avoid it as well.

function checkuuid(inputString) {
    var re = /^[0-9a-f]+-[0-9a-f]+-[0-9a-f]+-[0-9a-f]+-[0-9a-f]+$/g;
    if (re.test(inputString)) {
        return true
    } else {
        return false;

Using 'child_process'

In the package “bfx-hf-func-data”, we saw for the first time the usage of “child_process” from this attacker. Here, the preinstall script still runs the index.js file upon package installation, but this file itself contains different code with include the following snippets:

var spawn = require('child_process').spawn;
spawn('node', ['bgService.js',], {
    stdio: 'ignore', // piping all stdio to /dev/null
    detached: true

These lines of code spawn a child process that runs the bgService.js file which contains the same hex encoded malicious code we saw before.

The Next Attack Wave is Coming

Since the previous wave we wrote about in our first blogpost about the attacker, RED-LILI have slowed down and paused the burst automation attacks. They dumped their old domain names and registered a new domain (22timer[.]ga). We believe the next wave is yet to come and that RED-LILI is now exploring and publishing cherry-picked packages, each with different evasion technique.

However, the attacker’s thumbprint still remains as they re-use similar characteristics (code similarity, same identifying strings, etc.). In recent packages they are doing it while exfiltrating the data they collect to previously unknown addresses on different services, from what we have seen before such as free webhook services, for example, pipedream and requestbin.

old domains

new domain

Some of the latest packages published have also showed slight changes in regard to the user accounts publishing them. Up until now we were used to randomly generated usernames publishing a single package per account. However, the recent packages RED-LILI have published were from the usernames “john.moralis” and “leftwing_tenore” with the latter publishing 5 different packages.


In the past weeks, Checkmarx supply chain security team is tracking the threat actor RED-LILI which is constantly developing its capabilities. In this blog we reported about RED-LILI’s recent changes in code and TTP’s.

Furthermore, our research team has launched - an open source mini-project tracking the attacker's packages over time, while sharing analysis findings.


  • eome8ew0yti04in.m.pipedream[.]net
  • eo74s7cfv23fror.m.pipedream[.]net
  • 33mail[.]ga
  • 636o3.fuzzdb[.]cf
  • 3faa13bc25347fa55cff.d.requestbin[.]net
  • 425a2.33mail[.]ga
  • 22timer[.]ga


About the Author

About the Author

Never miss an update. Subscribe today!

By submitting my information to Checkmarx, I hereby consent to the terms and conditions found in the Checkmarx Privacy Policy and to
the processing of my personal data as described therein. By clicking submit below, you consent to allow Checkmarx
to store and process the personal information submitted above to provide you the content requested.
Skip to content