Wednesday, 21 August 2013

Native code obfuscation as part of a build process?

Native code obfuscation as part of a build process?

I'm interested in doing code obfuscation (native code) as a part of a
build process. I can think of several ways of doing it:
1) Writing a compiler plugin, that would get internal representation after
all optimization phases, transform it and then send it to compiler's
backend. In this case could you advise me some compilers, that support
plugins like that? Programming language doesn't really matter, but I would
like to try out something other than C/C++ (I know that both GCC and Clang
support plugins, but I could never get it working properly on Windows).
2) Dump internal representation after all optimization phases to file,
parse and process it with my obfuscation tool and pass it back to the
compiler. I couldn't find how to do it with GCC (I successfully dumped
different internal representations, but I couldn't find how to make
compiler generate code from it). And I know that Clang is able to generate
LLVM bitcode, that can be processed and compiled with LLVM compiler, but
again I couldn't make it work properly on Windows. Do you know any
compiler that allows doing such things?
3) Currently I'm doing obfuscation by preprocessing sources, it works, but
it takes too long to do it for a large code base. So I'm looking for
alternative ways of doing it, and I want to read your opinions on what is
the best way to do native code obfuscation. Thanks in advance!

No comments:

Post a Comment