简体   繁体   中英

Is possible edit a executable?

I struggle with the licence of the software I wrote in C(the core) and C++(the GUI).

At the beginning I thought I'd use some crypto algorithm, but it was very easy to read the password stored inside the executable.

So to prevent hacks I decided to store all the valid serials inside the executable, my optimistic guess was there would be 1000 serials. No need to encrypt anything. But I read that it is possible to edit the executable, this means that if I write:

if(tb->is_demo)
{
    //check limits
}

Somebody can by-pass it and write:

if(false)
{
    //check limits
}

So, it becomes hard to protect my software, each solution that comes to mind, earlier or later there is a main if somewhere that can be bypassed. The question are two:

  1. Is possible edit an executable?
  2. If yes, what can I do to avoid to get edited?
  1. is possible edit a executable?

Without surprises, Yes.

  1. if yes, what can I do to avoid to get edited?

You cannot completely avoid it. Big software development firms are working on the subject, yet their softwares (Professional software, games, ...) are hacked and used for free anyway.

What you can do is make the hack more expensive than your licence cost. You also can accept being "frauded". Or you can protect yourself by other means that technological ones (think law suits).

You may ask how to "make the hack more expensive than your licence cost?". This is off-topic on Stackoverflow. But be sure libraries answering that need exist. Now is the time to make your google skills pay;)

Anyone can easily edit your executable so I would advise not to store all the valid serials in your program.

You could look into this open source project Open license manager

Another option is to store all your valid serials in a database on some server and create an API that you can make requests to whenever you want to check if a serial is valid or not.

You could use python and flask to create the API and the server

  1. Yes , an executable can be edited. Many software have been cracked through this method. There are however two ways of doing this:
  • Hash editing
  • Through third-party software
  1. It is possible to "avoid" them. You can either encrypt these files or you can lock the data from being streamed out.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM