Blog

Bored BeaverTail Yacht Club – A Lazarus Lure

BY eSentire Threat Response Unit (TRU)

October 17, 2024 | 5 MINS READ

Attacks/Breaches

Threat Intelligence

Threat Response Unit

TRU Positive/Bulletin

Want to learn more on how to achieve Cyber Resilience?

TALK TO AN EXPERT

Adversaries don’t work 9-5 and neither do we. At eSentire, our 24/7 SOCs are staffed with Elite Threat Hunters and Cyber Analysts who hunt, investigate, contain and respond to threats within minutes.

We have discovered some of the most dangerous threats and nation state attacks in our space – including the Kaseya MSP breach and the more_eggs malware.

Our Security Operations Centers are supported with Threat Intelligence, Tactical Threat Response and Advanced Threat Analytics driven by our Threat Response Unit – the TRU team.

In TRU Positives, eSentire’s Threat Response Unit (TRU) provides a summary of a recent threat investigation. We outline how we responded to the confirmed threat and what recommendations we have going forward.

Here’s the latest from our TRU Team…

What did we find?

In September 2024, the eSentire Threat Response Unit (TRU) responded to an incident where the user downloaded a malicious NFT marketplace project named "nft_marketplace-main" from a GitHub repository. Based on our investigation, it was determined that "nft_marketplace-main" was BeaverTail malware.

Upon installation of the malicious NPM packages through Visual Studio Code, the NPM packages attempted to download a Python executable and associated components from a remote location through a cURL command, attempting to retrieve the initial components of the InvisibleFerret backdoor malware.

The Endpoint agent successfully blocked the execution of the cURL download command, preventing further malicious activity. We did not observe InvisibleFerret deploy, however, we assess the chances as probable that InvisibleFerret components for fingerprinting the infected device were hidden inside the .npl script; as the execution was blocked it was not confirmed.

In response, our team of 24/7 SOC Cyber Analysts responded by isolating the impacted host and alerting the customer with the relevant details.

Upon further investigation by eSentire’s TRU team, it was determined that the observed Tactics, Techniques, and Procedures (TTPs) were consistent with those reported to be used by North Korea threat actors, also tracked as Contagious Interview.

Initial Access

The victimized user visited a GitHub repository and retrieved a Zip archive containing multiple files (Figure 1).

Figure 1: Malicious GitHub Link Containing the BeaverTail Payload
Figure 1: Malicious GitHub Link Containing the BeaverTail Payload

Due to data retention, it is not obvious what prompted the user to visit the project. Based on the detection, as well as other campaign reporting, it was likely from a phishing email or LinkedIn interview follow-up. The user in this incident was a developer, which aligns with previously reported on campaigns by the North Korean threat actors targeting software developers.

The investigation began when the eSentire SOC identified a suspicious command line. The agent blocked the activity outlined in figure 2, which prevented BeaverTail from downloading and executing a subsequent payload. In this case, it was a python executable and associated libraries for InvisibleFerret.

Figure 2: Command Execution Attempt by BeaverTail Malware
Figure 2: Command Execution Attempt by BeaverTail Malware

When pivoting on the activity observed, a technical report by Unit42 was discovered. The report included specific command lines and Command-and-Control (C2) connections observed in attacks conducted by North Korean threat actors. The observed incident involved a GitHub project related to NFT and cryptocurrency, another common trait with North Korean threat actors.

Unit42 released an updated technical report that demonstrated additional overlap between indicators observed in the incident that the eSentire SOC and TRU teams responded to, and incidents that had been reported by Unit42.

In the technical report by Unit42, a specific HTTP GET request shares the exact same pattern as the one observed in the incident that the eSentire SOC and TRU teams responded to. This includes the “p.zi” file and the :1224/pdown string which appears to be a unique identifier related to the North Korean threat actors Contagious Interview campaign.

The NPM package masquerading as BeaverTail was downloaded and then opened in visual studio code; the malicious NPM package was installed via the NPM command-line, resulting in the execution of a JavaScript file 'test.js' being launched from the '.vscode' folder (Figure 3).

Figure 3: Screenshot of the Process Tree Showing ‘test.js’ attempting to execute.
Figure 3: Screenshot of the Process Tree Showing ‘test.js’ attempting to execute.

BeaverTail subsequently launched a cURL command in an attempt to download an additional python executable, and associated library files. The Endpoint agent blocked the execution of the cURL command and script (Figure 4 & 5), thereby preventing further malicious activity (Figure 6).

It should be noted that Figures 4 & 5 were pulled from a public sandbox and were not directly captured in our incident due to data retention but are included to provide additional context to our analysis and assessment.

Figure 4: The encoded .npl script (Python) that downloads the first InvisibleFerret component
Figure 4: The encoded .npl script (Python) that downloads the first InvisibleFerret component
Figure 5: The decoded .npl script (Python) that downloads InvisibleFerret components (inline comment added)
Figure 5: The decoded .npl script (Python) that downloads InvisibleFerret components (inline comment added)
Figure 6: Process Tree Showing the Blocked cURL Command
Figure 6: Process Tree Showing the Blocked cURL Command

eSentire's TRU team assesses the chances as probable that BeaverTail would have download InvisibleFerret components through the .npl script; but as the execution was blocked it was not confirmed.

What did we do?

What can you learn from this TRU Positive?

Recommendations from the Threat Response Unit (TRU):

Indicators of Compromise

You can access the indicators of compromise here.

References

eSentire Unit
eSentire Threat Response Unit (TRU)

The eSentire Threat Response Unit (TRU) is an industry-leading threat research team committed to helping your organization become more resilient. TRU is an elite team of threat hunters and researchers that supports our 24/7 Security Operations Centers (SOCs), builds threat detection models across the eSentire XDR Cloud Platform, and works as an extension of your security team to continuously improve our Managed Detection and Response service. By providing complete visibility across your attack surface and performing global threat sweeps and proactive hypothesis-driven threat hunts augmented by original threat research, we are laser-focused on defending your organization against known and unknown threats.

Read the Latest from eSentire