Supper is served

Recommend song to listen to while reading: Listen on Spotify.

If you find something off with what I say, please let me know. I’ll gladly amend my content and credit you for the fix.

Some thanks in alphabetical order for all those who supported this blogpost:

As part of my morning routine, I’ll usually check out what’s new in Malpedia. I’ve found the information posted there to be curated enough that I can usually make something useful out of the latest information that’s been added. Following my read on Supper, a somewhat new malware also known as the “Interlock Rat”, I kind of got nerd sniped by the fact it was known to be operated by a somewhat well-established entity (Vanilla Tempest/Vice Society).

Information was a bit scarce on the actual backdoor, as most reports focused on the TTPs related to Vice Society’s operation rather than the backdoor itself.

After playing a bit with the sample, I quickly realized that some crucial information about it was missing. Some sources were reporting erroneous capabilities and omitting fairly critical information.

A Threat Intelligence firm, in their online blog, has mistakenly labeled Supper as being able to Download a file from the C2 and save it on the disk. This is actually a reverse shell implementation. What they identified as running a temporary DLL is actually a mechanism to erase itself from the filesystem.

Simply put, the report is mistaken.

This specific blog post is written out of frustration from the lack of information about malware in public reports. Oftentimes, companies will leave out important contextual information that could help us better protect ourselves, which leaves us (defenders) either needing to reverse the sample ourselves or hoping they got their shit right so we can follow their lead. This situation makes me want to eat rocks.

In this article, I aim to explain clearly how Supper works by including technical details so that other defenders, like myself, can build better detection rules and why including proofs to back claims is important to avoid making mistakes.

Malware versus me doing reverse engineering in my free time for fun

Summary

The information publicly available on Supper essentially consists of this:

Supper is a 64-bit Windows backdoor and tunnelling utility first observed in the wild in July 2024. This malware operates as both a Remote Access Trojan (RAT) and a SOCKS5 proxy, offering threat actors persistent access to infected systems and the ability to route arbitrary traffic through victim environments.

It does, however, miss the fact that the sample is meant to operate in memory. That doesn’t mean nothing hits the disk. The helper DLL and command-output log are temporary files. The encrypted config, written on demand to C:\Users\<username>\AppData\Local\Temp\e35r4g.log, can remain there for the backdoor to read on a later connection attempt.

When communicating, it starts by sending an HTTPS packet containing a small header and a JSON payload. Once a victim has “announced” itself, it then falls back to a custom protocol. Moreover, all of the commands executed by this malware sample are executed through cmd.exe.

Header information/Context

Upon being loaded in Detect-It-Easy , we can reasonably assess that it is most likely a 64-bit PE file, weighing in at approximately 176 KiB. A closer inspection of the PE headers reveals the following:

  • The binary has the DLL characteristic flag enabled (IMAGE_NT_HEADERS->IMAGE_FILE_HEADER->Characteristics), suggesting it was likely intended to operate as a dynamic library.
  • It lacks any DLLCharacteristics flags (IMAGE_NT_HEADERS->IMAGE_OPTIONAL_HEADER->DllCharacteristics), which may indicate an absence of certain security-related features (e.g., ASLR, DEP).
  • The sample imports four DLLs (Sections->Import), which may imply basic system-level functionality and networking capability:
    • ADVAPI32.dll
    • KERNEL32.dll
    • msvcrt.dll
    • WS2_32.dll

View of the sample’s Imports in Detect-It-Easy

  • It exposes a single export named start, accessible through the library name socks.dll. This detail—along with the export naming—may suggest that the file was originally named or intended to be used as socks.dll.

View of the sample’s Exports in Detect-It-Easy

Decompilation

Before going too deep into the technical details of this specific sample I think it’s worth talking about DLLs in general. I aim at having this blog be interesting for both entry-level analysts and more seasoned ones so if you’re already familiar with how DLLs work, feel free to skip the next section.

DllMain

Upon loading the binary, we’re dropped into the _start function. We quickly notice that something seems off due to how empty it is. If you’re primarily used to analyzing executables (as opposed to DLLs), this layout may initially be a bit confusing.

Pre-analysis view of the sample’s “DLLMain” function

What is most likely happening here is the presence of simple boilerplate code for DLLs. With a bit of digging in MSDN, we can readily find an example of what such a structure typically looks like. DllMain serves as an initialization routine for a given DLL and is invoked via LoadLibrary. Microsoft defines DLLMain as such:

An optional entry point into a dynamic-link library (DLL). When the system starts or terminates a process or thread, it calls the entry-point function for each loaded DLL using the first thread of the process. The system also calls the entry-point function for a DLL when it is loaded or unloaded using the LoadLibrary and FreeLibrary functions.

If the initialization is successful and the fdwReason parameter is set to DLL_PROCESS_ATTACH the function should return TRUE to indicate success, or FALSE otherwise.

// DLLMain example from MSDN
BOOL WINAPI DllMain(
    HINSTANCE hinstDLL,  // handle to DLL module
    DWORD fdwReason,     // reason for calling function
    LPVOID lpvReserved )  // reserved
{
    // Perform actions based on the reason for calling.
    switch( fdwReason )
    {
        case DLL_PROCESS_ATTACH:
         // Initialize once for each new process.
         // Return FALSE to fail DLL load.
            break;

        case DLL_THREAD_ATTACH:
         // Do thread-specific initialization.
            break;

        case DLL_THREAD_DETACH:
         // Do thread-specific cleanup.
            break;

        case DLL_PROCESS_DETACH:

            if (lpvReserved != nullptr)
            {
                break; // do not do cleanup if process termination scenario
            }

         // Perform any necessary cleanup.
            break;
    }
    return TRUE;  // Successful DLL_PROCESS_ATTACH.
}

Based on this, we can reasonably extrapolate that the code we’re observing likely resembles the following:

BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
	switch (fdwReason)
	{
		case DLL_PROCESS_ATTACH:
			return TRUE;
	}

	// Initialize random number generator
	srand((unsigned int)_time64(NULL));
	// Store the HINSTANCE in a global for further use
	g_hInstance = hinstDLL;
	return TRUE;
}

Initial thread execution

When loading the exported start function, we find ourselves navigating through some boilerplate code. To keep things simple, let’s break down what the “entry point” of this sample does.

After initializing the Winsock DLL through WSAStartup, the sample spawns a thread via _beginthread.

Exported start routine where we can see a call to “_beginthread”

Understanding how the function is invoked in this context is particularly useful, as it provides a reference for what behavior is expected. Since it is called via _beginthread, we can reasonably infer the following about sub_100024a0:

  • It most likely uses either the __cdecl or __clrcall calling convention, given that _beginthread is used instead of _beginthreadex.
  • The function is expected to receive a single argument, which should be a void* pointing to an argument list passed by _beginthread through its _ArgList parameter.

Communications

The communication function relies on custom structures and involves the additional complexity of the Windows Sockets API which makes it a bit harder to analyze.

The Supper malware implements a custom, stateful stream cipher operating in two distinct phases. The 12-byte network header embeds the encryption key, allowing the attacker to decrypt the payload using the same algorithm in reverse.

The network addresses, wire format and masking routines are omitted here, along with the steps for operating the shell and removing the backdoor from disk.

C2 capabilities

After preparing itself to communicate, it’s now ready to execute the commands it supports. Supper starts off by preparing it’s global mutexes (thread safety baby!) and attempts to connect to the C2. If it fails to do so, it just returns. If not, we move into the good stuff.

To keep things a bit short, we’ll focus on the more interesting functionalities. Here’s a 10 000 foot overview of the capabilities:

  • Send health-check to C2 and reset connection
  • Continue receiving data
  • Terminate session if completed
  • Spawns revshell
  • Self-delete from being on disk
  • Dump C2 config to file (encrypted)
  • Update the C2 config
  • Cleanup & restart the “main” thread
  • Execute a (single) command through cmd.exe and exfiltrate the output back to the C2 (command execution)

Initial connection

Once the malware knows it’s got a steady foot after establishing network connectivity, it’ll start by sending an initial “ack” to the C2 to establish a confirmation of infection and identify the victim with a timeout.

Before doing so however, it gathers the OS version and maps it to a custom value:

The routine used to gather information on the victim host through multiple Windows APIs

Where each version corresponds to this table:

Custom IDReal OS versionCondition
0x0Default fallbackN/A
0x1Windows XPdwMajorVersion == 5 && dwMinorVersion == 1
0x2Windows Server 2003 / XP x64dwMajorVersion == 5 && dwMinorVersion == 2
0x3Windows 2000dwMajorVersion == 5 && dwMinorVersion == 0
0x4Windows Vista (workstation)dwMajorVersion == 6 && dwMinorVersion == 0 && product type check
0x5Windows 7 (workstation)dwMajorVersion == 6 && dwMinorVersion == 1 && product type check
0x6Windows 8 (workstation)dwMajorVersion == 6 && dwMinorVersion == 2 && product type check
0x7Windows 8.1 (workstation)dwMajorVersion == 6 && dwMinorVersion == 3 && product type check
0x8Windows 8 (server)dwMajorVersion == 6 && dwMinorVersion == 2 && product type not checked
0x9Windows 8.1 (server)dwMajorVersion == 6 && dwMinorVersion == 3 and product type is not workstation
0xAGeneric Windows 6.x fallbackdwMajorVersion == 6 but no minor version match (fallback case)
0xCWindows 10 (build >= 14393)dwMajorVersion == 10 && dwMinorVersion == 0 && dwBuildNumber >= 14393
0xDWindows 10 (build > 17762)dwBuildNumber > 17762
0xEWindows 11 (build > 20347)dwBuildNumber > 20347
0xFWindows 10 fallback (build < 22000)dwMajorVersion == 10 && dwMinorVersion == 0 && dwBuildNumber < 0x55f0

It then proceeds with it’s current integrity level (the decompilation here is a but wonky, not sure why but the you get the idea) with the default value of “UNTRUSTED”:

The routine used to gather information on the current integrity level of the running sample through multiple Windows APIs

Where each integrity level corresponds to this mapping:

Custom IDReal integrity level
UNTRUSTED (0x0)0x0
LOW (0x1)0x1000
MEDIUM (0x2)0x2000
HIGH (0x3)0x3000
SYSTEM (0x4)0x4000

It then fetches two important pieces of information:

  • The network hostname of the victim with a default/fallback value of WORKGROUP
  • The local hostname of the victim with a default/fallback value of SIRIUSWIN11MRE

After this initial transmission, something notable occurs. Supper receives an additional command that triggers one of three behaviors:

  1. Deletes its presence from the filesystem while remaining resident in memory
  2. Continues execution without erasing itself
  3. Exits immediately

The third option, arguably the most interesting, is most likely a kill switch, designed to halt further activity in the event the Threat Actor (TA) decides to terminate the campaign.

Self-deletion

By inspecting the global variables, we begin to notice a familiar pattern, it’s an embedded PE file!

Hexadecimal representation of the embedded PE file

After extracting the raw bytes, saving them into a new file and opening it up in Detect-It-Easy we quickly see that it’s a small DLL called “main.dll” with a single export called run.

Analysis of the embedded PE file in Detect-It-Easy that showcases it’s properties

Its single export, run, is just a thunk for remove.

The embedded DLL’s run export points to remove

At this point, we can reasonably conclude that the sample transitions to living entirely in memory.

Reverse shell

The WriteFile here seems to have confused a few analysts as a few reports mentioned this as a capability to “download and execute a file” while it’s actually not writing anything to a file. It’s simply leveraging WriteFile as a way to “type” into cmd.exe. Once no more bytes need to be written to the child process, the program just goes back into listening mode.

Config dump

The encrypted config is written to C:\Users\<username>\AppData\Local\Temp\e35r4g.log. Interestingly enough, this means that should a victim get a hold on this file they could decrypt the config by using the key at the top of the file.

Command execution

It starts by creating a log path with the format C:\Users\Public\{ulong_value}.log. The log contains the child process’ output; Supper wipes the log file.

General execution

If the initial call to it’s “main” routine fails, Supper will try 3 more times to get itself running. Failures could be a few things including lack of network connectivity or errors when trying to interact with the filesystem.

If after 3 attempts it still fails, it moves into trying to leverage it’s local config at C:\Users\<username>\AppData\Local\Temp\e35r4g.log by decrypting it with the key located at the first 4 bytes of the file.

Once the static config is loaded, it retries to spawn the “main” routine once per IP. If it fails at this once again, it leverages the variable exponentialBackoff that stores a retry count which is used to determine how long it should sleep before trying once more.

IOCs & Rules

Yara

This specific Yara rule was built with flexibility in mind. I tried to focus on functionality rather than simplicity so I’m not looking for strings that can easily be changed such as the ones in the header or the magic number is uses.

rule Supper_Backdoor {
    meta:
        author = "Cedric Brisson"
        date = "2025-06-28"
        version = "1.0"
        description = "Detects Supper backdoor based on PE characteristics and strings"
        reference = "https://c-b.io/2025-06-29+-+Supper+is+served"
        hash = "61f8224108602eb1f74cb525731c9937c2ffd9a7654cb0257624507c0fdb5610"
        tlp = "WHITE"
        severity = "Critical"

    strings:
        // Atomic parts of the original $header_xor_routine
        // Looks for the specific XOR key 0x4D4D4D4D used with an immediate arithmetic opcode
        // xor xmm1, dword 0x4d4d4d4d
        // movq xmm1, qword that points to 0x4d4d4d4d4d4d4d4d
        // pxor xmm0, xmm1
        // movq qword[rcx], xmm0
        $code_xor_key = { 81 ?? ?? 4d 4d 4d 4d }
        $code_pxor_movq = { 66 0f ef ?? [0-8] 66 0f d6 }
        $code_movq_from_mem = { f3 0f 7e 0d }

        // Atomic parts of the original $payload_encryption_routine
        // movzx ecx, byte ptr [eax+ebx]
        // and ecx, 3
        // xor dl, byte ptr [esi+ecx]
        $code_payload_lookup = { 0f b6 14 03 }
        $code_payload_and = { 41 83 e1 03 }
        $code_payload_xor = { 42 32 14 0e }

        $str1 = "chcp 650"
        $str2 = "cmd.exe /c"

    condition:
    (
      // High confidence: find XOR key and part of the encryption routine
        ( $code_xor_key and 1 of ( $code_payload_*) ) and

      // Medium confidence: Find a unique textual string and any code snippet
        (1 of ($str*) and 1 of ($code_*) )
    )
}