Runtime heap spray detector
Nozzle is a runtime monitoring infrastructure that detects attempts by attackers to spray the heap. Nozzle uses lightweight emulation techniques to detect the presence of objects that contain executable code. To reduce false positives, we developed a notion of global “heap health”.
The Nozzle lightweight emulator scans heap allocated object data to identify valid x86 code sequences, disassembling the code and building a control flow graph. Because the attack jump target cannot be precisely controlled, the emulator follows control flow to identify basic blocks that are likely to be reached through jumps from multiple offsets into the object.
We have developed a novel approach to mitigate this problem using global heap health metrics, which effectively distinguishes benign allocation behavior from malicious attacks. Fortunately, an inherent property of heap spraying attacks is the fact such attacks affect the heap globally. Consequently, Nozzle exploits this property to drastically reduce the false positive rate.
While static and runtime methods for malware detection been proposed in the literature, both on the client side, for just-in-time in-browser detection, as well as offline, crawler-based malware discovery, these approaches encounter the same fundamental limitation. Web-based malware tends to be environment-specific, targeting a particular browser, often attacking specific versions of installed plugins. This targeting occurs because the malware exploits vulnerabilities in specific plugins and fail otherwise. As a result, a fundamental limitation for detecting a piece of malware is that malware is triggered infrequently, only showing itself when the right environment is present. In fact, we observe that using current fingerprinting techniques, just about any piece of existing malware may be made virtually undetectable with the current generation of malware scanners.
- Clemens Kolbitsch, livshits, and zorn, Rozzle: De-Cloaking Internet Malware, in Proceedings of the Oakland Symposium on Security and Privacy, IEEE, 20 May 2012
- Clemens Kolbitsch, Benjamin Livshits, Benjamin Zorn, and Christian Seifert, Rozzle: De-Cloaking Internet Malware, no. MSR-TR-2011-94, 25 October 2011
- Paruj Ratanaworabhan, Benjamin Livshits, and Benjamin Zorn, Nozzle: A Defense Against Heap-spraying Code Injection Attacks, in Proceedings of the Usenix Security Symposium, USENIX, 2009
- "Nozzle: Counteracting Memory Exploits", by Janie Chang, Dr. Dobbs Journal, November 24, 2009 (also on the MSR website).
- MSDN Channel 9 Video: "Heap Spraying Attack Detection with Nozzle", Ben Livshits and Ben Zorn, interviewed by Peli de Halleux, March 25, 2009