Trustwave's 2024 Retail Report Series Highlights Alarming E-Commerce Threats and Growing Fraud Against Retailers. Learn More

Trustwave's 2024 Retail Report Series Highlights Alarming E-Commerce Threats and Growing Fraud Against Retailers. 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

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

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