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 MS XML 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:
So why did the malware author modify heaplib like this? It should be quite clear now that:
- It can be used as an evasion technique and avoid running unnecessary heap spraying on browsers that aren’t relevant to this specific CVE.
Great, so we know what the problem is, and what it is good
for, but what about a solution?
We learn 2 things from this event:
- Straying too far away from standards and supporting all sorts of quirks not only can, but will, turn into a security risk.
- 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.