All times are UTC




Post new topic Reply to topic  [ 13 posts ] 
Author Message
 Post subject: etadmin_mod 0.29 [15-nades/15-flashs/change of skin FIX]
PostPosted: Wed Jul 07, 2010 9:00 am 
Offline
Sharp Shooter
Sharp Shooter
User avatar

Joined: Sat Jun 19, 2010 7:16 pm
Posts: 48
Location: France
For the ones who use etadmin_mod on their server and waiting for a new version of the DutchFix ( ;) ), here is a little patch i made to kick the players who want to use the following exploits:

- 15 nades
- 15 flashs
- change of skin (VIP)

These cheat codes are used widely and annoying for everyone.
It will simply kick the cheaters for 5 minutes (according your configuration).
Why only to kick them instead of a ban ?
Because they are detected and kicked BEFORE to have the possibility to use the cheat :P

Edit your etadmin_mod.pl and find the following lines (line 2918-2920 in original version)
Code:
        $guid =~ s/ $//g;
        $guid = $over_guid if ( !$guid );
        $userinfo{$name} = $guid if ( !defined( $userinfo{$name} ) && $guid );


AFTER add the following code:
Code:
# START: [FanT]AsthMaTiK tcetest [15 grenades/15 flashs/skin change] cheats fix
        my $side_weapon = $$rhash{'sw'};

        if ( ( $side_weapon eq '9' ) || ( $weapon eq '9' ) )
        {
            &log("[15 NADES CHEAT] Kicked $name ($guid). He wanted to use the cheat of the 15 grenades!");
            &global_remote_send( "^1[15 NADES CHEAT]: $name $guid", "ETM-INFO" );
            &say( "^1[15 NADES CHEAT]^3 $name -> Kick !!!" );
            &kick( $client_id, "^1[15 NADES CHEAT] Attempt of cheat!" );
            last;
        }

        if ( ( $side_weapon eq '4' ) || ( $weapon eq '4' ) )
        {
            &log("[15 FLASHS CHEAT] Kicked $name ($guid). He wanted to use the cheat of the 15 flashs!");
            &global_remote_send( "^1[15 FLASHS CHEAT]: $name $guid", "ETM-INFO" );
            &say( "^1[15 FLASHS CHEAT]^3 $name -> Kick !!!" );
            &kick( $client_id, "^1[15 FLASHS CHEAT] Attempt of cheat!");
            last;
        }

        if ( $class eq '6' )
        {
            &log("[CHANGE OF SKIN] Kicked $name ($guid). He was using the change to vip skin!");
            &global_remote_send( "^1[CHANGE OF SKIN] $name $guid ^3-> Kick !!!", "ETM-INFO" );
            &say( "^1[CHANGE OF SKIN]^3 $name -> Kick !!!" );
            &kick( $client_id, "^1[CHANGE OF SKIN] You are not allowed to change of skin!" );
            last;
        }
# END:  [FanT]AsthMaTiK tcetest [15 grenades/15 flashs/skin change] cheats fix



Enjoy :)

_________________
Image
Site de la Communauté Française de TC:E
Server/Machine Admin for Teams |AES| - =]NyX[= - =]X-BlooD[=


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jul 07, 2010 12:21 pm 
Offline
Sharp Shooter
Sharp Shooter

Joined: Thu Sep 03, 2009 1:08 pm
Posts: 34
Hey Asthma,

Have you tested this?
Cause if I take a quick look, it looks like everyone with the weapon '9' and '4' will be kicked.
Unless those are infact illegal weapons


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jul 07, 2010 1:41 pm 
Offline
Sharp Shooter
Sharp Shooter
User avatar

Joined: Sat Jun 19, 2010 7:16 pm
Posts: 48
Location: France
Of course I did :)

TC:E weapons are not implemented as in Enemy Territory.
You have the .gear files which allow some weapon codes only.
In fact, you have 3 types of weapons:

Single Handed : SH1 to SH8
Single Handed Akimbo : SHA1 to SHA4
Two Handed : TH1 to TH20
Total: 32 types of weapons available theorically.

Each weapon allowed on a map is registered as this in .gear file
Code:
        gm_weapon
        {
                weaponID                "SH1"
                weaponFile              "beretta"
                team                    "specops"
                slot                    "secondary"
                requiredSkill           1 1 1
                startClips              3
                equivalentWeaponID      "SH2"
        }


Explanations:

weaponID : the hardcoded "alias" for the weapon number
weaponFile : the .weap file reference
team : availability for a team (terrorists, specops, both)
slot : primary (weaponbank 1) or secondary (weaponbank 2)
requiredSkill : skill (AA) required per class (Assault, Recon, Sniper) If set to 0, the weapon isn't available for this class.
startClips : number of clips in the weapon
equivalentWeaponID : equivalent weapon. For example, SH1 <-> SH2 (Beretta-Glock), R93-SR8 and so on...

For example, the Beretta is using the weaponID SH1 in the default .gear files.
But this is a reference to the code '2'.

Anyway, you can define any weapon in a .gear, they are not "physically" attached to any ID !
That's why depending on different servers you can have different weapons associations :P

Only Knife, Grenades, Flashs and Smokes are hardcoded (they are defined in .gear file to allow to change their 3D files/skins).

I guess "illegal" weapons like 15-flashs and 15-nades were supposed to be features for test only, like the change of skin to VIP.

For more informations about associations between weaponID and the weapon number, please refer to the PDF of my study you can find here (free for everyone):
ftp://aes-team.fr.cr/media/informations/Weapons_Codes.pdf

And yes, 9 an 4 are illegal weapons for sure :P

Illegal Weapons:
0..1
4
9
11..12
15..22
26..31
34..36
55..9999

I didn't test until 9999 but according the source code of ET, it is a conversion of a parameters ascii to integer made of 4 chars ;)

I hope it will help all the other server admins to protect themselves (and to customize a bit their machine :) )

Edit: I forgot 4 and 9 in "Illegal Weapons" of course they are included :P

_________________
Image
Site de la Communauté Française de TC:E
Server/Machine Admin for Teams |AES| - =]NyX[= - =]X-BlooD[=


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 08, 2010 5:02 pm 
Offline
Sharp Shooter
Sharp Shooter

Joined: Thu Sep 03, 2009 1:08 pm
Posts: 34
ey good work :)

I will try to implement the 'legal weapontable' into dutchfix soon


Top
 Profile  
 
 Post subject: Updated version
PostPosted: Thu Jul 08, 2010 7:23 pm 
Offline
Sharp Shooter
Sharp Shooter
User avatar

Joined: Sat Jun 19, 2010 7:16 pm
Posts: 48
Location: France
Ok, I did a new version of the patch to take account of the legal weapons only...

This time, it's done in two parts in etadmin_mod.pl:
- a declaration table
- the patch by itself

For the declaration find:
Code:
##############################################################
# ------------------------------------------------------------
# ----------- Don't change anything below this line ----------
# --------------- unless you know what you do! ---------------
# ------------------------------------------------------------


ABOVE add these lines:
Code:
# START: [FanT]AsthMaTiK tcetest Legal Weapons Declaration
my %TCE_LegalWeapons = (
    '0'  => 'Empty_At_Connection',

    '2'  => 'SH1' ,
    '3'  => 'SH8' ,

    '5'  => 'TH6' ,
    '6'  => 'TH19',
    '7'  => 'SH6' ,
    '8'  => 'TH1' ,

    '10' => 'SH7' ,

    '13' => 'TH20',
    '14' => 'SH4' ,

    '23' => 'TH16',
    '24' => 'TH10',
    '25' => 'TH18',

    '32' => 'TH17',
    '33' => 'TH4' ,

    '37' => 'SHA2',
    '38' => 'SHA1',
    '39' => 'SH2' ,
    '40' => 'SH5' ,
    '41' => 'TH3' ,
    '42' => 'TH5' ,
    '43' => 'TH8' ,
    '44' => 'TH7' ,
    '45' => 'TH2' ,
    '46' => 'TH15',
    '47' => 'TH13',
    '48' => 'TH11',
    '49' => 'TH12',
    '50' => 'TH9' ,
    '51' => 'TH14',
    '52' => 'SH3' ,
    '53' => 'SHA4',
    '54' => 'SHA3',
);
# END:   [FanT]AsthMaTiK tcetest Legal Weapons Declaration


For the patch by itself, it is in the same place as before (line 2918-2920 in original version):
Code:
        $guid =~ s/ $//g;
        $guid = $over_guid if ( !$guid );
        $userinfo{$name} = $guid if ( !defined( $userinfo{$name} ) && $guid );


AFTER add the following code:
Code:
# START: [FanT]AsthMaTiK tcetest [15 grenades/15 flashs/skin change/other team command] cheats fix
        my $side_weapon    = $$rhash{'sw'};
        my $latched_weapon = $$rhash{'lw'};

        # 15 NADES CHEAT
        if ( ( $side_weapon == 9 ) || ( $weapon == 9 ) || ( $latched_weapon == 9 ) )
        {
            &log("[15 NADES CHEAT] Kicked $name ($guid). He wanted to use the cheat of the 15 grenades!");
            &global_remote_send( "^1[15 NADES CHEAT]: $name $guid", "ETM-INFO" );
            &say( "^1[15 NADES CHEAT]^3 $name -> Kick !!!" );
            &kick( $client_id, "^1[15 NADES CHEAT] Attempt of cheat!" );
            last;
        }

        # 15 FLASHS CHEAT
        if ( ( $side_weapon == 4 ) || ( $weapon == 4 ) || ( $latched_weapon == 4 )  )
        {
            &log("[15 FLASHS CHEAT] Kicked $name ($guid). He wanted to use the cheat of the 15 flashs!");
            &global_remote_send( "^1[15 FLASHS CHEAT]: $name $guid", "ETM-INFO" );
            &say( "^1[15 FLASHS CHEAT]^3 $name -> Kick !!!" );
            &kick( $client_id, "^1[15 FLASHS CHEAT] Attempt of cheat!");
            last;
        }

        # CHANGE OF SKIN
        if ( $class == 6 )
        {
            &log("[CHANGE OF SKIN] Kicked $name ($guid). He was using the change to vip skin!");
            &global_remote_send( "^1[CHANGE OF SKIN] $name $guid ^3-> Kick !!!", "ETM-INFO" );
            &say( "^1[CHANGE OF SKIN]^3 $name -> Kick !!!" );
            &kick( $client_id, "^1[CHANGE OF SKIN] You are not allowed to change of skin!" );
            last;
        }

        # Other /TEAM CHEAT ATTEMPT
        if (
                ( $team  >  3 )
             || ( $class >= 6 )
             || ( length( $TCE_LegalWeapons{$weapon}         ) == 0 )
             || ( length( $TCE_LegalWeapons{$side_weapon}    ) == 0 )
             || ( length( $TCE_LegalWeapons{$latched_weapon} ) == 0 )
           )
        {
            &log("[/TEAM CHEAT ATTEMPT] Kicked $name ($guid). He wanted to use the cheat trying the /team $team $class $weapon $side_weapon !");
            &global_remote_send( "^1[CHEAT ATTEMPT]: $name $guid  /team $team $class $weapon $side_weapon", "ETM-INFO" );
            &say( "^1[/TEAM CHEAT ATTEMPT]^3 $name -> Kick !!!" );
            &kick( $client_id, "^1[/TEAM CHEAT ATTEMPT] You are not allowed to use illegal /team command!");
            last;
        }

# END:  [FanT]AsthMaTiK tcetest [15 grenades/15 flashs/skin change/other team command] cheats fix


How it works ?
In %TCE_LegalWeapons are defined all the legal weaponID codes associated to their number.
When a number is passed in the /team command, it checks the length of the string associated inside :P
It's a lot easy for perl to use such structures.
I added the code 0, even if it's an illegal value, as it is used at connection.
It would be sad to be kicked for nothing :P

I hope this will help you Dutchmeat, we still need the anti-nuke and weaponstats at a lower level :)

P.S.:
You need to use \w and \sw, because you can reverse order of weapons in the team command...
That's how cheaters defeated your fix ;)

_________________
Image
Site de la Communauté Française de TC:E
Server/Machine Admin for Teams |AES| - =]NyX[= - =]X-BlooD[=


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jul 17, 2010 12:19 am 
Offline
Sharp Shooter
Sharp Shooter
User avatar

Joined: Sat Jun 13, 2009 9:50 am
Posts: 78
Location: Poland
Well done [FanT]AsthMaTiK!

Those of you who don't use etadmin_mod, can use AntiSkill 0.1.1. This is a simple qmm plugin, which was made several weeks ago for better server protection against ws/team exploits.

History of this plugin is quite funny - there was one guy on ak47 server, who used team bugs instantly. I've added him to the suspects list, which allow to filtrate all commands from selected client. In this way I've noticed, that this one guy (his game client) is sending all the time numeric commands with one argument, which looked like time stamp. My first thought was, that this could be some kind of cheat or other shitty stuff, cause normal game client doesn't send anything like that to the server. Few days after I've filtrated two guys, who were using wallhack (pb screen shots showed that) and what I saw was that they are also sending various numeric commands. Putting this two things together I've made first version of that plugin to kick automatically this kind of players. But after that, many players had been kicked from the server - the reason of that was that they were using various types of scripts (auto-walk, silent door open etc.), which were sending this types of commands to the server. Filtrating numeric commands could be only useful eg. for competitions, where players wont be allow to use scripts, but it doesn't give any protection against cheaters.
Current plugin version doesn't take any actions against numeric commands.

AntiSkill registers a few new servers CVARS:
antiskill - plugin version info
as_logfile - log file name (default: antiskill.log)
as_wskick - should plugin kick player after ws exploit (0 or 1, default: 1)
as_teamkick - should plugin kick player after team exploit (0 or 1, default: 1)
as_kickduration - player kick duration (default: 1 minute)
as_whkick - deprecated and useless CVAR

Plugin log file is written in fs_homepath/tcetest/ directory.

Current version is compiled for linux servers only. It could be run in the same time with DutchFix for better server protection.

Plugin is currently installed on all ak47 servers for several weeks, works fine.

Enjoy :-)

_________________
Image

Image


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jul 17, 2010 10:30 am 
Offline
Sharp Shooter
Sharp Shooter
User avatar

Joined: Sat Jun 19, 2010 7:16 pm
Posts: 48
Location: France
Thanks Simons for your contribution and to permit public use of your plugin.
I'm working since last week on a gmScriptMod version, but I meet a "little" problem...
I'm trying to catch the change of UserInfo in the GAME_CLIENT_USERINFO_CHANGED event.
But the UserInfo of the client changes really when he has already respawned!
And strangely it seems the GAME_CLIENT_BEGIN event is only called one time when entering in the server (despite it is logged event in the server log file)...
A bit strange behavior oO
I will have to note who did a UserInfo change and "spy" GMSM_KILL_EVENT to know when to check :P
(btw a lot of time lost in reorganising/indenting/splitting the NeelixScript.gm oO)

_________________
Image
Site de la Communauté Française de TC:E
Server/Machine Admin for Teams |AES| - =]NyX[= - =]X-BlooD[=


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 22, 2010 7:12 am 
Offline
Sharp Shooter
Sharp Shooter

Joined: Thu Sep 03, 2009 1:08 pm
Posts: 34
@Simons,
Hey, doesn't Dutchfix do exactly the same?


[FanT]AsthMaTiK wrote:
Thanks Simons for your contribution and to permit public use of your plugin.
I'm working since last week on a gmScriptMod version, but I meet a "little" problem...
I'm trying to catch the change of UserInfo in the GAME_CLIENT_USERINFO_CHANGED event.
But the UserInfo of the client changes really when he has already respawned!

It has been a long time since I've checked out GMSM in TCE but obviously this shouldn't happen unless the player changes something after spawning


[FanT]AsthMaTiK wrote:
And strangely it seems the GAME_CLIENT_BEGIN event is only called one time when entering in the server (despite it is logged event in the server log file)...
A bit strange behavior oO

Actually GAME_CLIENT_BEGIN is supposed to be called one time only, every time the user loads a map on the server.

[FanT]AsthMaTiK wrote:
I will have to note who did a UserInfo change and "spy" GMSM_KILL_EVENT to know when to check :P
(btw a lot of time lost in reorganising/indenting/splitting the NeelixScript.gm oO)

Please note that the neelix scripts were only meant as example code and alot of functions can be alot more efficient.

GMSM was meant to let the admin play around with scripts like Lua but with a better looking syntax.

I wish I could give you better feedback, but like I said, it has been too long since I've worked with it


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 22, 2010 9:54 am 
Offline
Sharp Shooter
Sharp Shooter
User avatar

Joined: Sat Jun 13, 2009 9:50 am
Posts: 78
Location: Poland
dutchmeat wrote:
@Simons,
Hey, doesn't Dutchfix do exactly the same?

Unfortunately no. DutchFix is in use for a long time on ak47 servers, but players still were allowed to use nade bugs. Several weeks ago I've added one player to the suspect list, so all his commands were logged, here are a few results:
Code:
KoRn: txxxxxxxxx  ([i]edited coz we dont wanna people to try this stuff ;) and dutchmeat got the new commands already, jsut not yet implemented, for this kind of stuff better use pm[/i])

After using AntiSkill plugin:
Code:
[2010-07-05 16:41] ip(72.191.177.16:27960) guid(7DDC43A9825E0BBD42A6DD4410F74BDD) name(KoRn) message(team exploit detected (15 grenades): xxxxxxxxx)
[2010-07-06 08:09] ip(72.191.177.16:27960) guid(7DDC43A9825E0BBD42A6DD4410F74BDD) name(KoRn) message(vip model exploit: xxxxxxxxx )
[2010-07-10 19:04] ip(72.191.177.16:27960) guid(7DDC43A9825E0BBD42A6DD4410F74BDD) name(^0________) message(team exploit detected (2 primary weapon): xxxxxxx)
[2010-07-11 05:49] ip(72.191.177.16:27960) guid(7DDC43A9825E0BBD42A6DD4410F74BDD) name(^0________) message(team exploit detected (15 grenades): xxxxxxxx)


It was tested with DutchFix 1.4, dunno if 1.6 includes recent fixes. Anyway ws exploit was also added to the plugin, cause we've used fix via GMSM scripts, but the point was to move it to the lower level.

_________________
Image

Image


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 26, 2010 3:14 pm 
Offline
Master
Master

Joined: Sat Sep 02, 2006 4:03 pm
Posts: 398
Location: Croatia/Germany
hey asthmatik, first of all great job. i tried your etadmin_mod fix for quite some time now on heros. unfortunately it seems to have a bug, where people get kicked for no reason, mostly shortly after the [/TEAM CHEAT ATTEMPT] -> Kick !!! info-message. at first i didnt wanna believe some people but then it happened to me as well some days ago^^. there was no weapon/team change or anything when it happened, except that i maybe minimized the game (do it all the time so shouldnt trigger it). as mentioned already, this mostly happened after the info-message, so maybe take a look again, might have missed something :P

_________________
=MaveXII=|WL Admin |IRC:#mave-clan
Image
*Clan Movie #2*|xfire: snakes3k


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 26, 2010 4:19 pm 
Offline
Master
Master

Joined: Fri Jun 12, 2009 1:19 pm
Posts: 411
I were kicked for making such an exploit myself. I was not even in the game because I had minimized it

_________________
"It's by doing whatever that you become whoever"


Top
 Profile  
 
 Post subject:
PostPosted: Sat Aug 28, 2010 7:01 am 
Offline
Master
Master
User avatar

Joined: Tue Jun 16, 2009 5:36 pm
Posts: 477
SnaKeS3K wrote:
hey asthmatik, first of all great job. i tried your etadmin_mod fix for quite some time now on heros. unfortunately it seems to have a bug, where people get kicked for no reason, mostly shortly after the [/TEAM CHEAT ATTEMPT] -> Kick !!! info-message. at first i didnt wanna believe some people but then it happened to me as well some days ago^^. there was no weapon/team change or anything when it happened, except that i maybe minimized the game (do it all the time so shouldnt trigger it). as mentioned already, this mostly happened after the info-message, so maybe take a look again, might have missed something :P

Hahaha ! dont try to *i-need-a-broader-vocab* your own server snake ! thats not good !

_________________
Image
xFire : wootheyetti


Top
 Profile  
 
 Post subject:
PostPosted: Sat Aug 28, 2010 7:30 pm 
Offline
Sharp Shooter
Sharp Shooter
User avatar

Joined: Sat Jun 19, 2010 7:16 pm
Posts: 48
Location: France
@SnaKeS3K:
Could you please check in the logs of EtAdmin and PM me more infos about the kicked players?
Normally my code is limited to the data of the player.
I included the weapon "0" by security.
But I suppose this could happen when you are spectating a "cheater" or at least someone who used a /team trick during the time you are waiting for respawn, as you are "impersonating" him...
If the "cheater" changes his /team command before to be killed and respawn, he could be not be detected as cheater because the command isn't effectif yet (but already used by the follower).
But it's only a supposition.
I need some clues (maybe it's not a bug but a glitch :P)

_________________
Image
Site de la Communauté Française de TC:E
Server/Machine Admin for Teams |AES| - =]NyX[= - =]X-BlooD[=


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 13 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
Style created by © Matti, gry komputerowe, reklama sem reklama seo

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group