| Original Text |
|---|
From Water to Wine: An Analysis of WINELOADER |SplunkBy Splunk Threat Research TeamIntroductionIn late February 2024, Mandiant identified APT29, a Russian state-sponsored threat group, deploying a newbackdoor called WINELOADER to target German political parties. This campaign marks a significant shift inAPT29's targeting, as they have traditionally focused on government and diplomatic entities. The expansion topolitical parties suggests an evolution in the group's intelligence gathering priorities, likely influenced by thecurrent geopolitical climate.The attack chain begins with a spear-phishing email containing a malicious link to a ZIP file hosted on acompromised website. The ZIP file contains an HTML Application (HTA) file that, when executed, initiates amulti-stage infection process ultimately leading to the delivery of the WINELOADER backdoor.This blog post provides a detailed analysis of the tactics, techniques, and procedures (TTPs) employed byAPT29 in this campaign, focusing on two key aspects:Initial Access: We'll examine the spear-phishing email, the compromised website hosting the malicious ZIPfile, and the HTA file responsible for the initial stages of the infection chain.WINELOADER Analysis: We'll dive deep into the WINELOADER backdoor, exploring its capabilities,command and control (C2) communication, and evasion techniques.Furthermore, we'll showcase the Splunk security content developed by the Splunk Threat Research Team tohelp defenders detect and respond to this threat.As APT29 continues to adapt and evolve their tactics, it is crucial for organizations to stay informed andprepared. By understanding the TTPs and malware employed in this campaign, security teams can enhancetheir detection capabilities and better protect their organizations from this sophisticated threat.Initial AccessThis section dives deeper into the TTPs employed by APT29 in the initial access stage of the WINELOADERcampaign. By examining the spear-phishing attachment and the various components of the infection chain, weaim to provide defenders with the knowledge needed to identify and mitigate this threat.The Initial Access TTPs
Figure 01: Attack ChainThe attack chain begins with a spear-phishing email containing a malicious PDF attachment. This PDF file,masquerading as an invitation to a wine tasting event, includes a link to a ZIP file hosted on a compromisedwebsite. The ZIP file contains an HTML Application (HTA) file named "wine.hta" or "invite.hta", depending onthe sample analyzed.Upon executing the HTA file, obfuscated JavaScript code initiates the next stage of the infection chain. Theobfuscation technique used in this code matches patterns associated with the publicly available obfuscator"obfuscator.io". The HTA file downloads and executes additional malicious components, including:A legitimate Microsoft-signed binary named "sqlwriter.exe" or "sqldumper.exe", which is vulnerable to DLLside-loading.A malicious DLL named "vcruntime140.dll", crafted by the threat actor to be side-loaded by the legitimatebinary.The successful execution of the malicious DLL marks the beginning of the WINELOADER infection.Assessing Detection Coverage with Atomic Red TeamTo help defenders assess their detection coverage against the TTPs used in this campaign, the Splunk ThreatResearch Team has developed an Atomic Red Team test. This test provides a safe and controlled environmentfor security teams to evaluate their defenses and identify potential gaps in their detection capabilities.The Atomic Red Team test developed by the Splunk Threat Research Team covers the following aspects of theinitial access stage:HTA with base64 encoded invite.txt fileWrite invite.txt and decode the base64 to invite.zipExtract the invite.zip, which contains Atomic Red Team T1574.002 gup.exe DLL side loadAfter extraction the HTA will then run gup.exe to simulate the DLL side load
We tried to mimic this as close to the WINELOADER infection chain, only not using SQLWriter or SQLdumper.During our testing, however, we enhanced our Atomic by embedding sqlwriter.exe with the malicious sample ofvcruntime140.dll to emulate the behaviors. By running these tests and analyzing the results, security teams can gain visibility into their detection andresponse to the TTPs employed by APT29 in the WINELOADER campaign. This can then be used to: Fine-tune analytics.Improve incident response procedures.Ultimately strengthen the organization's overall security posture.In our example, the HTA file writes the Base64 encoded content of |
| Original Text | ChatGPT 4o Paged |
|---|---|
From Water to Wine: An Analysis of WINELOADER |SplunkBy Splunk Threat Research TeamIntroductionIn late February 2024, Mandiant identified APT29, a Russian state-sponsored threat group, deploying a newbackdoor called WINELOADER to target German political parties. This campaign marks a significant shift inAPT29's targeting, as they have traditionally focused on government and diplomatic entities. The expansion topolitical parties suggests an evolution in the group's intelligence gathering priorities, likely influenced by thecurrent geopolitical climate.The attack chain begins with a spear-phishing email containing a malicious link to a ZIP file hosted on acompromised website. The ZIP file contains an HTML Application (HTA) file that, when executed, initiates amulti-stage infection process ultimately leading to the delivery of the WINELOADER backdoor.This blog post provides a detailed analysis of the tactics, techniques, and procedures (TTPs) employed byAPT29 in this campaign, focusing on two key aspects:Initial Access: We'll examine the spear-phishing email, the compromised website hosting the malicious ZIPfile, and the HTA file responsible for the initial stages of the infection chain.WINELOADER Analysis: We'll dive deep into the WINELOADER backdoor, exploring its capabilities,command and control (C2) communication, and evasion techniques.Furthermore, we'll showcase the Splunk security content developed by the Splunk Threat Research Team tohelp defenders detect and respond to this threat.As APT29 continues to adapt and evolve their tactics, it is crucial for organizations to stay informed andprepared. By understanding the TTPs and malware employed in this campaign, security teams can enhancetheir detection capabilities and better protect their organizations from this sophisticated threat.Initial AccessThis section dives deeper into the TTPs employed by APT29 in the initial access stage of the WINELOADERcampaign. By examining the spear-phishing attachment and the various components of the infection chain, weaim to provide defenders with the knowledge needed to identify and mitigate this threat.The Initial Access TTPs |
Phase: Initial Access
Phase: Execution
Phase: WINELOADER Deployment
Additional Technical Analysis (WINELOADER)
This structured breakdown focuses on the attack's initial access and execution phases, highlighting the key techniques and procedures used by APT29 in deploying the WINELOADER backdoor. |
Figure 01: Attack ChainThe attack chain begins with a spear-phishing email containing a malicious PDF attachment. This PDF file,masquerading as an invitation to a wine tasting event, includes a link to a ZIP file hosted on a compromisedwebsite. The ZIP file contains an HTML Application (HTA) file named "wine.hta" or "invite.hta", depending onthe sample analyzed.Upon executing the HTA file, obfuscated JavaScript code initiates the next stage of the infection chain. Theobfuscation technique used in this code matches patterns associated with the publicly available obfuscator"obfuscator.io". The HTA file downloads and executes additional malicious components, including:A legitimate Microsoft-signed binary named "sqlwriter.exe" or "sqldumper.exe", which is vulnerable to DLLside-loading.A malicious DLL named "vcruntime140.dll", crafted by the threat actor to be side-loaded by the legitimatebinary.The successful execution of the malicious DLL marks the beginning of the WINELOADER infection.Assessing Detection Coverage with Atomic Red TeamTo help defenders assess their detection coverage against the TTPs used in this campaign, the Splunk ThreatResearch Team has developed an Atomic Red Team test. This test provides a safe and controlled environmentfor security teams to evaluate their defenses and identify potential gaps in their detection capabilities.The Atomic Red Team test developed by the Splunk Threat Research Team covers the following aspects of theinitial access stage:HTA with base64 encoded invite.txt fileWrite invite.txt and decode the base64 to invite.zipExtract the invite.zip, which contains Atomic Red Team T1574.002 gup.exe DLL side loadAfter extraction the HTA will then run gup.exe to simulate the DLL side load |
Phase: Initial Access
Phase: Execution
Phase: Defense Evasion
Phase: Execution (Simulation with Atomic Red Team)
|
We tried to mimic this as close to the WINELOADER infection chain, only not using SQLWriter or SQLdumper.During our testing, however, we enhanced our Atomic by embedding sqlwriter.exe with the malicious sample ofvcruntime140.dll to emulate the behaviors. By running these tests and analyzing the results, security teams can gain visibility into their detection andresponse to the TTPs employed by APT29 in the WINELOADER campaign. This can then be used to: Fine-tune analytics.Improve incident response procedures.Ultimately strengthen the organization's overall security posture.In our example, the HTA file writes the Base64 encoded content of |
Phase: Initial Access
Phase: Execution
Phase: Persistence
Phase: Execution
Phase: User Execution
|
Figure 03.1: Simulation AttackUpon clicking “OK,” the test will be completed by spawning calc.exe and a final message box from the HTA. Figure 03.2: Simulation AttackThe last “OK” click will lead to the Atomic logo along with the reference to the DLL sideload test with Gup.exeNext, check out this video for a live demonstration of our HTA. To try out the HTA, it is hosted on a GIST here.WINELOADER BreakdownThe next section takes a closer look at the WINELOADER malware itself, examining its: CapabilitiesCommunication methodsEvasion techniquesThis variant of WINELOADER employs DLL side-loading techniques to execute its malicious payload. Itachieves this by initiating the execution of either legitimate SQLWriter.exe or SQLDumper.exe, which in turnautomatically loads a specially crafted vcruntime140.dll residing in the same directory as these applications.SQLWriter.exe is a vital component of Microsoft SQL Server developed by Microsoft Corporation. SQLWriterinstalls a service facilitating backup/restore operations for Microsoft SQL Server via the Windows VSSinfrastructure. Alternatively, the malware may utilize legitimate Sqldumper.exe, responsible for generating dump filesessential for Watson error reporting and debugging tasks. |
Phase: Execution
Phase: Execution
Phase: Execution
Notes:
By employing DLL side-loading, the attacker leverages legitimate applications to mask malicious activities, allowing the unauthorized execution of malicious code while evading traditional security measures. |
In the WINELOADER samples analyzed by Zscaler and Mandiant, the Splunk Threat Research Team, observedthat the specially crafted vcruntime140.dll exports 'memset' and '_set_se_translator', signaling the beginningof the code execution process.This code segment is responsible for decrypting a block of 0x8028 bytes using the RC4 algorithm. The RC4 keyis positioned after the code setup within the aforementioned export function. Figure 04: Export Functions Figure 05: One of the RC4 KeyThe decrypted data blob typically comprises a headless WINELOADER or shellcode, meticulously encrypted,especially regarding critical APIs and strings essential for its operations. This encryption strategy aims tothwart static analysis of its code.The decryption routine employed by this WINELOADER variant uses yet another RC4 algorithm, with the RC4key positioned at offset 0x20 within the decrypted headless WINELOADER. |
Phase: Initial Payload Execution
Phase: Decryption
Phase: Payload Deployment
|
Figure 07: C2, User Agent & Landing PageAll of the C2 URLs are already down, so they aren't available to further analyze the WINELOADER infectionchain.Next, this brief video demonstrates how the information previously shared helped us in creating a simple toolto extract the headless WINELOADER from the specially crafted vcruntime140.dll for further analysis and TTPextraction.The simplified version of this python tool is available here.IOCFileName SHA256vcruntime140.dll 72b92683052e0c813890caf7b4f8bfd331a8b2afc324dd545d46138f677178c4d0a8fa332950b72968bdd1c8a1a0824dd479220d044e8c89a7dea4434b741750YARA Rule:import "pe"rule possible_wine_loader_export_function { meta: author = "@tccontre18 - Br3akp0int" description = "possible wine loader export function setup code" date = "2024-04-03" sha256 = "72b92683052e0c813890caf7b4f8bfd331a8b2afc324dd545d46138f677178c4" strings: $exp_loader = {48 83 EC 08 48 8D 0D ?? ?? ?? ?? 48 C7 C2 28 80 00 00 E8 ?? ?? ?? ?? 48 8D 0D ?? ?? ?? ?? 48 8D 05 ?? ?? ?? ?? 48 89 05 ?? ?? ?? ?? 48 C7 05 ?? ?? ?? ?? ?? ?? 00 00 48 C7 05 ?? ?? ?? ?? 28 80 00 00 E8 ?? ?? 00 00 48 83 C4 08 C3} condition: uint16(0) == 0x5a4d and $exp_loader and pe.number_of_exports != 0 }Splunk Security ContentThe Splunk Threat Research Team has released a new analytic story covering this campaign. Below is abreakdown of the related security content. |
Phase: Execution
Phase: Tool Development
Phase: Detection and Analysis
Example YARA Rule Structure:
These procedures provide a structured approach for red teams to emulate the attack and develop detection methodologies. |
The figure below shows the potential structure of the headless WINELOADER, highlighting key componentssuch as the RC4 key and the encrypted strings table. Figure 06: Decrypted WINELOADERThe figure below illustrates the following decrypted C2 information associated with the two WINELOADERvariants we analyzed:C2 Domains and Landing pages:castechtools[.]com/api[.]php siestakeying[.]com/auth[.]phpUser Agents:Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:86.1) Gecko/20100101 Firefox/86.1Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) |
To assist you properly, I'll need detailed text from the CTI report describing the threat actor's procedures, focusing on command lines, executed programs, tools, and attack techniques. Once provided, I'll format it to enable a red team to emulate the attack. |
Figure 08: Security Content Detection CoverageWindows MSHTA Writing to World Writable PathThis detection identifies instances of the Windows utility |
Phase: Initial Access
Phase: Execution
Phase: Payload Execution
Phase: Defense Evasion
Phase: Persistence
This sequence of actions demonstrates an adversary's use of common system tools and scripting to initialize and maintain control over compromised systems. |
(Get this content: Windows MSHTA Writing to World Writable Path.)CertUtil with Decode ArgumentCertUtil.exe may be used to |
Phase: Execution
Phase: Execution
These procedures demonstrate methods to execute payloads and inject code into legitimate processes, making detection more challenging. |
(Get this content: Windows SqlWriter SQLDumper DLL Sideload.)Windows Unsigned MS DLL Side-LoadingThe following analysis identifies potential DLL side-loading instances involving unsigned DLLs with a companydetail signature mimicking Microsoft. This technique is frequently exploited by adversaries to executemalicious code automatically by running a legitimate process. The analytics involves:Searching Sysmon logs for Event Code 7, where both the |
Phase: Discovery
Phase: Execution
|
SummaryAPT29 has launched a new campaign targeting political parties using the WINELOADER backdoor. Ourdetailed analysis of the TTPs employed by APT29, focused on the initial access stage and the WINELOADERmalware itself. To help organizations detect and respond to this threat, The Splunk Threat Research Team has: Developed an Atomic Red Team test. Released a new analytic story. As APT29 continues to evolve, it is important for security teams to stay informed and enhance their detectioncapabilities to protect against sophisticated threats.Learn MoreVisit research.splunk.com to view the Splunk Threat Research Team's complete security content repository.You can implement this content using the Enterprise Security Content Updates app or the Splunk SecurityEssentials app.We would like to thank Teoderick Contreras and Michael Haag for authoring this post and the entire SplunkThreat Research Team for their contributions. Referenceshttps://www.mandiant.com/resources/blog/apt29-wineloader-german-political-partieshttps://www.zscaler.com/blogs/security-research/european-diplomats-targeted-spikedwine-wineloader |
Phase: Initial Access
Phase: Execution
Phase: Persistence
Inferred Procedure for Backdoor Operations
Suggested Monitoring Activities
These procedures outline the use of phishing, malicious macros, and backdoor installation techniques to infiltrate and persist in target environments, focusing on political entities. |
The Splunk Threat Research Team is an active part of a customer’s overall defense strategy by enhancingSplunk security offerings with verified research and security content such as use cases, detection searches, andplaybooks. We help security teams around the globe strengthen operations by providing tactical guidance andinsights to detect, investigate and respond against the latest threats. The Splunk Threat Research Team focuseson understanding how threats, actors, and vulnerabilities work, and the team replicates attacks which arestored as datasets in the Attack Data repository. Our goal is to provide security teams with research they can leverage in their day to day operations and tobecome the industry standard for SIEM detections. We are a team of industry-recognized experts who areencouraged to improve the security industry by sharing our work with the community via conference talks,open-sourcing projects, and writing white papers or blogs. You will also find us presenting our research atconferences such as Defcon, Blackhat, RSA, and many more.Read more Splunk Security Content. |
I'm here to help with extracting and structuring threat procedures, but it seems the text you provided doesn't contain specific threat actor procedures or CTI report details. If you have a detailed CTI report or specific attack information from which I can extract details like command lines, executed programs, and tools, please provide that, and I'll be glad to assist! |
| Gemini 2.0 |
|---|
Phase: Initial Access
Phase: Execution
Phase: Download and Execution of Malicious Components
Phase: Privilege Escalation / Lateral Movement
Phase: Execution
|
| Gemini 2.5 |
|---|
Here's an emulation-focused breakdown of the threat actor's procedures: Phase: Initial Access
Phase: Execution & Defense Evasion
|