Page 1 of 1

Clock reversal issue

Posted: Tue Jul 11, 2017 9:28 pm
by Ajax
Hello,

I'm having an issue with Enigma's clock reversal protection feature.

When testing this feature, I set the clock to a time before the license generation. Enigma correctly triggered the clock reversal protection and prevented the application from opening. However, after resetting the clock back to the correct date and time, Enigma continued detecting clock tampering.

I confirmed that the reported BIOS time is correct. I also tried uninstalling a reinstalling the application, but the problem persists.

Is this an Enigma bug? What do you recommend to do?

Re: Clock reversal issue

Posted: Wed Jul 12, 2017 3:51 am
by Ilya
This is clock reversal protection. You can't set back time since it is considered as a manipulation with the clock. You can reset project data to remove app watermark.

Re: Clock reversal issue

Posted: Wed Jul 12, 2017 11:53 am
by Enigma
Ajax wrote:Is this an Enigma bug? What do you recommend to do?
Let me explain how it works.

Imagine, today is 12 July and you are testing the trial. You reversed clock forward to 12 August, program works fine. Then you reversed clock back to 12 June - program does not work. If you set the clock to the correct date - 12 July, it still won't work, because program checks for a maximum detected date, and it thinks that 12 August is the correct one.

What to do?

1. If you are testing it on own local computer then you can open your project in Enigma Protector and click main menu - Tools - Reset All Local Info.

2. If it is on a user computer you can use the Enigma API function EP_TrialClockReversedDays, it returns the number of days that protection detected the clock are reversed. So for the protection, the correct date would be Today + EP_TrialClockReversedDays days. Otherwise, if date is OK this function returns zero.

Hope this helps!

Re: Clock reversal issue

Posted: Mon Jul 17, 2017 9:22 pm
by Ajax
Thanks both for the quick reply, I'll use EP_TrialClockReversedDays

Re: Clock reversal issue

Posted: Mon Sep 04, 2017 3:14 am
by Priyanshu
how to use this api function EP_TrialClockReversedDays
Please help me, i have the same problem.

Re: Clock reversal issue

Posted: Mon Sep 04, 2017 1:45 pm
by Enigma
Priyanshu wrote:how to use this api function EP_TrialClockReversedDays
Please help me, i have the same problem.
This is possible to do only if you have sources of your application and can re-compile the application.

Please check Examples folder of installed Enigma Protector to view examples of Enigma API usage for different programming languages.

Re: Clock reversal issue

Posted: Thu Sep 07, 2017 10:31 pm
by Ajax
When calling EP_TrialClockReversedDays to compute the actual trial days left in case of reversal, or when using other API functions to control the way protection is handled, is it required to disable the corresponding functionality from the Enigma project to override with the API the way the protection works?

Re: Clock reversal issue

Posted: Mon Sep 11, 2017 2:52 pm
by Enigma
Ajax wrote:When calling EP_TrialClockReversedDays to compute the actual trial days left in case of reversal, or when using other API functions to control the way protection is handled, is it required to disable the corresponding functionality from the Enigma project to override with the API the way the protection works?
You should disable the option "Terminate execution" for clock reversing, otherwise protection shut down the execution before it reaches your code.

Do you have any problem with this?

Re: Clock reversal issue

Posted: Wed Mar 03, 2021 6:25 am
by njmube
Enigma wrote: Wed Jul 12, 2017 11:53 am
Ajax wrote:Is this an Enigma bug? What do you recommend to do?
Let me explain how it works.

Imagine, today is 12 July and you are testing the trial. You reversed clock forward to 12 August, program works fine. Then you reversed clock back to 12 June - program does not work. If you set the clock to the correct date - 12 July, it still won't work, because program checks for a maximum detected date, and it thinks that 12 August is the correct one.

What to do?

2. If it is on a user computer you can use the Enigma API function EP_TrialClockReversedDays, it returns the number of days that protection detected the clock are reversed. So for the protection, the correct date would be Today + EP_TrialClockReversedDays days. Otherwise, if date is OK this function returns zero.

Hope this helps!

Hello.

It is not clear to me the formula that I must implement in the method if I want to use the trick from point 2.

Can you explain me with an example please, what is the method in order to know that the correct date was adjusted after modifying it?

Example: EP_TrialClockReversedDays = 28
Today = 02/03/2021
Today + EP_TrialClockReversedDays = 30/03/2021
Today - EP_TrialClockReversedDays = 02/02/2021

the correct date = ??

Re: Clock reversal issue

Posted: Wed Mar 03, 2021 10:59 am
by Enigma
njmube wrote: Wed Mar 03, 2021 6:25 am Example: EP_TrialClockReversedDays = 28
Today = 02/03/2021
Today + EP_TrialClockReversedDays = 30/03/2021
Today - EP_TrialClockReversedDays = 02/02/2021

the correct date = ??
This should be:
Today + EP_TrialClockReversedDays = 30/03/2021

Looks unreal? Why that happened?

EP_TrialClockReversedDays relies on the maximum execution date. It thinks that the maximum execution date is the real date.
Eg, if while testing, you reversed clock forward to 30/03/2021 and run protected program, it will think that the real date is 30/03/2021 independent of anything else.

Hope the protection logic is clear.