Implement AntiCheat System - AntiHacks:#23509
Conversation
|
since some began to sell this code (violating copyrights), I consider such behavior to be incorrect, and I post this code for free use |
Nice. Anyway, we all know you are a real author 😜 |
|
@kvipka good job! |
|
@kvipka Unfortunately people won't be thankful for this. |
|
We are thankful to everyone who contribute to the project, specially with this kind of PRs. |
| ################################################################################################### | ||
| # AntiCheats.FlyHackTimer | ||
| # Description: Timer for AntiCheat FlyHack check | ||
| # Default: 3000 - 1 check in 1 second |
There was a problem hiding this comment.
1 check in 3 second
for big projects better (1500ppl +) set 5000 (5 sec) or more
There was a problem hiding this comment.
so, add this description in conf file to clarify and not miss the information ;)
There was a problem hiding this comment.
# Default: 3000 - 1 check in 1 second
1 check in 3 second
# Default: 3000 - 1 check in 3 seconds
:P
|
Wow, very good |
|
|
||
| if (target) | ||
| { | ||
| std::string _canfly = handler->GetTrinityString(LANG_ERROR); |
There was a problem hiding this comment.
_canfly is initialized but then its value is replaced 1 line below
|
I will try to queue this PR to be merged in the test server (either by creating a new realm or waiting for the current PR in test to be merged) |
|
few cosmetic things: anticheat:919: trailing whitespace. |
|
When ack packet handlers are implemented we can also add teleport hacking detection |
|
Teleport hack also not working, just because it usual step with wrong distance, and blocked by ASH |
|
|
||
| void Player::Update(uint32 p_time) | ||
| { | ||
| if (!GetSession()) |
There was a problem hiding this comment.
does this skip some more stuff than what the !IsInWorld() check below skips ?
There was a problem hiding this comment.
This is an impossible condition.
| if (ToUnit()->IsFalling() || IsInFlight()) | ||
| return true; | ||
|
|
||
| if (GetTransport() || GetVehicle() || GetVehicleKit()) |
There was a problem hiding this comment.
So if we mount on vehicle and use hack, can we ignore hack check here?
There was a problem hiding this comment.
Yes.We can get speed of vehicle? If yes, need to add it
There was a problem hiding this comment.
I think we can get speed of vehicle, but I'm not sure if here we can.
in WorldSession::HandleMovementOpcodes I think yes
|
|
||
| GetPosition(x, y); | ||
|
|
||
| TC_LOG_INFO("anticheat", "Unit::CheckMovementInfo : SpeedHack Detected for Account id : %u, Player %s", GetSession()->GetAccountId(), GetName().c_str()); |
There was a problem hiding this comment.
Maybe should be:
"Player::CheckMovementInfo : ...
instead of
"Unit::CheckMovementInfo : ...
There was a problem hiding this comment.
P yep, early it was in unit, and yes, need to rename
| movetime = movementInfo.time; | ||
| realping = GetSession()->GetLatency(); | ||
| ping = realping; | ||
| if (ping < 60) |
There was a problem hiding this comment.
use std::min instead
edit: derp ;p
| @@ -0,0 +1,15 @@ | |||
| -- Strings for ASH + AFH allerts | |||
There was a problem hiding this comment.
well, the name of the sql will be renamed, so it does not matter much, but, better not use capital letters in the file name
|
a low level hunter on one elevator xd Player::CheckMovementInfo : Climb-Hack detected for Account id : , Player , diffZ = 2.124893, distance = 0.000000, angle = 0.000000, Map = Kalimdor, mapId = 1, X = -5381.604492, Y = -2488.781494, Z = 49.361019 |
|
added check for first step on elevator for except wallclimb this false/positive |
|
plz don't push --force or we can miss sql changes. |
|
creature 667 sometimes casts one spell on player making it to false positive |
|
it looks hunter's feing dead is reason to this bug a lof of times. |
|
maybe you missed this code ? |
|
ohh, rly my mistake. |
|
nope, i git apply. |
|
still false positiving xd maybe it's the hunter feigns when it's stunned? |
|
Can you add info from logs? |
|
there is nothing more: Player::CheckMovementInfo : Ignore control Hack detected for Account id : , Player Maybe include a log of debufs can help? |
|
i think not needed. |
|
yes, she is a normal player, i even spoke with her and told to use feign a lot of times and sometimes it was show and most no. |
|
try this, i can't to check it on weekend. Strange, but it first idea |
|
the coding standards of |
|
anyway - all questions about some troubles here |
-ASH - AntiSpeedHack -AFH - AntiFlyHack -DoubleJump -Wallclimb -FakeJumper -FakeFlyingMode
|
@kvipka I found false positives: Anticheat falsely triggered when the client started on the same machine as the server. |
|
could you fix the merge conflicts ? |
|
if you wipe on malygos 3rd phase it false positives a lot. |
|
@Aokromes Strange, but there the anticheat does not give false positives for me. In general, I noticed such a problem that false positives occur completely randomly. For an example: at any movement of the character on the GM Island, the anticheat falsely reacted to my character. The funny thing is that this problem was solved by restart the server, which in principle can mean that the problem may not be in the anticheat itself. |
|
@Infernales It actually can be anticheat, if the reason is something like uninitialized variable (even relog could make it behave differently) or if its related to timers (restarting resets the value for getMsTime()) |
|
@Infernales you wiped there on 3rd stage? |
|
@kvipka Thx for update. |
|
Conflicting files |
-ASH - AntiSpeedHack (+anti teleport hack)
-AFH - AntiFlyHack
-DoubleJump
-Wallclimb
-FakeJumper
-FakeFlyingMode
This system has been tested on some big projects with big online (project names are hidden).
Issues: No false positives
For some questions : discord -
https://discord.gg/GcJJfXG
youtube videos : https://www.youtube.com/watch?v=aZP3qm9Ql0Y&list=PLUpIDd4JDWyOOJhJRcfaVL0RaRH1Ra5Xy
Note:
This system using only mathematic operations, without additional manager as AC2, no using additional memory.
Part of code can be shorter, when PR with ACK-packet handlers will complete.