0xresetti

making blog posts and memes about malware

View on GitHub

WhiteSnake Stealer Analysis

I’m drunk and this is my analysis on WhiteSnake Stealer. My friend Global wouldn’t stop bothering me to analyse it with him so here it is.

Shoutout to my cat Vince for giving me the emotional support while reversing this shit

First off we got a fuckin .NET binary !!!

image

How fun and enjoyable, no Ghidra required.

After initally opening the binary, everything is obfuscated and shit, so i used de4dot to unobfuscate it and decode the strings:

image

image

After “cleaning”, the file is now decoded and we can view the strings:

image

A lot of the function names or whatever the fuck the shit in the left side of DnSpy is called is encoded/obfuscated with random names, so anything that i mention will come from this list:

image

btw, you will see a lot of dissing to ESET in this malware, lol

image

The malware seems to create a schtask for something, i would assume its for persistence.

image

Also, the malware seems to make a bunch of random requests to random websites like google.kz, blog.cyble.com, and cyware.com

image

image

image

I haven’t made a direct connection yet, but i believe the parameters used on the end of these requests are encoded variables or code used by the malware

For example, here is some encoded strings that Process.Start calls:

image

Then here is one of the webClient.DownloadString functions:

image

See how the 1Mxm1dRnMr is similar to the Process.Start strings? I cant find a connection, but i assume this is some sort of evasion method which is unique to me, i havent seen it before

The malware also downloads TOR for some reason? I messaged the WhiteSnake developer himself and i asked if it uses TOR, and he confirmed it does! What a nice threat actor. I assume TOR is used for uploading the data:

image

image

image

mA2Z seems to be where most of the functionality calls for the stealer are located, for example:

Here is the malware compress function, it compresses data into a ZIP file, and again we see it using the webClient.DownloadString “obfuscation” that we saw earlier:

image

image

We also have a WEBCAM call function, i assume to record the webcam or screenshot it:

image

Then of course, we have a KEYLOGGER function.

image

We also have a LIST_PROCESSES function.

image

Overall, from what ive seen, mA2Z is where a lot of the malicious functionality lies.

The malware also uses SQL Queries! What for? I have no fucking idea, this shit is Windows malware, and as much as WhiteSnakes dev apparently has a Linux stub, i dont see Win32_ComputerSystem working on Linux lol:

image

Moving on, the quq function is sending some data regarding the infected machine to the CNC server:

image

I assume this is the inital infection data, that the threat actor could possible use to filter their infections out via Country, OS, Report Size, etc, based on the strings seen above.

Below, we see the CNC choice for this malware, which is Telegram, as you can see the malware is using Telegrams API to communicate the stolen data, and we also get some information on the chat_id

image

image

If we look into the wRFiM.g_zc function seen below:

image

We can see the Telegram channel ID and the HTTP API token:

image

For anyone who wants to fuck around (since the CNC we found this binary on is still up and running + we believe this campaign is still ongoing), here is the API token & channel ID:

Channel ID: 5668321496

Token API: 5805920195:AAHrkiYfOXg55Cncdj5wUj0Ov4rUYjQg7iU

Moving onto the ra function, we also have have some XML related functions which relate to the XML written stealer variables/targets which i will talk about later:

image

Continuing on, I eventually found a function called rkbzL, which im pretty sure was being used as the keylogger function to capture keys inputted into the victim computer:

image

As you can see from above, the function is noting any notable keys like ESC, Space and LWin and i would assume sending them to the Telegram CNC

Furthermore, the wCbjr function is more than likely noting down and stealing the storage drives that are connected to the computer:

image

It also seems to be creating some sort of persistence module within %SystemDrive%\\Users\\{0}\\AppData\\Roaming\\Microsoft\\Windows\\Start Menu\\Programs\\Startup

image

Finally, probably the only interesting thing about the malware, the configuration. While looking at the wRFiM function, we have a bunch of random IP addresses:

image

Browsing to these IPs results in either a transfer.sh link or a timeout:

image

Interestingly, these transfer.sh links had their upload links, so when browsing to them, a lot of them had 404s, like below:

image

Some of them timed out:

image

And rarely, i would get some error messages, which could be being used by the malware as a way of error reporting, but im not 100% sure:

image

Apart from that, we also have the variable names of the Channel ID and Token API key which i mentioned earlier:

image

And we also have a big XML “encoded”/”written” string of all the data that the stealer should steal and send to the Telegram CNC:

image

This includes:

The stealer sends all of this data to the Telegram channel

Channel ID: 5668321496

Token API: 5805920195:AAHrkiYfOXg55Cncdj5wUj0Ov4rUYjQg7iU

Overall, a fun 3 hour reversing session, thanks to Global for the laughs and enjoyment while reversing this shit.