Bored BeaverTail Yacht Club – A Lazarus Lure

Summary: eSentire’s Threat Response Unit (TRU) investigated a security incident involving the BeaverTail malware, which was downloaded from a malicious GitHub repository. The team’s swift actions prevented the installation of additional malware components, highlighting the importance of robust endpoint security and user education.

Threat Actor: North Korean threat actors | North Korean threat actors
Victim: Developer | developer

Key Point :

  • eSentire’s SOC identified a suspicious command line and blocked the execution of a cURL command that attempted to download additional malware.
  • The incident involved a user downloading a malicious NFT marketplace project that was later identified as BeaverTail malware.
  • Recommendations include enhancing endpoint security and educating users about the risks of engaging with suspicious GitHub repositories.

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.

In the attack eSentire responded to, the user installed BeaverTail masquerading as an NPM package. BeaverTail was downloaded through Visual Studio Code, which resulted 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?

  • Our team of 24/7 SOC Cyber Analysts isolated the affected host to contain the infection.
  • We alerted the customer of the incident and supported them through the remediation process.

What can you learn from this TRU Positive?

  • The case showcases the importance of endpoint security solutions, such as Endpoint Detection and Response (EDR), and the implementation of security training programs to educate users about such sophisticated threats.
  • Using company-issued computers for personal activities outside of work, such as job interviews, can put corporate networks at risk.
  • Developers should exercise caution when engaging with GitHub profiles that have a sparse portfolio – typically a single repository with minimal activity. This behavior can be a red flag, as threat actors often misuse free platforms like GitHub to host malicious code or distribute malware.

Recommendations from the Threat Response Unit (TRU):

Indicators of Compromise

You can access the indicators of compromise here.

References

Source: https://www.esentire.com/blog/bored-beavertail-yacht-club-a-lazarus-lure