Casual Analysis of Valak C2

You can play with the C2 using the notebook on my github.

The sample under investigation is 0dcee360983fa2e073e9f07e06b6d695, sto.exe.

When executing the sample on, we observe two initial http requests to atm506[.]com and housefull2006[.]com, of which only one is responsive.

There is no response in the sandbox, so let’s analyze the payload. Looking more carefully at the payload, it appears to be somewhat obfuscated version of base64:


It appears that == was replaced with _2cea, = with _3DF, / with _ and + with -. Applying the transformation and decoding the request, we get the following registration request:


The sig field appears to be the md5 hash of the previous data points concatenated in the URL format. With that, we can write up our own registration request.

If bot_id is unique, the registration request will return another script with a --BODY header. Decoding the script, we get the bot config and some utilities:

Specifically of interest is the GetQuery function, which provides another URL for getting tasks and plugins:

The check-in message looks like this:


Let’s call this API with our bot_id:

It returns a number of plugins and 2 tasks (VT links):

The modules uses a known technique for executing serialized .NET objects.

After observing each module in Wireshark, the following deductions can be made:

The data is sent base64-encoded via POST body. The path contains same obfuscated base64 string that sets the processing configuration for the content.

data = {

The code path is affected only by ltype parameter, and can take the following values:

The list above contains only observed values, and may not be complete. A special note needs to be mentioned around PASSWORD_GRABBER, which unlike other options, takes it input as XML. The C2 is written in PHP using Laravel framework.

And it uses a simple web authentication.