DSLR: Polymorphing Software By Randomizing Data Structure Layout
Zhiqiang Lin, Ryan Riley, Dongyan Xu 
Lab Friends, Purdue University


----------------------------------------------------------

To install the patch:

1. get the original gcc-4.2.4 source code:
 - wget http://gcc.cybermirror.org/releases/gcc-4.2.4/gcc-4.2.4.tar.bz2

2. get the patch file:
 - wget http://www.cs.purdue.edu/homes/zlin/file/gcc-4.2.4.patch


3. build the original gcc (to make sure it works)
 If you have any problems when compiling the
 original gcc, you may try some of my options.
 - I use "gcc (Ubuntu 4.3.2-1ubuntu12) 4.3.2" to compile gcc-4.2.4.
   Also, I tried "gcc (GCC) 4.0.3", it works too.
 - And I disable some of the original gcc features when compiling it.
 - My configure is:
   $./configure --prefix=/home/zlin/gcc-4.2.4 --enable-languages=c,c++ --disable-libmudflap --disable-objc-gc
 

4. Apply our patch file
  ~/gcc/gcc-4.2.4$ patch -p1 <gcc-4.2.4.patch

5. Then you will have a workable version of gcc which
can randomize the data structure.


------------------------------------------------------------

To use our gcc:

1. You may refer our paper for all the details (it
 contains example code).
 http://www.cs.purdue.edu/homes/zlin/file/DIMVA09.pdf

2. You may also use our simple test file. Make sure
 you use the patched gcc in the makefile.
 http://www.cs.purdue.edu/homes/zlin/file/test.tar.gz

3. A few notes:
 - To build a new project, you could first delete
   the file "/tmp/struct" because that file contains
   a mapping of all the struct/class random value (detail
   is in the paper). Each project should have a system wide 
   "/tmp/struct" file (reason is explained in the paper).


------------------------------------------------------------ 
