Code obfuscation / decompilers?

Joshua Muskovitz josh at open.com
Sat Oct 7 00:14:09 EDT 2000


Thanks for the reply.  I too, spent my youth doing just this sort of thing.
I understand that the effort necessary to make code unreadable yet efficient
is approximately the same amount of time it takes to reverse the process.
Luckily, the advancement of compilation techniques makes obfuscation
possible, by automating the process.

So, for the concrete example, suppose that I have a mechanism written in
Python which handles, say, license key validation.  I need a method (or set
of methods) which manipulate keys to verify their authenticity, and
decompose them to turn various program bits on and off.  This is a standard
problem for many software developers.

The actual algorithm for generating the keys and taking them apart
originates in older code written in C.  It was fairly easy, given the
original C source, to produce a python equivalent.  But...  I don't want
prying eyes to easily reverse engineer our key validation process, or it
will become useless.  There is a "good enough" point, though, where the
amount of time needed to crack the algorithm exceeds the value of the
software.  My goal is to obfuscate my code enough to get to this point.
(Identifying this point is another matter, of course!)

I realized that simply shipping .pyc files is far from enough.  Importing
them into the interpreter gives one access to the names of the methods,
docs, etc.  (Duh.)  So, the first obvious step was to replace the names of
the more sensitive methods with arbitrary names (__abc, __def, etc) and only
keeping the names of the intentionally public methods, which take in a key
and simply return a boolean, for example.  Removing the docs is the next
step.  Removing error handling (!) goes another step towards maing
experimentation less useful.  But a "real" obfuscator, which took bytecode
and munged it into something really bizarre would help a lot more.

The value of the decompiler is to verify how well the obfuscator works.

-- josh




-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----==  Over 80,000 Newsgroups - 16 Different Servers! =-----



More information about the Python-list mailing list