Raised This Month: $51 Target: $400
 12% 

How to list game addresses and use it?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
oplkill
Member
Join Date: Aug 2015
Old 07-17-2021 , 06:14   How to list game addresses and use it?
Reply With Quote #1

Hi, i founded some worked "hacks" for TF2 scripting for do things that can be done via operating directly addresses.
For example, that code allowing to get damage for ghosts:
PHP Code:
Handle hGameData LoadGameConfigFile"opGameData" );
if ( 
hGameData == INVALID_HANDLE 
{
    
SetFailState"Couldn't find plugin gamedata!" );
}

Address g_aOnTakeDamage view_as<Address>(0);
g_aOnTakeDamage GameConfGetAddresshGameData"CTFPlayer::OnTakeDamage" );

if ( 
g_aOnTakeDamage != view_as<Address>(0) )
{
    
int OS LoadFromAddressg_aOnTakeDamage view_as<Address>(1), NumberType_Int8 );
    switch ( 
OS )
    {
        
// Allow ghost players to take damage
        
case 0x89// Linux
        
{
            
// 84 0C   test -> xor
            
StoreToAddressg_aOnTakeDamage view_as<Address>(0x269), 0x33NumberType_Int8 );
        } 
        case 
0x8B// Windows
        
{
            
// 84 0C   test -> xor
            
StoreToAddressg_aOnTakeDamage view_as<Address>(0x177), 0x33NumberType_Int8 );
        }
        default:
        {
            
SetFailState"CTFPlayer::OnTakeDamage OS lookup failed. (0x%.2x)"OS );
        }
    }
}
else
{
    
SetFailState"CTFPlayer::OnTakeDamage address failed." );

opGameData.txt
PHP Code:
"Games"
{
    
"tf"
    
{
        
"Addresses"
        
{
            
"CTFPlayer::OnTakeDamage"
            
{
                
"windows"
                
{
                    
"signature" "CTFPlayer::OnTakeDamage"
                
}
                
"linux"
                
{
                    
"signature" "CTFPlayer::OnTakeDamage"
                
}
            }
}}} 
But from last update, Valve changed address for that function in Linux(in Windows works) and that "hack" stopped works as it supposed.
Please tell me, where i can see those addresses(server.dll ?), which programms i can use (Ghidra or IDA ?) or there is an instructions that already written.
oplkill is offline
Dragokas
Veteran Member
Join Date: Nov 2017
Location: Ukraine on fire
Old 08-07-2021 , 06:17   Re: How to list game addresses and use it?
Reply With Quote #2

According to this:
Quote:
// 84 0C test -> xor
you have to find offset in "CTFPlayer::OnTakeDamage" of appropriate "test" opcode and replace it with "xor", using IDA or GHidra.
If you didn't work with C++/ASM before, it's unlikely you can do it instantly without any video guides.

Also, there can be lot of "test" instruction; without analysis (or having previous version binary / or a part of decompiled code) it's impossible to know for sure which one you need.

Give me server.dll from Windows and server.so from Linux (bin folder) and I can look.
Also, you posted incomplete GameData. Please, post a full gamedata file.
__________________
Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
[My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]
Dragokas is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


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