Connect with our team of offensive security, AI security and pen testing experts at Black Hat Europe 2023. Learn More

Connect with our team of offensive security, AI security and pen testing experts at Black Hat Europe 2023. Learn More

Services
Capture
Managed Detection & Response

Eradicate cyberthreats with world-class intel and expertise

twi-cloud-lock-color-svg
Managed Security Services

Expand your team’s capabilities and strengthen your security posture

twi-briefcase-color-svg
Consulting & Professional Services

Tap into our global team of tenured cybersecurity specialists

twi-dashboard-color-svg
Penetration Testing

Subscription- or project-based testing, delivered by global experts

twi-database-color-svg
Database Security

Get ahead of database risk, protect data and exceed compliance requirements

twi-email-color-svg
Email Security & Management

Catch email threats others miss with layered security & maximum control

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

Eliminate alert fatigue, focus your SecOps team, stop threats fast, and reduce cyber risk

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
The Trustwave Approach
Awards and Accolades
Trustwave SpiderLabs Team
Trustwave Fusion Platform
SpiderLabs Fusion Center
Security Operations Centers
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

Multi-Stage Email Word Attack Without Macros

Malware authors often distribute malware through code macros in Microsoft Office documents such as Word, Excel, or PowerPoint. Regardless of the particular Office version, macros can be executed whenever the user opens the file. By default users get warnings from Office that the file they are about to open will run a macro, but at that point it's up to the user to decide whether to take the risk.

7866_0c7bb706-586b-4631-9ba8-9cfa23065710

Recently, we have been receiving a lot of standard macro-related downloaders, most of them distributed from the Necurs botnet. However, the sample we look at today takes a longer, macro-less approach.

We have been monitoring an email spam campaign where opening the attachment downloads a password stealer as its final payload. However, getting to that payload uses a four-stage infection process, as summarized below.

10507_8cecb5ea-8dd3-4d7b-93da-65d015dc0f41

Listed below are the some of email subjects used in the spam campaign:

  • TNT STATEMENT OF ACCOUNT – {random numbers}...............
  • Request for Quotation (RFQ) - <{random numbers}>
  • Telex Transfer Notification
  • SWIFT COPY FOR BALANCE PAYMENT

We examine the email and find that it has a Word document attachment (receipt.docx)

9523_5e279e00-b62e-4375-b1d8-f93b119252a0

Word documents with Office 2007 Open XML Formats are based on XML and ZIP archive technologies. Anyone can easily manipulate data in a Word 2007 file programmatically or manually. As shown below, the DOCX attachment contains an embedded OLE object that has external references. This 'feature' allows external access to remote OLE objects to be referenced in the document.xml.rels.

10868_9da69f37-290c-4a36-b294-4c20d25ad5df

When user opens the DOCX file, it causes a remote document file to be accessed from the URL: hxxp://gamestoredownload[.]download/WS-word2017pa[.]doc. This is actually a RTF file that is downloaded and executed.

9087_4988353b-90ca-4d7d-9f18-ba8f5c8bcb61

The RTF file exploits the recent CVE-2017-11882 vulnerability that targets the MS Equation Editor tool. For more information about this vulnerability, click here

When the RTF file is run, by decoding the ASCII to its equivalent values, it will execute an MSHTA command line which downloads and executes a remote HTA file.

9877_702e6702-7195-4dd8-9e2d-ad5d448a6014

The HTA file contains VBScript with obfuscated code. By decoding each character code in VBScript, it reveals a PowerShell Script which eventually downloads and executes a remote binary file.

9093_49e3a110-d0da-4108-8e94-6667772cf27b

Finally, we get the final payload which is a Password Stealer Malware.

11975_d2ef0111-6800-42e2-9f27-8f2bca050e0b

Adds and modifies registry:

10016_772912f7-7904-435c-97ad-9c6097b897bd

The malware steals credentials from email, ftp, and browser programs by concatenating available strings in the memory and usage of the APIs RegOpenKeyExW and PathFileExistsW to check if registry or paths of various programs exist:

11828_cb809011-1906-4382-887b-667133b0a005
8642_3323c76e-9c46-4a76-996f-5a4a6cd0023c

Email Programs (Memory Strings)

8997_453d905f-8d5f-4bf2-86c3-4c4eab266472

Browser Programs (Memory Strings)

10220_7e230a4d-71fc-4931-8489-a491bdf70129

FTP Programs (Memory Strings)

9118_4acc57ce-1bf7-4636-989b-cd56ec9ce984

Finally, the malware will send data to its C&C via a HTTP POST:

11094_a896c336-fd38-43a3-8544-c668d5d38f26

It's pretty unusual to find so many stages and vectors being used to download malware. Indeed, this approach can be very risky for the malware author. If any one stage fails, it will have a domino effect on the whole process. Another noticeable point is that the attack uses file types (DOCX, RTF and HTA), that are not often blocked by email or network gateways unlike the more obvious scripting languages like VBS, JScript or WSF.

 

Indicators of Compromise

DOCX File
MD5: F7DA16B16567A78C49D998AE85021A0F
SHA1: 776C469861C3AC30AA63D9434449498456864653

RTF File
MD5: 79BCAFD6807332AD2B52C61FE05FFD22
SHA1: 0D8215F88C75CD8FBF2DFAB12D47B520ECE94C52

HTA File
MD5: 11B28D4C555980938FE7440629C6E0EC
SHA1: 0ADD65090EF957AA054236FF6DD59B623509EC8B

Final Payload
MD5: EDB27CC321DF63ED62502C172C172D4F
SHA1: C4AA4E70521DD491C16CE1FBAB2D4D225C41D1EA

Latest SpiderLabs Blogs

The 2023 Retail Services Sector Threat Landscape: A Trustwave Threat Intelligence Briefing

The annual holiday shopping season is poised for a surge in spending, a fact well-known to retailers, consumers, and cybercriminals alike. The latter group, however, is poised to exploit any...

Read More

Pwning Electroencephalogram (EEG) Medical Devices by Default

Overall Analysis of Vulnerability Identification – Default Credentials Leading to Remote Code Execution During internal network testing, a document was discovered titled the “XL Security Site...

Read More

Hidden Data Exfiltration Using Time, Literally

I was looking at my watch last week and my attention was moved towards the seconds over at the right of the watch face, incrementing nicely along as you’d expect. Now, I don’t know if I’d just spent...

Read More