Re: Name obfuscation precompiler (VBDis)
1 Feb 2004 12:49:18 -0500

          From comp.compilers

Related articles
Name obfuscation precompiler (2004-01-22)
Re: Name obfuscation precompiler (2004-01-31)
Re: Name obfuscation precompiler (2004-02-01)
| List of all articles for this month |

From: (VBDis)
Newsgroups: comp.compilers
Date: 1 Feb 2004 12:49:18 -0500
Organization: AOL Bertelsmann Online GmbH & Co. KG
References: 04-01-135
Keywords: tools, comment
Posted-Date: 01 Feb 2004 12:49:18 EST ( schreibt:

>Is there any sample compiler source code available that does
>anything remotely similar to the above or can anyone give me any
>suggestions on a quick proof of concept implementation of my own?

You may have a look at the cpp preprocessor of gcc. A simple
obfuscation then is possible by replacing all non-predefined symbols
(token "names") by other strings. Since the preprocessor doesn't
distinguish between identifiers for local and global identifiers, or
identifiers in different namespaces, the same name then is substituted
for e.g. a local variable "i" in every subroutine.

But why do you want obfuscation at all? When your code refers to
external (library) symbols, or exports symbols for use by other
applications, then you'll need at least a list of names which never
must be obfuscated. Then stripping all debug information from the
compiled files should provide the same results as your obfuscator. If
then still remain unwanted symbols in the compiled files, it may be
easier to tweak the name list in the object files, instead of
bothering with the source code.

[The usual point of obfuscation is to be able to provide source code to
people running on systems for which you don't have a compiler without
giving them full access to the useful source code. -John]

Post a followup to this message

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