[Request] Anti-Cheat Help

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

sv_allowcslua 1;lua_openscript_cl bypassedurstuffkid.lua;sv_allowcslua 0

This 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.

I know how to stop them from removing it, I’m already using that though

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.

[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

https://github.com/zerothefallen/Quack-Anti-Cheat/blob/master/lua/autorun/client/!!_cl_qac.lua

do not care

what if they bypasser they’re using changes flags? Mine doesn’t seem to pick up my bypasser

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

] 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

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

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

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).

i was not thinking through at the time, listing other methods is all