SA-MP Forums

SA-MP Forums (https://forum.sa-mp.com/index.php)
-   Includes (https://forum.sa-mp.com/forumdisplay.php?f=83)
-   -   [Include] Southclaw's & Pottus's Anti-cheat patches (https://forum.sa-mp.com/showthread.php?t=504244)

Pottus 03/04/2014 12:54 AM

Southclaw's & Pottus's Anti-cheat patches
 
Anti-cheat patches


Objective:
Southclaw and I have decided to keep a resource of anti-hack patches which can be easily integrated into your script. Every patch will follow some basic guidelines for implementation, as well as a description of the cheat which the patch prevents. Please keep in mind these are not designed to be an anti-cheat system addressing a complete system is really on an individual basis and often directly needs to be integrated into the gamemode it's self instead this patches are meant to build on your anti-cheat system by providing a means of quick implementation.

Guidelines:
- Patches are to be designed to be included BEFORE YSI
- Patches will contain ALS hooking only
- Patches will contain a callback with the following prefix OnAntiCheat ..... () ex OnAntiCheatAutoAim(playerid)
- Patches will have a description outlining the anticheat
- Patches can use y_iterate

__________________________________________________ ________________________________________________

Patches
__________________________________________________ ________________________________________________


Name: Autobullet
Type: Animation / Weapon exploit
Description: Modifies the behavior of walking weapons allowing them to be used like running weapons it also skips the reload animations.
Detection Method: There is a velocity range in which this exploit happens however it is also possible to achieve the same velocity in some circumstances by using the slide-shoot-run bug that is why there is player key checks in place to make sure that does not happen. A player receiving 3 infractions will result in OnAntiCheatAutoBullet() being called.
Callback: public OnAntiCheatAutoBullet(playerid, weaponid)


pawn Code:
// Anti autobullet exploit detection by [uL]Pottus
#define             MAX_AUTOBULLET_INFRACTIONS          3
#define             AUTOBULLET_RESET_DELAY              30

static AutoBulletInfractions[MAX_PLAYERS];
static LastInfractionTime[MAX_PLAYERS];

forward OnAntiCheatAutoBullet(playerid, weaponid);

public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ)
{
    if(!IsPlayerInAnyVehicle(playerid))
    {
        switch(weaponid)
        {
            case 27, 23, 25, 29, 30, 31, 33, 24, 38:
            {
                if(CheckSpeed(playerid))
                {
                    if(gettime() - LastInfractionTime[playerid] >= AUTOBULLET_RESET_DELAY) AutoBulletInfractions[playerid] = 1;
                    else AutoBulletInfractions[playerid]++;
                    LastInfractionTime[playerid] = gettime();

                    if(AutoBulletInfractions[playerid] == MAX_AUTOBULLET_INFRACTIONS)
                    {
                        AutoBulletInfractions[playerid] = 0;
                        CallLocalFunction("OnAntiCheatAutoBullet", "ii", playerid, weaponid);
                        return 0;
                    }
                }
            }
        }
    }
   
    if (funcidx("ACAutoB_OnPlayerWeaponShot") != -1)
    {
        return CallLocalFunction("ACAutoB_OnPlayerWeaponShot", "iiiifff", playerid, weaponid, hittype, hitid, fX, fY, fZ);
    }
    return 1;
}

#if defined _ALS_OnPlayerWeaponShot
    #undef OnPlayerWeaponShot
#else
    #define _ALS_OnPlayerWeaponShot
#endif
#define OnPlayerWeaponShot ACAutoB_OnPlayerWeaponShot

forward ACAutoB_OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ);

public OnPlayerDisconnect(playerid, reason)
{
    AutoBulletInfractions[playerid] = 0;

    if (funcidx("ACAutoB_OnPlayerDisconnect") != -1)
    {
        return CallLocalFunction("ACAutoB_OnPlayerDisconnect", "ii", playerid, reason);
    }
    return 1;
}

#if defined _ALS_OnPlayerDisconnect
    #undef OnPlayerDisconnect
#else
    #define _ALS_OnPlayerDisconnect
#endif
#define OnPlayerDisconnect ACAutoB_OnPlayerDisconnect

forward ACAutoB_OnPlayerDisconnect(playerid, reason);


static CheckSpeed(playerid)
{
    new Keys,ud,lr;
    GetPlayerKeys(playerid,Keys,ud,lr);

    if(ud == KEY_UP && lr != KEY_LEFT && lr != KEY_RIGHT)
    {
        new Float:Velocity[3];
        GetPlayerVelocity(playerid, Velocity[0], Velocity[1], Velocity[2]);
        Velocity[0] = floatsqroot( (Velocity[0]*Velocity[0])+(Velocity[1]*Velocity[1])+(Velocity[2]*Velocity[2]));
        if(Velocity[0] >= 0.11 && Velocity[0] <= 0.13) return 1;
    }
    return 0;
}

Name: Connection spoofing
Type: Server exploit
Description: It was possible in 0.3x to spoof a connection to a server when a player is already connected, this will result in the players name being changed to the spoofed name unprotected servers could potentially have player accounts overwritten. It is currently unknown if this exploit exists in 0.3z however it assumed that it still could potentially happen in any case this patch provides protection by preventing OnPlayerConnect() from being called to the rest of the script. IMPORTANT Make sure this is placed before any other includes that use OnPlayerConnect!!!!
Detection Method: When a player connects a variable is set that they are connected, if another connection happens on the same ID while they are still connected this is considered a spoof.
Callback: public OnAntiCheatPlayerSpoof(playerid)

Edit - I have confirmed this as still possible.


pawn Code:
// Anti connection spoofing patch by [uL]Pottus

forward OnAntiCheatPlayerSpoof(playerid);

static bool:PlayerConnected[MAX_PLAYERS];
static PlayerNames[MAX_PLAYERS][MAX_PLAYER_NAME];

public OnPlayerConnect(playerid)
{
    // User was already connected cheat detected
    if(PlayerConnected[playerid])
    {
        SetPlayerName(playerid, PlayerNames[playerid]);
        CallLocalFunction("OnAntiCheatPlayerSpoof", "i", playerid);
        return 1;
    }
    else
    {
        GetPlayerName(playerid, PlayerNames[playerid], MAX_PLAYER_NAME);
        PlayerConnected[playerid] = true;
    }

    if (funcidx("AntiSpoof_OnPlayerConnect") != -1)
    {
        return CallLocalFunction("AntiSpoof_OnPlayerConnect", "i", playerid);
    }
    return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
    PlayerConnected[playerid] = false;

    if (funcidx("AntiSpoof_OnPlayerDisconnect") != -1)
    {
        return CallLocalFunction("AntiSpoof_OnPlayerDisconnect", "ii", playerid, reason);
    }
    return 1;
}


#if defined _ALS_OnPlayerConnect
    #undef OnPlayerConnect
#else
    #define _ALS_OnPlayerConnect
#endif
#define OnPlayerConnect AntiSpoof_OnPlayerConnect

forward AntiSpoof_OnPlayerConnect(playerid);

#if defined _ALS_OnPlayerDisconnect
    #undef OnPlayerDisconnect
#else
    #define _ALS_OnPlayerDisconnect
#endif
#define OnPlayerDisconnect AntiSpoof_OnPlayerDisconnect

forward AntiSpoof_OnPlayerDisconnect(playerid, reason);

Name: NPC Connection spoofing
Type: Server exploit
Description: This is very similar to connection spoofing and was an issue in 0.3x it is assumed that it is still possible in the new SAMP version. It will result in faked NPC connections to the server. IMPORTANT Make sure this is placed before any other includes that use OnPlayerConnect!!!!
Detection Method: All real NPC connections can only occur on IP: 127.0.0.1 if the IP is different then it is a spoofed NPC connection
Callback: public OnAntiCheatNPCSpoof(playerid)


pawn Code:
// Anti NPC spoof by [uL]Pottus

forward OnAntiCheatNPCSpoof(playerid);

public OnPlayerConnect(playerid)
{
    if(IsPlayerNPC(playerid))
    {
        new ip[16];
        GetPlayerIp(playerid, ip, sizeof(ip));
        if (!!strcmp(ip, "127.0.0.1"))
        {
            new name[MAX_PLAYER_NAME];
            format(name, sizeof(name), "%i", gettime());
            SetPlayerName(playerid, name);
            CallLocalFunction("OnAntiCheatNPCSpoof", "i", playerid);
            return 1;
        }
    }
    if (funcidx("AntiNPC_OnPlayerConnect") != -1)
    {
        return CallLocalFunction("AntiNPC_OnPlayerConnect", "i", playerid);
    }
    return 1;
}

#if defined _ALS_OnPlayerConnect
    #undef OnPlayerConnect
#else
    #define _ALS_OnPlayerConnect
#endif
#define OnPlayerConnect AntiNPC_OnPlayerConnect

forward AntiNPC_OnPlayerConnect(playerid);

Name: Lag Troll
Type: Vehicle Cheat
Description: This cheat appears to send fake packets to the server in rapid succession by copying the position of the targeted vehicle the result is a lag type effect.
Callback: public OnAntiCheatLagTroll(playerid)


pawn Code:
#define         MAX_VEHICLE_ID_CHANGES          5

static LastVehicleID[MAX_PLAYERS];
static VehicleIDChanges[MAX_PLAYERS];
static VehicleIDChangeTime[MAX_PLAYERS];

forward OnAntiCheatLagTroll(playerid);

public OnPlayerUpdate(playerid)
{
    new vid = GetPlayerVehicleID(playerid);
    if(vid > 0)
    {
        if(vid != LastVehicleID[playerid])
        {
            if(GetTickCount() - VehicleIDChangeTime[playerid] < 5000)
            {
                VehicleIDChanges[playerid]++;
                if(VehicleIDChanges[playerid] > MAX_VEHICLE_ID_CHANGES)
                {
                    CallLocalFunction("OnAntiCheatLagTroll", "i", playerid);
                    return 0;
                }
            }
            else VehicleIDChanges[playerid] = 1;
        }
        LastVehicleID[playerid] = vid;
        VehicleIDChangeTime[playerid] = GetTickCount();
    }

    if (funcidx("AntiLT_OnPlayerUpdate") != -1)
    {
        return CallLocalFunction("AntiLT_OnPlayerUpdate", "i", playerid);
    }
    return 1;
}

#if defined _ALS_OnPlayerUpdate
    #undef OnPlayerUpdate
#else
    #define _ALS_OnPlayerUpdate
#endif
#define OnPlayerUpdate AntiLT_OnPlayerUpdate

forward AntiLT_OnPlayerUpdate(playerid);




Name: Server Freezer - Obsolete download the new SAMP server update
http://forum.sa-mp.com/showthread.php?t=506214

RenovanZ 03/04/2014 02:36 AM

Re: Southclaw's & Pottus's Anti-cheat patches
 
Really Nice! Good Job, Southclaw & Pottus!
Gonna use this.

Whitetiger 03/04/2014 02:42 AM

Re: Southclaw's & Pottus's Anti-cheat patches
 
you should make this a community driven solution on github, with changes encouraged by the community (see fixes.Inc). can make a quick include to patch a bunch of hacks

Pottus 03/04/2014 02:57 AM

Re: Southclaw's & Pottus's Anti-cheat patches
 
Quote:

Originally Posted by Whitetiger (Post 2977081)
you should make this a community driven solution on github, with changes encouraged by the community (see fixes.Inc). can make a quick include to patch a bunch of hacks

That is a good idea, but the issue with that is implementation, were not really releasing a full AC system rather patches to integrate into gamemodes. It will be up to the scripter to determine how they want to handle specific events. I still have a lot of patches to put up yet :)

awsomedude 03/04/2014 04:50 AM

Re: Southclaw's & Pottus's Anti-cheat patches
 
Good job both of you

Niko_boy 03/04/2014 04:54 AM

Re: Southclaw's & Pottus's Anti-cheat patches
 
Nice work guys.

Lorenc_ 03/04/2014 07:07 AM

Re: Southclaw's & Pottus's Anti-cheat patches
 
Nice job!

Never encountered the second one, but that's a strange but effective fix.

iZN 03/04/2014 09:12 AM

Re: Southclaw's & Pottus's Anti-cheat patches
 
Ah, you were discussing at the IRC about the patches. Nice work!

Kar 03/04/2014 01:36 PM

Re: Southclaw's & Pottus's Anti-cheat patches
 
Sorry guys, the first one has ALOT of false alarms.

All you have to do to throw the auto bullet thing

is keep firing your weapon and move left and right around constantly and it throws the autobullet detection

Tested with deagle and combat shotgun

Pottus 03/04/2014 02:03 PM

Re: Southclaw's & Pottus's Anti-cheat patches
 
Quote:

Originally Posted by Kar (Post 2977366)
Sorry guys, the first one has ALOT of false alarms.

All you have to do to throw the auto bullet thing

is keep firing your weapon and move left and right around constantly and it throws the autobullet detection

Tested with deagle and combat shotgun

Thanks, I'll test it out again and see if I can get it to happen going to comment it out for the time being. Okay now I see how that happens :)

shittt 03/04/2014 02:15 PM

Re: Southclaw's & Pottus's Anti-cheat patches
 
Nice , protects against rapid fire?

if so I'm not seeing is blurred, Linux does not help :/

OFF: 666 Posts o_O.

MugiwaraNoLuffy 05/04/2014 06:51 AM

Respuesta: Southclaw's & Pottus's Anti-cheat patches
 
Good job, keep it up

Kyle 08/04/2014 10:51 AM

Re: Southclaw's & Pottus's Anti-cheat patches
 
Quote:

Originally Posted by ****** (Post 2983302)
Could I make a request (partially a suggestion). You explicitly mention that this should be included before YSI, and I agree, but there are a few things to be aware of with that:

1) You say you can use y_iterate, but if you include these patches before YSI the "foreach" macro won't yet exist and that code will never be used even if it is included later.

2) y_hooks in YSI 4.0 is awkward to deal with in terms of orderings. Currently y_hooks hooks always come before ALS hooks, even if they appear later in source code, the ordering is changed (or, more accurately, set) at run-time, not compile-time. I have a solution to this that will be released shortly (I am now back home), but the solution requires some co-operation from other library developers that want their code to come before any y_hooks code. "Breaking" an ALS chain is tricky as you need to be able to detect the chain, but this can be done. I want to try and figure out an even better way of specifying ordering, but for now this is the best I have come up with. Instead of your current hooking method use:

pawn Code:
// This function has two purposes - defines 3 states, and declares your ALS prefix.
// You seem to use different prefixes for each callback though, I'm not sure that's a
// good idea and will make detection MUCH harder.
forward @@@_AC();
// The function is never called, but can be found by the "@@@_" prefix.
public @@@_AC() <AC_state : AC_state1> {}
public @@@_AC() <AC_state : AC_state2> {}
public @@@_AC() <AC_state : AC_state3> {}

#define AC_FORWARD%0(%1) \
    forward%0(%1); \
    public%0(%1)<> return 0; \
    public%0(%1)<AC_state : AC_state1> return 0

// Now this is a normal callback.
public OnPlayerDisconnect(playerid, reason)
{
    // And this is the hook, no wrapping of any kind required.
    return AC_OnPlayerDisconnect(playerid, reason);
}

#if defined _ALS_OnPlayerDisconnect
    #undef OnPlayerDisconnect
#else
    #define _ALS_OnPlayerDisconnect
#endif
#define OnPlayerDisconnect(%0) AC_OnPlayerDisconnect(%0) <AC_state : AC_state2>

AC_FORWARD AC_OnPlayerDisconnect(playerid, reason);

Using that, the order hooks are done in becomes:

- State-based hooks.
- y_hooks.
- ALS hooks.
- Public function.

If you need me to explain the issues in more depth, or would like to discuss alternate solutions (I would), feel free to contact me here or on IRC. This is a VERY brief post on the issue, and I wish there was a better way. Note that you also need:

pawn Code:
state AC_state : AC_state2;

Somewhere to make the whole thing work, but you could add that to every callback, I just prefer doing it in OnGameModeInit (etc).

Other than that, nice.

They already did when they first posted: "- Patches are to be designed to be included BEFORE YSI"

Admigo 08/04/2014 03:08 PM

Re: Southclaw's & Pottus's Anti-cheat patches
 
Very usefull. Good job;)

Kyra 08/04/2014 09:12 PM

Re: Southclaw's & Pottus's Anti-cheat patches
 
Very usefull post if the community contribute on this post, i think it's important with the massive cheat created.

I don't understand the Autobullet, it's for detect shoot player on slide bug?

Pottus 09/04/2014 01:31 AM

Re: Southclaw's & Pottus's Anti-cheat patches
 
I was reviewing the rapid fire cheat Southclaw and I think it needs to be revised because it doesn't take in account c-bugging at all.

@Edit - It's also probably a good idea to run ammo lock checking first since the rapid fire cheats seem to usually lock ammo it would be easier to bust someone this way as a first line of defense.

MugiwaraNoLuffy 09/04/2014 04:41 AM

Respuesta: Re: Southclaw's & Pottus's Anti-cheat patches
 
Quote:

Originally Posted by [uL]Pottus (Post 2984722)
I was reviewing the rapid fire cheat Southclaw and I think it needs to be revised because it doesn't take in account c-bugging at all.

@Edit - It's also probably a good idea to run ammo lock checking first since the rapid fire cheats seem to usually lock ammo it would be easier to bust someone this way as a first line of defense.

Every weapon should have its own shooting max rate if you know what I mean.

kristo 13/04/2014 02:18 PM

Re: Southclaw's & Pottus's Anti-cheat patches
 
Raise the limit of MessagesRecvPerSecond. Me and my friend got kicked by it because we used miniguns.

Pottus 13/04/2014 02:22 PM

Re: Southclaw's & Pottus's Anti-cheat patches
 
Quote:

Originally Posted by kvann (Post 2990961)
Raise the limit of MessagesRecvPerSecond. Me and my friend got kicked by it because we used miniguns.

That check is going to be removed it is obsolete with the new SAMP version.

SkittlesAreFalling 14/04/2014 04:46 AM

Re: Southclaw's & Pottus's Anti-cheat patches
 
Why is this stickied?

iRaiDeN 14/04/2014 09:22 AM

Re: Southclaw's & Pottus's Anti-cheat patches
 
goo job!

Kyra 14/04/2014 10:04 PM

Re: Southclaw's & Pottus's Anti-cheat patches
 
For the cheat no reload weapon, i use personally an anti infiny ammo but with the SYNC i can have false positive and i use a timer for this bug i use an system for multi check all 1000 ms if the player have a diff ammo + X ammo on my function local (example for eagle getplayerammo +15 ammos) and i the player have +15 Ammos eagle on 6 checks on timer (6 seconds) i kick this

It's not the best i think but for the moment for me it's good, and i decrease a variable on onplayerweaponshot for the ammo

For me your system use lot of ressource for detect this cheat but your system there is more performant and it's an good idea

For anti rapid fire, when the player lag he can have false positive i don't know how i can check if the player have a big LAG but your idea for check GetServerTickRate () it's good for lag server i think

And yes this post is very usefull for help the community to counter cheats.

NoahF 20/04/2014 12:27 PM

Re: Southclaw's & Pottus's Anti-cheat patches
 
This is great. Thank you so much for this. This will def. help a lot of people!

Kyra 11/05/2014 06:52 PM

Re: Southclaw's & Pottus's Anti-cheat patches
 
Someone try an anticheat for norecoil/spread bullet?

Pottus 15/05/2014 01:28 PM

Re: Southclaw's & Pottus's Anti-cheat patches
 
Quote:

Originally Posted by Kyra (Post 3031445)
Someone try an anticheat for norecoil/spread bullet?

That would probably be too difficult to detect I think.

Admigo 15/05/2014 03:53 PM

Re: Southclaw's & Pottus's Anti-cheat patches
 
Nice patches. Will use them for my server. Great job. I hope to see more of them.

Kyra 17/05/2014 09:32 PM

Re: Southclaw's & Pottus's Anti-cheat patches
 
I try your code here, http://forum.sa-mp.com/showthread.php?t=496392

But when i move sometimes i have strange result, easy how? I need to detect this :) if you can just explain me your idea please

Chrillzen 04/10/2014 01:22 PM

Re: Southclaw's & Pottus's Anti-cheat patches
 
Much appreciated.

Chefão 28/10/2014 03:03 PM

Re: Southclaw's & Pottus's Anti-cheat patches
 
download link?

Alex Magaņa 28/10/2014 04:48 PM

Re: Southclaw's & Pottus's Anti-cheat patches
 
nice include ;D! great work southclaw + pottus.

Chefão 28/10/2014 05:41 PM

Re: Southclaw's & Pottus's Anti-cheat patches
 
Quote:

Originally Posted by [HLF]Southclaw (Post 3239238)
Read the first post, the code is right there!

show me example ?

Pottus 01/11/2014 06:25 AM

Re: Southclaw's & Pottus's Anti-cheat patches
 
New patch for a new exploit today.

Killa[DGZ] 02/11/2014 01:33 AM

Re: Southclaw's & Pottus's Anti-cheat patches
 
Quote:

Originally Posted by Pottus (Post 3243140)
New patch for a new exploit today.

Tested with the exploit itself and it doesn't work mate.. didn't get detected even after a whole minute of lagging the server.

The exploit causes 'GetPlayerVehicleID' to return 0 everytime, also you cannot, GetHealth, GetWeapon, GetModel an so on.. OnPlayerStateChange & OnPlayerUpdate is never called for the exploiting player.

However you can still get their 'exiting vehicleID' from within OnPlayerExitVehicle, on my test server there are no vehicles and OnPlayerExitVehicle was still being called, it's only when there are vehicles that OnPlayerEnterVehicle is also called.


This is 1 minute worth of running the lag exploit on my test server, I've added prints into every callback to see what is actually being called.
Code:

[22:33:00] OnPlayerExitVehicle
[22:33:00] OnPlayerPickUpPickup: 53
[22:33:00] OnPlayerRequestSpawn
[22:33:00] OnDialogResponse - dialogID:0
[22:33:01] OnPlayerExitVehicle
[22:33:01] OnPlayerPickUpPickup: 54
[22:33:01] OnPlayerRequestSpawn
[22:33:01] OnDialogResponse - dialogID:0
[22:33:02] OnPlayerExitVehicle
[22:33:02] OnPlayerPickUpPickup: 55
[22:33:02] OnPlayerRequestSpawn
[22:33:02] OnDialogResponse - dialogID:0
[22:33:03] OnPlayerExitVehicle
[22:33:03] OnPlayerPickUpPickup: 56
[22:33:03] OnPlayerRequestSpawn
[22:33:03] OnDialogResponse - dialogID:0
[22:33:04] OnPlayerExitVehicle
[22:33:04] OnPlayerPickUpPickup: 57
[22:33:04] OnPlayerRequestSpawn
[22:33:04] OnDialogResponse - dialogID:0
[22:33:05] OnPlayerExitVehicle
[22:33:05] OnPlayerPickUpPickup: 58
[22:33:05] OnPlayerRequestSpawn
[22:33:05] OnDialogResponse - dialogID:0
[22:33:06] OnPlayerExitVehicle
[22:33:06] OnPlayerPickUpPickup: 59
[22:33:06] OnPlayerRequestSpawn
[22:33:06] OnDialogResponse - dialogID:0
[22:33:07] OnPlayerExitVehicle
[22:33:07] OnPlayerPickUpPickup: 60
[22:33:07] OnPlayerRequestSpawn
[22:33:07] OnDialogResponse - dialogID:0
[22:33:08] OnPlayerExitVehicle
[22:33:08] OnPlayerPickUpPickup: 61
[22:33:08] OnPlayerRequestSpawn
[22:33:08] OnDialogResponse - dialogID:0
[22:33:09] OnPlayerExitVehicle
[22:33:09] OnPlayerPickUpPickup: 62
[22:33:09] OnPlayerRequestSpawn
[22:33:09] OnDialogResponse - dialogID:0
[22:33:10] OnPlayerExitVehicle
[22:33:10] OnPlayerPickUpPickup: 63
[22:33:10] OnPlayerRequestSpawn
[22:33:10] OnDialogResponse - dialogID:0
[22:33:11] OnPlayerExitVehicle
[22:33:11] OnPlayerPickUpPickup: 64
[22:33:11] OnPlayerRequestSpawn
[22:33:11] OnDialogResponse - dialogID:0
[22:33:12] OnPlayerExitVehicle
[22:33:12] OnPlayerPickUpPickup: 65
[22:33:12] OnPlayerRequestSpawn
[22:33:12] OnDialogResponse - dialogID:0
[22:33:13] OnPlayerExitVehicle
[22:33:13] OnPlayerPickUpPickup: 66
[22:33:13] OnPlayerRequestSpawn
[22:33:13] OnDialogResponse - dialogID:0
[22:33:14] OnPlayerExitVehicle
[22:33:14] OnPlayerPickUpPickup: 67
[22:33:14] OnPlayerRequestSpawn
[22:33:14] OnDialogResponse - dialogID:0
[22:33:15] OnPlayerExitVehicle
[22:33:15] OnPlayerPickUpPickup: 68
[22:33:15] OnPlayerRequestSpawn
[22:33:15] OnDialogResponse - dialogID:0
[22:33:16] OnPlayerExitVehicle
[22:33:16] OnPlayerPickUpPickup: 69
[22:33:16] OnPlayerRequestSpawn
[22:33:16] OnDialogResponse - dialogID:0
[22:33:17] OnPlayerExitVehicle
[22:33:17] OnPlayerPickUpPickup: 70
[22:33:17] OnPlayerRequestSpawn
[22:33:17] OnDialogResponse - dialogID:0
[22:33:18] OnPlayerExitVehicle
[22:33:18] OnPlayerPickUpPickup: 71
[22:33:18] OnPlayerRequestSpawn
[22:33:18] OnDialogResponse - dialogID:0
[22:33:19] OnPlayerExitVehicle
[22:33:19] OnPlayerPickUpPickup: 72
[22:33:19] OnPlayerRequestSpawn
[22:33:19] OnDialogResponse - dialogID:0
[22:33:20] OnPlayerExitVehicle
[22:33:20] OnPlayerPickUpPickup: 73
[22:33:20] OnPlayerRequestSpawn
[22:33:20] OnDialogResponse - dialogID:0
[22:33:21] OnPlayerExitVehicle
[22:33:21] OnPlayerPickUpPickup: 74
[22:33:21] OnPlayerRequestSpawn
[22:33:21] OnDialogResponse - dialogID:0
[22:33:22] OnPlayerExitVehicle
[22:33:22] OnPlayerPickUpPickup: 75
[22:33:22] OnPlayerRequestSpawn
[22:33:22] OnDialogResponse - dialogID:0
[22:33:23] OnPlayerExitVehicle
[22:33:23] OnPlayerPickUpPickup: 76
[22:33:23] OnPlayerRequestSpawn
[22:33:23] OnDialogResponse - dialogID:0
[22:33:24] OnPlayerExitVehicle
[22:33:24] OnPlayerPickUpPickup: 77
[22:33:24] OnPlayerRequestSpawn
[22:33:24] OnDialogResponse - dialogID:0
[22:33:25] OnPlayerExitVehicle
[22:33:25] OnPlayerPickUpPickup: 78
[22:33:25] OnPlayerRequestSpawn
[22:33:25] OnDialogResponse - dialogID:0
[22:33:26] OnPlayerExitVehicle
[22:33:26] OnPlayerPickUpPickup: 79
[22:33:26] OnPlayerRequestSpawn
[22:33:26] OnDialogResponse - dialogID:0
[22:33:27] OnPlayerExitVehicle
[22:33:27] OnPlayerPickUpPickup: 80
[22:33:27] OnPlayerRequestSpawn
[22:33:27] OnDialogResponse - dialogID:0
[22:33:28] OnPlayerExitVehicle
[22:33:28] OnPlayerPickUpPickup: 81
[22:33:28] OnPlayerRequestSpawn
[22:33:28] OnDialogResponse - dialogID:0
[22:33:29] OnPlayerExitVehicle
[22:33:29] OnPlayerPickUpPickup: 82
[22:33:29] OnPlayerRequestSpawn
[22:33:29] OnDialogResponse - dialogID:0
[22:33:30] OnPlayerExitVehicle
[22:33:30] OnPlayerPickUpPickup: 83
[22:33:30] OnPlayerRequestSpawn
[22:33:30] OnDialogResponse - dialogID:0
[22:33:31] OnPlayerExitVehicle
[22:33:31] OnPlayerPickUpPickup: 84
[22:33:31] OnPlayerRequestSpawn
[22:33:31] OnDialogResponse - dialogID:0
[22:33:32] OnPlayerExitVehicle
[22:33:32] OnPlayerPickUpPickup: 85
[22:33:32] OnPlayerRequestSpawn
[22:33:32] OnDialogResponse - dialogID:0
[22:33:33] OnPlayerExitVehicle
[22:33:33] OnPlayerPickUpPickup: 86
[22:33:33] OnPlayerRequestSpawn
[22:33:33] OnDialogResponse - dialogID:0
[22:33:34] OnPlayerExitVehicle
[22:33:34] OnPlayerPickUpPickup: 87
[22:33:34] OnPlayerRequestSpawn
[22:33:34] OnDialogResponse - dialogID:0
[22:33:35] OnPlayerExitVehicle
[22:33:35] OnPlayerPickUpPickup: 88
[22:33:35] OnPlayerRequestSpawn
[22:33:35] OnDialogResponse - dialogID:0
[22:33:36] OnPlayerExitVehicle
[22:33:36] OnPlayerPickUpPickup: 89
[22:33:36] OnPlayerRequestSpawn
[22:33:36] OnDialogResponse - dialogID:0
[22:33:37] OnPlayerExitVehicle
[22:33:37] OnPlayerPickUpPickup: 90
[22:33:37] OnPlayerRequestSpawn
[22:33:37] OnDialogResponse - dialogID:0
[22:33:38] OnPlayerExitVehicle
[22:33:38] OnPlayerPickUpPickup: 91
[22:33:38] OnPlayerRequestSpawn
[22:33:38] OnDialogResponse - dialogID:0
[22:33:39] OnPlayerExitVehicle
[22:33:39] OnPlayerPickUpPickup: 92
[22:33:39] OnPlayerRequestSpawn
[22:33:39] OnDialogResponse - dialogID:0
[22:33:40] OnPlayerExitVehicle
[22:33:40] OnPlayerPickUpPickup: 93
[22:33:40] OnPlayerRequestSpawn
[22:33:40] OnDialogResponse - dialogID:0
[22:33:41] OnPlayerExitVehicle
[22:33:41] OnPlayerPickUpPickup: 94
[22:33:41] OnPlayerRequestSpawn
[22:33:41] OnDialogResponse - dialogID:0
[22:33:42] OnPlayerExitVehicle
[22:33:42] OnPlayerPickUpPickup: 95
[22:33:42] OnPlayerRequestSpawn
[22:33:42] OnDialogResponse - dialogID:0
[22:33:43] OnPlayerExitVehicle
[22:33:43] OnPlayerPickUpPickup: 96
[22:33:43] OnPlayerRequestSpawn
[22:33:43] OnDialogResponse - dialogID:0
[22:33:44] OnPlayerExitVehicle
[22:33:44] OnPlayerPickUpPickup: 97
[22:33:44] OnPlayerRequestSpawn
[22:33:44] OnDialogResponse - dialogID:0
[22:33:45] OnPlayerExitVehicle
[22:33:45] OnPlayerPickUpPickup: 98
[22:33:45] OnPlayerRequestSpawn
[22:33:45] OnDialogResponse - dialogID:0
[22:33:46] OnPlayerExitVehicle
[22:33:46] OnPlayerPickUpPickup: 99
[22:33:46] OnPlayerRequestSpawn
[22:33:46] OnDialogResponse - dialogID:0
[22:33:47] OnPlayerExitVehicle
[22:33:47] OnPlayerPickUpPickup: 100
[22:33:47] OnPlayerRequestSpawn
[22:33:47] OnDialogResponse - dialogID:0
[22:33:48] OnPlayerExitVehicle
[22:33:48] OnPlayerPickUpPickup: 101
[22:33:48] OnPlayerRequestSpawn
[22:33:48] OnDialogResponse - dialogID:0
[22:33:49] OnPlayerExitVehicle
[22:33:49] OnPlayerPickUpPickup: 102
[22:33:49] OnPlayerRequestSpawn
[22:33:49] OnDialogResponse - dialogID:0
[22:33:50] OnPlayerExitVehicle
[22:33:50] OnPlayerPickUpPickup: 103
[22:33:50] OnPlayerRequestSpawn
[22:33:50] OnDialogResponse - dialogID:0
[22:33:51] OnPlayerExitVehicle
[22:33:51] OnPlayerPickUpPickup: 104
[22:33:51] OnPlayerRequestSpawn
[22:33:51] OnDialogResponse - dialogID:0
[22:33:52] OnPlayerExitVehicle
[22:33:52] OnPlayerPickUpPickup: 105
[22:33:52] OnPlayerRequestSpawn
[22:33:52] OnDialogResponse - dialogID:0
[22:33:53] OnPlayerExitVehicle
[22:33:53] OnPlayerPickUpPickup: 106
[22:33:53] OnPlayerRequestSpawn
[22:33:53] OnDialogResponse - dialogID:0
[22:33:54] OnPlayerExitVehicle
[22:33:54] OnPlayerPickUpPickup: 107
[22:33:54] OnPlayerRequestSpawn
[22:33:54] OnDialogResponse - dialogID:0
[22:33:55] OnPlayerExitVehicle
[22:33:55] OnPlayerPickUpPickup: 108
[22:33:55] OnPlayerRequestSpawn
[22:33:55] OnDialogResponse - dialogID:0
[22:33:56] OnPlayerExitVehicle
[22:33:56] OnPlayerPickUpPickup: 109
[22:33:56] OnPlayerRequestSpawn
[22:33:56] OnDialogResponse - dialogID:0
[22:33:57] OnPlayerExitVehicle
[22:33:57] OnPlayerPickUpPickup: 110
[22:33:57] OnPlayerRequestSpawn
[22:33:57] OnDialogResponse - dialogID:0
[22:33:58] OnPlayerExitVehicle
[22:33:58] OnPlayerPickUpPickup: 111
[22:33:58] OnPlayerRequestSpawn
[22:33:58] OnDialogResponse - dialogID:0
[22:33:59] OnPlayerExitVehicle
[22:33:59] OnPlayerPickUpPickup: 112
[22:33:59] OnPlayerRequestSpawn
[22:33:59] OnDialogResponse - dialogID:0
[22:34:00] OnPlayerExitVehicle
[22:34:00] OnPlayerPickUpPickup: 113
[22:34:00] OnPlayerRequestSpawn
[22:34:00] OnDialogResponse - dialogID:0

This is the patch that you helped me make timerless pottus, it still works perfectly with no false positives..
pawn Code:
#define VEHICLE_EXIT_TIME   2000
#define VEHICLE_EXITS       3

new LAGExitedVehicle[MAX_PLAYERS];
new LAGExitTimeCheck[MAX_PLAYERS];
new LAGPlayerExitingVehicle[MAX_PLAYERS];

public OnPlayerConnect(playerid)
{
    if(IsPlayerConnected(playerid))
    {
        LAGExitedVehicle[playerid] = 0;
        LAGExitTimeCheck[playerid] = 0;
        LAGPlayerExitingVehicle[playerid] = 0;
    }
    return 1;
}

public OnPlayerExitVehicle(playerid, vehicleid)
{
    if(LAGPlayerExitingVehicle[playerid] != vehicleid)
    {
        if(GetTickCount() - LAGExitTimeCheck[playerid] < VEHICLE_EXIT_TIME)
        {
            LAGExitedVehicle[playerid]++;
            if(LAGExitedVehicle[playerid] >= VEHICLE_EXITS)
            {
                OnPlayerUsedLagExploit(playerid);
            }
        }
        else
        {
            LAGExitedVehicle[playerid] = 1;
        }
        LAGExitTimeCheck[playerid] = GetTickCount();
        LAGPlayerExitingVehicle[playerid] = vehicleid;
    }
    return 1;
}
forward OnPlayerUsedLagExploit(playerid);
public OnPlayerUsedLagExploit(playerid)
{
    if(IsPlayerConnected(playerid))
    {
        //KICK or BAN
    }
    return 1;
}
You should add this patch to the list, thanks again for your help with it too :)

Killa[DGZ] 02/11/2014 01:39 AM

Re: Southclaw's & Pottus's Anti-cheat patches
 
Spose you could also detect the request of spawn "if already spawned" add infraction?

Edit: Tested, not a good enough detection method in my opinion..

Pottus 02/11/2014 02:15 AM

Re: Southclaw's & Pottus's Anti-cheat patches
 
Are you sure you used the correct exploit? I don't think what your detecting is the same thing.

Killa[DGZ] 02/11/2014 02:24 AM

Re: Southclaw's & Pottus's Anti-cheat patches
 
Quote:

Originally Posted by Pottus (Post 3244309)
Are you sure you used the correct exploit? I don't think what your detecting is the same thing.


Probably isn't you know lol,

This is what I mentioned to you a few days ago via PM, the exploit that is designed to severely lag the server by calling numerous callbacks sequentially @20ms or so..

Looking at your code, my patch would also detect it.. but feel free to test your exploit on my server and see what happens.

Pottus 02/11/2014 02:35 AM

Re: Southclaw's & Pottus's Anti-cheat patches
 
Give me your IP and I will try it thanks.

Killa[DGZ] 02/11/2014 03:28 AM

Re: Southclaw's & Pottus's Anti-cheat patches
 
Quote:

Originally Posted by Pottus (Post 3244329)
Give me your IP and I will try it thanks.


Ahh yes I see, completely different thing.. I will implement your code asap.


Good job, an thankyou!

Jakwob 18/11/2014 08:51 PM

Re: Southclaw's & Pottus's Anti-cheat patches
 
nice work guys its about time we crack down on hacks.

PaulDinam 15/01/2015 02:16 PM

Re: Southclaw's & Pottus's Anti-cheat patches
 
delete


All times are GMT. The time now is 09:51 PM.

Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.