Trustwave SpiderLabs Uncovers Ov3r_Stealer Malware Spread via Phishing and Facebook Advertising. Learn More

Trustwave SpiderLabs Uncovers Ov3r_Stealer Malware Spread via Phishing and Facebook Advertising. Learn More

Services
Capture
Managed Detection & Response

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

twi-managed-portal-color
Co-Managed SOC (SIEM)

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

twi-briefcase-color-svg
Advisory & Diagnostics

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

tw-laptop-data
Penetration Testing

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

twi-database-color-svg
Database Security

Prevent unauthorized access and exceed compliance requirements.

twi-email-color-svg
Email Security

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

tw-officer
Digital Forensics & Incident Response

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

tw-network
Firewall & Technology Management

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

Solutions
BY TOPIC
Microsoft Exchange Server Attacks
Stay protected against emerging threats
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
SpiderLabs Blog

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

Latest SpiderLabs Blogs

Hunting For Integer Overflows In Web Servers

Allow me to set the scene and start proceedings off with a definition of an integer overflow, according to Wikipedia:

Read More

Welcome to Adventures in Cybersecurity: The Defender Series

I’m happy to say I’m done chasing Microsoft certifications (AZ104/AZ500/SC100), and as a result, I’ve had the time to put some effort into a blog series that hopefully will entertain and inform you...

Read More

Trustwave SpiderLabs: Insights and Solutions to Defend Educational Institutions Against Cyber Threats

Security teams responsible for defending educational institutions at higher education and primary school levels often find themselves facing harsh lessons from threat actors who exploit the numerous...

Read More