sapphonie / StAC-tf2

steph's anticheat (StAC). a built-from-scratch sourcemod based solution to cheating in Team Fortress 2.
https://sappho.io
GNU General Public License v3.0
120 stars 23 forks source link

Ban Duration (and False Positive) #60

Closed MAGNAT2645 closed 3 years ago

MAGNAT2645 commented 3 years ago

Would be good to have a ConVar (or ConVars, for every cheat) for ban duration because there are false positives like

[StAC] Player :troll: has invalid eye angles!
Current angles: 89.87 134.40 0.00.
Detections so far: 1
L 07/26/2021 - 19:34:53: [stac.smx] 
 Player: :troll:<173><[U:1:865755532]><>
 StAC cached SteamID: STEAM_0:0:432877766
L 07/26/2021 - 19:34:54: [stac.smx] 

----------

[StAC] Player :troll: has invalid eye angles!
Current angles: 89.58 351.14 0.00.
Detections so far: 2
L 07/26/2021 - 19:34:54: [stac.smx] 
 Player: :troll:<173><[U:1:865755532]><>
 StAC cached SteamID: STEAM_0:0:432877766
L 07/26/2021 - 19:35:00: [stac.smx] 

----------

[StAC] Player :troll: has invalid eye angles!
Current angles: 89.11 214.22 0.00.
Detections so far: 3
L 07/26/2021 - 19:35:00: [stac.smx] 
 Player: :troll:<173><[U:1:865755532]><>
 StAC cached SteamID: STEAM_0:0:432877766
L 07/26/2021 - 19:35:00: [stac.smx] 

----------

[StAC] Player :troll: has invalid eye angles!
Current angles: 89.62 220.97 0.00.
Detections so far: 4
L 07/26/2021 - 19:35:00: [stac.smx] 
 Player: :troll:<173><[U:1:865755532]><>
 StAC cached SteamID: STEAM_0:0:432877766
L 07/26/2021 - 19:35:00: [stac.smx] 

----------

[StAC] Player :troll: has invalid eye angles!
Current angles: 89.91 322.95 0.00.
Detections so far: 5
L 07/26/2021 - 19:35:00: [stac.smx] 
 Player: :troll:<173><[U:1:865755532]><>
 StAC cached SteamID: STEAM_0:0:432877766
L 07/26/2021 - 19:35:00: [stac.smx] 

----------

[StAC] Player :troll: has invalid eye angles!
Current angles: 89.67 16.03 0.00.
Detections so far: 6
L 07/26/2021 - 19:35:00: [stac.smx] 
 Player: :troll:<173><[U:1:865755532]><>
 StAC cached SteamID: STEAM_0:0:432877766
L 07/26/2021 - 19:35:00: [stac.smx] 

----------

[StAC] Player :troll: has invalid eye angles!
Current angles: 89.50 20.63 0.00.
Detections so far: 7
L 07/26/2021 - 19:35:00: [stac.smx] 
 Player: :troll:<173><[U:1:865755532]><>
 StAC cached SteamID: STEAM_0:0:432877766
L 07/26/2021 - 19:35:00: [stac.smx] 

----------

[StAC] Player :troll: has invalid eye angles!
Current angles: 89.44 21.58 0.00.
Detections so far: 8
L 07/26/2021 - 19:35:00: [stac.smx] 
 Player: :troll:<173><[U:1:865755532]><>
 StAC cached SteamID: STEAM_0:0:432877766
L 07/26/2021 - 19:35:00: [stac.smx] 

----------

[StAC] Player :troll: has invalid eye angles!
Current angles: 89.44 21.58 0.00.
Detections so far: 9
L 07/26/2021 - 19:35:00: [stac.smx] 
 Player: :troll:<173><[U:1:865755532]><>
 StAC cached SteamID: STEAM_0:0:432877766
L 07/26/2021 - 19:35:00: [stac.smx] 

----------

[StAC] Player :troll: has invalid eye angles!
Current angles: 89.44 21.58 0.00.
Detections so far: 10
L 07/26/2021 - 19:35:00: [stac.smx] 
 Player: :troll:<173><[U:1:865755532]><>
 StAC cached SteamID: STEAM_0:0:432877766
L 07/26/2021 - 19:35:00: [stac.smx] [StAC] No STV demo is being recorded, no demo name will be printed to the ban reason!

So i had to disable banning for fakeangle. And permaban isn't a good thing in these cases.

MAGNAT2645 commented 3 years ago

EDIT: This false positive was caused by Mind Control.

sapphonie commented 3 years ago

image

This plugin causes issues with eye angles as it doesn't properly clamp them:

L385

GetVectorAngles(angles, angles);

if(angles[0] > 90.0)     // correct upwards angle sign
// ^ should be 89.0
// and should check negative angles (-89.0) as well
{
    angles[0] -= 360.0;
}

TeleportEntity(client, NULL_VECTOR, angles, NULL_VECTOR);

StAC is doing it's job here, open an issue with the other plugin (and set stac_max_fakeang_detections to -1 if you're running it)

As for the ban duration cvar, I can add that in the next minor update.

sapphonie commented 3 years ago

Closed in #72