Researchers from FireEye have found the first use in the wild of a new kind of injection technique that was first described in October. The technique is used by the RIG exploit kit to inject code that downloads and executes a Monero miner on the target machine.
The RIG EK attack that FireEye describes starts with loading of the EK's landing page -- the URL of which is hidden inside an invisible iframe -- from a compromised site. The EK then uses the Nullsoft Scriptable Install System (NSIS) to inject shellcode into explorer.exe. This shellcode will execute the next payload, which downloads and executes the Monero miner.
The NSIS, which is also sometimes called SmokeLoader, is the stage where the injection technique -- also known as PROPagate -- is used.
The attack has other steps that need to be executed before the PROPagate routines are invoked. It will check the OS major version from the Process Environment Block (PEB). If the OS version value is found to be less than 6, which means prior to Windows Vista, the executable will terminate itself.
It also checks if the BeingDebugged flag is set. If so, it again terminates itself.
Finally, it will run an Anti-VM check by opening the registry key HKLM\SYSTEM\ControlSet001\Services\Disk\Enum with a value of zero. It further checks for the strings vmware, virtual, qemu, or xen which are indicative of virtual machines. The malware also performs an anti-analysis check, making sure no analysis tool is running in the system.
After all this checking of environment happens, the injection occurs. The malware uses the SetPropA function to modify the callback for UxSubclassInfo and cause the remote process to execute the malicious code.
PROPagate is an evasion technique which takes advantage of generic properties of legitimate Windows GUI management APIs and functions. Because of the ubiquity of these functions, an attack that uses them is hard to defend against.
For an attacker, this is a way of executing code inside a remote process without using obvious (to defenders) and traceable methods like remote threads or asynchronous procedure calls. It evades these standard detection areas with this technique.
Boost your understanding of new cybersecurity approaches at Light Reading's Automating Seamless Security event on October 17 in Chicago! Service providers and enterprises receive FREE passes. All others can save 20% off passes using the code LR20 today!
SetWindowSubclass API, a function of the Windows operating system that manages GUI application windows inside parent process is one of the APIs that can be abused.
The initial research has a proof of concept code that allowed injection, according to the researcher, on "Windows Explorer, Total Commander, Process Hacker, Ollydbg, and a few more applications."
Researchers also believe the attack worked on both Windows XP and Windows 10.The code that is finally injected by the RIG EK into explorer.exe will download the Monero miner and then install it in the system.
Attackers always try and find new ways to throw trackers off their trail. PROPagate is just such a way to revitalize an older EK so that it may have an increased infection rate.
— Larry Loeb has written for many of the last century's major "dead tree" computer magazines, having been, among other things, a consulting editor for BYTE magazine and senior editor for the launch of WebWeek.