• Stop Cheat Engine speedhackers in 542 bytes or less
    23 replies, posted
Most speedhack detectors run server-side and, due to potential lag, must only be triggered if the speedhack is extremely obvious - several times normal speed. To get around this some players will just give themselves a smaller speedhack (<2x) but this still unbalances gameplay and is very hard to detect reliably serverside. Here's an extremely simple yet powerful speedhack prevention method I came up with which runs [I]totally clientside[/I]. [CODE]--noSpeeding basic but precise speedhack protection by Swamp Onions --put this code in lua/autorun/client/nospeeding.lua speedingTickCount = 0 isSpeeding = 0 timer.Create("noSpeeding", 1, 0, function() if speedingTickCount > ((1 / engine.TickInterval()) + 1) then isSpeeding = isSpeeding + 1 else isSpeeding = 0 end speedingTickCount = 0 if isSpeeding > 5 then --crash their game LOL while true do end end end) hook.Add("Tick", "noSpeedingTick", function() speedingTickCount = speedingTickCount + 1 end)[/CODE] This can reliably detect speedhacks at an impressively low level while having almost zero false detections. It just works based on the fact that some timers are affected by Cheat Engine and some aren't, and compares values between the two. Of course, any real hacker could stop this from running easily, but this is a good way to stop people who aren't familiar with GMOD hacking and just boot up Cheat Engine to speedhack like in every game.
You can do the same thing serverside with hooks like Move or PlayerTick.
[QUOTE=Willox;47762238]You can do the same thing serverside with hooks like Move or PlayerTick.[/QUOTE] I see that being done in anticheat software but it has to give a lot more leeway to prevent false detections because of lag and such.
This can easily be bypassed, you can just remove the timer and hook.
[quote]Of course, any real hacker could stop this from running easily, but this is a good way to stop people who aren't familiar with GMOD hacking and just boot up Cheat Engine to speedhack like in every game.[/quote]
[QUOTE=meharryp;47762480]This can easily be bypassed, you can just remove the timer and hook.[/QUOTE] I will never understand how people who can't read visit forums. Or at least why they do...
This is something that has been known and done via the move hook since around 2008. I would prefer not using a hook and a timer and just use a move hook. [QUOTE=Swamp Onions;47762445]I see that being done in anticheat software but it has to give a lot more leeway to prevent false detections because of lag and such.[/QUOTE] Server would be more reliable that the client. We don't trust the client.
Can someone give a snippet using the Move hook? I'm unsure how to implement it and I would like to use it. [editline]20th May 2015[/editline] Would cmd rates affect it in any way?
[QUOTE=hootiegerbil;47767910]Can someone give a snippet using the Move hook? I'm unsure how to implement it and I would like to use it.[/QUOTE] [img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/GM/Move]GM/Move[/url], the wiki is bae
[QUOTE=hootiegerbil;47767910]Can someone give a snippet using the Move hook? I'm unsure how to implement it and I would like to use it.[/QUOTE] I think you could just replace "Tick" with "Move" in the hook.Add(). But why? It's better (semantically, at least) to do it with tick because what you're really trying to detect is timing hacks, not speed hacks. People who use actual hacks besides Cheat Engine to cheat will just bypass it anyway. This should be used alongside a proper anti cheat; only effective one I have used is CAC. But this will detect people with a much lower speedhack than a serverside method.
trusting the client is like giving someone $500 who you just met. also: if you trusted a client so much like this, your gonna have a terrible future programming a server where clients will manipulate any data coming towards them. but that's if you don't change the this attitude of coding.
Also, this will cause issues with client/serverside lag since engine.tickinterval doesn't scale to framerate and returns a constant value.
Trusting the client is the way to go. There is absolutley no doubt. Why not also make the money system client-side while you're at it?
This is a very specific question but, Player's have tick. How often does the SERVER update the client??? I ask because I'm trying to do client-side physics for my game-mode. It's difficult for me to tell where the client-side calculations stops, and where the server side calculations begin.
[QUOTE=rayts5;47783270]Trusting the client is the way to go. There is absolutley no doubt. Why not also make the money system client-side while you're at it?[/QUOTE] I think the point of this is that it will take out most skids who try to hack. Not EVERYONE knows how to bypass it.
[QUOTE=BFG9000;47787438]I think the point of this is that it will take out most skids who try to hack. Not EVERYONE knows how to bypass it.[/QUOTE] timer.Destroy("noSpeeding") hook.Remove("Tick", "noSpeedingTick") everyone knows how.
[QUOTE=Kawurftha;47790735]timer.Destroy("noSpeeding") hook.Remove("Tick", "noSpeedingTick") everyone knows how.[/QUOTE] To be honest, renaming the hooks and timers you find online should be your first priority. You don't just copy paste code from an extremely renowned forum and expect no one to bypass it.
Uh and you can detect and kill an infinite loop with a Lua script.
[QUOTE=buu342;47792682]To be honest, renaming the hooks and timers you find online should be your first priority. You don't just copy paste code from an extremely renowned forum and expect no one to bypass it.[/QUOTE] Before I cheat, all I do is look at clientside code. even if you renamed it I could easily adjust my code to it.
How to stop this clientside speedhack detection in 127 bytes or less Run this before you speedhack. (example for a 5x speedhack) [CODE] local old = engine.TickInterval local SpeedMultiplier = 5 engine.TickInterval = function() return old()/SpeedMultiplier end [/CODE] :suicide:
The amount of people getting their dicks hard because they can bypass this is palpable. Congratulations, you can bypass a simple anti-speedhack. Everyone knows it's easy to bypass. I know it, you know it, the OP knows it. He even says it. Just stop.
[QUOTE=man with hat;47796826]The amount of people getting their dicks hard because they can bypass this is palpable. Congratulations, you can bypass a simple anti-speedhack. Everyone knows it's easy to bypass. I know it, you know it, the OP knows it. He even says it. Just stop.[/QUOTE] Everyone has kinda missed the point..
there's only so much you can do on gmod, its not a big deal to have small bits of junk in like this that will catch out skiddies who dont know better (maybe not this specifically as code_gs pointed out it can cause issues) people acting like its the worst thing ever to do this. anticheats are just a deterrent, why bother spending countless hours coding a comprehensive anticheat that can just be bypassed similarly anyway when you can have small client side snippets and then have good admins that will clean up anyone who wastes their time bypassing them? i used to run a one line clientside SethHack anticheat that i didnt publish on here until GM12 was near release (if PrintTable then (person is cheater) end) and guess what, it caught out hundreds of people over the space of a few weeks and it was never bypassed before the hack disappeared, and we were never DDOSed because i had admins just watch them for a few mins and ban them for other reasons. as long as you write your addons securely, there's no harm in throwing stuff like this in.
SethHack was brilliant. SH_REGREAD SH_REGWRITE Both of these were [b]global[/b] and I may or may not have stolen the clients login and password to use with a spambot on his forums. Glorious days.
Sorry, you need to Log In to post a reply to this thread.