AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   VBAC - Very Basic Anti-Cheat V3.3 [29 Aug 08] (https://forums.alliedmods.net/showthread.php?t=72170)

MoggieX 06-01-2008 18:29

VBAC - Very Basic Anti-Cheat V3.3 [29 Aug 08]
 
1 Attachment(s)
VBAC - Very Basic Anti-Cheat

What does it do?
This plugin checks players when spawning for:
1. sv_cheats being enabled - When obviously they should not be!
2. mat_wireframe being enabled - When obviously it should not be!
3. sv_consistency disabled - Added in V3.0 when should be enabled
4. The name of "unconnected" - And then when a player connects, it checks the players name "unconnected", this is normally a sign of a cheat has been some what rife, this is the screen name of a client that has not connected properly.

If it finds a match for ANY of the conditions above it BANS.

To be on the safe side, if sv_cheats (or what ever CVar you set it to) is enabled, then the plugin will not ban the players.

I do stress that this is a very basic anti-cheat protection, as its been proven that not all sv_cheats bypasses are not being picked up (no idea why) hence the addition of the mat_wireframe check as a secondary check and sv_consistancy as a third check being added in V3.0.

MySQL Bans Support Added in V3.0
In version 3.0 I have added basic support for my MySQL banning plugin:
http://forums.alliedmods.net/showthread.php?t=65822

This is disabled by default and needs to be enabled by putting sm_vbac_mysql 1 in your <mod dir>/cfg/soucremod.cfg file and of course you need to install the above plugin.

This was added due to the number of people it was banning and I was getting fed up of going back through the log files and manually adding them to protect the other 11 game servers.

Source Bans Support Added in V3.1
Added support for this, by adding a convar called sm_vbac_sb which will need to enabled adding sm_vbac_sb 1 to your in your <mod dir>/cfg/soucremod.cfg file.

Successful So Far!
So far when using this plug-in in conjunction with KAC, I've found that VBAC is picking the cheaters up quicker (all 222 now some +640 cheaters found across our servers alone), however KAC is still mopping up the rest of the losers (51 extra bans because of KAC).

Prime example is below, this plug-in picked up this player and banned them tonight, as far as I'm concerned thats one less cheater.

http://www.ukmandown.co.uk/media/cheater-found.gif


Background:
From a request in the forums at http://forums.alliedmods.net/showthread.php?t=72097 also I would not e here that I left this running over night when testing it and picked up 8 players on our main server that had sv_cheats enabled, in one night!!

CVars
sm_vbac_version - Duh
sm_vbac_value - sv_cheats - Do not alter
sm_vbac_mysql - Default: 0 - Set to 1 if using with my MySQL Banning Plug-in
sm_vbac_sb - Default:0 - Set to 1 if using Source Bans

Installation:
Pop the compiled smx file into your <%MOD DIR%>/addons/sourcemod/plugins folder and change maps

Version History:
V1.0 - First Release
V2.0 - Added mat_wireframe check, added check if the player is a bot & tidied the code up
V2.1 - Kigen fixed the bot check
V3.0 - Added extra check and basic MySQL banning support
V3.1 - Added Source Bans support via sm_vbac_sb
V3.2 - Fixed fakeclients() prob
V3.3 - Fixed client not connected log error

Thanks to:
Everyone in http://forums.alliedmods.net/showthread.php?t=72097 !

Suggestions?
Ban everyone that joins? Issue solved then :mrgreen:

FunTF2Server 06-01-2008 18:44

Re: Basic Anti-Cheat V1.0 [1 Jun 08]
 
thanks so much i was haveing many probleams with people comming in and enabling sv_cheats1 and then fooking up my searver

siosios 06-01-2008 18:54

Re: Basic Anti-Cheat V1.0 [1 Jun 08]
 
is this using the sm_ban or writeid banid of the server?

MoggieX 06-01-2008 19:23

Re: Basic Anti-Cheat V1.0 [1 Jun 08]
 
In the code...

PHP Code:

        // Ban the *
        
BanClient(client

Matt

siosios 06-01-2008 19:52

Re: Basic Anti-Cheat V1.0 [1 Jun 08]
 
thank you for this

sirmoe 06-01-2008 20:14

Re: Basic Anti-Cheat V1.0 [1 Jun 08]
 
How would this work with sourcebans? Possible to integrate?

MoggieX 06-01-2008 20:16

Re: Basic Anti-Cheat V1.0 [1 Jun 08]
 
Quote:

Originally Posted by sirmoe (Post 633318)
How would this work with sourcebans? Possible to integrate?

It would be separate, unless they want to add it to their core.

Matt

sirmoe 06-01-2008 21:12

Re: Basic Anti-Cheat V1.0 [1 Jun 08]
 
Would it be possible to change it from ban > kick?

Trying to investigate who is banned on which server on a large scale is a nightmare

XARIUS 06-01-2008 21:47

Re: Basic Anti-Cheat V1.0 [1 Jun 08]
 
I'd like to find some way to run this ban thru sourcebans (sm_ban) as well, so that our community admins can police this sorta thing. I remember a long time ago, legitimate people would occasionally show up as unconnected.

Thanks for the great plugin!

siosios 06-01-2008 21:56

Re: Basic Anti-Cheat V1.0 [1 Jun 08]
 
yea i like this plugin but since im using sourcebans and hate searching the stock banlist and then guessing it was for this plugin, i would prefer something to tie it in to sourcebans. not saying anything derogatory just think that there might be alot of use for this with SB rather then having a hacker talk his way out of a ban due to lack of info and having to seach multiple servers for the ban.

thanks
siosios

DontWannaName 06-01-2008 22:15

Re: Basic Anti-Cheat V1.0 [1 Jun 08]
 
So if someone buys a hack online and it somehow enables sv_cheats on his game so he can hack on my server this will ban him?

Fenrix 06-01-2008 22:21

Re: Basic Anti-Cheat V1.0 [1 Jun 08]
 
Thanks for getting this done so quick, seems to work well, 2 people caught so far and its only been runing 3 hours :D

XARIUS 06-01-2008 22:35

Re: Basic Anti-Cheat V1.0 [1 Jun 08]
 
Just read up on that banclient function, bobdole. I was looking at a ServerCommand() approach, but I believe your way will work great, thanks!

sirmoe 06-02-2008 00:11

Re: Basic Anti-Cheat V1.0 [1 Jun 08]
 
This addon doesnt work?

I just did a quick google for a sv_cheats bypasser, loaded up this plugin on my server (disabled VAC) and i was able to access sv_cheats 1 commands on a sever running sv_cheats 0, I dont know the unconnected glitch, but may i suggestion someone try it?

siosios 06-02-2008 00:29

Re: Basic Anti-Cheat V1.0 [1 Jun 08]
 
yes thank you

Fenrix 06-02-2008 03:05

Re: Basic Anti-Cheat V1.0 [1 Jun 08]
 
works perfectly, the unconnected glitch is... not something I want to tell anyone how to do thanks to all the servers without this plugin so yeah...

sirmoe 06-02-2008 03:13

Re: Basic Anti-Cheat V1.0 [1 Jun 08]
 
It doesnt work for the sv_cheats bypass, just had a few people use it and it didnt ban them or pick it up.

Fenrix 06-02-2008 04:19

Re: Basic Anti-Cheat V1.0 [1 Jun 08]
 
I dont think it was supposed to fix bypassing sv_cheats

ottobohn 06-02-2008 10:41

Re: Basic Anti-Cheat V1.0 [1 Jun 08]
 
Bravo!

otto
n00bsalad.net

MoggieX 06-02-2008 10:56

Re: Basic Anti-Cheat V1.0 [1 Jun 08]
 
Quote:

Originally Posted by Fenrix (Post 633446)
I dont think it was supposed to fix bypassing sv_cheats

Thats right, its meant to ban them if it finds that the player has then enabled when the spawn.

Matt

Fenrix 06-02-2008 12:45

Re: Basic Anti-Cheat V1.0 [1 Jun 08]
 
found a bug... i think

a player joined and we were messing around "me and my admins" and changing his name, he is a friend of mine and to stop us he used the unconnected cheat and the script banned him :D

I checked the logs and found that it had somehow banned his ID "AND" a random players... it was a little wierd, It could be a bug or just my logs being odd.
after looking at the logs my friend had one steam ID under wich he was banned by the plugin, however when i unbanned this ID it would not let him back, so using my CD announcer plugin I saw that steam was saying his ID was different to the one that he was banned as...

so i unbanned the number the connect / disconnect announcer stated as his id and it worked.... i did a status command once he was in and his id was his original id that was refusing to unban...


this doesnt make a lot of sense so here.

1. friend caught with plugin and banned -

L 06/02/2008 - 16:25:47: "«<17><STEAM_0:1:16273482><Undead>" changed name to "fgdfg"
L 06/02/2008 - 16:26:11: "fgdfg<17><STEAM_0:1:16273482><Undead>" disconnected (reason "Disconnect by user.")
L 06/02/2008 - 16:26:11: "[SPV] Joe Robot<29><STEAM_0:1:6001428><Undead>" changed name to "[SPV] Joe Robot is Eating"
L 06/02/2008 - 16:26:25: "<35><STEAM_ID_PENDING><>" connected, address "203.217.40.44:27005"
L 06/02/2008 - 16:26:26: "<35><STEAM_0:1:16273482><>" STEAM USERID validated
L 06/02/2008 - 16:26:30: "|SPV| Zombie Picnic |SHE|<18><STEAM_0:0:2390964><Survivor>" say "lol"
L 06/02/2008 - 16:26:31: "<35><STEAM_0:1:16273482><>" entered the game
L 06/02/2008 - 16:26:33: "<35><STEAM_0:1:16273482><Spectator>" disconnected (reason "VAC Ban Detected #ATC561412")

-dunno about the VAC ban bit as he is not VAC banned and my server is VAC enabled


2. then he attempts to reconnect -

L 06/02/2008 - 17:24:29: "Ventari<69><STEAM_ID_PENDING><>" connected, address "203.217.40.44:27005"
L 06/02/2008 - 17:24:30: "Ventari<69><STEAM_0:1:16273482><>" disconnected (reason "STEAM UserID STEAM_0:1:16273482 is banned")

3. I unban above ID and it refuses to let him in.

4. I check the connect disconnect logs and grab this one STEAM_0:1:14620599 then I unban it and he is allowed in....

L 06/02/2008 - 17:31:54: "Ventari<77><STEAM_ID_PENDING><>" connected, address "203.217.40.44:27005"
L 06/02/2008 - 17:31:56: "Ventari<77><STEAM_0:1:16273482><>" STEAM USERID validated


GUH!?!?!?!?

MoggieX 06-02-2008 13:58

Re: Basic Anti-Cheat V1.0 [1 Jun 08]
 
Quote:

Originally Posted by Fenrix (Post 633595)
L 06/02/2008 - 16:26:33: "<35><STEAM_0:1:16273482><Spectator>" disconnected (reason "VAC Ban Detected #ATC561412")

The plugin did its job correctly, the ban reasons differ by one number, ATC561412 and the "VAC Ban" bit is there to make them "poo their pants" or at least ponder what they just did, the number was 2, which was because of their name.

You can check the SM logs at <mod dir>/addons/sourcemod/logs/ and there will be an entry for it

Matt

GriMz 06-02-2008 19:14

Re: Basic Anti-Cheat V1.0 [1 Jun 08]
 
good job finishing this up.

but i wish you hadn't explained the VAC bit, something better off left unsaid. :D

shoulda claimed that it was a steam error or something.

noobs 101 is now using this on their Dust 2 Server and NP is using it on all of theirs.

great job bob.

sirmoe 06-02-2008 20:14

Re: Basic Anti-Cheat V1.0 [1 Jun 08]
 
Myself and a few admins tried the Skell 'sv_cheat' bypass v1.5 and this addon did nothing to stop it,

XARIUS 06-03-2008 01:57

Re: Basic Anti-Cheat V1.0 [1 Jun 08]
 
For what it's worth, I was able to get this working with sourcebans by using servercommand()

Code:

ServerCommand("sm_ban #%d 0 Unconnected_Exploit",GetClientUserId(client));
For those of us that use sourcebans, this should pretty much work for any plugin in place of using BanClient.

Thanks again for this plugin, it's snagged over a dozen today coming in to micspam as unconnected.

siosios 06-03-2008 02:34

Re: Basic Anti-Cheat V1.0 [1 Jun 08]
 
works like a charm!

MoggieX 06-03-2008 05:29

Re: Basic Anti-Cheat V1.0 [1 Jun 08]
 
Quote:

Originally Posted by sirmoe (Post 633761)
Myself and a few admins tried the Skell 'sv_cheat' bypass v1.5 and this addon did nothing to stop it,

Try the attached version, this comes with a warning that if you enable sv_cheats, then it will ban everyone in sight.

Matt

Kigen 06-03-2008 08:05

Re: Basic Anti-Cheat V1.0 [1 Jun 08]
 
Quote:

Originally Posted by siosios (Post 633832)
works like a charm!

Couldn't wait until I got KAC out huh? :p

http://www.n00bsalad.net/admin/index...&advType=admin

KAC is something that is really, truely, designed to be a complete server side anti-cheat option with the available options in SourceMod.

However, I probably will never release the source code, thus I'd fall short of being able to release it as a plugin here. :p

siosios 06-03-2008 11:16

Re: Basic Anti-Cheat V1.0 [1 Jun 08]
 
Quote:

Originally Posted by Kigen (Post 633909)
Couldn't wait until I got KAC out huh? :p

http://www.n00bsalad.net/admin/index...&advType=admin

KAC is something that is really, truely, designed to be a complete server side anti-cheat option with the available options in SourceMod.

However, I probably will never release the source code, thus I'd fall short of being able to release it as a plugin here. :p

actually no i couldnt wait. while you have your servers up and running on it im sitting and getting hammered, so why not put a plugin that is available in place?

MoggieX 06-03-2008 11:21

Re: Basic Anti-Cheat V1.0 [1 Jun 08]
 
sirmoe try this version

NOTE: This is for testing ONLY do not use on a live server!

Solltex 06-03-2008 17:01

Re: Basic Anti-Cheat V1.0 [1 Jun 08]
 
MoggieX, you can this plugin upgrade for lan servers, by ip?

MoggieX 06-03-2008 23:39

Re: Basic Anti-Cheat V1.0 [1 Jun 08]
 
Quote:

Originally Posted by Solltex (Post 634185)
MoggieX, you can this plugin upgrade for lan servers, by ip?

I'll do that on the next time round, just trying to focus on it actually doing what it needs to do atm.

New version released, now time for bed as its 04:39 in the morning!

Matt

siosios 06-04-2008 00:10

Re: VBAC - Very Basic Anti-Cheat V2.0 [4 Jun 08]
 
thanks moggie for your work

PStar 06-04-2008 14:30

Re: VBAC - Very Basic Anti-Cheat V2.0 [4 Jun 08]
 
Getting this after the latest update:
Quote:

L 06/04/2008 - 14:21:04: [SM] Native "IsFakeClient" reported: Client 12 is not connected
L 06/04/2008 - 14:21:04: [SM] Debug mode is not enabled for "basic-anti-cheat.smx"
L 06/04/2008 - 14:21:04: [SM] To enable debug mode, edit plugin_settings.cfg, or type: sm plugins debug 15 on

Kigen 06-04-2008 15:08

Re: Basic Anti-Cheat V1.0 [1 Jun 08]
 
Quote:

Originally Posted by siosios (Post 633995)
actually no i couldnt wait. while you have your servers up and running on it im sitting and getting hammered, so why not put a plugin that is available in place?

Because it'd be bypassed in no time flat by cheat-makers if you put up your source code. Its not that hard to hook incoming packets and send out the appropriate response.

blz 06-04-2008 21:09

Re: Basic Anti-Cheat V1.0 [1 Jun 08]
 
Quote:

Originally Posted by sirmoe (Post 633328)
Would it be possible to change it from ban > kick?

Trying to investigate who is banned on which server on a large scale is a nightmare

I would leave the banning (or make the action adjustable via a cvar perhaps), and keep a separate log file for people the script takes action against with all the info (when, who, ip/location, reason, ...)

Solltex 06-05-2008 01:01

Re: VBAC - Very Basic Anti-Cheat V2.0 [4 Jun 08]
 
Code:

L 06/05/2008 - 04:05:32: [SM] Native "IsFakeClient" reported: Client 3 is not connected
L 06/05/2008 - 04:05:32: [SM] Displaying call stack trace for plugin "basic-anti-cheat.smx":
L 06/05/2008 - 04:05:32: [SM]  [0]  Line 104, /home/groups/alliedmodders/forums/files/2/9/7/7/1/27272.attach::ClientConVar()
L 06/05/2008 - 04:05:32: [SM] Native "IsFakeClient" reported: Client 3 is not connected
L 06/05/2008 - 04:05:32: [SM] Displaying call stack trace for plugin "basic-anti-cheat.smx":
L 06/05/2008 - 04:05:32: [SM]  [0]  Line 180, /home/groups/alliedmodders/forums/files/2/9/7/7/1/27272.attach::ClientConVar2()
L 06/05/2008 - 04:36:17: Error log file session closed.


Kigen 06-05-2008 13:09

Re: VBAC - Very Basic Anti-Cheat V2.0 [4 Jun 08]
 
QueryClientConVar will fail on bots. You should make the check to see if the client is a bot before you query, not after.

I also suggest you should change your current IsFakeClient check to a IsClientConnected. It appears QueryClientConVar may trigger a call after a client is disconnected.

Kigen 06-05-2008 13:34

Re: VBAC - Very Basic Anti-Cheat V2.0 [4 Jun 08]
 
1 Attachment(s)
I went ahead and made said alterations myself.

I would like to also note that the callback doesn't need any return value.

MoggieX 06-05-2008 13:45

Re: VBAC - Very Basic Anti-Cheat V2.0 [4 Jun 08]
 
Quote:

Originally Posted by Kigen (Post 635007)
I went ahead and made said alterations myself.

I would like to also note that the callback doesn't need any return value.

tar! Updating now


All times are GMT -4. The time now is 04:23.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.