Researchers found HijackLoader, first discovered in July this year, ends up used to load different malware families such as Danabot, SystemBC and RedLine Stealer, according to Zscaler’s ThreatLabz telemetry.
HijackLoader utilizes syscalls to evade monitoring from security solutions, detects specific processes based on an embedded blocklist, and delays code execution at different stages, the researchers said.
The following analysis focuses on one of the samples observed by ThreatLabz.
Upon execution in the first stage, HijackLoader starts by executing a modified (hooked) function of the Windows C Runtime (CRT), which points to the entry point of the first stage.
During its initialization phase, the loader determines if the final payload ended up embedded in the binary or if it needs to download it from an external server. To achieve this, HijackLoader includes an encrypted configuration, which stores information such as:
- A DWORD hash value to detect the next stage from the modules table.
- Windows API hashes for dynamic loading.
- An array of DWORDs, which determine if the loader has to download the final payload. The offsets for these fields might differ from sample to sample.
- Parameters for several Windows API functions. For example, the constant PAGE_EXECUTE_READWRITE (0x40) for VirtualProtect.
- A DWORD seed value, used for deriving a string based on the compromised host’s username.
- A DWORD value, used for validating the payload, when loaded from disk, by searching it in the payload’s data.
- A DWORD value, used for detecting all blobs of the encrypted payload.
- An offset for the payload URL (if any) along with an XOR key to decrypt it.
- A blocklist of process name hashes (described later in Table 1).
The above configuration block ends up detected by using hardcoded offsets and then decrypted either with a bitwise XOR or ADD operation. The offsets for the configuration block detection (including the offset of the encryption key) might differ from sample to sample.
The first stage includes a limited set of evasion techniques:
- Dynamic loading of Windows API functions by leveraging a custom API hashing technique.
- Performing an HTTP connectivity test to a legitimate website (e.g. mozilla.org). If a connection cannot be made, then HijackLoader does not proceed with the execution and enters an infinite loop until it makes a connection.
- Delaying of code execution at different stages.
- The first stager checks for the presence of a set of running processes. Depending on which ones are present, it executes different functionality.
HijackLoader locates the payload of the second stage by following the steps below:
- Parses the decrypted configuration block, obtained from the initialization phase. Then, HijackLoader locates the encrypted payload URL and decrypts it using a bitwise XOR operation.
- Downloads the payload and validates it by checking for the presence of the signature (included in the configuration block) in its data. If the validation passes, it writes it to disk.
- Searches for encrypted blobs using the second marker. Each marker represents the start of an encrypted blob along with the size of the blob (stored before each occurrence). Moreover, the XOR key ends up located after the offset of the first encrypted blob.
- Once all encrypted blobs have been extracted, they end up concatenated together and decrypted with the XOR key.
- The decrypted payload ends up decompressed using the LZNT1 algorithm.
HijackLoader is a modular loader with evasion techniques, which provides a variety of loading options for malicious payloads, the researchers said. Moreover, it does not have any advanced features and the quality of the code is poor.
However, considering the increasing popularity of HijackLoader, the researches said they expect code improvements and further usage from more threat actors.
Click here for more information on the malware downloader analysis.

