How to expire software on Windows?

I have a part of a Windows / C ++ application that includes an expiration date for hard coding, so the release expires and stops working on a specific date, like August 30, 2009.

Obviously, the user can return the system time to circumvent this limitation.

Is there a good way to stop my application from running if the date has passed even if the user has returned the system date?

PS I can’t use an internet connection for this. And I believe that writing the last run time to a file / registry will also be too easy to break.

Thanks.

Floor

+5
source share
5 answers

Everything you do will be hacked, so you better focus on your software rather than on protection. Be more simple. If people intend to circumvent your protection, they will. They can even use a virtual machine, so day trials are not really a limitation that can be applied.

+9
source

To make the expiration date more complex, you can keep the last execution time somewhere β€œhidden” and make sure that the user cannot return in time. Any decent "hacker" will cost, but for the average user it will be too much trouble.

Working with the wrong date has some bad side effects when using other programs that rely on the correct date / time. Therefore, when a user desperately wants to change his date / time every time he launches your software, he will not buy it at all ...

Improving the expiration mechanism is exactly the same as copy protection for games at the moment. Good games are sold anyway, bad ones are not.

+8
source

You can save the first and last execution date in a file, as well as save the checksum in it. As @Timbo said, any decent hacker will get around this (as with any other method).

Similarly, you can store something like this in a file anywhere (possibly in a register)

20090801:20090815:20090901 ca5579e3bacb7557b6ed22b5f553f9d5 

:

 20090801 - the start date 20090815 - the last execution date 20090901 - the final date ca5579e3bacb7557b6ed22b5f553f9d5 - the salted MD5 checksum 

this way you can check the correctness of the checksum using such an algorithm

 bool CheckExpiry() { string SecretSalt = "Y*## d3F!@g ^hk"; string InitialDate = FetchInitialDate(); string LastExecutionDate = FetchLastExecutionDate(); string FinalDate = FetchFinalDate(); int Checksum = FetchChecksum(); string FinalString = InitialDate + ":" + SecretSalt + ":" + LastExecutionDate + ":" + FinalDate; int InternalCheckSum = md5sum( FinalString ); return InternalCheckSum == CheckSum; } 

Of course, you can use SHA-1 or any other digest algorithm that you like best. Just make sure you use SecretSalt , which is not easily guessed.

And you can check LastExecutionDate for the current date to check if the date has been changed in the opposite direction.

+7
source

In this case, you can make some changes to the system when the application expires. In other words, to get an application using the system date, not the system change, must be there.

You can add a registry entry when it has expired. or there may be a file deletion.

And this is the previous discussion I initiated regarding the simillar problem. It will be possibly useful.

Licensing

+2
source

you can try to save (inside the code, and not in the file) the expiration date of md5summed, this may add some more "protection" from disassemblers. Hide the code for checking the date inside any other critical function, do not write a specific function to execute it. You can also edit the exe file after the expiration date to avoid the "change date" trick.

+2
source

All Articles