Control-Flow Integrity: Compiler Assisted Signature Monitoring

Mario Werner

Research output: ThesisMaster's Thesis


Nowadays, security sensitive data is distributed across all kind of devices. Attacks targeting this data are an ubiquitous threat. Embedded systems like smart cards are especially endangered given that they often play central roles in the security concept of bigger systems. A typical smart card consists of a processor and secured cryptographic hardware modules. These components are vulnerable to fault attacks. Previous research mostly focused on securing the cryptographic primitives. However, a system is only as strong as its weakest link. An adversary who mounts fault attacks against an unprotected processor can alter the control flow of the software. This compromises the security of the whole system and has to be prevented. Control-Flow Integrity (CFI) techniques can potentially provide protection.

In this thesis, we present a CFI scheme called Derived Signature Monitoring using Assertions (DSMA). The scheme is based on the Continuous-Signature Monitoring (CSM) scheme from Wilken and Shen and has been designed with embedded applications in mind. DSMA uses a hybrid architecture and protects the control flow on the instruction-stream level. This permits the detection of control-flow errors induced by logical as well as by physical attacks. Implementing the scheme requires both hardware and software modifications. We implemented DSMA for the lightweight ARM Cortex-M0+ compatible Xetroc-M0+ processor. The DSMA monitor introduces only a 4.6% overheard on the microprocessor core.

Software instrumentation for DSMA is performed using a modified compiler in combination with a special post-processing tool. The advantage of this concept is its user friendliness. Protecting a program with DSMA is as simple as compiling it. The modified compiler and the post-processing tool have been built upon the LLVM compiler infrastructure. Overhead on the software side largely depends on the actual program code. Hardening an assembler optimized implementation of Elliptic Curve Cryptography (ECC) introduces a 2.5% runtime and a 55.7% program memory overhead. Protecting a C version of the Advanced Encryption Standard (AES) on the other hand leads to an 8% runtime and a 4.5% program memory overhead.

This thesis lays the foundation for future research. Further contributions in the field of compiler assisted control-flow integrity can be expected.
Original languageEnglish
  • Wenger, Erich, Advisor
  • Mangard, Stefan, Supervisor
Publication statusPublished - 2014


  • Control-Flow Integrity

Fields of Expertise

  • Information, Communication & Computing

Cite this