Fresh Variant of Snake Keylogger Malware

The Excel sample, delivered as an attachment in a phishing email, contains malicious Macro VBA code
Once the yellow button ‘Enable Content’ is clicked by victim, the malicious VBA code is executed in the background. The malicious macro project that contains the malicious VBA code is password protected so it cannot be viewed by the analyzer.
However, it is possible to modify its binary file to remove this restriction.

The file “Wheahmnfpgaqse.exe” is a downloader of Snake Keylogger, which is a .Net program. When it starts, it sleeps 21 seconds to bypass those sandboxes with a strategy of killing a sample process when a timeout of no-action is triggered.
Twenty one seconds later, the downloader then invokes a function called ‘Consturctor()’.
It then invokes another function ‘Program.List_Types()’, where it downloads Snake Keylogger module from the link ‘hxxps[:]//store2[.]gofile[.]io/download/0283e6ba-afc6-4dcb-b2f4-3173d666e2c4/Huzeigtmvaplpinhoo.dll’, which is a RC4 encrypted DLL file. Next, it calls ‘ToRc()’ function to RC4 decrypt it using a decryption key “Dllzjn”.

It then proceeds to load the decrypted Dll module (a .Net Dll file, called ‘Huzeigtmvaplpinhoo.dll’), and enumerates its export functions to find “G6doICqoMU()”, which is invoked by executing ‘type.InvokeMember(“G6doICqoMU”, BindingFlags.InvokeMethod, null, null, null)’ in function Consturctor().
The decrypted .Net Dll is a dropper and installer of Snake Keylogger.

The decrypted Dll module (‘Huzeigtmvaplpinhoo.dll’) deploys Snake Keylogger onto a victim’s device and sets it as an auto-run program. It extracts an executable PE file into memory from the Resource directory and then performs process hollowing that injects the executable PE file into a newly created child process and executes it.

The full name of the export function ‘G6doICqoMU()’ is ‘Huzeigtmvaplpinhoo!pXfqpio3clcAoFxTnfJ.CORFgLoyRGlurYwdwIh.G6doICqoMU()’.
Again, for the same reason as before, it sleeps 35 seconds at the beginning of this function to bypass some malware analysis systems.

Next, it works to make this Snake Keylogger persistent on the infected Windows.
A Windows system has a ‘Startup’ folder inside the ‘Start Menu’.
The programs inside this folder are started when Windows starts. The full path to this folder is defined in the system registry with a string value of ‘HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionExplorerShell FoldersStartup’ and ‘HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionExplorerUser Shell FoldersStartup’.
The value data of ‘Startup’ is C:Users{UserName}AppDataRoamingMicrosoftWindowsStart MenuProgramsStartup’ by default.

This variant of Snake Keylogger changes both the values of ‘Startup’ to other folders.
The process of extracting the payload file of Snake Keylogger is a little complicated.
It uses a tricky way to load the resource.
It has a local callback function defined by ResolveEventHandler that is registered to AppDomain.ResourceResolve, which is then called when it fails to load a resource by name.
It looks like an exception handler to Windows SEH strategy to handle exceptions.
In addition, it has another local callback function registered to AppDomain.AssemblyResolve, which is called when it fails to load an assembly (like a module) by name.
A while later, another PE file, decrypted from resource ‘{d977ee8c-85ce-4731-b9a1-323ba88c6eeb}‎’, appears in memory.
The program then creates a suspended child process and deploys the compressed Snake Keylogger payload into the child process.
It then resumes the child process to run. Meanwhile, the parent process exits by calling the function Environment.Exit(0).
It calles API CreateProcess() to create the child process with Creation Flag 134217732U (0x8000004), which means CREATE_NO_WINDOW and CREATE_SUSPENDED.

It then calls the API WriteProcessMemory() to copy the Snake Keylogger payload into the child process, section by section.
It next calls SetThreadContext() to make the child process point to the entry point function of Snake Keylogger.
The code of the Snake Keylogger payload file is fully obfuscated, to protect it from being analyzed.
The class and function names are unreadable.

It calls API SetWindowsHookExA() to register a hook callback function( this.callback_ProcessKey()) to monitor low-level keyboard input events.
The first parameter is the hook type, where ’13’ indicates WH_KEYBOARD_LL.

After that, the callback function is called by the Windows system when the victim types, so it is able to handle and record the keystrokes into a global string variable. It also records the foreground Window title to identify where the victim types by calling the APIs GetForegroundWindow() and GetWindowText ().

It also has a Timer (Timer0) that keeps sending the keylogger data to the attacker.

It is able to take screenshots of the victim’s device.
It has a Timer (Timer1), which captures the victim’s screenshots from time to time by calling API CopyFromScreen().
It saves the screenshot into a local Screenshot.png file in the system’s ‘MyDocuments’ folder.
It also sends this picture file to the attacker.

It has two Timers.
One (Time2) is used to collect system clipboard data by calling Clipboard.GetText() and save to a global variable.
The other (Time3) is used to send collected clipboard data to the attacker.

FEvery time it counts down it checks to see whether current clipboard data has been collected in the global variable main_cls.string_clipboard_data.
If not, it appends the current clipboard data to the global variable.

Based on my analysis, this variant’s main work is to steal credentials from the victim’s device.function.
Per the code of this variant of Snake Keylogger, it sends an email to the attacker (using SMTP protocol) to submit the stolen credentials data of the victim.

Snake Keylogger collects basic information regarding the victim’s Windows system, like User name, PC name, System Date and Time, Public IP address, and Country, which are put in the header of the collected credentials.

Sign Up For Threat Alerts

Loading...
Threats Icon

Dec 08, 2022

Trigona (._locked) ransomware virus

Trigona is ransomware that encrypts files and appends the "._locked" extension to filenames. Also, it...

Threats Icon

Dec 08, 2022

Threat Actors Target Exposed Remote Desktop Protocol...

Threat actors were discovered targeting open Remote Desktop Protocol (RDP) ports with variants from a...

Threats Icon

Dec 07, 2022

Redigo Backdoor Malware Targets Redis Servers

The Redigo backdoor is written in the Go programming language and targets Redis servers vulnerable...

Threats Icon

Dec 06, 2022

DuckLogs MaaS (Malware-as-a-Service) Provides Sophisticated Features

DuckLogs is MaaS (Malware-as-a-Service) advertised on cybercrime forums with a range of features including remote...

Threats Icon

Dec 05, 2022

WannaRen Returns As Life Ransomware

WannaRen ransomware appeared on the threat landscape in 2020 and reemerged in 2022 as Life...

Threats Icon

Dec 04, 2022

Alert (AA22-335A) Cuba Ransomware

The Federal Bureau of Investigation (FBI) and the Cybersecurity and Infrastructure Security Agency (CISA) are...

Threats Icon

Dec 01, 2022

UNC4191 Threat Group Targets Entities In The...

The UNC4191 threat group was discovered targeting entities in the Philippines with custom malware and...

Threats Icon

Nov 30, 2022

Emotet Leads To Quantum Ransomware Infection

Threat actors were observed using Emotet to gain access to the victim's network and deploy...

Threats Icon

Nov 29, 2022

RansomExx Upgrades to Rust

IBM Security X-Force Threat Researchers have discovered a new variant of the RansomExx ransomware that...

Threats Icon

Nov 29, 2022

Ransomware Roundup: Cryptonite Ransomware

FortiGuard Labs has reported on Cryptonite ransomware, which was found to target Microsoft Windows machines...

Threats Icon

Nov 28, 2022

Operation Typhoon: The Cyber Sea Lotus Coveting...

Cyber espionage actors, now designated by FireEye as APT32 (OceanLotus Group), are carrying out intrusions...

Threats Icon

Nov 27, 2022

IL-Cert Alert – Active phishing campaign in...

There is a new phishing campaign in Israel. The malware relies upon user execution. The...

Threats Icon

Nov 27, 2022

Emotets Vacation Is Over: No Rest For...

Emotet started as a banking Trojan in spreading via spam campaigns by imitating financial statements,...

Threats Icon

Nov 24, 2022

Aurora: A Rising Stealer Flying Under The...

Aurora is a multipurpose botnet with data collection, information stealer, downloading, and remote access Trojan...

Threats Icon

Nov 23, 2022

Analysis Of The ViperSoftX And VenomSoftX Information...

Torrents and software-sharing sites are being used to target victims across the globe with variants...