C++11 METAPROGRAMMING TECHNICS APPLIED TO SOFTWARE OBFUSCATION

No ratings

Presented at HackInParis 2014 by

Obfuscation is the transformation of source or binary code into a form that is difficult to understand, but without affecting the functionality of the code. Goals of obfuscation are multiple: hide a secret or a logic, make code harder to reverse engineer, protect intellectual property, prevent tampering, etc. Obfuscation is not a panacea. It is well known that obscurity does not provide security by itself. However, obfuscation is a useful tool in a defense in depth approach when it is combined with other security measures. Such technics are used for years in DRM systems and viruses. It has also some similarities with more recent technics such as white-box cryptography. There are several approaches to obfuscate software: pre-processing of the source code, post-processing of the binary, or direct modification of the original source code. They all have drawbacks such as modification of the compilation process, difficulty to maintain source code modified to obfuscate it, etc. This presentation is based on my researches in this domain since 2010 and is focused on the obfuscation of C, C++ and Objective-C code using the C++ compiler itself and technics known as metaprogramming. I will present the principles behind C++ metaprogramming applied to obfuscation and some concrete applications of these concepts.