Short Summary
eSentire’s Threat Response Unit (TRU) investigated a security incident involving the BeaverTail malware, which was downloaded by a user from a malicious GitHub repository. The malware attempted to install the InvisibleFerret backdoor but was blocked by the endpoint security measures in place. The incident highlights the risks associated with downloading software from unverified sources and the importance of robust endpoint security.
Key Points
- eSentire operates 24/7 Security Operations Centers (SOCs) staffed with elite threat hunters and cyber analysts.
- The TRU team provides summaries of threat investigations and responses to confirmed threats.
- In September 2024, a user downloaded a malicious NFT marketplace project, leading to the discovery of BeaverTail malware.
- The malware attempted to download components of the InvisibleFerret backdoor but was blocked by endpoint security.
- The incident was linked to North Korean threat actors targeting software developers.
- eSentire’s SOC identified suspicious command lines and took immediate action to isolate the affected host.
- Recommendations include enhancing endpoint security and educating users about risks associated with unverified software.
MITRE ATT&CK TTPs – created by AI
- Initial Access (T1071.001)
- Users may be tricked into downloading malicious software from unverified sources, such as GitHub.
- Command and Control (T1071)
- Malware may attempt to communicate with a command and control server to download additional payloads.
- Execution (T1203)
- Malicious scripts or executables may be executed on the victim’s machine after being downloaded.
- Defense Evasion (T1562)
- Malware may attempt to evade detection by using encoded scripts or obfuscation techniques.
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).
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.
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).
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.
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: Original Post