On December 7 2020 researchers from Malwarebytes uncovered a campaign targeting the South Korean government with a variant of the RokRat RAT.
The experts found a malicious document uploaded to Virus Total related to a meeting request dated 23 Jan 2020, a circumstance that suggests the attack took place a year ago.
The file contains a macro that uses a VBA self decoding technique to decode itself directly into the memory of the victim’s machine.
The ROKRAT RAT was employed in past attacks, attributed to APT37, on Korean users using the popular Korean Microsoft Word alternative Hangul Word Processor (HWP). RokRat is believed to be the handiwork of APT37, also known as ScarCruft, Group123, and Reaper.
“On December 7 2020 we identified a malicious document uploaded to Virus Total which was purporting to be a meeting request likely used to target the government of South Korea.” reads the post published by Malwarebytes. “Based on the injected payload, we believe that this sample is associated with APT37.”
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[.]ly/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.
Similar to other variants, it implements several anti-analysis techniques to avoid being executed in a virtualized environment.
The malware supports classic RAT features, such as stealing files, taking screenshots, capturing credentials, managing files, and directories.
“The primary initial infection vector used by APT37 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 (Hangul Office) as their phish documents and instead used Microsoft Office documents weaponized with a self decode macro.” concludes the report. “That technique is a clever choice that can bypass several static detection mechanisms and hide the main intent of a malicious document.”
If you want to receive the weekly Security Affairs Newsletter for free subscribe here.
(SecurityAffairs – hacking, APT37)
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.