AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting (https://forums.alliedmods.net/forumdisplay.php?f=107)
-   -   Blocking a server crashing cheat (https://forums.alliedmods.net/showthread.php?t=306891)

cra88y 04-17-2018 18:40

Blocking a server crashing cheat
 
Recently, a popular cheat provider has implemented a way to instantly crash clients from servers using some sort of sound bug. Is an known patch available for this?

Here's a snippet of the error log from console:
Code:

Error: Total static audio channels have been used: 96 32, common\null.wav 33, common\null.wav 34, common\null.wav 35, common\null.wav 36, common\null.wav 37, common\null.wav 38, common\null.wav 39, common\null.wav 40, common\null.wav 41, common\null.wav 42, common\null.wav 43, common\null.wav 44, common\null.wav 45, common\null.wav 46, common\null.wav 47, common\null.wav 48, common\null.wav 49, common\null.wav 50, common\null.wav 51, common\null.wav 52, common\null.wav 53, common\null.wav 54, common\null.wav 55, common\null.wav 56, common\null.wav 57, common\null.wav 58, common\null.wav 59, common\null.wav 60, common\null.wav 61, common\null.wav 62, common\null.wav 63, common\null.wav 64, common\null.wav 65, common\null.wav 66, common\null.wav 67, common\null.wav 68, common\null.wav 69, common\null.wav 70, common\null.wav 71, common\null.wav 72, common\null.wav 73, common\null.wav 74, common\null.wav 75, common\null.wav 76, common\null.wav 77, common\null.wav 78, common\null.wav 79, common\null.wav 80, common\null.wav 81, common\null.wav 82, common\null.wav 83, common\null.wav 84
Here's a snippet of code that "protects" a client but is done within a cheat:
Code:

    void __fastcall hkEmitSound(IEngineSound* thisptr, int edx, IRecipientFilter& filter, int iEntIndex, int iChannel, const char *pSoundEntry, unsigned int nSoundEntryHash, const char *pSample,
                    float flVolume, float flAttenuation, int nSeed, int iFlags, int iPitch,
                    const Vector *pOrigin, const Vector *pDirection, CUtlVector< Vector >* pUtlVecOrigins, bool bUpdatePositions, float soundtime, int speakerentity)
            {
                    auto oEmitSound = enginesound_hook.get_original<EmitSound>(5);
                   
                    if (strstr(pSample, "null"))
                            iPitch = 256;
   
                    oEmitSound(thisptr, filter, iEntIndex, iChannel, pSoundEntry, nSoundEntryHash, pSample, flVolume, flAttenuation, nSeed, iFlags, iPitch, pOrigin, pDirection, pUtlVecOrigins, bUpdatePositions, soundtime, speakerentity);
            }

Here's what I've tried that doesn't work:

Code:

public void OnPluginStart(){
        AddNormalSoundHook(Hook_EntSound);
        AddAmbientSoundHook(Hook_AmbSound);
}

public Action Hook_AmbSound(char sample[PLATFORM_MAX_PATH], int &entity, float &volume, int &level, int &pitch, float pos[3], int &flags, float &delay) {
                if (StrContains(sample, "null.wav"))
                {
                        sample = "";
                        return Plugin_Changed;
                }
                return Plugin_Continue;
}

public Action Hook_EntSound(int clients[64], int &numClients, char sample[PLATFORM_MAX_PATH], int &client, int &channel, float &volume, int &level, int &pitch, int &flags, char soundEntry[PLATFORM_MAX_PATH], int &seed) {
                if (StrContains(sample, "null.wav"))
                {
                        sample = "";
                        for (int i = 0; i < numClients; i++)
                        {
                                clients[i] = 0;
                                return Plugin_Changed;
                        }
                }
                return Plugin_Continue;
}

Anyone have a fix, or ideas?

SytekBox 04-17-2018 19:31

Re: Blocking a server crashing cheat
 
Have you tried this out?
https://github.com/IT-KiLLER/Exploit-FIX-2018-04-17

Related to this: https://forums.alliedmods.net/showthread.php?t=280545 (Go to the last pages for the updated part)

Damien111 04-17-2018 19:49

Re: Blocking a server crashing cheat
 
https://forums.alliedmods.net/showpo...8&postcount=75

This should work

cra88y 04-17-2018 19:57

Re: Blocking a server crashing cheat
 
Quote:

Originally Posted by SytekBox (Post 2588217)
Have you tried this out?
https://github.com/IT-KiLLER/Exploit-FIX-2018-04-17

Related to this: https://forums.alliedmods.net/showthread.php?t=280545 (Go to the last pages for the updated part)

Isn't that essentially the same as what I was using, which I can confirm did not block the attack?

Quote:

Originally Posted by Damien111 (Post 2588221)

This doesn't look relevant.

EDIT: nvm read the reasoning and will test it out.


All times are GMT -4. The time now is 21:08.

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