Code Tamper-Proofing using Dynamic Canaries

Rajesh Shrivastava, Kevin Jude Concessao, Chittaranjan Hota · 2019

Control flow integrity is a technique that prohibits hijacking of the control flow of a program. The common CFI implementations match labels at the call-sites and return-sites. Also, function calls are oblivious of previous function invocations. In this paper, we propose a novel technique that ensures control flow integrity using dynamic canaries with a sequence of XOR computations at the call-sites and return-sites. The values of these canaries are representative of the current execution history. Further, these canaries also provide implicit protection against buffer-overflow attacks. As a proof-of-concept, a plug-in for the GCC compiler has been developed in this work to add necessary instrumentation instructions, with a performance overhead of under 5%.

Read the paper · More papers on PaperTik