Lab52 has detected a different maldoc samples of a potential malicious campaign. The initial access is through a Chinese phishing. The maldoc seems to be a campaign against Chinese speaking users as the content of the maldoc is written in Chinese. The social engineering technique applied into the maldoc’s content is to pretend to be a Curriculum Vitae of a 28 years old professional who is specialized in finance, concretely into the software development for banking systems and NCR.
The infection chain is similar to the threat actor APT29, however it has been identified significant differences related to the typical APT29’s infection chain that makes consider that it does not seem to be this threat actor.
This is a compressed file with Chinese characters referring to “Sun Jichao – Peking University – Master”. The file has a file with extension “.pdf” and a hidden directory “_MACOSX/.DOCX”, which contains a .bat file, two .tmp files (also hidden) and another .pdf file.
In the following image capture is shown the content of the .pdf maldoc:
The infection starts with the file “孙继超-北京大学-硕士.pdf” which is actually a “.lnk” file that executes the binary “aaa.bat” using the following command: %windir%\system32\cmd.exe /c “__MACOSX\.DOCX\aaa.bat”. It is also interesting to note the comment “chang the world google”.
When analyzing the “.bat” binary, we observe that it is obfuscated with special characters.
Searching for part of this string in Google, we found that it is obfuscated using a specific “.bat” file encryption technique. Fortunately, there is a tool called Batch Encryption DeCoder that allows to decrypt the content automatically.
Analyzing the “.bat” file, it can be seen that it performs the following actions:
- First copy the files “wda.tmp” and “mbp.tmp” to the folder “C:\ProgramData”.
- Then change the attributes of the file, to unhide them.
- Rename “wda.tmp” to “OfficeUpdate.exe” and “mbp.tmp” to “appvisvsubsystems64.dll”.
- Execute the “.pdf” file showing the Decoy (a resume).
- Execute “OfficeUpdate.exe” to continue with stage1.
- Finally delete the stage0 files “wda.tmp”, “mbp.tmp”, “aaa.bat” and the “lnk”; so that only what is in C:\ProgramData\ persists.
We continue the execution with the two files located in “C:\ProgramData”, “OfficeUpdate” and “appvisvsubsystems64.dll”. The first one is the legitimate “WinWord” binary and “appvisvsubsystems64.dll” is a malicious library that will load “WinWord” via DLL Side-Load.
These names and techniques are reminiscent of those used by APT29 in its campaigns in recent months and we discussed in this Lab52 post.
Looking at the dll “appvisvsubsystems64.dll” statically we find that its compilation date is quite recent (July 4th) and that it is packaged by the open source packer “UPX”. It is also noted that the binary is written in Go.
The DLL has several exports, but the malicious code is in the section called “test”. With IDA you can see how it creates a thread to execute this function.
Analyzing the operation of the library, it can be seen that it is a CobaltStrike beacon that the actor will use as a post-exploitation framework.
Comparison with APT29
As discussed above, the group uses a number of TTPs and artifacts that have been linked in previous campaigns to APT29. Examples of these could be:
- The use of Side-Load DLL with the “appvisvsubsystems64.dll” library and the legitimate “WinWord.exe” binary.
- The fact of developing the DLL in the go language (something that has also been seen in APT29).
- Deploying a CobaltStrike at the end of the infection.
However, there are several features that suggest that the attack was not perpetrated by the Russian group:
- The infection chain is different, employing an encrypted “.bat”.
- Chinese characters are found in all the files and the “decoy” is addressed to Beijing.
- It saves the files in the %ProgramData% folder, unlike APT29 which did so in %AppData%.
Campaign: Sun Jichao – Peking University – Master
|wda.tmp (OffceUpdate.exe) [Legit]||DD657A7A3688D039F0A208F39B1128EC447689EE664C6695D5C7E384DCDC1014|
Campaign: 2023 Medical Examination Program
Campaign: Beijing Municipal Communications Commission Year-end Summary Report – Template 1