Related articles |
---|
Making a partial C compiler cyberheg@l115.langkaer.dk (John Eskie) (2003-05-18) |
Re: Making a partial C compiler torbenm@diku.dk (2003-05-23) |
Re: Making a partial C compiler matt@peakfive.com (Matt Rosing) (2003-05-24) |
Re: Making a partial C compiler blackmarlin@asean-mail.com (2003-05-24) |
Re: Making a partial C compiler idbaxter@semdesigns.com (2003-05-24) |
Re: Making a partial C compiler cyberheg@l115.langkaer.dk (John Eskie) (2003-05-29) |
Re: Making a partial C compiler vbdis@aol.com (2003-06-03) |
Re: Making a partial C compiler lars@bearnip.com (2003-06-03) |
Re: Making a partial C compiler boldyrev@cgitftp.uiggm.nsc.ru (Ivan Boldyrev) (2003-06-03) |
Re: Making a partial C compiler jyrixx@astro.temple.edu (2003-06-03) |
Re: Making a partial C compiler torbenm@diku.dk (2003-06-05) |
Re: Making a partial C compiler cyberheg@l115.langkaer.dk (John Eskie) (2003-06-08) |
[3 later articles] |
From: | "John Eskie" <cyberheg@l115.langkaer.dk> |
Newsgroups: | comp.compilers |
Date: | 29 May 2003 03:04:58 -0400 |
Organization: | TDC Internet |
References: | 03-05-139 |
Keywords: | C, tools |
Posted-Date: | 29 May 2003 03:04:58 EDT |
Thanks to everyone who responded.
However I don't think I made myself really clear on what objectives I
have. The obfuscator I want to create should produce obfuscated
source code that will be functionally the same as the original. I
don't really care about source code obfuscation if it looks nice to
read since I only distribute binary files. So I only concentrate on
what will be seen on disassembly. (For java there has existed such
obfuscators for many years, but they only work on bytecode and not
sourcecode.)
When I said flow obfuscation I really had something as this in mind:
1. Variable and function name string replacement (more of you already wrote
how that can be done).
2. Introduction of parallel code i.e. dummy code which doesn't interfear
with the real program but make things harder to read since you gotta figure
out what is real and what isn't real.
This means at best that the obfuscator should be able to determine which
type local variable is so it can do processing with it e.g.:
int real_var, real_var2;
int dummy_var;
// Real code
real_var2 = real_var + 235;
...
// Code which does nothing
dummy_code = abs(real_var2 * real_var);
// More real code
...
To do this it's needed to know where you can place the code in order not to
damage the real program.
3. Rearranging of code so if you got 3 blocks of statements A, B, C you can
do:
goto A_;
C_:
C
goto END;
B_:
B
goto C_;
A_:
A
goto B_;
END:
4. Dynamic "linking" by making exact function calls to be resolved at
runtime by using function pointers.
I'm hoping/thinking it's possible to solve some of these wishes by
using macros (#define (x) ...) and since I am doing it on my own code
I don't need to care about every possible situation that can arrise
because I know my own coding style.
Thanks in advance.
-- John
Return to the
comp.compilers page.
Search the
comp.compilers archives again.