Trustwave and Cybereason Merge to Form Global MDR Powerhouse for Unparalleled Cybersecurity Value. Learn More

Trustwave and Cybereason Merge to Form Global MDR Powerhouse for Unparalleled Cybersecurity Value. Learn More

Services
Managed Detection & Response

Eliminate active threats with 24/7 threat detection, investigation, and response.

Co-Managed SOC (SIEM)

Maximize your SIEM investment, stop alert fatigue, and enhance your team with hybrid security operations support.

Advisory & Diagnostics

Advance your cybersecurity program and get expert guidance where you need it most.

Penetration Testing

Test your physical locations and IT infrastructure to shore up weaknesses before exploitation.

Database Security

Prevent unauthorized access and exceed compliance requirements.

Email Security

Stop email threats others miss and secure your organization against the #1 ransomware attack vector.

Digital Forensics & Incident Response

Prepare for the inevitable with 24/7 global breach response in-region and available on-site.

Firewall & Technology Management

Mitigate risk of a cyberattack with 24/7 incident and health monitoring and the latest threat intelligence.

Solutions
BY TOPIC
Microsoft Security
Unlock the full power of Microsoft Security
Offensive Security
Solutions to maximize your security ROI
Rapidly Secure New Environments
Security for rapid response situations
Securing the Cloud
Safely navigate and stay protected
Securing the IoT Landscape
Test, monitor and secure network objects
Why Trustwave
About Us
Awards and Accolades
Trustwave SpiderLabs Team
Trustwave Fusion Security Operations Platform
Trustwave Security Colony
Partners
Technology Alliance Partners
Key alliances who align and support our ecosystem of security offerings
Trustwave PartnerOne Program
Join forces with Trustwave to protect against the most advance cybersecurity threats

Yet Another Archive Format Smuggling Malware

The use of novel disk image files to encapsulate malware distributed via spam has been a theme that we have highlighted over the past couple of years. As anticipated, we have seen more disk image file formats being used, in addition to .ISO, .IMG, and .DAA which we blogged about.

We recently spotted another file format being used. These spams, spoofing courier companies, contain a malicious WIM (Windows Imaging Format) file disguised as an invoice or consignment note. WIM is a file-based disk image format developed by Microsoft. The file format serves to deploy Windows software components and updates ever since Windows Vista. This format uses a ".wim" extension and its content can be extracted using archiving tools like 7Zip, PowerISO, and PeaZip. Below are some samples from this campaign.

Figure 1Figure 1: A DHL spam containing a fake invoice attachment
 
Figure 2
Figure 2: A DHL spam containing multiple malicious attachments disguised as consignment documents
 
Figure 3
Figure 3: A spam spoofing AlphaTrans containing a fake invoice attachment

 

The attachments, although they have a ‘.wim.001’ file extension which denotes that they are the first part of a larger WIM file, have the complete file structure of a WIM file. Using the ImageX tool, we verified that all the WIM attachments we collected are not compressed and have one file only.

Figure 4
Figure 4: The information about the WIM attached in Fig. 1 using the tool ImageX
 

 

Opening the WIM files in a hex editor, its immediately noticeable that an executable file is hiding in them. Using the archiving tool 7Zip as displayed in Fig. 3, the EXE file bearing the same name as its WIM container can be extracted.

Figure 5
Figure 5: The WIM attachment shown in Fig. 1 viewed using the tool Hiew
 

 

All the WIM files we gathered from our samples contain Agent Tesla malware. This threat is a Remote Access Trojan (RAT) written in .Net which can take full control over a compromised system and can exfiltrate data via HTTP, SMTP, FTP, and Telegram. In 2020, Agent Tesla was one of the predominant RATs and early this year, we reported that this malware is still actively getting distributed in spam emails.

Figure 6
Figure 6: The SMTP process of the Agent Tesla malware contained in Fig. 5 using DNSpy

 

 
Figure 7
Figure 7: The Agent Tesla malware extracted from the spam seen in this blog
 

 

Summary

Encapsulating malware in an unusual archive file format is one of the common ways to bypass gateways and scanners. However, this strategy also poses a hurdle – the target system must recognize the file type or at least have a tool which can unpack and process the file. In contrast to the more popular .IMG and .ISO disk image files, WIM files are not supported by Windows built-in ability to mount disk image files. Moreover, the other popular archive utilities WinRAR and WinZip do not recognize the WIM disk image. WIM files can be processed with the widely used 7Zip.

In terms of suspiciousness, an inbound email containing a WIM file is not usual and should raise a few flags. Administrators could look to block these outright. Trustwave MailMarshal detects these threats bundled inside unusual disk imaging containers using a combination of its unpacking engine and its multi-layered threat detection technology.

IOC

WIM Files:
DHL Airway 3426983794.wim.001 (782102 bytes)    SHA1: 91E3FE9AF48482484A4AAC9573D1FB13CB428738
Invoice_for_part_shipped(Feb 19,2021).wim.001 (634678 bytes)    SHA1: D37C13A36A92114A927860B7021EB0C71BE73FBF
Monthly Statement.wim.001 (747278 bytes)    SHA1: 2498342105E1C196C73960654E751D441925ED5C

Agent Tesla:
DHL Airway 3426983793.exe (780800 bytes)    SHA1: 62FC617343B3D823362C8D9EA89AA676F79CE972
DHL Airway 3426983794.exe (780800 bytes)    SHA1: 62FC617343B3D823362C8D9EA89AA676F79CE972
Invoice_for_part_shipped(Feb 19,2021).exe (633344 bytes)    SHA1: F02FAFB08125D877584F73D5077DFCA95D66318C
Monthly Statement.exe (745984 bytes)     SHA1: 236D1F71EB2EFA0C24E7EBA4390FEFE3691F1C68

Other:
DHL Airway 3426983793.tar.001 (782336 bytes)    SHA1: E31107CCE2AA0DCF8B8C064EFEACAD5508C69D29

ABOUT TRUSTWAVE

Trustwave is a globally recognized cybersecurity leader that reduces cyber risk and fortifies organizations against disruptive and damaging cyber threats. Our comprehensive offensive and defensive cybersecurity portfolio detects what others cannot, responds with greater speed and effectiveness, optimizes client investment, and improves security resilience. Learn more about us.

Latest Intelligence

Discover how our specialists can tailor a security program to fit the needs of
your organization.

Request a Demo