How to encrypt a program for defense against disassembly? [closed]
I need to protect my pr开发者_运维问答ogram from disassembly. The first attempt would be by encrypting the program and decrypting its parts when needed. Perhaps encrypting again when decrypted code is executed.
Please give me a clue, how create this type of defense. Obviously without assambler this task is difficult, but I haven't found many resources.
If you have any URLs to share with information around this issue, please share.
This is pointless. If you don't have control and support of the hardware, the code could always be run in an emulator that would read decrypted instructions.
Protect the data not the code.
This is just wrong :/. If you encrypt/decrypt every function that will be executed, your program will have the speed as a ... i don't know. A stone perhaps?
There is no good solutions on how to completely protect against disassembly.
Look at this article and also this one regarding binary-level encryption of executable code.
Other than that, just strip your debugging symbols and use gcc
's -O2
flag; the bytecode will become more or less un-decompilable.
You'll have to have the decrypting component in the clear, right? Which means that you have handed the attacker the key to unlock the box, right? So what, exactly, have you gained by doing this?
精彩评论