Re: C/C++ obfuscator

robert.hundt@gmail.com
3 Feb 2005 22:45:36 -0500

          From comp.compilers

Related articles
[2 earlier articles]
Re: C/C++ obfuscator walter@bytecraft.com (Walter Banks) (2005-01-24)
Re: C/C++ obfuscator ppluzhnikov@charter.net (Paul Pluzhnikov) (2005-01-25)
Re: C/C++ obfuscator gneuner2@comcast.net (George Neuner) (2005-01-25)
Re: C/C++ obfuscator lkrupp@pssw.NOSPAM.com.INVALID (Louis Krupp) (2005-01-30)
Re: C/C++ obfuscator idbaxter@semdesigns.com (Ira Baxter) (2005-01-30)
Re: C/C++ obfuscator ppluzhnikov@charter.net (Paul Pluzhnikov) (2005-02-03)
Re: C/C++ obfuscator robert.hundt@gmail.com (2005-02-03)
Re: C/C++ obfuscator ppluzhnikov@charter.net (Paul Pluzhnikov) (2005-02-06)
Re: C/C++ obfuscator lkrupp@pssw.com (Louis Krupp) (2005-02-06)
| List of all articles for this month |
From: robert.hundt@gmail.com
Newsgroups: comp.compilers
Date: 3 Feb 2005 22:45:36 -0500
Organization: http://groups.google.com
References: 05-01-07405-01-110
Keywords: tools
Posted-Date: 03 Feb 2005 22:45:36 EST

Hi @ll,


Is it really that complicated to write an obfuscator? If you take an
available compiler, such as SGI's Pro64, they have tools to convert
their IR back to C/C++. We have such a tool in our HP-UX compiler, and
I know that many other compiler vendors do have those internal tools as
well for debugging (reading the IR itself is usually more complicated).


That generated code already looks pretty bad compared to the original
input, and if enough optimizations are applied, the control flow will
have changed significantly, if PRE has been performed, all kinds of
temps will be there, forward subst gets rid of all kinds of locals, the
data layout will be different because of local and global data layout
optimizations, loops are interchanged, fused, distributed, unrolled,
if-converted etc. etc.


One just needs to add a final step to rename variables and types and if
you really want you can additionally permute the CFG and - off you go
with your tool. And - this would even work interprocedurally, which you
need to obfuscate a whole program. Thinking about it - you can add all
kinds of funny trasnformations...


Am I missing something?


-- RH


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.