- Sponsored Advertisement -
Welcome to the UnKnoWnCheaTs - Multiplayer Game Hacks and Cheats.
You have to register before you can post and see and access any of the advanced forum features, please click the register link to proceed to the registration form. To start viewing threads or posts, select a forum that you want to visit from the selection below.
Direct3D hacking programming reversing
You are Unregistered, please register to gain Full access.
xPwn 1.0 xFire Trampoline Hook
09-02-2010, 05:47 AM
#1 Donator
Join Date: Nov 2007
Posts: 1,494
Reputation: 72055 Rep Power: 802
xPwn 1.0 xFire Trampoline Hook
Code:
/*
Project: xPwn 1.0 xFire Trampoline Hook
Author: Raiders - UC-Forum.com
Release Date: 9/1/2010
Credits: Reunion - Initial Swapchain::Present hook and using xfire's hook to obtain render access.
Monster64 - Hes awesome.
xFire - Thanks for creating a wide open window to avoid punkbuster scans on our render hooks!
This code is a UC-Forum only release and is not to be distributed without express permission from the author.
This code may not be used in any saleable product, public hacks using this method are encouraged!
*/ I turned my idea into a working base for you guys to use. I wrote my own little detour function just to replace and redirect their trampoline, so if you don't know how detours work now is your chance to learn!
This code should work in any xfire supported game where the game uses a swapchain to render (Battlefield, Call of Duty... perhaps more). Xfire must be installed and loaded into the game.
This method can be adapted to work for any xfire supported game on really any xfire supported renderer. This method can also be adapted to other in game overlays, such as fraps.
If there is enough popularity for this release, I may create hooks to support games that don't use a swapchain for rendering and possibly a dx10/11 release.
What you get:
Undetected render hook!
Undetected reset hook!
Undetected release hook (xfire hooks this function, if you need it I wrote the hook...)
All of the required functions to enable all of these hooks across multiple versions of xfire.
Download Link:
http://www.ucdownloads.com/downloads...o=file&id=5485
Enjoy,
Raiders
__________________
[22:22] monster64: yo dawg i heard u like chams so i put chams in your chams so you can see through shit while you see through shit
[09:07] Tally: grab your ak47 and put on your bomb jacket.... its gonna be a long morning
09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0
Last edited by raiders; 09-04-2010 at 07:57 PM .
raiders is offline
09-02-2010, 06:08 AM
#2 « Answers To Mr. Ballsack »
Join Date: Dec 2008
Posts: 341
Reputation: 13299 Rep Power: 177
I reserve my first post and first thanks for this until it is approved.
Thanks though lol
Rave.whiteLight is online now
09-02-2010, 07:50 AM
#3 ◄ Super Moderator ►
Join Date: Dec 2009
Posts: 3,198
Reputation: 81948 Rep Power: 909
Omg can't wait, Good job.
Hanoi22 is offline
09-02-2010, 01:08 PM
#4 Retired Admin Join Date: Sep 2006
Posts: 5,249
Reputation: 93628 Rep Power: 1106
approved, no binaries, no scanlog
learn_more is offline
09-02-2010, 01:39 PM
#5 Level 3
Join Date: Nov 2007
Location: msdn
Posts: 528
Reputation: 22916 Rep Power: 291
Nice work, xfire just got raided.
__________________
Gellin is offline
09-02-2010, 06:18 PM
#6 Join Date: Jan 2008
Posts: 1,228
Reputation: 46050 Rep Power: 534
very nice & clean base, sir.
+reputation.
smoochy is online now
09-04-2010, 07:15 PM
#7 Join Date: Mar 2010
Location: Germany
Posts: 942
Reputation: 40621 Rep Power: 448
very nice post ! Thanks
Freeheadshot is online now
09-04-2010, 08:48 PM
#8 Join Date: Jul 2009
Posts: 1,069
Reputation: 49844 Rep Power: 551
Thisisgoodthanks
Coolness +rep.
__________________
Shad0w_'s Alter Ego
disavow is online now
09-12-2010, 11:22 PM
#9 Join Date: Feb 2010
Posts: 61
Reputation: 226 Rep Power: 28
Last Achievements Thanks for publicating this
Special11 is offline
09-15-2010, 10:17 PM
#10 Donator
Threadstarter Join Date: Nov 2007
Posts: 1,494
Reputation: 72055 Rep Power: 802
Quote:
Originally Posted by
Special11 Thanks for publicating this
You are quite welcome lol
__________________
[22:22] monster64: yo dawg i heard u like chams so i put chams in your chams so you can see through shit while you see through shit
[09:07] Tally: grab your ak47 and put on your bomb jacket.... its gonna be a long morning
09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0
raiders is offline
09-28-2010, 04:08 PM
#11 Posting Well Join Date: Sep 2010
Location: Denmark, Gjellerup
Posts: 33
Reputation: 432 Rep Power: 21
What are you supposed to do with this ??
__________________
Quote:
the worst mistake in life is not to aim too high and fail rather to aim too low and succeed
Cynical_Dude is offline
09-28-2010, 04:50 PM
#12 Level 3
Join Date: May 2005
Posts: 1,103
Reputation: 38964 Rep Power: 494
Quote:
Originally Posted by
Cynical_Dude What are you supposed to do with this ??
Hook and draw and other things ....
fatboy88 is online now
09-28-2010, 04:53 PM
#13 Posting Well Join Date: Sep 2010
Location: Denmark, Gjellerup
Posts: 33
Reputation: 432 Rep Power: 21
Great help... nvm guess my newb brain just isnt good enough at programming to understand this stuff yet
__________________
Quote:
the worst mistake in life is not to aim too high and fail rather to aim too low and succeed
Cynical_Dude is offline
09-30-2010, 04:00 PM
#14 Level ∞ Coder
Join Date: Oct 2009
Posts: 584
Reputation: 17985 Rep Power: 219
Nice Hook raiders!
You could also use this:
PHP Code:
//////////////////////////////////////////////////////////////////// int FindXFireString ( char * ss ) { int qs = 0 , i = 0 ; //xfire while( ss [ qs ]!= 0 ) qs ++; for( i = 0 ; i < qs ; i ++) { if(( i + 5 )> qs )return 0 ; if( ss [ i + 0 ] == 'x' ) if( ss [ i + 1 ] == 'f' ) if( ss [ i + 2 ] == 'i' ) if( ss [ i + 3 ] == 'r' ) if( ss [ i + 4 ] == 'e' ) { return 1 ; } } return 0 ; } //////////////////////////////////////////////////////////////////// char * GetModule ( ModuleInfoNode * module ) { ProcessModuleInfo * pmInfo ; char * buf ; char * pathbuf ; int i = 0 ; _asm { mov eax , fs :[ 18h ] // TEB mov eax , [ eax + 30h ] // PEB mov eax , [ eax + 0Ch ] // PROCESS_MODULE_INFO mov pmInfo , eax } module = ( ModuleInfoNode *)( pmInfo -> LoadOrder . Flink ); while( module -> baseAddress ) { buf =( char *) malloc (( 1 + module -> name . Length )* sizeof ( char )); for( i = 0 ; i < module -> name . Length ; i ++) buf [ i ] = module -> name . Buffer [ i ]; buf [ i ] = 0 ; pathbuf =( char *) malloc (( 1 + module -> fullPath . Length )* sizeof ( char )); for( int p = 0 ; p < module -> fullPath . Length ; p ++) pathbuf [ i ] = module -> fullPath . Buffer [ i ]; pathbuf [ i ] = 0 ; if( FindXFireString ( buf )== 1 ) { return buf ; } module = ( ModuleInfoNode *)( module -> LoadOrder . Flink ); free ( buf ); } return NULL ; } ////////////////////////////////////////////////////////////////////
I Can't remember where I found it but its used to dynamically find the xfire modules name
.
Use it like this:
PHP Code:
DWORD WINAPI InitHooks ( LPVOID ) { char * ModName = NULL ; ModuleInfoNode * module ; while(! ModName ) { ModName = GetModule ( module ); Sleep ( 10 ); } DWORD dwXfire = 0 ; while(! dwXfire ) { dwXfire = ( DWORD ) GetModuleHandle ( ModName ); Sleep ( 250 ); }
And I'm not sure if PB scans for strings but if they do then you should just ZeroMemory the Pattern Scan Strings after you use them:
PHP Code:
DWORD WINAPI InitHooks ( LPVOID ) { char * ModName = NULL ; ModuleInfoNode * module ; while(! ModName ) { ModName = GetModule ( module ); Sleep ( 10 ); } DWORD dwXfire = 0 ; while(! dwXfire ) { dwXfire = ( DWORD ) GetModuleHandle ( ModName ); Sleep ( 250 ); } Sleep ( 5000 ); char * FP_One = "\x55\x8B\xEC\x83\xEC\x00\x53\x52\x51\x56\x57\x9C\xE8\x00\x00\x00\x00\x89\x45\x00\xFF\x75\x00\xFF\x75\x00\xFF\x75\x00\xFF\x75\x00\xFF\x75\x00\xFF\x75\x00\x8B\x4D\x00\xE8\x00\x00\x00\x00\xA3\x00\x00\x00\x00\x8B\x4D\x00\xE8\x00\x00\x00\x00\x83\xF8\x00\x75\x00\x8B\x45\x00\x5\x00\x00\x00\x00" ; char * FP_Two = "xxxxx?xxxxxxx????xx?xx?xx?xx?xx?xx?xx?xx?x????x????xx?x????xx?x?xx?x???" ; CXfireTrampoline * xfTrampoline = GetXfireTrampoline ( GetAbsoluteFromRelative ( FindPattern (( DWORD ) dwXfire , 0xFFFFFF , ( byte *) FP_One , ( char *) FP_Two ) + 0xC )); //Render hook pSwapPresent = ( SwapPresent_t ) HookTrampoline (& xfTrampoline -> trSwapchain , ( DWORD *)& hkSwapPresent ); //Reset hook pReset = ( Reset_t ) HookTrampoline (& xfTrampoline -> trReset , ( DWORD *)& hkReset ); //Device release hook... if you have a use for this uncomment this line //pRelease = (Release_t)HookTrampoline(&xfTrampoline->trRelease, (DWORD*)&hkRelease); ZeroMemory ( FP_One , sizeof ( FP_One )); ZeroMemory ( FP_Two , sizeof ( FP_Two )); ZeroMemory ( ModName , sizeof ( ModName )); return 0 ; }
Great Hook though!
CyberDwak is offline
09-30-2010, 05:55 PM
#15 Retired Admin Join Date: Sep 2006
Posts: 5,249
Reputation: 93628 Rep Power: 1106
a bit easier?
wrote in notepad, so dunno if it's syntaxically correct
Code:
HMODULE GetXfireModule()
{
ProcessModuleInfo *pmInfo;
ModuleInfoNode* module
_asm
{
mov eax, fs:[18h] // TEB
mov eax, [eax + 30h] // PEB
mov eax, [eax + 0Ch] // PROCESS_MODULE_INFO
mov pmInfo, eax
}
module = (ModuleInfoNode *)(pmInfo->LoadOrder.Flink);
while( module->baseAddress )
{
if( module->name.Buffer && module->name.Length && !_wcsnicmp( module->name.Buffer[i], L"xfire_toucan", 12 ) )
return module->baseAddress;
}
return NULL;
}
learn_more is offline
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
All times are GMT +1. The time now is 03:44 PM .