• [Request] Anti-Cheat Help
    13 replies, posted
I'd like you guys to comment one thing that you know that you could pass on to me that you know about anti-cheats that might be helpful. * The main thing that I need right now is how to keep people from doing [CODE]sv_allowcslua 1;lua_openscript_cl bypassedurstuffkid.lua;sv_allowcslua 0[/CODE]
[url=http://wiki.garrysmod.com/page/cvars/AddChangeCallback]This[/url] might help if they're not changing the name of sv_allowcslua. But then you run into the issue of them removing your callback. Writing an anti-cheat is an intricate can of worms.
[QUOTE=mcd1992;45937107][url=http://wiki.garrysmod.com/page/cvars/AddChangeCallback]This[/url] might help if they're not changing the name of sv_allowcslua. But then you run into the issue of them removing your callback. Writing an anti-cheat is an intricate can of worms.[/QUOTE] I know how to stop them from removing it, I'm already using that though
[QUOTE=mcd1992;45937107][url=http://wiki.garrysmod.com/page/cvars/AddChangeCallback]This[/url] might help if they're not changing the name of sv_allowcslua. But then you run into the issue of them removing your callback. Writing an anti-cheat is an intricate can of worms.[/QUOTE] string indentifier=nil If set, you will be able to remove the callback using cvars.RemoveChangeCallback. no. it doesnt need to be set. They cannot remove it, if it's not set. [url]http://wiki.garrysmod.com/page/cvars/AddChangeCallback[/url] [lua]cvars.AddChangeCallback(convar, func)[/lua] tis all u need [editline]10th September 2014[/editline] unsure if it's a shameless plug but feel free to steal as much content as you want from here [url]https://github.com/zerothefallen/Quack-Anti-Cheat/blob/master/lua/autorun/client/!!_cl_qac.lua[/url] do not care
[QUOTE=zerothefallen;45937146]string indentifier=nil If set, you will be able to remove the callback using cvars.RemoveChangeCallback. no. it doesnt need to be set. They cannot remove it, if it's not set. [url]http://wiki.garrysmod.com/page/cvars/AddChangeCallback[/url] [lua]cvars.AddChangeCallback(convar, func)[/lua] tis all u need [editline]10th September 2014[/editline] unsure if it's a shameless plug but feel free to steal as much content as you want from here [url]https://github.com/zerothefallen/Quack-Anti-Cheat/blob/master/lua/autorun/client/!!_cl_qac.lua[/url] do not care[/QUOTE] what if they bypasser they're using changes flags? Mine doesn't seem to pick up my bypasser
[QUOTE=neato;45937397]what if they bypasser they're using changes flags? Mine doesn't seem to pick up my bypasser[/QUOTE] not possible, at that point. You'll need to delve into c++ server-side fuckery to grab cvars with stripped shit. [editline]10th September 2014[/editline] but it is possible, HeX proved it to me
[QUOTE=zerothefallen;45937146]string indentifier=nil If set, you will be able to remove the callback using cvars.RemoveChangeCallback. no. it doesnt need to be set. They cannot remove it, if it's not set. [url]http://wiki.garrysmod.com/page/cvars/AddChangeCallback[/url] [lua]cvars.AddChangeCallback(convar, func)[/lua] tis all u need [editline]10th September 2014[/editline] unsure if it's a shameless plug but feel free to steal as much content as you want from here [url]https://github.com/zerothefallen/Quack-Anti-Cheat/blob/master/lua/autorun/client/!!_cl_qac.lua[/url] do not care[/QUOTE] ] lua_run cvars.AddChangeCallback("sv_cheats", function() print("tomatochanged") end) > cvars.AddChangeCallback("sv_cheats", function() print("tomatochanged") end) ] lua_run PrintTable(cvars.GetConVarCallbacks("sv_cheats")) > PrintTable(cvars.GetConVarCallbacks("sv_cheats"))... 1 = function: 0x3133e138
Well didnt know. Prolly should of thought of that
[QUOTE=zerothefallen;45941932]Well didnt know. Prolly should of thought of that[/QUOTE] Checking the ConVars every so often should be fine, though, right?
Set a meta table on that changeback table so it cant be removed. Problem solved
[QUOTE=zerothefallen;45942225]Set a meta table on that changeback table so it cant be removed. Problem solved[/QUOTE] That doesn't really solve anything. [lua] local function example() local old = cvars.OnConVarChanged; rawset(cvars, "OnConVarChanged", function() end); pseudo_setallowcslua("1"); rawset(cvars, "OnConVarChanged", old); end [/lua] [editline]10th September 2014[/editline] That being said, what Leystryku posted is pretty irrelevant since as I could only touch that table when my scripts have loaded, which according to the scenario is after I've forced the cvar. Besides, if I were to develop a module that forces sv_allowcslua, I don't think I'd call the SetValue function on the cvar, rather just set the cvar's value by member (that doesn't call callbacks).
well if we're gonna go down the path of "but you can always do x" then anti-cheats always lose. for what he asked, they cant remove it without changing the cvar, assuming we're targeting the tards
[QUOTE=zerothefallen;45942732]well if we're gonna go down the path of "but you can always do x" then anti-cheats always lose.[/QUOTE] That pretty blatantly contradicts you saying metatables were the way forward earlier. [QUOTE=zerothefallen;45942732]for what he asked, they cant remove it without changing the cvar, assuming we're targeting the tards[/QUOTE] Yeah, that's kind of exactly what I just said? If you really thought this before I posted you wouldn't have told OP to protect the table with metatables (which, as I proved would not help at all).
[QUOTE=>>oubliette<<;45942859]That pretty blatantly contradicts you saying metatables were the way forward earlier. Yeah, that's kind of exactly what I just said? If you really thought this before I posted you wouldn't have told OP to protect the table with metatables (which, as I proved would not help at all).[/QUOTE] i was not thinking through at the time, listing other methods is all
Sorry, you need to Log In to post a reply to this thread.