Trustwave and Cybereason Merge to Form Global MDR Powerhouse for Unparalleled Cybersecurity Value. Learn More
Get access to immediate incident response assistance.
Get access to immediate incident response assistance.
Trustwave and Cybereason Merge to Form Global MDR Powerhouse for Unparalleled Cybersecurity Value. Learn More
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:
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:
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:
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:
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.
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.
Copyright © 2024 Trustwave Holdings, Inc. All rights reserved.