Microsoft Research
Microsoft Research Year 2008 Peer-reviewed
Security · Vulnerability Detection

Nozzle: A Defense Against Heap-spraying Code Injection Attacks

Paruj Ratanaworabhan Benjamin Livshits Benjamin Zorn
2008
Publication year
Microsoft Research
Venue
Peer-reviewed
Type

Problem

Heap spraying is a new security attack that significantly increases the exploitability of existing memory corruption errors in type-unsafe applications. With heap spraying, attackers leverage their ability to allocate arbitrary objects in the heap of a type-safe language, such as JavaScript, literally filling the heap with objects that contain dangerous exploit code. In recent years, spraying has been used in many real security exploits, especially in web browsers.

Approach

In this paper, we describe Nozzle, 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”.

Results

We measure the effectiveness of Nozzle by demonstrating that it successfully detects 12 published and 2,000 synthetically generated heap-spraying exploits. We also show that even with a detection threshold set six times lower than is required to detect published malicious attacks, Nozzle reports no false positives when run over 150 popular Internet sites. Using sampling and concurrent scanning to reduce overhead, we show that the performance overhead of Nozzle is less than 7% on average. While Nozzle currently targets heap-based spraying attacks, its techniques can be applied to a more general class of attacks in which an attacker attempts to fill the address space with dangerous code objects.

Cite this paper — BibTeX
@TechReport{nozzle08tr,
  title = "Nozzle: A Defense Against Heap-spraying Code Injection Attacks",
  author = "Paruj Ratanaworabhan and Benjamin Livshits and Benjamin Zorn",
  year = "2008",
  month = nov,
  institution = "Microsoft Research",
}
Copied