GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — Control Flow Flattening Control Flow Flattening
R1kk3r edited this page
The purpose of this pass is to completely flatten the control flow graph of a program. For a detailed explanation of the control flow flattening technique, see for instance the paper of T László and Á Kiss, Obfuscating C++ programs via control flow flattening, Annales Univ. Sci. Budapest., Sect. Comp. 30 (2009) 3-19. Note however that our algorithm fully flattens the control flow, which is not the case of the one of László and Kiss.
Here is an example. Consider this very simple C program : The flattening pass will transform this code into this one : As one can see, all basic blocks are split and put into an infinite loop and
the program flow is controlled by a Here, it's what it looks like for the control flow generated before the flattening :
After the flattening, we get the following instruction flow:
As one can see, the main difference between the example in pure C, the IR version is completely flattened. Clone this wiki locally |
| You are visitor 01402792 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |