Thread: D3D menu

Page 1 of 2 12 LastLast
Results 1 to 15 of 20
  1. #1
    DaneCoder's Avatar
    Join Date
    May 2014
    Gender
    male
    Location
    parking lot
    Posts
    465
    Reputation
    10
    Thanks
    777
    My Mood
    Doubtful

    D3D menu

    Hello its me again I need some help with my d3d menu as you can see in the photo it gets detected after I turn on the hack functions(specially the chams) but when I test it in my no menu it doesnt get detected at all and when I ask other people about this detection others said "Its the detour, not the hooking". Others said "Its not the hooking, its the detour". And others said "Detour and hooking are still working your function is detected" and its making me confuse



    Im using elextro

    My detour.h
    Code:
    LPDIRECT3DVERTEXBUFFER9 Stream_Data;
    UINT m_Stride; UINT OffsetsInBytes;
    
    typedef HRESULT(WINAPI *tDrawIndexedPrimitive)(LPDIRECT3DDEVICE9 pDevice, D3DPRIMITIVETYPE A, INT B, UINT C, UINT D, UINT E, UINT F); 
    tDrawIndexedPrimitive oDrawIndexedPrimitive;
    
    typedef HRESULT(WINAPI *oPresent) (LPDIRECT3DDEVICE9 pDevice, CONST RECT* pSourceRect,CONST RECT* pDestRect,HWND hDestWindowOverride,CONST RGNDATA* pDirtyRegion);
    oPresent pPresent;
    
    DWORD DetourCreate(DWORD SrcVA, DWORD DstVA, DWORD Size)
    {
    	#define SIZEOF_JMP_NEAR  5
    
    	if(SrcVA && DstVA && Size > 0)
    	{
    		DWORD DetourVA = (DWORD) 
    		VirtualAlloc( NULL, Size + SIZEOF_JMP_NEAR, 
    		MEM_COMMIT | MEM_TOP_DOWN, PAGE_EXECUTE_READWRITE );
    		
    		if(DetourVA == 0)
    			return(0);
    
    		DWORD dwProtect;
    
    		if(VirtualProtect((PVOID)SrcVA, Size, PAGE_EXECUTE_READWRITE, &dwProtect ))
    		{
    			for(DWORD i = 0; i < Size; i++) {
    				*(PBYTE)(DetourVA + i) = *(PBYTE)(SrcVA + i);
    			}
    
    			*(PBYTE)(DetourVA + Size + 0) = 0xE9;
    			*(PDWORD)(DetourVA + Size + 1) = (SrcVA - DetourVA - SIZEOF_JMP_NEAR);
    
    	    	*(PBYTE)(SrcVA + 0) = 0xE9;
    			*(PDWORD)(SrcVA + 1) = (DstVA - SrcVA - SIZEOF_JMP_NEAR);
    
    			VirtualProtect((PVOID)SrcVA, Size, dwProtect, &dwProtect );
    
    			VirtualProtect((PVOID)DetourVA, Size + SIZEOF_JMP_NEAR, PAGE_EXECUTE_READ, &dwProtect);
    
    	    	return DetourVA;
    		}
    	}
    	return(NULL);
    }
    
    PVOID D3Ddiscover(void *tbl, int size)
    {
    	HWND hWnd;
    	VOID *pInterface = NULL;
    	D3DPRESENT_PARAMETERS d3dpp; 
    
    	if((hWnd = CreateWindowEx(NULL, WC_DIALOG, "", WS_OVERLAPPED, 0, 0, 50, 50, NULL, NULL, NULL, NULL)) == NULL)
    		return FALSE;
    
    	ShowWindow(hWnd, SW_HIDE);
    	LPDIRECT3D9	pD3D;
    	LPDIRECT3DDEVICE9 pD3Ddev;
    
    	if((pD3D = Direct3DCreate9(D3D_SDK_VERSION))!=NULL) 
    	{
    	    ZeroMemory(&d3dpp, sizeof(d3dpp));
    	    d3dpp.Windowed         = TRUE;
    		d3dpp.SwapEffect       = D3DSWAPEFFECT_DISCARD;
    	    d3dpp.hDeviceWindow    = hWnd;
    	    d3dpp.BackBufferFormat = D3DFMT_X8R8G8B8;
    	    d3dpp.BackBufferWidth  = d3dpp.BackBufferHeight = 600;
    		pD3D->CreateDevice(D3DADAPTER_DEFAULT,D3DDEVTYPE_HAL,hWnd,D3DCREATE_SOFTWARE_VERTEXPROCESSING,&d3dpp,&pD3Ddev);
    		if (pD3Ddev)  {
    		    pInterface = (PDWORD)*(DWORD *)pD3Ddev;
    			memcpy(tbl,(void *)pInterface,size);
    			pD3Ddev->Release();
    		}
    		pD3D->Release();
    	}
    	DestroyWindow(hWnd);
    	return pInterface;
    }
    
    HRESULT GenerateTexture(LPDIRECT3DDEVICE9 pDevice, LPDIRECT3DTEXTURE9 *D3DTexture, DWORD D3DColor)
    {
    	if(FAILED(pDevice->CreateTexture(8, 8, 1, 0, D3DFMT_A4R4G4B4, D3DPOOL_MANAGED, D3DTexture, NULL)))
    		return E_FAIL;
    
    	WORD Color = ((WORD)((D3DColor >> 28) & 0xF) << 12)
    				|(WORD)(((D3DColor >> 20) & 0xF) <<  8)
    				|(WORD)(((D3DColor >> 12) & 0xF) << 04)
    				|(WORD)(((D3DColor >> 04) & 0xF) << 00);
    
    	D3DLOCKED_RECT pRect;
    	(*D3DTexture)->LockRect(NULL, &pRect, NULL, NULL);
    	WORD *pBits = (PWORD)pRect.pBits;
    
    	for(INT i=0; i<8*8; i++)
    		*pBits++ = Color;
    
    	(*D3DTexture)->UnlockRect(NULL);
    
    	return S_OK;
    }
    My hook
    Code:
    INT D3D(VOID)
    {
    	HINSTANCE hD3D; DWORD vTable[105];
    	hD3D = NULL;
    
    	do {
    		hD3D = GetModuleHandle("d3d9.dll");
    		if(!hD3D) Sleep(10);
    	} while(!hD3D);
    
    	if(D3Ddiscover((PVOID) &vTable[0], 420) == 0) return NULL;
    	{
    		pPresent = (oPresent)DetourCreate((DWORD)vTable[17], (DWORD)myPresent,12);
    		oDrawIndexedPrimitive = (tDrawIndexedPrimitive)DetourCreate((DWORD)vTable[82], (DWORD)&DrawIndexedPrimitive, 5);
    
    		Sleep(100);
    	}
    	return FALSE;
    }
    Last edited by DaneCoder; 07-12-2014 at 05:59 AM.
    FUCK YOU

  2. #2
    TheG36's Avatar
    Join Date
    May 2014
    Gender
    male
    Location
    133.7.0.0
    Posts
    83
    Reputation
    10
    Thanks
    400
    My Mood
    Sleepy
    Weapon Binder = Detected.

    Your detours came with the base so that means it's already patched, detour is patched that's why the hook doesn't work.

  3. The Following User Says Thank You to TheG36 For This Useful Post:

    DaneCoder (07-12-2014)

  4. #3
    V3n0x's Avatar
    Join Date
    Jul 2014
    Gender
    male
    Posts
    57
    Reputation
    10
    Thanks
    15
    My Mood
    Amazed
    try 2 use other base it might work

    @TheG36 Weapon Binder Detected i thought its still working ??
    -= |::V3n0x::| =-

    im just ein Neuling







    Respect:
    Ryuzaki™
    DaneCoder
    Jhem
    Burn3r
    RoBerTo
    Cyno™
    AeroMan

  5. The Following User Says Thank You to V3n0x For This Useful Post:

    DaneCoder (07-12-2014)

  6. #4
    TheG36's Avatar
    Join Date
    May 2014
    Gender
    male
    Location
    133.7.0.0
    Posts
    83
    Reputation
    10
    Thanks
    400
    My Mood
    Sleepy
    Quote Originally Posted by V3n0x View Post
    try 2 use other base it might work

    @TheG36 Weapon Binder Detected i thought its still working ??
    Here in Ph you'll receive a GG error.

  7. The Following User Says Thank You to TheG36 For This Useful Post:

    DaneCoder (07-12-2014)

  8. #5
    V3n0x's Avatar
    Join Date
    Jul 2014
    Gender
    male
    Posts
    57
    Reputation
    10
    Thanks
    15
    My Mood
    Amazed
    Quote Originally Posted by TheG36 View Post
    Here in Ph you'll receive a GG error.
    oh i see
    -= |::V3n0x::| =-

    im just ein Neuling







    Respect:
    Ryuzaki™
    DaneCoder
    Jhem
    Burn3r
    RoBerTo
    Cyno™
    AeroMan

  9. #6
    DaneCoder's Avatar
    Join Date
    May 2014
    Gender
    male
    Location
    parking lot
    Posts
    465
    Reputation
    10
    Thanks
    777
    My Mood
    Doubtful
    Quote Originally Posted by TheG36 View Post
    Weapon Binder = Detected.

    Your detours came with the base so that means it's already patched, detour is patched that's why the hook doesn't work.
    So you're saying that I only need to update my detour?
    FUCK YOU

  10. #7
    TheG36's Avatar
    Join Date
    May 2014
    Gender
    male
    Location
    133.7.0.0
    Posts
    83
    Reputation
    10
    Thanks
    400
    My Mood
    Sleepy
    Quote Originally Posted by DaneCoder View Post
    So you're saying that I only need to update my detour?
    Yes and good luck

  11. #8
    DaneCoder's Avatar
    Join Date
    May 2014
    Gender
    male
    Location
    parking lot
    Posts
    465
    Reputation
    10
    Thanks
    777
    My Mood
    Doubtful
    Edit: Still getting detected

    Used this detour:
    Code:
    DWORD DetourCreate( DWORD  SrcVA, DWORD  DstVA, DWORD  Size )
    {
    	/*Credits for this detour to croner*/
    #define SIZEOF_JMP_NEAR  5
    
    	if ( SrcVA && DstVA && Size > 0 )
    	{
    		DWORD DetourVA = (DWORD) 
    			VirtualAlloc( NULL, Size + SIZEOF_JMP_NEAR, 
    			MEM_COMMIT | MEM_TOP_DOWN, PAGE_EXECUTE_READWRITE );
    		
    		if ( DetourVA == 0 )
    			return (0);
    
    		DWORD dwProtect;
    		if ( VirtualProtect( (VOID*)SrcVA, Size, PAGE_EXECUTE_READWRITE, &dwProtect ) )
    		{
    			for ( DWORD i=0; i < Size; i++ ) {
    				*(BYTE*)( DetourVA + i ) = *(BYTE*)( SrcVA + i );
    			}
    			
    			*(BYTE*)( DetourVA + Size + 0 ) = 0xE9;
    			*(DWORD*)( DetourVA + Size + 1 ) = ( SrcVA - DetourVA - SIZEOF_JMP_NEAR );
    
    	    	*(BYTE*)( SrcVA + 0 ) = 0xE9;
    			*(DWORD*)( SrcVA + 1 ) = ( DstVA - SrcVA - SIZEOF_JMP_NEAR );
    
    			VirtualProtect( (VOID*)SrcVA, Size, dwProtect, &dwProtect );
    
    			VirtualProtect( (VOID*)DetourVA, Size + 
    				SIZEOF_JMP_NEAR, PAGE_EXECUTE_READ, &dwProtect );
    
    	    	return DetourVA;
    		}
    	}
    	return (0);
    }
    
    
    
    
    PVOID D3Ddiscover(void *tbl, int size)
    {
    
    	
    	HWND				  hWnd;
    	void				  *pInterface=0 ;
    	D3DPRESENT_PARAMETERS d3dpp; 
    
    	if ((hWnd=CreateWindowEx(NULL,WC_DIALOG,"",WS_OVERLAPPED,0,0,50,50,NULL,NULL,NULL,NULL))==NULL) return 0;
    	ShowWindow(hWnd, SW_HIDE);
    
    	LPDIRECT3D9			pD3D;
    	LPDIRECT3DDEVICE9	pD3Ddev;
    	if ((pD3D = Direct3DCreate9(D3D_SDK_VERSION))!=NULL) 
    
    	{
    >CreateDevice(D3DADAPTER_DEFAULT,D3DDEVTYPE_HAL,hWnd,D3DCREATE_SOFTWARE_VERTEXPROCESSING,&d3dpp,&pD3Ddev);
    		if (pD3Ddev)  {
    		    pInterface = (PDWORD)*(DWORD *)pD3Ddev;
    			memcpy(tbl,(void *)pInterface,size);
    			pD3Ddev->Release();
    		}
    		pD3D->Release();
    	}
    	DestroyWindow(hWnd);
    	return pInterface;
    }
    	PIMAGE_DOS_HEADER pDoH; 
    	PIMAGE_NT_HEADERS pNtH;
    	DWORD i, ersize, protect;
    
    	if (!hModule) return;
    	
    	// well just to make clear what we doing
    	pDoH = (PIMAGE_DOS_HEADER)(hModule);
    
    	pNtH = (PIMAGE_NT_HEADERS)((LONG)hModule + ((PIMAGE_DOS_HEADER)hModule)->e_lfanew);
    
    	ersize = sizeof(IMAGE_DOS_HEADER);
    	if ( VirtualProtect(pDoH, ersize, PAGE_READWRITE, &protect) )
    	{
    		for ( i=0; i < ersize; i++ )
    				*(BYTE*)((BYTE*)pDoH + i) = 0;
    	}
    
    	ersize = sizeof(IMAGE_NT_HEADERS);
    	if ( pNtH && VirtualProtect(pNtH, ersize, PAGE_READWRITE, &protect) )
    	{
    		for ( i=0; i < ersize; i++ )
    				*(BYTE*)((BYTE*)pNtH + i) = 0;
    	}
    	return;
    }
    
    
    void HideModule(HINSTANCE hModule)/*Credits to Thanatos aka Surpintine for his hide module function*/
    {
    	DWORD dwPEB_LDR_DATA = 0;
    	_asm
    	{
    		pushad;
    		pushfd;
    		mov eax, fs:[30h]             
    		mov eax, [eax+0Ch]               
    		mov dwPEB_LDR_DATA, eax	
    
    		InLoadOrderModuleList:
    			mov esi, [eax+0Ch]	     
    			mov edx, [eax+10h]	     
    
    		LoopInLoadOrderModuleList: 
    		    lodsd		         
    			mov esi, eax	
    			mov ecx, [eax+18h]  
    			cmp ecx, hModule	
    			jne SkipA		 
    		    mov ebx, [eax]	  
    		    mov ecx, [eax+4]  
    		    mov [ecx], ebx    
    		    mov [ebx+4], ecx	  
    			jmp InMemoryOrderModuleList 
    
    		SkipA:
    
    		LoopInMemoryOrderModuleList: 
    			lodsd
    			mov esi, eax
    			mov ecx, [eax+10h]
    			cmp ecx, hModule
    			jne SkipB
    			mov ebx, [eax] 
    			mov ecx, [eax+4]
    			mov [ecx], ebx
    			mov [ebx+4], ecx
    			jmp InInitializationOrderModuleList
    
    		SkipB:
    			cmp edx, esi
    			jne LoopInMemoryOrderModuleList
    
    		InInitializationOrderModuleList:
    			mov eax, dwPEB_LDR_DATA
    			mov esi, [eax+1Ch]	  
    			mov edx, [eax+20h]	  
    
    		LoopInInitializationOrderModuleList: 
    			lodsd
    			mov esi, eax		
    			mov ecx, [eax+08h]
    			cmp ecx, hModule		
    			jne SkipC
    			mov ebx, [eax] 
    			mov ecx, [eax+4]
    			mov [ecx], ebx
    			mov [ebx+4], ecx
    			jmp Finished
    
    		SkipC:
    			cmp edx, esi
    			jne LoopInInitializationOrderModuleList
    
    		Finished:
    			popfd;
    			popad;
    	}
    }
    Last edited by DaneCoder; 07-12-2014 at 09:50 PM.
    FUCK YOU

  12. #9
    AeroMan's Avatar
    Join Date
    Dec 2008
    Gender
    male
    Location
    Hell
    Posts
    3,294
    Reputation
    189
    Thanks
    3,049
    My Mood
    Busy
    For the people that say it's the detour and not hooking: GTFO.
    You hook using detours, meaning hooking -> detouring.
    When you use a menu you use present and reset to right?
    Those can also be detected.
    Try it step by step.

    i made a small diagram:

    i hope this helps somewhat

  13. The Following 4 Users Say Thank You to AeroMan For This Useful Post:

    DaneCoder (07-13-2014),emiedumalasa (07-13-2014),TheG36 (07-13-2014),V3n0x (07-13-2014)

  14. #10
    V3n0x's Avatar
    Join Date
    Jul 2014
    Gender
    male
    Posts
    57
    Reputation
    10
    Thanks
    15
    My Mood
    Amazed
    @Alex_Agnew nice diagram
    -= |::V3n0x::| =-

    im just ein Neuling







    Respect:
    Ryuzaki™
    DaneCoder
    Jhem
    Burn3r
    RoBerTo
    Cyno™
    AeroMan

  15. The Following User Says Thank You to V3n0x For This Useful Post:

    AeroMan (07-13-2014)

  16. #11
    emiedumalasa's Avatar
    Join Date
    May 2012
    Gender
    female
    Location
    Hackershero
    Posts
    683
    Reputation
    10
    Thanks
    794
    My Mood
    Angelic
    Quote Originally Posted by DaneCoder View Post
    Hello its me again I need some help with my d3d menu as you can see in the photo it gets detected after I turn on the hack functions(specially the chams)
    actually even you don't turn on the hack functions, you will still getting detected, because you're using vtable and the you way you hook the d3d9.dll, the detour is not detected, because I used detour E9 in menu/no menu d3d base but I'm not using vtable, so that if you want to make the menu undetected, here's the tips, try not to used vtable or used another hook, edit your menu classes.
    here's the proof:

  17. The Following User Says Thank You to emiedumalasa For This Useful Post:

    V3n0x (07-13-2014)

  18. #12
    V3n0x's Avatar
    Join Date
    Jul 2014
    Gender
    male
    Posts
    57
    Reputation
    10
    Thanks
    15
    My Mood
    Amazed
    thats nice
    -= |::V3n0x::| =-

    im just ein Neuling







    Respect:
    Ryuzaki™
    DaneCoder
    Jhem
    Burn3r
    RoBerTo
    Cyno™
    AeroMan

  19. #13
    DaneCoder's Avatar
    Join Date
    May 2014
    Gender
    male
    Location
    parking lot
    Posts
    465
    Reputation
    10
    Thanks
    777
    My Mood
    Doubtful
    Quote Originally Posted by emiedumalasa View Post
    actually even you don't turn on the hack functions, you will still getting detected, because you're using vtable and the you way you hook the d3d9.dll, the detour is not detected, because I used detour E9 in menu/no menu d3d base but I'm not using vtable, so that if you want to make the menu undetected, here's the tips, try not to used vtable or used another hook, edit your menu classes.
    here's the proof:
    But your proof is old, why? Look closely at the event kill.
    FUCK YOU

  20. #14
    DaneCoder's Avatar
    Join Date
    May 2014
    Gender
    male
    Location
    parking lot
    Posts
    465
    Reputation
    10
    Thanks
    777
    My Mood
    Doubtful
    Quote Originally Posted by Alex_Agnew View Post
    For the people that say it's the detour and not hooking: GTFO.
    You hook using detours, meaning hooking -> detouring.
    When you use a menu you use present and reset to right?
    Those can also be detected.
    Try it step by step.

    i made a small diagram:

    i hope this helps somewhat
    Should i tell you guys who told that to me?
    FUCK YOU

  21. #15
    TheG36's Avatar
    Join Date
    May 2014
    Gender
    male
    Location
    133.7.0.0
    Posts
    83
    Reputation
    10
    Thanks
    400
    My Mood
    Sleepy
    Quote Originally Posted by DaneCoder View Post
    Should i tell you guys who told that to me?
    Yes please, inform us

Page 1 of 2 12 LastLast

Similar Threads

  1. [REQUEST]How work that :Warrock D3D Menu Hack
    By taylan in forum Programming Tutorial Requests
    Replies: 0
    Last Post: 01-26-2010, 09:06 AM
  2. D3D Menu (Request)
    By AeroMan in forum Visual Basic Programming
    Replies: 9
    Last Post: 11-14-2009, 05:02 AM
  3. D3D menu Help Please....
    By ~InsaneWayne~ in forum C++/C Programming
    Replies: 14
    Last Post: 11-08-2009, 09:00 PM
  4. My D3D menu closes :| ! Source attached
    By Jammy122333 in forum C++/C Programming
    Replies: 1
    Last Post: 06-15-2008, 01:38 PM
  5. [Help]D3D Menu
    By cothen12 in forum C++/C Programming
    Replies: 13
    Last Post: 01-18-2008, 04:28 PM