|
You last visited: Today at 04:00
Advertisement
[RELEASE] Present HWBP Hook ( D3D9 )
Discussion on [RELEASE] Present HWBP Hook ( D3D9 ) within the Wolfteam forum part of the Shooter category.
09/04/2013, 16:02
|
#1
|
elite*gold: 2
Join Date: Aug 2013
Posts: 80
Received Thanks: 40
|
[RELEASE] Present HWBP Hook ( D3D9 )
Some Days ago i worked on a D3D Hook for WT since this Hooking is detected after some mins i decided to post it public.
cMain.cpp:
Code:
VOID WINAPI Present_Main(LPDIRECT3DDEVICE9 pDevice,CONST RECT* pSourceRect,CONST RECT* pDestRect,HWND hDestWindowOverride,CONST RGNDATA* pDirtyRegion)
{
Present_CheckPtr = TRUE;
// your code
Present_Pointer(pDevice,pSourceRect,pDestRect,hDestWindowOverride,pDirtyRegion);
Present_CheckPtr = FALSE;
}
__declspec(naked)VOID WINAPI Present_Call()
{
if ( Present_Check == TRUE )
{
cTools->WriteMemory((LPVOID)Present_Hook,(LPBYTE)Present_Bytes,5);
Present_Breakpoint();
Present_Check = FALSE;
}
__asm
{
MOV EDI,DWORD PTR SS:[EBP+0x8]
TEST EDI,EDI
PUSHFD
PUSHAD
MOV EDX,[Present_CheckPtr]
CMP EDX,0x0
JG Jump
PUSH [EBP+0x18]
PUSH [EBP+0x14]
PUSH [EBP+0x10]
PUSH [EBP+0xC]
PUSH [EBP+0x8]
CALL [Present_Main]
Jump:
POPAD
POPFD
JMP [Present_Jump]
}
}
LONG WINAPI Present_Exception(EXCEPTION_POINTERS* ExceptionInfo)
{
if ( ExceptionInfo->ExceptionRecord->ExceptionCode == EXCEPTION_SINGLE_STEP && (DWORD)ExceptionInfo->ExceptionRecord->ExceptionAddress == Present_Hook )
{
ExceptionInfo->ContextRecord->Eip = (DWORD)Present_Call;
return ( EXCEPTION_CONTINUE_EXECUTION );
}
return ( EXCEPTION_CONTINUE_SEARCH );
}
VOID WINAPI Present_Breakpoint()
{
AddVectoredExceptionHandler((rand()%0xFFFFFF),Present_Exception);
CONTEXT Context = {CONTEXT_DEBUG_REGISTERS};
Context.Dr0 = Present_Hook;
Context.Dr7 = 0x1;
SetThreadContext(GetCurrentThread(),&Context);
}
Code:
VOID WINAPI DirectX9Hook()
{
while(!GetModuleHandleA("d3d9.dll")) Sleep(100);
Present_Hook = ( GetADRessPtr(17) + 0x7 );
Present_Jump = ( Present_Hook + 0x5 );
*(PDWORD)(&Present_Pointer) = GetADRessPtr(17);
cTools->WriteMemory((LPVOID)Present_Bytes,(LPBYTE)Present_Hook,5);
cTools->WriteJump((DWORD)Present_Call,(DWORD)Present_Hook);
}
cMain.h:
Code:
#include <Windows.h>
typedef HRESULT (WINAPI* oReset) (LPDIRECT3DDEVICE9 pDevice,D3DPRESENT_PARAMETERS* pPresentationParameters);
oReset pReset;
BYTE Present_Bytes[5];
BOOL Present_Check = TRUE;
DWORD Present_Hook = 0x00;
DWORD Present_Jump = 0x00;
BOOL Present_CheckPtr = FALSE;
VOID WINAPI Present_Breakpoint();
LONG WINAPI Present_Exception(EXCEPTION_POINTERS* ExceptionInfo);
HRESULT (WINAPI* Present_Pointer)(LPDIRECT3DDEVICE9,CONST RECT*,CONST RECT*,HWND,CONST RGNDATA*);
Credits:
- Me
- MSDN
- CyberRazzer ( Base Midfunc )
|
|
|
09/04/2013, 20:20
|
#2
|
elite*gold: 274
Join Date: Jun 2012
Posts: 4,523
Received Thanks: 434
|
Also,
Ist ja schön und gut ^^ aber ein richtiger Coder kriegt es selbst hin.
Und ein möchtegern Coder oder amateur wird damit nich viel anfangen können.
Weil letztens meint jemand zu mir er wär geiler hacker unso und konnt mir nichmal sagen was ne hook ist.
Also wird das eig. nix bringen ^^
|
|
|
09/04/2013, 21:15
|
#3
|
elite*gold: 2
Join Date: Aug 2013
Posts: 80
Received Thanks: 40
|
Quote:
Originally Posted by MaBarker
Also,
Ist ja schön und gut ^^ aber ein richtiger Coder kriegt es selbst hin.
Und ein möchtegern Coder oder amateur wird damit nich viel anfangen können.
Weil letztens meint jemand zu mir er wär geiler hacker unso und konnt mir nichmal sagen was ne hook ist.
Also wird das eig. nix bringen ^^
|
" 'ne hook " ist der Refrain eines Rap Titels 
Und ich denke das die wenigsten der WT Sektion HWBP Hooks hinbekommen,
ausgenommen einiger Ausnahmen *hust* CyberRaZZer *hust*
Naja werde bei GZN Coder ^^ ( wurde von DIDACOol "geworben" )
Wir arbeiten auch schon an einem "Kleinen" Hack
Vorschau kommt heute oder Morgen
|
|
|
09/06/2013, 12:30
|
#4
|
elite*gold: 40
Join Date: Mar 2013
Posts: 1,396
Received Thanks: 778
|
Quote:
Originally Posted by wSiiCK
" 'ne hook " ist der Refrain eines Rap Titels 
Und ich denke das die wenigsten der WT Sektion HWBP Hooks hinbekommen,
ausgenommen einiger Ausnahmen *hust* CyberRaZZer *hust*
Naja werde bei GZN Coder ^^ ( wurde von DIDACOol "geworben" )
Wir arbeiten auch schon an einem "Kleinen" Hack
Vorschau kommt heute oder Morgen 
|
1. Zeugs was patched ist zu releasen beint nicht viel
2. was für GzN Coder ? Du betrittst eine FB Gruppe
|
|
|
09/06/2013, 13:39
|
#5
|
elite*gold: 2
Join Date: Aug 2013
Posts: 80
Received Thanks: 40
|
Quote:
Originally Posted by C0RE'
1. Zeugs was patched ist zu releasen beint nicht viel
2. was für GzN Coder ? Du betrittst eine FB Gruppe
|
Er hat mich gefragt ob ich dem GZN Team beitreten möchte
|
|
|
09/06/2013, 15:31
|
#6
|
elite*gold: 0
Join Date: Aug 2013
Posts: 161
Received Thanks: 70
|
Quote:
Originally Posted by wSiiCK
Some Days ago i worked on a D3D Hook for WT since this Hooking is detected after some mins i decided to post it public.
cMain.cpp:
Code:
VOID WINAPI Present_Main(LPDIRECT3DDEVICE9 pDevice,CONST RECT* pSourceRect,CONST RECT* pDestRect,HWND hDestWindowOverride,CONST RGNDATA* pDirtyRegion)
{
Present_CheckPtr = TRUE;
// your code
Present_Pointer(pDevice,pSourceRect,pDestRect,hDestWindowOverride,pDirtyRegion);
Present_CheckPtr = FALSE;
}
__declspec(naked)VOID WINAPI Present_Call()
{
if ( Present_Check == TRUE )
{
cTools->WriteMemory((LPVOID)Present_Hook,(LPBYTE)Present_Bytes,5);
Present_Breakpoint();
Present_Check = FALSE;
}
__asm
{
MOV EDI,DWORD PTR SS:[EBP+0x8]
TEST EDI,EDI
PUSHFD
PUSHAD
MOV EDX,[Present_CheckPtr]
CMP EDX,0x0
JG Jump
PUSH [EBP+0x18]
PUSH [EBP+0x14]
PUSH [EBP+0x10]
PUSH [EBP+0xC]
PUSH [EBP+0x8]
CALL [Present_Main]
Jump:
POPAD
POPFD
JMP [Present_Jump]
}
}
LONG WINAPI Present_Exception(EXCEPTION_POINTERS* ExceptionInfo)
{
if ( ExceptionInfo->ExceptionRecord->ExceptionCode == EXCEPTION_SINGLE_STEP && (DWORD)ExceptionInfo->ExceptionRecord->ExceptionAddress == Present_Hook )
{
ExceptionInfo->ContextRecord->Eip = (DWORD)Present_Call;
return ( EXCEPTION_CONTINUE_EXECUTION );
}
return ( EXCEPTION_CONTINUE_SEARCH );
}
VOID WINAPI Present_Breakpoint()
{
AddVectoredExceptionHandler((rand()%0xFFFFFF),Present_Exception);
CONTEXT Context = {CONTEXT_DEBUG_REGISTERS};
Context.Dr0 = Present_Hook;
Context.Dr7 = 0x1;
SetThreadContext(GetCurrentThread(),&Context);
}
Code:
VOID WINAPI DirectX9Hook()
{
while(!GetModuleHandleA("d3d9.dll")) Sleep(100);
Present_Hook = ( GetADRessPtr(17) + 0x7 );
Present_Jump = ( Present_Hook + 0x5 );
*(PDWORD)(&Present_Pointer) = GetADRessPtr(17);
cTools->WriteMemory((LPVOID)Present_Bytes,(LPBYTE)Present_Hook,5);
cTools->WriteJump((DWORD)Present_Call,(DWORD)Present_Hook);
}
cMain.h:
Code:
#include <Windows.h>
typedef HRESULT (WINAPI* oReset) (LPDIRECT3DDEVICE9 pDevice,D3DPRESENT_PARAMETERS* pPresentationParameters);
oReset pReset;
BYTE Present_Bytes[5];
BOOL Present_Check = TRUE;
DWORD Present_Hook = 0x00;
DWORD Present_Jump = 0x00;
BOOL Present_CheckPtr = FALSE;
VOID WINAPI Present_Breakpoint();
LONG WINAPI Present_Exception(EXCEPTION_POINTERS* ExceptionInfo);
HRESULT (WINAPI* Present_Pointer)(LPDIRECT3DDEVICE9,CONST RECT*,CONST RECT*,HWND,CONST RGNDATA*);
Credits:
- Me
- MSDN
- CyberLegendz ( Base Midfunc )
|
Auch wenn wir alte Coder-Freunde sind, sage ich zum letzten mal, was bringt es dir jetzt in Wolfteam alles zu veröffentlichen. Willst du das dass Spiel genauso versaut wird wie andere Spiele ( WarRock , ect. ) ? Willst du irgendwie berühmt werden, weil andere denken das ist von dir ? Was bringt es dir einfach mal sowas zu veröffentlichen, ein guter Coder behält seine Codes, was bringt es wenn andere Ihn haben & sie benutzen können ? Zudem ist "CyberLegendz" nicht mal richtig, ändere mal zu CyberRazzer .. Du weißt. Und sollte sich das nicht ändern, bekommt man GzN eine Info von mir & ich haue gleich alle öffentlich & mache Tutorials, nur damit du " Gefic*t" wirst.
PS: Ein Hardware Breakpoint Hook zu benutzen ist eine schlechte Idee, einfach mal weil Exceptions riesig viel Ressourcen verbrauchen & sich das auf die Game Frame Rate auswirkt hoch 10.
|
|
|
09/06/2013, 15:51
|
#7
|
elite*gold: 466
Join Date: Jul 2010
Posts: 1,801
Received Thanks: 1,378
|
Quote:
Originally Posted by xKahba
Du weißt. Und sollte sich das nicht ändern, bekommt man GzN eine Info von mir & ich haue gleich alle öffentlich & mache Tutorials, nur damit du "Gefic*t" wirst.
|
In wiefern ist er dadurch
Quote:
?
Damit bewirkst du nur das gleiche wie er, was du grade noch scheiße fandest.
Sinn ?
PS:Lern Deutsch
|
|
|
09/06/2013, 16:00
|
#8
|
elite*gold: 0
Join Date: Aug 2013
Posts: 161
Received Thanks: 70
|
Quote:
Originally Posted by v1Dr333s
In wiefern ist er dadurch ?
Damit bewirkst du nur das gleiche wie er, was du grade noch scheiße fandest.
Sinn ?
PS:Lern Deutsch 
|
Kleiner nerv nicht wenn ich mich mit'n Kumpel unterhalte. Du hast damit überhaupt nichts zutun  Und es ist mein Ding.
|
|
|
09/06/2013, 16:12
|
#9
|
elite*gold: 466
Join Date: Jul 2010
Posts: 1,801
Received Thanks: 1,378
|
Quote:
Originally Posted by xKahba
Kleiner nerv nicht wenn ich mich mit'n Kumpel unterhalte. Du hast damit überhaupt nichts zutun  Und es ist mein Ding.
|
Das hier ist nun mal ein Forum, da darf ich mich mit unterhalten
|
|
|
Similar Threads
|
DLL Injection + D3D9 Hook
01/01/2013 - C/C++ - 6 Replies
Hallo elitepvpers,
ich hab mich an diesem Tutorial versucht.
Die DLL hab ich einigermaßen hinbekommen. Hier der Code:
#pragma once
#pragma comment(lib, "d3d9.lib")
#pragma comment(lib, "d3dx9.lib")
#include <windows.h>
#include <cstdio>
|
[Release] Krischkros D3D9 Hook 1.1 [20.01.2011]
12/18/2012 - Shaiya Hacks, Bots, Cheats & Exploits - 19 Replies
Hallo...
Das ist mein aller erster D3D9 Hack
------------------------------------------------- -------------------------------------------------- -------------------------------------------------- -------------------------------------------------- --------------------
------------------------------------------------- -------------------------------------------------- -------------------------------------------------- -------------------------------------------------- --------------------...
|
All times are GMT +1. The time now is 04:03.
|
|