C++11 Metaprogramming Applied to Software Obfuscation
summary
Uses C++11 template metaprogramming to emit compile-time encrypted string literals (variadic templates + index sequences) and per-string randomized keys via a meta-LCG seeded from __TIME__ + __COUNTER__ seed, producing inline decryption at runtime. Builds compile-time Boost MPL/MSM finite-state machines to interpose and polymorph calls so IDA cannot find cross-references; demo shows protected binaries with no plaintext strings and missing xrefs. Source is on GitHub; works with clang/GCC, not full MSVC.
AI-written summary · about
chapters (24)
- 0:00Intro
- 0:56Reverse engineering
- 5:26What is Obfuscation?
- 7:17Without templates
- 8:09With C++ templates
- 9:29Type safety
- 9:59Optimisation based on types
- 10:56C++ metaprogramming
- 11:50Strings literals obfuscation
- 16:501st implementation - Problem
- 18:172nd implementation - Usage
- 18:27rd implementation
- 19:08Generating (pseudo-) random numbers
- 19:55Seed
- 21:23th implementation
- 23:03Without obfuscation
- 25:11Application 2 - Obfuscate calls
- 25:44Finite State Machine (simple example)
- 26:23Boost Meta State Machine (MSM) library
- 31:25FSM + Debugger Detection
- 32:36More obfuscation
- 34:07Predicate
- 35:01Compilers support
- 36:21White paper
related talks
01h 06m“C++ Metaprogramming: Journey from simple to insanity and back"
57mIntroduction to C++ Template Metaprogramming
59mMeta++: Language Support for Advanced Generative Programming
26mAn Effective Approach to Software Obfuscation
01h 08mC++ Metaprogramming: A Paradigm Shift
45m"Advanced Malware Threat: handling obfuscated code using..."
01h 08mTemplate Meta-State Machines, Madness and Shannon
30mC++ Cryptozoology - A Compendium of Cryptic Characters :: #2
