

#Keepassx unsigned app code
The information derived from this structure is necessary for the loader in order to apply necessary code relocations.

It is worth to note that the final stage of the loader has its own header structure, which is described below. The main module uses the same path for data exfiltration.
#Keepassx unsigned app download
Unsigned char C2 // The URL path to download the main module. Unsigned char Key_Salt // Used during the AES decryption of the downloaded main module. Unsigned int Flag // Used during command line parsing since version 0.4.1 The structure of the decrypted configuration is the following: In the final stage, the loader decrypts its configuration using the RC4 algorithm and proceeds with the download process of the main module.
#Keepassx unsigned app windows
In the second phase, the decoded shellcode loads dynamically a set of Windows API functions and decompresses the loader’s code using the LZSS algorithm. Moreover, in more recent samples, they have added the XTEA algorithm as an additional layer of encryption for the decoded payload. NOTE: The magic bytes of the VM bytecodes have been modified by the threat actors as an attempt to hide the usage of the tool that was used. Table 1 - Rhadamanthys Virtualized functionsĪdditionally, we identified a sample, which includes a de-virtualized version of the last code block (parameter 3) and the PDB path:ĭ:\debugInfo\rhadamanthys\debug\sandbox.pdb Gets a set of strings and searches for them in the current’s process memory space. Loads the Windows API functions GetProcAddress and VirtualProtect by using the ROR-13 hashing technique.Ĭalls the loaded VirtualProtect Windows API function to prepare the shellcode for execution.

The identified features of the protected code are summarized in Table 1 below.ĭecodes the next phase using the Base32 algorithm with the custom charset A-Z4-9= Interestingly in one of them, Rhadamanthys uses a virtual machine (Q3VM) in order to obfuscate its code and hide certain code details.Įach virtualized block of the protected code is executed by passing an integer value as a parameter to the interpreter of the virtual machine. In general, we have identified two different types of loaders.

