IPhone: How to fix cheat based on changing device date? Is there a server I can get time for?

I have an iPhone game that, over time, distributes the currency within the game, and someone has discovered that you can change the date on your device to receive rewards at an early stage.

I found that there is a similar problem in Smurf Village and they somehow detect fake. Does anyone know how they do this? The only thing I can think of is to get time from an external server, for which devices should be on the network, but it's better than nothing, I think ... does anyone know where I can find a server that just tells you time?

+4
source share
6 answers

You can use an NTP server that tells you the time.

Until someone uses a proxy server to determine what the NTP server is connected to and then tricks the NTP response ... as others mention, the answer is easy to analyze and therefore easy to respond to.

The best solution would be to use something like the Google App Engine (for free) to send your application some kind of encrypted response that comes down to server time. If the client time deviates too much from this, the application will simply use the server time for calculations. Then even if they intercept the request, they cannot easily return the correct answer.

But basically in any multiplayer game you should always consider that the client is lying. The only real way to prevent problems is to let everything go through the server, so the client cannot decide that it is unexpectedly rich, and any other client agrees that this is so ...

+4
source

You can simply use one of the time servers available over the Internet. This pretty simple protocol, you will analyze the answers without any problems.

+1
source

You can use any NTP server (see http://www.ntp.org/ ).

In addition, you can perform some simple verification by storing the last date the application started, and make sure the date is never returned.

+1
source

One way to provide at least a level of protection if you absolutely cannot verify the remote ntp server

Check the time and time zone, if you notice a change in time that is not related to a change in time zone, which is more than a change in summer time, suspend the issue of money

0
source

In online mode, you should check the NTP server or, preferably, your own timestamp server using an encrypted protocol.

In offline mode, you can either not add currency, or mark the time stamp to add currency and check for fraud (time stamps change monotonously too much to allow movement and drift of the clock) every time the application is activated, Then you can somehow depreciate any unsuccessful benefits: a virtual barn catches fire, everything in the game suddenly costs more, the fee for a bank transfer will become more than the amount transferred, etc.

0
source

iPhone: Open your game so that it loads all the energy, then go to: * Settings * General * Date and time Turn off the car Set 1 hour in advance (or more depending on the wait time IE Energy filled in 3 hours, set in advance 3 hours ) Re-open the game, does not work for every game

0
source

Source: https://habr.com/ru/post/1335153/


All Articles