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

Backward Compatibility Plays to Malware’s Hands

Maintaining backward compatibility in software products is hard. Technology evolves on a daily basis, and while it feels "right" to go ahead and ditch the old technology in favor of the new, it sometimes might cause issues, especially when a software platform which millions of developers develop for is in question. However, it turns out that the desire of software vendors to keep backward compatibly is abused by malware authors.

Let's have a look at a piece of malware recently spotted in the wild:

BSL_10147_7b91e894-d61a-41fc-9d83-54e2f28bf4f4

Most of you will find it familiar, since it is the latest MSXML Core Services vulnerability (CVE-2012-1889) along with the notorious heaplib which became popular once more thanks to this vulnerability. But wait, something is weird about this snippet from heaplib… look at the if-else statement at the beginning of the screenshot – it was modified from the original version and now has those semicolons. So why did the malware authors put them there?

Let's have a look at a simpler case:

10147_7b91e894-d61a-41fc-9d83-54e2f28bf4f4

All modern browsers consider this code as an invalid JavaScript, and won't execute even a single line of it. IE, on the other hand, considers this as a perfectly legitimate JavaScript, and will execute the alert function with x=3.

So why did the malware author modify heaplib like this? It should be quite clear now that:

  1. It can be used as an evasion technique and avoid running unnecessary heap spraying on browsers that aren't relevant to this specific CVE.
  2. It can be used as a method to trick various dynamic analysis engines such as Wepawet and JS-Unpack. Such engines usually handle well only strict JavaScript, based on the RFC, without vendor quirks.

Great, so we know what the problem is, and what it is good for, but what about a solution?
We tried to get an answer from MS regarding why would IE allow such syntax for JavaScript, and were responded that it is supported in IE versions <9 and in the compatibility mode of 9 and 10. Since the compatibility mode can be easily requested by the page (X-UA-Compatible), even users who use the most modern version of Microsoft's browsers are still vulnerable to this trick.

We learn 2 things from this event:

  1. Straying too far away from standards and supporting all sorts of quirks not only can, but will, turn into a security risk.
  2. Malware authors continue with their efforts to not only discover new vulnerabilities, but also to find interesting ways to evade security engines.

Unfortunately, it is not possible to force IE to use the standards mode for internet sites, so our best advice for IE users would be to keep the system up-to-date with the latest security updates at all times.

Latest SpiderLabs Blogs

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

Breakdown of Tycoon Phishing-as-a-Service System

Just weeks after Trustwave SpiderLabs reported on the Greatness phishing-as-a-service (PaaS) framework, SpiderLabs’ Email Security team is tracking another PaaS called Tycoon Group.

Read More