https://securelist.com/a-new-secret-stash-for-fileless-malware/106393/

Hello, Dave? Meet The First Fileless Malware

--

Our basic concept of malware is that it is contained in a file, and which is then executed. This file might be in the form of raw code or an executable file. But, Kaspersky Lab has detected a new type of malware, and it is one that doesn’t have a file. With the GriftHorse, the malware injects encrypted shellcode into the Windows event logs. It then waits for the logs to be processed, and which injects the code into the system.

The shellcode finds the address of the Trojan, and which is contained within the event log. It then does a standard ROR13 hash of the function named “Load”, and loads the name inside the Trojan:

Figure: Shell code [here]

With ROR13 we take each 8-bit character and then convert it to a Unicode value (with 16 bits). We then rotate the bits right by thirteen places:

dword >> 13 | dword << (32 - 13)) & 0xFFFFFFFF

The result is an accumulation of these values (and where we simply sum the values). For “Load” we get value is 0xE124D840. We can test with this Python program [here]:

# Some code extracted from https://github.com/iagox86/nbtool/blob/master/samples/shellcode-win32/hash.py

--

--

Prof Bill Buchanan OBE FRSE
ASecuritySite: When Bob Met Alice

Professor of Cryptography. Serial innovator. Believer in fairness, justice & freedom. Based in Edinburgh. Old World Breaker. New World Creator. Building trust.