so i want to protect my software against reverse-engineering and i want to add checksum verification to prevent patching the binary but the problem that if i added a checksum verification the binary changes, how's the proper way to do it?

  • 1
    Your effort to prevent patching by adding / verification of checksum is a useless waste of your time. I'm sorry, it's a naive approach.
    – MarianD
    Aug 23, 2021 at 1:02

2 Answers 2


You cannot prevent patching. There are ways to make reverse engineering harder, but the checksum approach is not the best way. There are way more advanced methods, that cannot be compared to a custom-made antitampering routine.

Even those advanced methods become eventually studied and cracked.

Either you have to rely on commercial protections (maybe hardware-dependent like dongles), or you have to give a great effort on designing your protection scheme, but have in mind that if someone skilled enough is determined to crack your app, it will happen.

  • i know that it will gonna be cracked anyway using: Loader (editing in memory), Removing Protection Code, etc.... , and i don't want to depend on other people software to protect my software i want to protect it myself, and the goal is not to prevent it anyway cause i know it's impossible i want to make it harder, can you send a website or something that can help? Aug 24, 2021 at 12:21
  • @Ahmed, "... i know it's impossible i want to make it harder ..." - harder for whom??? Any reverse engineer will break your amateur protector within seconds or few minutes, while other people may barely change your software beyond changing some text strings.
    – MarianD
    Aug 24, 2021 at 20:30
  • @MarianD what do you mean with "Any reverse engineer will break your amateur (((protector)))" do you even know what's going on? i literally said "i want to protect my software against reverse-engineering" not making a protector, please next time when you read someone question PLEASE READ THE WHOLE QUESTION FOR THE SAKE OF GOD, and if you can't help or seeing that my question are stupid then simply don't answer it, not trying to get smarter on somebody because he just started learning something. Aug 25, 2021 at 21:53
  • @Ahmed, excuse me, please, I didn't want to offend you, believe me. I wanted to help you not waste your time for something which is useless. But if it is only for your learning and understanding, it's OK.
    – MarianD
    Aug 26, 2021 at 0:19
  • @MarianD that's not the way you help somebody, you tell him what's better to do and if you really wanted to help him then give him a website or a sample code that can help him to go to the right direction, not saying "Any reverse engineer will break your amateur protector within seconds or few minute", but yeah it's fine. Aug 27, 2021 at 0:32

You can use a packer. Packers such as VMProtect, have something called virtualization engine - where code is encrypted, never actually decrypted, because it runs through a virtual CPU. This is probably the toughest thing to crack in any client-sided protection possible.

There are a few other packers out that have this feature as well. If you really want top notch client-sided security, look out for this feature (of course include others like anti-debugging on so on.). You will want to keep it up to date, because there are usually scripts made to unpack/decrypt these protection tools. It will probably cost a bomb though.

Without deep knowledge and understanding, it is actually not that easy to crack them. This alone would defeat the vast majority that have malicious intent.

Of course, you would know by now - that security that relies on client-sided security alone is never fully secured. But you can certainly make it hard to crack.

  • actually i want to do that myself i don't want to depend on other people software to protect mine (because i'm learning from it anyways) plus there's a scripts that devirtualize VMProtect. Aug 27, 2021 at 9:43
  • @Ahmedminegames indeed there are scripts, but it is unlikely that they would work on the latest version - because there are usually updates to the virtualization engine that breaks the script. or at least there should be an update like this every X release/version of the packer. If you want to learn it yourself, you can search google on how to make your own PE file packer - you will need to study the PE file format, and how windows runs and interact with exe/dll files under the hood. That said, your protection will likely be crack-able even by amateurs.
    – Niraeth
    Aug 27, 2021 at 14:14
  • 1
    In your original post, you mentioned checksum verification - checksum verification alone without other forms of protection makes the checksum verification nothing more than an if-else statement. A malicious author would just need to patch this if-else statement. Your goal would then be to make it hard for them to patch it. For example, you could embed your entire file into another file - so a file in a file. Encrypt the original file, and only decrypt and load it at runtime. Perform a checksum verification on both ends - before decrypting the file, and after the file is decrypted at runtime.
    – Niraeth
    Aug 27, 2021 at 14:19
  • Many other ways to go about protecting a file. Google will be your best source of answer.
    – Niraeth
    Aug 27, 2021 at 14:21
  • no i have another protections such as anti-debugging, anti-hooking, etc......, and there's nobody talked about preventing patching the binary / prevent file modifying in C++, "you could embed your entire file into another file - so a file in a file. Encrypt the original file, and only decrypt and load it at runtime." so i just encrypt my program with something simple like XOR (many layers) and then decrypt it in runtime? what is the best way to do it though, do i just embed the program inside the resources? and i need to prevent dumping right? Aug 27, 2021 at 18:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.