Simple SethHack Detector!

Hello Facepunch, I’ve previously been giving this out to server owners who asked, but now I’ve decided to release it for everyone.

It’s very simple, the clientside part is only really 6 lines of code. It should detect any other injected cheats that change the size of _G and _R too

If it detects cheats, it kicks the client (you can set what it does in autorun/server/sv_sshd_example.lua).

Download here - You might want to mirror this too

Also this won’t work on GMod 13, garry removed the enum folder.

I thought SethHack loaded before enum?

It loads before anything.

It does, but because it loads all its stuff ahead of mine it changes the ammount of entries in the _G and _R tables. Count these tables, send values to server, compare to known baseline, if mismatch, player == cheater.

If SethHack loads before this then

local G,R,HeX,NotRCC,NotFR,NotFF,NotFFIL = 0,0,1,RunConsoleCommand,file.Read,file.Find,file.FindInLua[/lua]

All of those will be SethHacks overrides?

Yes. Those backup globals are only for skiddie cheats that detour them incase the server owner wants to modify SSHD and add more features etc

Also I thought SethHack didn’t add anything to _G and _R to make it not this easy to detect?

[editline]14th August 2012[/editline]

Have you tested this by the way?

I think that was planned for v5. v4 always set off these checks on my server.

Yes i have tested it on a few servers. Mine uses the same method in a much larger script and has caught hundreds of SHers

Have you had any recently? I haven’t got a single hit on mine since garrys last round of bans, not sure if it’s because my method was patched or not.

None since started redirecting to the forums. I think he’s closed it down. (I play on my server every day, not had to manually ban anyone for obvious hacking either)

He did, think about it: A majority of his customers where banned.

However I don’t believe he’ll be the last guy to get cash off of garrysmod hacks, you never know what the future holds…

ethanbot v2 :v:

HUSH the world is not ready for it yet! >:l