Principles of software time-limited [turn]

        Such software is generally limited period of time, such as 30-day trial and so on. After a trial period when sharing software, it will not run. Only a registered version to get a timeless pay later registered with the software's author. Implementation of such protection is as follows.

        First, when you install the software made by the installer of the current system date, or the date when the main system to get the first run, and recorded somewhere in the system; may be recorded in the registry of an inconspicuous the position may also be recorded in a file or sector. This time is referred to as the date of installation of the software.

        Program to be made every time you run the current system date and compares it with the record of the installation date, when the difference exceeds the number of days allowed (such as 30 days) to stop the run.

        Visible, the mechanism of this date restriction is very simple. But when implemented, if all cases handled thorough enough, it is easy to be bypassed, such as after time expired simply transferred back to the machine, and the software can be used normally.

        If you consider the relatively comprehensive, the software you want to save a minimum of two time values, one is the above mentioned installation time, this time recorded by the installer when installing the software, the software can also be recorded at the time of the first run (ie, software the current date will be recorded) as the value when the value is not found to exist. In order to increase the difficulty of decryption, the best this time and more stored in several different places, or else decryption can find a place to store the value by RegMon, FileMon and other monitoring tools easily, and then delete the key, so that they can be used normally software.

        Another time value is the last date software running, which is to prevent users from changing the machine date back to the word. Each time you exit the software when the date should be taken out compared to the current date, if the date is greater than the current date, then replace the value with the current date, otherwise keeping the value unchanged. Meanwhile, when the software is started each time the value is read out should be compared with the current date, and if the value is greater than the current system date, then the user time to change back to the machine, you can refuse to run.

        Acquisition time API functions are generally GetSystemTime, GetLocalTime and GetFileTime. Software authors may not directly use the above function to get the system time, such as using high-level languages ​​like good package to operate the system time. These classes are actually encapsulated calling the above function. Cracker when using dynamic tracking method to break this date restrictions, this is the most common breakpoint.

        Also with a more convenient method to get the current system date is read frequently modify system files (such as Windows registry files user.dat, system.dat, etc.) of the last modification date, use FileTimeToSystemTime () to convert the system date format to obtain the current system date.

        It should be noted that the use of blackout dates software must be able to prevent RegMon, FileMon like monitoring software, it will easily be the location to date.

Guess you like

Origin www.cnblogs.com/railgunman/p/11161606.html