A framework for automated architecture-independent gadget search

  • Authors:
  • Thomas Dullien;Tim Kornau;Ralf-Philipp Weinmann

  • Affiliations:
  • zynamics GmbH;zynamics GmbH;University of Luxembourg

  • Venue:
  • WOOT'10 Proceedings of the 4th USENIX conference on Offensive technologies
  • Year:
  • 2010

Quantified Score

Hi-index 0.00

Visualization

Abstract

We demonstrate that automated, architecture-independent gadget search is possible. Gadgets are code fragments which can be used to build unintended programs from existing code in memory. Our contribution is a framework of algorithms capable of locating a Turing-complete gadget set. Translating machine code into an intermediate language allows our framework to be used for many different CPU architectures with minimal architecture-dependent adjustments. We define the paradigm of free-branch instructions to succinctly capture which gadgets will be found by our framework and investigate side effects of the gadgets produced. Furthermore we discuss architectural idiosyncrasies for several widely spread CPU architectures and how they need to be taken into account by the generic algorithms when locating gadgets.