Cryptography Reference
In-Depth Information
of information. If the loop counter is an integer and it's incre-
mented in a predictable way, it's possible to use one of these
two equivalent pieces of code:
{
for (int i=0;i<10;i++)
{
for (int i=0;i<=9;i++)
Transformation Most programming languages are, like C, Java
and Perl, inherently declarative and filled with statements that
are executed in some predefined order. Others are defined
more by transformations. They are not much different from
the grammars used in Chapters 7 and 8. These chapters of-
fer a number of ways to transform the grammars, in essence,
to change the encryption structure. These techniques, like the
ones in Section 7.3.3, will also help obfuscate code.
These techniques themselves are pretty independent and it's usu-
ally possible to use all of themwith some code.
In fact, I know one
person who worked at a
place that used
automated tools to
search for comments.
He turned around and
wrote an automated
comment generator.
The techniques are also easy to apply in different contexts. Re-
ordering independent blocks of instructions can usually be done eas-
ily with source code if the language doesn't require that the methods
or variables be declared in a fixed order. The methods in a Java class,
for instance, can appear in any order, and this is an easy way to add
a watermark to Java code without bothering to do any complicated
code analysis to determine whether two blocks of code are truly in-
dependent.
The technique can often be applied in binary packages too if the
binary code doesn't require code to appear in a particular order. Var-
ious routines can be reordered in code as long as all references to the
location are rewritten.
18.4 Real Tools
There are too many tools available for obfuscation to list them here.
This short list is provided only as a starting point:
JODE A nice package for Java from Jochen Hoenicke that can
be downloaded from jode.sourceforge.net . It includes a de-
compiler, an obfuscator that works by renaming, and a few
other tools like a dead code eliminator. This tool can be used
to introduce watermarks or remove them.
Search WWH ::




Custom Search