Post by Real TrollIs there any way to stop an application from bundling all the debug info
in the executables so that people can't reverse engineer the file?
I was watching a yourTube video and somebody showed a way to reverse the
exe file and extract the source code from it and the guy created a
keyGen from it so that now everybody can use the programs without buying
it. Surely, there must be a way to stop this or at least make it harder
for amateurs from doing this.
I create the "Release" versions of my toy applications and when I opened
the exe file in WordPad, I could see almost most things that are
supposed to be private.
Jesus is not going to help me here, can he?
As others have pointed out, make sure you build without debug
information, and run "strip" on the executable to take out any extra
linking or debug symbols that are not needed.
Prefer to use static linking where possible, rather than dynamic
linking. This lets you keep more of the function and symbol names
internal, and they will be removed by "strip".
Use link-time optimisation. This will blur the boundaries between
functions on a much wider scale, making it much harder for reverse
engineering. In general, high optimisation levels make it harder to
follow the logic of code from a disassembly.
Beyond that, you can look at obfuscation. If you have got lots of
strings in the code, try to find a way to "munge" them. This is
probably best done with the help of some external scripts. Something as
simple as xor'ing each letter with a fixed value will be quite effective
at ruining an attempt at running "strings" on the file.
Finally, there are obfuscation utilities that intentionally jumble up
code by inserting extra jumps, splitting up functions, etc. Note that
these may slow down the code - sometimes quite significantly, as you
lose a lot of locality in your code.