Blog

Go Injector Leading to Stealers

BY eSentire Threat Response Unit (TRU)

September 19, 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 August 2024, eSentire's Threat Response Unit (TRU) observed Go Injector leading to the attempted execution of Lumma Stealer.

Lumma Stealer (aka LummaC2 Stealer) is an information stealing malware developed in the C programming language. It has been operating as Malware-as-a-Service (MaaS) in Russian-speaking forums since August 2022. Lumma Stealer targets cryptocurrency wallets, 2FA browser extensions, and other sensitive data on victims' devices.

The infection chain began with the user navigating to a malicious website that displayed a fake captcha page. The page copies a Base64 encoded PowerShell command (Figure 1) to the users’ clipboard and provides instructions to execute it using the Windows Run keyboard shortcut as part of a “Verification Step” (Figure 2).

Figure 1: Base64 encoded PowerShell command provided to user
Figure 1: Base64 encoded PowerShell command provided to user
Figure 2: Fake captcha page
Figure 2: Fake captcha page

The file retrieved, as seen in the decoded PowerShell command from Figure 2, is named smart1. The smart1 file is a PE, Dialer.exe (Figure 3), which is used to masquerade as a legitimate application. By executing Dialer.exe with MSHTA all the non-HTML/script data is ignored, only executing the embedded script content within. The embedded script content can be observed when opening the smart1 file in a text editor.

When investigating the domain which served the smart1 file, we were able to identify an additional four files numbering from smart1 to smart5 which are likely used to deliver varying payloads.

Figure 3: smart1 showing as PE
Figure 3: smart1 showing as PE

Through decoding the HTA payload found within, VBScript code can be identified (Figure 4)

Figure 4: VBScript code found within HTA payload
Figure 4: VBScript code found within HTA payload

When decoding the VBScript code, an encoded PowerShell command is present. By beautifying the PowerShell command, code responsible for retrieving the archive file ‘smart1.zip’ to the Temp directory, extracting the contents and executing them, can be identified (Figure 5).

Figure 5: PowerShell to download and extract content from smart1.zip
Figure 5: PowerShell to download and extract content from smart1.zip

The contents of the ‘smart1.zip’ archive are mainly legitimate DLL files; however, the executable file present is Go Injector (0klevgrand.exe), a malware injection program written in the Go programming language (Figure 6).

Figure 6: smart1.zip contents
Figure 6: smart1.zip contents

Go Injector

Upon examining the 0klevgrand.exe executable, we can find references to the Go build ID and Inno Setup (Figure 7). The Inno Setup portion is a part of its manifest file which may have been placed to masquerade as an Inno setup utility.

Figure 7: 0klevgrand.exe displaying the Go Build ID and Inno Setup
Figure 7: 0klevgrand.exe displaying the Go Build ID and Inno Setup

When 0klevgrand.exe is executed, a few key steps are performed, including basic initial host data collection where the malware identifies the hostname, username, and temporary and public directories. Go Injector will then copy the encrypted PE data of size 0x4E000 to the allocated region of memory from its .rdata section (Figure 8). It then calls VirtualAlloc again to allocate another region of memory where the same encrypted PE data is copied over.

Figure 8: Go Injector allocating memory to copy encrypted PE data
Figure 8: Go Injector allocating memory to copy encrypted PE data

The Go Injector uses a 3-step injection process comprising of CreateProcess to create a BitLockerToGo.exe process in suspended mode, WriteProcessMemory to write the contents of the Lumma Stealer module in memory of the BitLockerToGo.exe process and ResumeThread to resume the execution of the BitLockerToGo.exe process which now has overwritten Lumma Stealer content (Figure 9).

Figure 9: Go Injector 3-step injection process
Figure 9: Go Injector 3-step injection process

The decrypted PE data of the Lumma Stealer module is shown below (MD5: E372BBE59DC7DA4FDAB393DA71404848) (Figure 10).

Figure 10: Decrypted PE data (Lumma Stealer PE)

After copying over the PE data, Go Injector then allocates 0x4E000 bytes of memory to decrypt the final PE data of the payload using AES GCM decryption (Figure 11).

Figure 11: Decryption method used by Go Injector to decrypt the Lumma Stealer payload
Figure 11: Decryption method used by Go Injector to decrypt the Lumma Stealer payload

Lumma Stealer

On viewing the decrypted PE data using a disassembler, we see base64 like strings which are typical of Lumma Stealer (Figure 12).

Figure 12: Lumma Stealers base64 lookalike strings
Figure 12: Lumma Stealers base64 lookalike strings

Using our previous Lumma Decryptor with the new base64 like strings, we get the domains for the new samples.

Figure 13: Lumma Stealers decrypted C2 domains
Figure 13: Lumma Stealers decrypted C2 domains

The delivery method and the first stage injector indicate a possible Pay-Per-Install (PPI) service. During the investigation, the Threat Intelligence team was able to identify an almost identical execution of Go Injector on a public Joesandbox analysis report. In that incident the final payload appears to be another known malware dubbed StealC instead of Lumma Stealer (Figures 14 – 15).

Figure 14: eSentire observed Go Injector leading to Lumma Stealer
Figure 14: eSentire observed Go Injector leading to Lumma Stealer
Figure 15: Public Joesandbox sample with Go Injector leading to StealC source:https://www.joesandbox.com/analysis/1491044/0/html
Figure 15: Public Joesandbox sample with Go Injector leading to StealC source: https://www.joesandbox.com/analysis/1491044/0/html

What did we do?

Our 24/7 SOC Cyber Analysts investigated the suspicious activities, notified the client, and isolated the affected device.

What can you learn from this TRU Positive?

Recommendations from our Threat Response Unit (TRU):

Indicators of Compromise

You can access the indicators of compromise here.

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