APT37 targets South Korea with RokRat Trojan.The file contains a macro that uses a VBA self decoding technique to decode itself directly into the memory of the victim’s machine. Employed on Korean Microsoft alternative Hangul Word Processor
The VBA self-decoding technique is not a novelty, the threat actor is using it since 2016. A malicious macro is encoded within another that is dynamically decoded and executed.
The technique acts as unpacker stub that is executed upon opening the document, it unpacks the macro and inject it into the memory of Microsoft Office to avoid detection. The stub then embeds a variant of the RokRat into Notepad.
Microsoft by default disables the dynamic execution of the macro, but the threat actor could bypass the VB object model (VBOM) by modifying its registry value.
“To check if it can bypass the VBOM, it looks to see if the VBOM can be accessed or not. The “ljojijbjs” function is used for this purpose and checks read access to the VBProject.VBComponent. If it triggers an exception, it means the VBOM needs to be bypassed (IF clause). If there is no exception, it means the VBOM is already bypassed and VBA can extract its macro dynamically (Else clause).” continues the analysis.
The shellcode injected into Notepad.exe process downloads an encrypted payload from http://bit%5B.%5Dly/2Np1enh which is a link to a Google Drive containing RokRat.
RokRat is able to steal data from the infected systems and send it to cloud-based services, including Pcloud, Dropbox, Box, and Yandex. It employes techniques to evade analysis. It RAT features, such as stealing files, taking screenshots, capturing credentials, managing files, and directories.
The primary initial infection is spear phishing, in which the actor sends an email to a target that is weaponized with a malicious document. The case we analyzed is one of the few where they did not use Hwp files as their phish documents and instead used Microsoft Office documents weaponized with a self decode macro which evades the detections