Forum

> > CS2D > General > AntiSpeeder in Lua
Forums overviewCS2D overviewGeneral overviewLog in to reply

English AntiSpeeder in Lua

19 replies
To the start Previous 1 Next To the start

old .YeaH.

FiiD
User Off Offline

Quote
Give more info man...I dont want to download something that isnt better than my default CS2D anti speeder

old Re: AntiSpeeder in Lua

Lee
Moderator Off Offline

Quote
This is in the always hook:

1
if math.abs(ply:Pos().x - ply:GetNetworked("AntiSpeederPos").x) >= 95.25 or math.abs(ply:Pos().y - ply:GetNetworked("AntiSpeederPos").y) >= 95.25 then

AKA:

if change in x > 3 squares or change in y > 3 squares, we call him a hacker...

Personally, I think this is incredibly naive, you do not test for whether a player is undergoing speedmod, whether he is experiencing fluctuated lags that can cause him to warp, or anything else to that effect. In fact, the underlying architecture is completely incorrect even if you do finally create a system that accounts for the above deviations to accurately determine whether someone is hacking and abstracted it onto a region, that region cannot be a square region as the bound are not uniform. At least create a vector field to serialize the probabilities of speed-hacking within a circular region instead of a square...

old Re: AntiSpeeder in Lua

FlooD
GAME BANNED Off Offline

Quote
lol @ always hook...
ya i dont see how this is any better than the default

old Re: AntiSpeeder in Lua

Informatixa
User Off Offline

Quote
Hello,
Such that the first version, but I test them on server building and it works fine. Of course it is perfect as any system.
For speedmod I see you later to incorporate this variable

old Re: AntiSpeeder in Lua

CappaCappa
BANNED Off Offline

Quote
This would be a better solution:

Store the last 10 positions of a player. calculate the average velocity over these 10 positions.

if this average is 2x normal speed ( accounted with speedmod) then the player is a speedhacker.

old Re: AntiSpeeder in Lua

Lee
Moderator Off Offline

Quote
What I wish you can show instead rather than the true positive and false negative cases are the false positive cases instead. Assuming that we experience 50% (quite rare on per packet basis, quite common in bundled UDP) packet loss within the entire network during a move request on a 100ms+ latency connection. The client "blocks" the request (literally dozens of failed confirmation) until the network retains its full efficiency, it will then send a range of move packets, of which all will be handled sequentially, and maybe several position updates, of which only the last will be handled (the moves come in and then position set is validated, all within a second). What will happen if the position update succeeds at a point outside of the 3-tile square? The innocent player who lagged will get banned. Meh, maybe you just don't care about laggers so thank the heavens that this lagger got banned as well.

What if the server itself periodically blocks its datagram stream in order to multicast a status message to the rest of the network (this happens quite a lot in several low end server VPS providers)? Well, the entire server will get kicked if the stream is blocked for any longer than 2 seconds (which means that the muticast takes around 600-700ms). Additionally, due to the fact that the entire call queue becomes suspended, and since all additional datagrams will reopen the stream, add the datagram to a queue, and then suspend the stream again by refitting its stack, the overhead accumulated from this operation will literally slow CS2D to a grinding halt for a few second. (ever had one of those periodic lag moments on some server with low ram and very small processing power?) If you keep the current implementation, then the following will likely to happen:

1. Servers not hosted on high end servers or even high end servers hosted on an oversold network will very regularly kick ALL of its players for speed hacking.

2. Laggers (people who jump from time to time) with high latency and are thus sensitive to packet loss will frequently get kicked for speed hacking.

3. Your server will be slow as hell thanks to the always hook that could've been replaced by a timer method...

Note that Cappa's solution would solve a lot issues discussed here.

old Re: AntiSpeeder in Lua

CappaCappa
BANNED Off Offline

Quote
You can see my implementation here:
http://unrealsoftware.de/files_show.php?file=3215

I've developed another implementation, that's even better. It's based on the mode of the 10 previous distances between sample points. If the mode is higher than the allowed speed, then the person is a speedhacker. The advantage of this is that "spike" movements don't account for the average, only the normal movement does. Also teleports and setpos thingies won't affect the mode. But I really need to do some testing on large servers before i can release all this..
edited 2×, last 26.10.10 12:45:20 pm

old Re: AntiSpeeder in Lua

KimKat
GAME BANNED Off Offline

Quote
I think I got a solution for this.

The method is this; by making a timer function that checks a player's speedmod after a amount of seconds the player is running(latency warping)/speedhacking, so that we can check if player is lagging or simply speedhacking. Then if the player is a speedhacker and is undergoing speedmod of above 0 or within a speedmod range from 10-100(or other). That means if the speedhacker is using the speeds specified within a time span of let's say 5-15 seconds then the Lua will trigger itself to warn the speedhacker or alternatively kick/tempban the speedhacker in the most effective way. Then you can be somewhat totally sure that the player is indeed a speedhacker. Just randomly thought that up.

Anyone think the idea is somewhat clever? it's the best I can come up with, honestly.

old Re: AntiSpeeder in Lua

KimKat
GAME BANNED Off Offline

Quote
Well, yeah, because if a player moves in a speed then the server will/would know what the speedmod the player has, at least in my theory. It's not like the server is totally ignorant towards the players speedmods. Right?

If so, how, explain all to me...

old Re: AntiSpeeder in Lua

Hador
User Off Offline

Quote
I think that if the speedhack was used over speedmod, then the server would be completely ignorant towards it, and so would the antispeeder function of the server, seeing as it thinks that it is simply a speedmod, which could just as well been given to a player by an Admin. I would think that a speedhack just changes the information sent between the server and your computer, and the server on its side tries to find out if this information differs from the information it has expected, if it does, and the antispeeder is on, the player gets kicked from the server with the reason of speedhacking. That would also be the reason why players can get kicked if their ping is too high and they are lagging, as the informatiion arrives at the wrong time and may be damaged.

old Re: AntiSpeeder in Lua

Banaan
User Off Offline

Quote
speedhack = sending move packages more often (but then more complicated). It has nothing to do with speedmod whatsoever, except that a player using hacks will not be affected by speedmod.

old Re: AntiSpeeder in Lua

KimKat
GAME BANNED Off Offline

Quote
Oh, so you mean that the speedhacker intentionally has made the programme to malform packets and send them to server when playing in the server... somehow?

I have not a clue though how that would work...
Hmm, I guess it works, sounds like it but why would someone speedhack anyway?

Even if they did successfully malform packets and sending them to server faking their speedmod or anything like that, I guess, I think best solution to stop the speedhacker would be to use banip. There is counter-measures, yay!

Perhaps DC could develop a good Lua Anti-Speeder to prevent speedhackers, somehow. Looking forward to some greater stopping power.
To the start Previous 1 Next To the start
Log in to replyGeneral overviewCS2D overviewForums overview