Post a Reply
1377 views

Rehashed RAT Used in APT Campaign Against Vietnamese Organizations

  1. 6 months ago

    Recently, FortiGuard Labs came across several malicious documents that exploit the vulnerability CVE-2012-0158. To evade suspicion from the victim, these RTF files drop decoy documents containing politically themed texts about a variety of Vietnamese government-related information. It was believed in a recent report that the hacking campaign where these documents were used was led by the Chinese hacking group 1937CN. The link to the group was found through malicious domains used as command and control servers by the attacker. In this blog, we will delve into the malware used in this campaign and will try to provide more clues as to the instigator of this campaign.

    rehashed-rat-used-in-apt-campaign-against-vietnamese-organizations-1602.png

    rehashed-rat-used-in-apt-campaign-against-vietnamese-organizations-1603.png

    Sample decoy documents

    When the documents are opened, they drop several files in one of the following folders:

    • %AppData%\Microsoft\Credentials
    • %AppData%\Microsoft\SystemCertificates
    • %AppData%\Microsoft\Windows\Templates

    Some samples drop the following files:

    • Taskeng.exe – signed legitimate GoogleUpdate.exe version 1.3.33.5
    • Psisrndrx.ebd – encrypted blob containing malware file
    • Goopdate.dll – decrypter and loader of malware file

    Some drop the following files:

    • SC&Cfg.exe – signed legitimate McAfee AV application
    • Vsodscpl.dll – contains the malware file

    Others drop the following files:

    • Systemm.exe - signed legitimate GoogleUpdate.exe version 1.3.30.3
    • Systemsfb.ebd - encrypted blob containing malware file
    • Goopdate.dll – decrypter and loader of malware file

    Similar to other APT attacks, such as MONSOON APT, this APT uses DLL hijacking to evade the behavior monitoring technologies of security programs.

    DLL Hijacking

    DLL hijacking is a technique used by some APT malware in which instead of the legitimate application (.exe) loading the benign DLL, the application is tricked into loading a DLL containing malicious code. This technique is employed to evade Host Intrusion Prevention System (HIPS) of security programs that monitor the behaviors of executed files. Most HIPS tools whitelist signed or trusted files, thereby excluding malware loaded using DLL hijacking by signed files from behavior monitoring.

    In the context of this attack, taskeng.exe and SC&Cfg.exe are signed legitimate applications; however, they are tricked into loading malware that are disguised as the legitimate Goopdate.dll and Vsodscpl.dll files.

    rehashed-rat-used-in-apt-campaign-against-vietnamese-organizations-1604.png

    rehashed-rat-used-in-apt-campaign-against-vietnamese-organizations-1605.png

    Taskeng.exe and SC&Cfg.exe file information

    Next, Taskeng.exe needs to load and import some functions from the original Goopdate.dll file; however, the Goopdate.dll was hijacked to contain malicious code, effectively changing the original code execution to execution of the malicious code.

    rehashed-rat-used-in-apt-campaign-against-vietnamese-organizations-1607.png

    SC&Cfg.exe import table containing import from vsodscpl.dll

    Once the malicious DLLs are loaded, the DLLs decrypt (from psisrndrx.ebd (1st case) or from its body (2nd case)) and load a Trojan downloader. The Trojan downloader is a DLL file. It is not dropped on disk but is only executed in memory. Also, the actual Trojan downloader in memory when dumped will not run. This is because the ‘MZ’ in the IMAGE_DOS_HEADER, the DOS stub, and the ‘PE’ signature were deliberately removed. This was done to prevent the dumped file from being analyzed properly in a debugger and decompiler. However, we can easily fix the dump by adding the ‘MZ’, a DOS stub, and the ‘PE’ signature.

    rehashed-rat-used-in-apt-campaign-against-vietnamese-organizations-1607.png

    Missing header items as anti-analysis

    This Trojan downloader downloads a RAT (Remote Access Trojan), which we will call “NewCore” RAT, from the following domains:

    • web.thoitietvietnam.org
    • dalat.dulichovietnam.net
    • halong.dulichculao.com

    Trojan Downloader

    The Trojan downloader first creates an autostart registry entry so it runs whenever the machine is rebooted:
    HKLM/HKCU\Software\Microsoft\Windows\CurrentVersion\Run
    Microsoft Windows Media = “%AppData%\Microsoft\Credentials\.exe”
    As an anti-VM, it checks whether the environment has the registry key:
    HKCR\Applications\VMwareHostOpen.exe
    Before it can download the NewCore RAT, it needs to send the following information to the C&C server:

    • OS version
    • Processor speed
    • Number of processors
    • Physical memory size
    • Computer name
    • User name
    • User privilege
    • Computer IP address
    • Volume serial number

    The above information is converted to its hex string representation, and then sent to the C&C server via HTTP GET:

    rehashed-rat-used-in-apt-campaign-against-vietnamese-organizations-1607.png

    Shutdown and restart machine commands

    rehashed-rat-used-in-apt-campaign-against-vietnamese-organizations-1616.png

    File manager, monitor screen, command shell commands

    rehashed-rat-used-in-apt-campaign-against-vietnamese-organizations-1617.png

    File manager subcommands

    Based on the strings found in its body, this malware may have been derived from the PcClient and PcCortr backdoors whose source codes are publicly available, especially on Chinese language coding forums. PcClient detections usually include PcCortr.

    rehashed-rat-used-in-apt-campaign-against-vietnamese-organizations-1618.png

    Strings related to PcCortr modules

    rehashed-rat-used-in-apt-campaign-against-vietnamese-organizations-1619.png

    [i]PcClient and PcCortr source codes can be downloaded from Chinese coding forums[/i

    PcClient was used in the past by some APT groups such as Nitro , which were also linked to a China-based hacker.

    According to the PDB file string embedded in the NewCore RAT body, the creator of the project is someone using the handle “hoogle168”.

    rehashed-rat-used-in-apt-campaign-against-vietnamese-organizations-1620.png

    We have little clue as to who this individual is, so we tried to look for information about this handle. Our investigation led us to several Chinese language forum pages. Looking at these forums, it seems like a user using the handle “hoogle168” is very active on a certain coding forums, and is proficient in C and VC++. This user even replied to a thread and gave advice on what to learn to develop remote control software. We don’t know for sure if this person is the NewCore author.

 

or Sign Up to reply!