Key Takeaways
- Cyble Analysis and Intelligence Labs (CRIL) recognized a marketing campaign focusing on people linked to the upcoming US-Taiwan Protection Business Convention, as indicated by the lure doc uncovered throughout the investigation.
- The marketing campaign includes a ZIP archive containing an LNK file that mimics a authentic PDF registration kind for deception.
- When the LNK file is opened, it executes instructions to drop a lure PDF and an executable within the startup folder, establishing persistence.
- Upon system reboot, the executable downloads extra content material and executes it straight in reminiscence, successfully evading detection by the safety merchandise.
- The primary-stage loader triggers a second-stage loader, which downloads, decodes, and compiles C# code in reminiscence, avoiding the creation of traceable information on disk.
- As soon as the compiled code is executed, the malware exfiltrates delicate information again to the attacker’s server through internet requests designed to mix in with regular visitors, making detection tougher.
Overview
The preliminary an infection vector of this marketing campaign stays unclear; nonetheless, based mostly on the lure doc analyzed, there are indications that the assault might have been delivered to customers through spam emails. The assault commences with a suspicious archive file containing an LNK file disguised as a PDF doc. This deception is designed to trick customers into executing the malicious LNK file, which in flip triggers a collection of covert actions within the background.
Upon execution, the LNK file extracts two parts: a base64-encoded executable and the precise lure PDF. The executable is protected utilizing .NET’s Confuser, an obfuscation device, to evade detection and is positioned within the startup folder to make sure persistence on the compromised system. As soon as the executable runs, it retrieves extra malicious content material, particularly a DLL file, from a distant server. This DLL file is Encrypted utilizing XOR operation to additional obscure its objective.
The executable employs .NET’s “Meeting.Load” operate to load the decrypted DLL straight into reminiscence, enabling it to bypass conventional safety mechanisms that scan information written to disk. After the DLL is loaded, it downloads encrypted C# code from the TA-controlled server, compiles it on the sufferer’s machine, after which executes it solely in reminiscence.
Throughout our testing of this malware, we have been unable to seize the ultimate payload. Nonetheless, evaluation of the loader’s code means that the payload’s final objective is to exfiltrate delicate information from the sufferer’s machine to conduct additional malicious actions. Primarily based on the lure doc used on this assault, it’s probably that the TA behind this marketing campaign is particularly focusing on people related to the upcoming US-Taiwan Protection Business Convention.
The determine beneath exhibits the an infection chain.
Technical Evaluation
CRIL uncovered a marketing campaign focusing on customers by posing as registration kinds for the upcoming Convention and distributed malicious ZIP information beneath the identify “registration_form.pdf.zip”. The ZIP file accommodates an LNK file disguised as a PDF. When extracted, the archive presents a file named “registration_form.pdf,” however that is truly an LNK file with a twin extension (.pdf.lnk), deceptive the person into considering it’s a authentic PDF doc. The malicious LNK file accommodates an embedded executable and a lure PDF, each encoded in base64 format, additional concealing the malicious content material, as proven in Determine 2.
When the person opens the LNK file, it triggers a number of background instructions. First, the LNK file searches the base64 embedded content material utilizing the “findstr” command and saving them as “1.txt” and “2.txt,” respectively. Subsequent, the “certutil” utility decodes these information, storing the lure PDF as ” registration_form.pdf ” within the Temp listing and the executable as “replace.exe” within the “%AppDatapercentRoamingMicrosoftWindowsStart MenuProgramsStartup” folder, making certain persistence. Lastly, the registration_form.pdf is opened with the system’s default PDF viewer. The determine beneath exhibits the content material of the malicious LNK file.
Lure Doc:
The lure doc used on this assault means that the TA behind the marketing campaign is probably going focusing on people linked to the upcoming US-Taiwan Protection Business Convention, which is scheduled to happen in the USA from September twenty second to September twenty fourth, 2024.
The potential targets are anticipated to incorporate key members resembling protection officers, business executives, authorities representatives, and different stakeholders concerned in or attending the occasion. The timing and focus of the marketing campaign recommend that the TA goals to use the importance of the convention, doubtlessly for gathering delicate info to conduct additional malicious actions. This strategic focusing on underscores the delicate nature of the marketing campaign and its alignment with geopolitical pursuits. The determine beneath exhibits the Lure doc.
First Stage Loader: updater.exe
The “Updater.exe” file capabilities as a loader and is protected utilizing the .NET “Confuser protector.” It’s positioned within the Startup folder, making certain it executes every time the person logs into the system. Upon execution, the file first verifies whether it is working from the “Startup” listing. Whether it is, the execution proceeds; in any other case, it terminates with out additional motion. When the file runs, it sends a POST request to a compromised website managed by the TA, transmitting the sufferer’s machine.
Subsequent, utilizing “WebClient”, it downloads string content material from “hxxp://tdea.com.tw/asset/uploads/information/68679813[.]txt” and removes the primary character to retrieve the right base64-encoded content material. This reveals the
- machine identify: “MSEDGEWIN10″
- URL for the twond stage loader: “hxxp://tdea.com.tw/asset/uploads/information/68679815[.]txt“
The primary-stage loader downloads a base64-encoded information stream from the above URL, which is first decoded after which additional processed by making use of an XOR operation utilizing a hardcoded key with a decimal worth of 16. This operation ends in the extraction of a DLL file. The beneath exhibits the decryption loop used for getting the DLL file.
The extracted DLL is then dynamically loaded and executed utilizing the .NET “Meeting.Load” operate, permitting the TA to invoke malicious performance embedded throughout the DLL. The beneath determine exhibits how the “Meeting.Load” operate is used to load the decrypted DLL and name a selected methodology named “MyEntry” with in a category named “ConsoleApp.MyClass”
Second Stage Loader
The “.NET Meeting.Load” operate is used to load the second-stage loader, which capabilities equally to the preliminary stage. This DLL loader retrieves extra base64-encoded content material from the TA’s managed server. As soon as the content material is downloaded, it’s decoded utilizing base64 after which processed with an XOR operation utilizing a hardcoded key of 48 in decimal, as proven beneath.
Though the URL “hxxp://tdea.com.tw/asset/uploads/information/68679811[.]txt” presently doesn’t include any information, code evaluation signifies that the decoded content material is probably going XML information containing C# code and meeting references (DLLs) which makes use of “Compile After Supply” approach to compile the supply code throughout runtime.
In-memory Execution
The downloaded C# code is compiled in reminiscence utilizing particular compiler parameters resembling “GenerateExecutable = false” and “GenerateInMemory = true”. These parameters, together with references to core assemblies like “System.dll”, “System.Knowledge.dll”, and “System.Administration.dll”. The “System.Administration.dll” is particularly used to work together with Home windows Administration Instrumentation (WMI), permitting the code to question system properties and work together with system parts by WMI queries. This means that the TA might use WMI queries to collect system info from the sufferer.
Further DLLs can also be included as reference assemblies. The compiled code is executed straight in reminiscence, bypassing the disk solely, which complicates detection by typical safety instruments.
This methodology is very efficient for evasion. It permits malware or APT teams to dynamically generate and execute payloads at runtime, making detection and mitigation efforts considerably more difficult for defenders. The determine beneath exhibits a code snippet liable for compiling the downloaded C# code and executing it in reminiscence.
Knowledge Exfiltration
After executing the compiled code, the ensuing information is distributed again to the TA’s server utilizing an internet request. A “WebClient” object is utilized to add the info, the place the request’s “ContentType” is about to “utility/x-www-form-urlencoded” to simulate normal kind information submission, and the “UserAgent” header is modified to imitate an internet browser. The “UploadString” methodology is used to ship a POST request to the TA’s specified URL, together with parameters resembling a randomly generated filename, a command flag, and the encoded content material being transmitted.
Community Communication:
The TA leverages a compromised web site to host malicious content material and incessantly retrieves information saved inside an uncovered open listing. Furthermore, the TA employs CKFinder, a PHP-based file administration framework, to add and handle information despatched from the sufferer machines. This framework permits the TA to retailer exfiltrated information or extra malicious payloads on the server. The picture beneath illustrates the construction of the open listing on the compromised website, highlighting the benefit with which the TA can entry and manipulate saved information.
Risk Attribution
Chinese language menace actors have a well-documented historical past of focusing on Taiwan, notably round important political occasions. As an illustration, throughout the interval main as much as Taiwan’s presidential election earlier in 2024, there was a marked enhance in cyberattacks throughout the 24 hours previous the election, as reported by Trellix. Regardless of this sample, the precise TA behind the present marketing campaign stays unidentified, and we now have not been in a position to hyperlink these ways, strategies, and procedures (TTPs) to any identified menace actor or superior persistent menace (APT) group at the moment.
Conclusion
This refined assault employs social engineering and superior in-memory execution strategies to keep away from detection. By disguising the LNK file as a authentic convention registration PDF and executing payloads dynamically in reminiscence, the TAs can conduct malicious actions to steal delicate info with out leaving traces on the disk. Given the timing and context of the US-Taiwan Protection Business Convention, this marketing campaign is probably going meant to conduct malicious operations focusing on beneficial info associated to protection collaborations.
Our Suggestions
- Deploy superior electronic mail filtering options to dam phishing emails and suspicious attachments earlier than they attain the tip customers. Anti-phishing options that use machine studying or conduct evaluation can even establish and block malicious campaigns at an early stage.
- Implement safety options with superior menace detection that may monitor in-memory execution of code or PowerShell instructions. Instruments like EDR (Endpoint Detection and Response) must be used to detect uncommon conduct, resembling applications compiling and working C# code in reminiscence.
- Make sure that customers have the least privileges required for his or her roles, decreasing the chance of malware having the ability to execute in privileged areas.
- Utility whitelisting or blocking untrusted functions from executing in sure directories can even reduce the chance.
- Monitor outbound community visitors for indicators of exfiltration and communication with command-and-control (C2) servers, particularly encrypted and base64-encoded visitors. Use firewalls, IDS/IPS (Intrusion Detection and Prevention Programs), and community evaluation instruments to detect suspicious internet visitors patterns.
MITRE ATT&CK® Strategies
Tactic | Approach | Process |
Preliminary Entry (TA0001) | Spearphishing Attachment (T1566.001) | The ZIP archive containing the LNK file could also be delivered through phishing or spam emails |
Persistence (TA0003) | Registry Run Keys / Startup Folder (T1547.001) | replace.exe added into the Startup folder |
Execution (TA0002) | Person Execution: Malicious File (T1204.002) | Malicious LNK file executed by the person after extracted from archive file |
Defence Evasion (TA0005) | Obfuscated Recordsdata or Data: LNK Icon Smuggling (T1027.012) | The LNK file makes use of a PDF file icon, leveraging the “IconEnviromentDataBlock” to look as a innocent PDF doc. |
Defence Evasion (TA0005) | Deobfuscate/Decode Recordsdata or Data (T1140) | Certutil is used to decode base64 content material. |
Defence Evasion (TA0005) | Obfuscated Recordsdata or Data: Compile After Supply (T1027.004) | CSharp code is compiled and executed in reminiscence |
Command and Management (TA0011) | Knowledge Encoding: Non-Customary Encoding (T1132.002) | Encrypted file is downloaded from TA managed server. |
Exfiltration (TA0010) | Exfiltration Over Various Protocol: Exfiltration Over Unencrypted Non-C2 Protocol (T1048.003) | Exfiltrated information is transmitted utilizing normal protocol. |
Indicators of Compromise (IOCs)
Indicator | Indicator Sort | Feedback |
6b1af6be189e31168b8f4eff84cd475eb5d0cbd08e646760fb352165a30cb269 | SHA-256 | registration_form.pdf.zip |
4989882339d745692eabe0a375d8cecd6e7e3af534cd1173d94867b8d069cd7f | SHA-256 | registration_form.pdf.lnk |
0e07b96c508dfc0e11f119071cca4ec628dae635771532dae7f034ed369591d7 | SHA-256 | updater.exe |
df92e2c56f53c9139da70c5a813b6512df616abd56dc10dc80a625c4512cb7f2 | SHA-256 | updater.exe |
e0174968064b45d1b0c255bec351de94bb59852cb7f2e6ac694debbac59acb7a | SHA-256 | d.dll |
5aaa5a7ef2eaa13e6e4274ccdb3c80251c868043fa51c2ca1e5b556a65d5166c | SHA-256 | 68679815.txt |
531db819d928243bda43997165da1fa3ebda3412e7d9928cb6bd2a8c898a85ae | SHA-256 | 68679813.txt |
hxxp://tdea.com.tw/asset/uploads/information/68679813[.]txt | URL | URL used to get the DLL hyperlink |
hxxp://tdea.com.tw/asset/uploads/information/68679815[.]txt | URL | URL used to get the DLL file |
hxxp://tdea[.]com[.]tw/ckeditor/ckfinder/core/connector/php/connector[.]php?command=SaveFile&sort=Recordsdata¤tFolder=%2F&langCode=en&hash=f92a86fd96382c5a | URL | POST request to ship exfiltrated information |
hxxp://tdea.com.tw/asset/uploads/information/68679811[.]txt | URL | URL used to get the CSharp (C#) code |
Associated