View Single Post
ESK0
BANNED
Join Date: May 2014
Location: Czech Republic
Old 11-18-2020 , 16:03   Re: [ANY/CSGO] cutlrbtree overflow, memory access
Reply With Quote #4

Quote:
Originally Posted by Ilusion9 View Post
PHP Code:

#include <sourcemod>
#include <sdktools>
#include <cstrike>
#pragma newdecls required

Handle g_FreeAll;

public 
void OnPluginStart()
{
    
Handle gamedata LoadGameConfigFile("memorycrash.games");

    
StartPrepSDKCall(SDKCall_Static);
    
PrepSDKCall_SetFromConf(gamedataSDKConf_Virtual"CStringPool::FreeAll");
    
PrepSDKCall_SetReturnInfo(SDKType_BoolSDKPass_Plain);
    
g_FreeAll EndPrepSDKCall();
    
    
delete gamedata;
    
    
HookEvent("round_prestart"Event_RoundPreStart);
}

public 
void Event_RoundPreStart(Event event, const char[] namebool dontBroadcast)
{
     
SDKCall(g_FreeAll);

You can do something like this if you know the offsets.
Code:
Linux: \x55\x89\xE5\x56\x53\x83\xEC\x10\x8B\x75\x08\x8D\x46\x04
Windows: \x55\x8B\xEC\x83\xEC\x0C\x8D\x45\x08 (not sure)
ESK0 is offline