Close analysis of the delivered payloads and legitimate resources retrieved from URLs by the first stage malware dropper reveals that TA416 is once again using an updated version of PlugX malware to target their victims.
Historically, the group has relied on a variety of legitimate antivirus files, including the Avast file resource wsc_proxy.exe, to begin the process of DLL search order hijacking that results in PlugX malware installation.
In the January 2022 campaigns, TA416 used the PE file potplayermini.exe to initiate DLL search order hijacking.
This is a legitimate executable file that is part of the publicly available media player Daum PotPlayer 1.5.29825, which Mandiant has previously documented as being susceptible to search order hijacking since at least 2016.
Numerous Chinese APT groups, which are not directly correlated to TA416, have utilized it since that time. This campaign leveraged the vulnerability of potplayermini.exe to load the file PotPlayer.dll which contains an obfuscated launcher that in turn executes the file PotPlayerDB.dat.
The file DocConvDll.dll has also intermittently been used as a loader of the PlugX DAT configuration files.
For those that are familiar with TA416’s historic tactics, techniques, and procedures (TTPs), this is highly similar to the Trident Loader method which the group used to install PlugX in previous campaigns.
While PotPlayerDB.dat is a variant of PlugX malware, TA416 has updated the payload by changing both its encoding method and expanding the payload’s configuration capabilities.
Historically, TA416 relied on the DLL launcher to decode the PlugX payload utilizing an XOR key included at the offset 0 within the PlugX DAT configuration file.
In this case, TA416 has abandoned that approach in favor of something with less dependencies that is more convoluted.
The latest version contains obfuscation to thwart analysis.
One of the main ways it does this is by resolving API functions during runtime. Generally, malware loads a DLL, iterates over the set of exports of the DLL and hashes the string, looking for a matching hash.
This iteration of PlugX does standard API hashing, but only to resolve the address of the functions GetProcAddress as well as LoadLibrary.
In addition to this obfuscation attempt, most of the functions that contain the “business logic” of the malware are obfuscated with a state machine.
At a high level this obscures the order of which blocks are executed within a function. It does this by maintaining a state variable with many comparisons in the function.
After each block, the state variable is modified to whatever the subsequent block should be, making analysis more difficult. This sample further implements anti-analysis techniques via the malware’s design.
After every iteration of the state machine, the malware sample will modify the state with a XOR operation.
This makes it difficult to analyze as the states are not hardcoded as the result of a function.