Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Speed hack

Discussion in 'General Discussion' started by Rithy-Jim, Jul 31, 2015.

  1. Rithy-Jim

    Rithy-Jim

    Joined:
    Nov 10, 2012
    Posts:
    19
    Dear all unity user
    I have release my game and it got hack by slow speed.
    Anyone got any solution to detect slow speed hack?
    Thank
     
  2. greggtwep16

    greggtwep16

    Joined:
    Aug 17, 2012
    Posts:
    1,546
  3. Rithy-Jim

    Rithy-Jim

    Joined:
    Nov 10, 2012
    Posts:
    19
    @greggtwep16 I had try that plugin but it's not work with root/jailbreak device.
     
  4. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,860
    Care to elaborate on what slow speed hack is? The first step to beating any hacker is to understand what they are doing.

    Actually, before that you should determine if blocking hackers is even worth the effort.
     
  5. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    20,943
    Essentially a hack to slow down the game. If you're playing a fast-paced game but aren't very quick to respond or your network isn't very fast you could slow the game down to make it easier to play.
     
  6. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,860
    Got you. So we are talking about something like pinging a server that keeps a constant time interval. Or implementing lockstep networking for multiplayer.

    BTW: Congratulations on being hacked. You haven't made it until someone decides its worth their time to cheat at your game.
     
    macdude2 and calmcarrots like this.
  7. Rithy-Jim

    Rithy-Jim

    Joined:
    Nov 10, 2012
    Posts:
    19
    They hacked by using some tools like GameCIH, GameHacker ... Is it possible to detect if there installed all that tools?
     
  8. tedthebug

    tedthebug

    Joined:
    May 6, 2015
    Posts:
    2,570
    If you can detect the players that have done it implement an achievement for hackers & give them the achievement & post it in a public in game scoreboard, something like the "I could only win by cheating" award
     
    nivrig and Rithy-Jim like this.
  9. elmar1028

    elmar1028

    Joined:
    Nov 21, 2013
    Posts:
    2,355
    Is it a multiplayer game?
     
  10. Rithy-Jim

    Rithy-Jim

    Joined:
    Nov 10, 2012
    Posts:
    19
    No,it match 3 game. And they get highest score with slow hack. How can I detect it? Do you have any idea?
     
  11. tedthebug

    tedthebug

    Joined:
    May 6, 2015
    Posts:
    2,570
    How does a speed hack affect match 3 games? I thought they worked by checking the grids around the tiles to detect the same tiles rather than needing reflexes.
     
  12. Rithy-Jim

    Rithy-Jim

    Joined:
    Nov 10, 2012
    Posts:
    19
    @tedthebug My game is simple just touch and game check if there are 3 or more connected they destroy. So if user hack to slow down the game, they will touch as more as they can and without mistake. So the score will be highest than normal user.
     
  13. tedthebug

    tedthebug

    Joined:
    May 6, 2015
    Posts:
    2,570
    Can you put a check in so when they touch no other touch can register until all the tile moves have completed? Once all the tiles have stopped moving & effects have finished playing then reset the touch controls so they will register the next move.
     
    ShilohGames likes this.
  14. Rithy-Jim

    Rithy-Jim

    Joined:
    Nov 10, 2012
    Posts:
    19
    @tedthebug My game allow user to multiple touch and fast touch to get top score. And I can't just wait for tile moves completed. User challenge by high score. The way to check if they hack slow time I had use is, get time from time.nist.gov every 5 second in game, if duration every 5 second greater than 6 or 7 second, I fire event speedHackDetect. But sometime get time false.
     
  15. tedthebug

    tedthebug

    Joined:
    May 6, 2015
    Posts:
    2,570
    You'll have to be careful then because some people play using multi fingers & are real quick, check out videos of people playing wordament at official Microsoft competitions where everything was filmed & checked. They were exceptionally fast. Mir you block it at what you think is reasonable you will block people that aren't cheating.

    Can you compare the in-game time against the processor time of the device? I'm assuming each device keeps track of time in some way as some apps use it when posting the time something was done. If you can access that to determine how much time has passed & compare it to how much time your game says has passed then you might be able to determine if they are cheating.
     
    Rithy-Jim likes this.
  16. Rithy-Jim

    Rithy-Jim

    Joined:
    Nov 10, 2012
    Posts:
    19
    @tedthebug While user hack slow time, we will get device time with the cheat time. My game play just 1 minute. After game ended we also get 1 minute passed with normal and hacked.
     
  17. tedthebug

    tedthebug

    Joined:
    May 6, 2015
    Posts:
    2,570
    Sounds like you're kinda stuck. If it isn't costing you money it may not be worth the effort. If their times are massively better than people then most people will assume they cheated anyway.
     
    Rithy-Jim likes this.
  18. Rithy-Jim

    Rithy-Jim

    Joined:
    Nov 10, 2012
    Posts:
    19
    Our company would like to give away real prize to user. So that's the big problem if user cheat .
     
  19. tedthebug

    tedthebug

    Joined:
    May 6, 2015
    Posts:
    2,570
    Make it a random prize, pick a time randomly. That way no one knows how much to cheat or if it's even worth it. Plus it encourages everyone to try no matter how bad they are.
     
  20. N1warhead

    N1warhead

    Joined:
    Mar 12, 2014
    Posts:
    3,884
    you could essentially add lets say example 50 variables constantly check things for changes.

    This is just entirely an example (50 wasn't a real number, could just be one or two).

    have each variable verify changes, know what changes should happen, if something differently happens, make something happen where it makes the game impossible to do anything unless they delete it or something.

    (Here's an example)
    Not exactly the best way to do thigns I don't think, but you could easily do it with your SLOW SPEED.
    I just gave this as an example to things.

    Code (CSharp):
    1. public float health;
    2. public float H1; // Checks health.
    3. public float C1; // Checks H1.
    4. public float CH1; // Checks H1 and C1 by adding them together.
    5. public float CH2; // - Verifys CH1;
    6.  
    7. // I put random names for things that way people don't understand what things are as easily when memory hacking at least.
    8.  
    9. void Update(){
    10.  
    11. C1 = health;
    12. H1 = C1;
    13.  
    14. if(C1 < health){
    15. Cheating.
    16. }else if(H1 < C1){
    17. Cheating.
    18. }
    19.  
    20. CH1 = H1 + C1;
    21. CH2 = CH1;
    22. if(CH1 < CH2 || CH2 < CH1 || CH2 > CH1 || CH1 > CH2){
    23. Cheating
    24. }
    25.  
    26. }
     
    Rithy-Jim likes this.
  21. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,860
    You are going to have to rely on time keeping server side. You can't trust a clients clock.
     
    Rithy-Jim likes this.
  22. delinx32

    delinx32

    Joined:
    Apr 20, 2012
    Posts:
    417
    Can you check the time server side when they start the game, then check it again when you post the score and if the client time is significantly different than the server time, then don't post the score?
     
    Rithy-Jim and Kiwasi like this.
  23. delinx32

    delinx32

    Joined:
    Apr 20, 2012
    Posts:
    417
    Example,

    1) User starts game, ping server for a gameid which could be a guid.
    2) Store the gameid and server/client start time
    3) User finishes and posts score to your server. Check the delta server time against the delta client time for the stored gameid.
     
  24. N1warhead

    N1warhead

    Joined:
    Mar 12, 2014
    Posts:
    3,884
    I only know Photon, but if you are using that there is a "PhotonNetwork.time" you can use that to sync the time correctly to only use the server time, not the local time on client.
     
  25. Rithy-Jim

    Rithy-Jim

    Joined:
    Nov 10, 2012
    Posts:
    19
    Thank everyone for your suggestion and idea. There is the only way to detect slow hack with time server I think. The method I use is get time from time.nist.gov
    - Get start time from server (startTime)
    - Get time from server again every 5 second (currentTime)
    - Check duration from startTime to currentTime (duration)
    - If duration greater than 5 second or (Max 7 second if poor internet connection) then detected user hack slow speed.
    Problem : sometime I got time from server with 0000:00:00 and sometime no response.
     
  26. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,860
    How far down this rabbit hole do you want to go? Digital security measures in games have a history of making the game less and less accessible to legitimate players, while at the same time doing little to nothing to stop cheaters. You have already set up a system where players will have difficulty playing without an internet connection.
     
  27. tedthebug

    tedthebug

    Joined:
    May 6, 2015
    Posts:
    2,570
    Just make the prize random, everyone has equal chance to win so even bad players will keep playing it, especially if they get extra entries for each game completed. Slow hack just gets them on the leader board & their chance of a prize is the same as everyone else's then.
     
  28. Rithy-Jim

    Rithy-Jim

    Joined:
    Nov 10, 2012
    Posts:
    19
    I wonder why Clash of Clan not affected with slow hack? Did unity can do that?
     
    Last edited: Aug 4, 2015
  29. tedthebug

    tedthebug

    Joined:
    May 6, 2015
    Posts:
    2,570
    Because you only play against the enemy village on their server, plus it doesn't rely on speed. You just press & your troops spawn at a consistent rate.