Page 1 of 2 12 LastLast
Results 1 to 15 of 22
  1. #1
    Voltage552's Avatar
    Join Date
    Jul 2009
    Gender
    male
    Posts
    252
    Reputation
    10
    Thanks
    135

    [Tutorial]Creating D3D8 Base | Wallhack


    YOU MUST DO THIS FIRST
    INSTALLING VISUAL C++ 2008
    LINK : https://www.microsof*****m/express/Dow...008-Visual-CPP
    HOW-TO : Select Visual C++ 2008 Express Edition under Visual Studios 2008 Express and click Free Download
    INSTALLING DIRECT-X SDK
    LINK : https://www.microsof*****m/downloads/d...displaylang=en
    HOW-TO : Click download and install this SDK
    ADDING DIRECT-X INCLUDE FILES IN VC++
    STEP 1. Install Direct-X SDK
    STEP 2. Open VC++
    STEP 3. Select Tools -> Option -> Projects and Solutions -> VC++ Directories
    STEP 4. In VC ++ Directories, go to the drop-down menu and select Include Files
    STEP 5. Add the code below
    Code:
    C:\Program Files\Microsoft DirectX 9.0 SDK (Summer 2004)\Include
    ADDING DIRECT-X LIBRARY FILES IN VC++
    STEP 1. Install Direct-X SDK
    STEP 2. Open VC++
    STEP 3. Select Tools -> Option -> Projects and Solutions -> VC++ Directories
    STEP 4. In VC ++ Directories, go to the drop-down menu and select Library Files
    STEP 5. Add the code below
    Code:
    C:\Program Files\Microsoft DirectX 9.0 SDK (Summer 2004)\Lib
    --------------------------------------

    Here's a tutorial on how to create a d3d8 / Sudden attack base!

    ---------------------------------------------

    Open up Visual C++ 2008
    Create: Project...
    Choose Win32 Console Application
    If you do not see it, look at Project types and click on Visual C++

    Screenshot


    You should see the picture below be presented on your Visual C++
    Press NEXT

    Screenshot


    Do not touch anything else. Application type - Select "DLL"
    Press FINISH

    Screenshot


    You should see the screenshot below presented on your Visual C++
    Right click and remove dllmain.cpp*
    * - Remove because it is already defined in the base source I will give you.

    Screenshot


    Click the green arrow on the top to debug / release. Alternately, you can just build / rebuild (for those who know how to use C++ IDE)

    Screenshot


    ---------------------------------------------
    Base Source Code
    ---------------------------------------------
    Replace your main cpp file with this.
    Code:
    #include "stdafx.h"
    #include <windows.h>
    
    #include <d3d8.h>
    #pragma comment(lib, "d3d8.lib")
    
    typedef HRESULT (WINAPI* CreateDevice_Prototype)        (LPDIRECT3D8, UINT, D3DDEVTYPE, HWND, DWORD, D3DPRESENT_PARAMETERS*, LPDIRECT3DDEVICE8*);
    typedef HRESULT (WINAPI* Reset_Prototype)               (LPDIRECT3DDEVICE8, D3DPRESENT_PARAMETERS*);
    typedef HRESULT (WINAPI* EndScene_Prototype)            (LPDIRECT3DDEVICE8);
    typedef HRESULT (WINAPI* DrawIndexedPrimitive_Prototype)(LPDIRECT3DDEVICE8, D3DPRIMITIVETYPE, UINT, UINT, UINT, UINT);
    
    CreateDevice_Prototype         CreateDevice_Pointer         = NULL;
    Reset_Prototype                Reset_Pointer                = NULL;
    EndScene_Prototype             EndScene_Pointer             = NULL;
    DrawIndexedPrimitive_Prototype DrawIndexedPrimitive_Pointer = NULL;
    
    HRESULT WINAPI Direct3DCreate8_VMTable    (VOID);
    HRESULT WINAPI CreateDevice_Detour        (LPDIRECT3D8, UINT, D3DDEVTYPE, HWND, DWORD, D3DPRESENT_PARAMETERS*, LPDIRECT3DDEVICE8*);
    HRESULT WINAPI Reset_Detour               (LPDIRECT3DDEVICE8, D3DPRESENT_PARAMETERS*);
    HRESULT WINAPI EndScene_Detour            (LPDIRECT3DDEVICE8);
    HRESULT WINAPI DrawIndexedPrimitive_Detour(LPDIRECT3DDEVICE8, D3DPRIMITIVETYPE, UINT, UINT, UINT, UINT);
    
    PDWORD Direct3D_VMTable = NULL; 
    
    BOOL WINAPI DllMain(HINSTANCE hinstModule, DWORD dwReason, LPVOID lpvReserved)
    {
      if(dwReason == DLL_PROCESS_ATTACH)
      {
        DisableThreadLibraryCalls(hinstModule);
    
        if(Direct3DCreate8_VMTable() == D3D_OK)
        return TRUE;
      }
    
      return FALSE;
    }
    
    HRESULT WINAPI Direct3DCreate8_VMTable(VOID)
    {
      LPDIRECT3D8 Direct3D_Object = Direct3DCreate8(D3D_SDK_VERSION);
    
      if(Direct3D_Object == NULL)
      return D3DERR_INVALIDCALL;
      
      Direct3D_VMTable = (PDWORD)*(PDWORD)Direct3D_Object;
      Direct3D_Object->Release();
    
      DWORD dwProtect;
    
      if(VirtualProtect(&Direct3D_VMTable[15], sizeof(DWORD), PAGE_READWRITE, &dwProtect) != 0)
      {
        *(PDWORD)&CreateDevice_Pointer = Direct3D_VMTable[15];
        *(PDWORD)&Direct3D_VMTable[15] = (DWORD)CreateDevice_Detour;
    
        if(VirtualProtect(&Direct3D_VMTable[15], sizeof(DWORD), dwProtect, &dwProtect) == 0)
        return D3DERR_INVALIDCALL;
      }
      else
      return D3DERR_INVALIDCALL;
    
      return D3D_OK;
    }
    
    HRESULT WINAPI CreateDevice_Detour(LPDIRECT3D8 Direct3D_Object, UINT Adapter, D3DDEVTYPE DeviceType, HWND FocusWindow, 
    					DWORD BehaviorFlags, D3DPRESENT_PARAMETERS* PresentationParameters, 
    					LPDIRECT3DDEVICE8* Returned_Device_Interface)
    {
      HRESULT Returned_Result = CreateDevice_Pointer(Direct3D_Object, Adapter, DeviceType, FocusWindow, BehaviorFlags, 
    	                                          PresentationParameters, Returned_Device_Interface);
    
      DWORD dwProtect;
    
      if(VirtualProtect(&Direct3D_VMTable[15], sizeof(DWORD), PAGE_READWRITE, &dwProtect) != 0)
      {
        *(PDWORD)&Direct3D_VMTable[15] = *(PDWORD)&CreateDevice_Pointer;
        CreateDevice_Pointer           = NULL;
    
        if(VirtualProtect(&Direct3D_VMTable[15], sizeof(DWORD), dwProtect, &dwProtect) == 0)
        return D3DERR_INVALIDCALL;
      }
      else
      return D3DERR_INVALIDCALL;
    
      if(Returned_Result == D3D_OK)
      {
        Direct3D_VMTable = (PDWORD)*(PDWORD)*Returned_Device_Interface;
    
        *(PDWORD)&Reset_Pointer                = (DWORD)Direct3D_VMTable[14];
        *(PDWORD)&EndScene_Pointer             = (DWORD)Direct3D_VMTable[35];
        *(PDWORD)&DrawIndexedPrimitive_Pointer = (DWORD)Direct3D_VMTable[71];
    
        *(PDWORD)&Direct3D_VMTable[14] = (DWORD)Reset_Detour;
        *(PDWORD)&Direct3D_VMTable[35] = (DWORD)EndScene_Detour;
        *(PDWORD)&Direct3D_VMTable[71] = (DWORD)DrawIndexedPrimitive_Detour;
      }
        
      return Returned_Result;
    }
    
    HRESULT WINAPI Reset_Detour(LPDIRECT3DDEVICE8 Device_Interface, D3DPRESENT_PARAMETERS* PresentationParameters)
    {
      return Reset_Pointer(Device_Interface, PresentationParameters);
    }
    
    HRESULT WINAPI EndScene_Detour(LPDIRECT3DDEVICE8 Device_Interface)
    {
      return EndScene_Pointer(Device_Interface);
    }
    
    HRESULT WINAPI DrawIndexedPrimitive_Detour(LPDIRECT3DDEVICE8 Device_Interface, D3DPRIMITIVETYPE Type, 
                                               UINT MinIndex, UINT NumVertices, UINT StartIndex, UINT PrimitiveCount)
    {
      LPDIRECT3DVERTEXBUFFER8 Stream_Data;
      UINT Stride = 0;
    
      if(Device_Interface->GetStreamSource(0, &Stream_Data, &Stride) == D3D_OK)
      Stream_Data->Release();
      //code
      return DrawIndexedPrimitive_Pointer(Device_Interface, Type, MinIndex, NumVertices, StartIndex, PrimitiveCount);
    }
    Enjoy your Base!
    -Voltage552

    I have no idea where the heck this base is from. It was somewhere in my harddrive.

    --
    How to add WALLHACK
    Look at this piece of code right here in the base
    Code:
    HRESULT WINAPI DrawIndexedPrimitive_Detour(LPDIRECT3DDEVICE8 Device_Interface, D3DPRIMITIVETYPE Type, 
                                               UINT MinIndex, UINT NumVertices, UINT StartIndex, UINT PrimitiveCount)
    {
      LPDIRECT3DVERTEXBUFFER8 Stream_Data;
      UINT Stride;
    
      if(Device_Interface->GetStreamSource(0, &Stream_Data, &Stride) == D3D_OK)
      Stream_Data->Release();
      //code
      return DrawIndexedPrimitive_Pointer(Device_Interface, Type, MinIndex, NumVertices, StartIndex, PrimitiveCount);
    }
    Now, look more closely at the following.
    Code:
    //code
    INFO
    Stride 40 and 44 are the body model of Sudden Attack. (One's upper, one's lower)
    WALL HACK ---
    Add this below the "//code"
    Code:
    bool wallhack;
    if(Stride == 40 && wallhack || Stride == 44 && wallhack)
    {
       Device_Interface->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);
    }
    To make this work, you need to add a hotkey.

    Add this below the wallhack code.
    Code:
    if ((GetAsyncKeyState(VK_NUMPAD1)&1) == 1) //Numpad 1
         wallhack = !wallhack;//Start Wallhack
    If you press NUMPAD 1, wallhack will start.


    --Enjoy-- Voltage552
    Originally wrote for SANA section , but re-posted here since it fits here too.
    [img]https://www.steliar*****m/images/star1.gif[/img][img]https://www.steliar*****m/images/star2.gif[/img][img]https://www.steliar*****m/images/star3.gif[/img][img]https://www.steliar*****m/images/star2.gif[/img][img]https://www.steliar*****m/images/star1.gif[/img]


    Don't expect any more public hacks from me.

    [SA Public]Voltage552 Hook! UNDETECTED - ALL OS

  2. The Following 8 Users Say Thank You to Voltage552 For This Useful Post:

    andybuibee (03-24-2010),baraozin (12-22-2011),darksaider (09-23-2012),FLEEphacks (06-19-2013),kang147852 (09-17-2012),Kryptox3 (04-07-2010),OzzyConstantine (04-14-2011),why06 (03-23-2010)

  3. #2
    why06's Avatar
    Join Date
    Jul 2009
    Gender
    male
    Location
    IBM
    Posts
    4,304
    Reputation
    170
    Thanks
    2,203
    My Mood
    Flirty
    The base just mysteriously showed up on your harddrive hmmmm? I would prefer if you had some idea who wrote this code, but I know they too, probably took most of it from some one else's detouring method. However the tutorial is yours even if the code is not. I'll leave it for now, unless too many people object.


    Also I have a question. Does anyone know if this macro: Direct3DCreate8(D3D_SDK_VERSION);
    will always return the current D3D object, even if another one was already created? Because that's how this guy detoured all these functions. With pointers to different functions. The technique is actually pretty amazing. Has a certain beauty to it you know... =/

    "Every gun that is made, every warship launched, every rocket fired signifies, in the final sense, a theft from those who hunger and are not fed, those who are cold and are not clothed. This world in arms is not spending money alone. It is spending the sweat of its laborers, the genius of its scientists, the hopes of its children. The cost of one modern heavy bomber is this: a modern brick school in more than 30 cities. It is two electric power plants, each serving a town of 60,000 population. It is two fine, fully equipped hospitals. It is some fifty miles of concrete pavement. We pay for a single fighter plane with a half million bushels of wheat. We pay for a single destroyer with new homes that could have housed more than 8,000 people. This is, I repeat, the best way of life to be found on the road the world has been taking. This is not a way of life at all, in any true sense. Under the cloud of threatening war, it is humanity hanging from a cross of iron."
    - Dwight D. Eisenhower

  4. The Following User Says Thank You to why06 For This Useful Post:

    andybuibee (03-24-2010)

  5. #3
    Voltage552's Avatar
    Join Date
    Jul 2009
    Gender
    male
    Posts
    252
    Reputation
    10
    Thanks
    135
    Well, it didn't mysteriously appear. I was looking through it and found this base among some other bases. It was quite simple so I just put it here. If anyone knows who made it, I'll be glad to put the credits here.
    [img]https://www.steliar*****m/images/star1.gif[/img][img]https://www.steliar*****m/images/star2.gif[/img][img]https://www.steliar*****m/images/star3.gif[/img][img]https://www.steliar*****m/images/star2.gif[/img][img]https://www.steliar*****m/images/star1.gif[/img]


    Don't expect any more public hacks from me.

    [SA Public]Voltage552 Hook! UNDETECTED - ALL OS

  6. #4
    comwhat's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Location
    Korea
    Posts
    3
    Reputation
    10
    Thanks
    0
    1>c:\documents and settings\tera\my documents\visual studio 2008\projects\koreak\koreak\koreak.cpp(122) : warning C4700: uninitialized local variable 'wallhack' used

    what's the matter??

  7. #5
    Void's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Location
    Inline.
    Posts
    3,198
    Reputation
    205
    Thanks
    1,445
    My Mood
    Mellow
    @Why's question.

    Modules are only loaded once, he creates a IDirect3D8 object so he could find the CreateDevice address, nothing more. I can tell this is copy and pasted, hooking CreateDevice to get the device address won't for CA ( well atleast not for me ) and probably a lot of other games, it seems to be detected.

    By the way, for you people using Direct3D 9 and not 8. CreateDevice is the 16th on the virtual table for IDirect3D9.

  8. The Following User Says Thank You to Void For This Useful Post:

    why06 (03-24-2010)

  9. #6
    treeham's Avatar
    Join Date
    Apr 2009
    Gender
    male
    Location
    heh. Turn around.
    Posts
    200
    Reputation
    10
    Thanks
    41
    My Mood
    Cynical
    Quote Originally Posted by comwhat View Post
    1>c:\documents and settings\tera\my documents\visual studio 2008\projects\koreak\koreak\koreak.cpp(122) : warning C4700: uninitialized local variable 'wallhack' used

    what's the matter??
    [IMG]https://raoworld.files.*********.com/2009/01/facepalm.jpg[/IMG]

    Gosh I don't know...!

    C&P choob.
    In Choob Language:
    also for all your info.. i didnt copy and paste shit.. coz i dont think anyone has realeased any source code for the New update of CA.. so sdfu..
    In English:
    I didn't copy and paste because no one has released what I need copy and paste
    Oh Choobs...

  10. #7
    andybuibee's Avatar
    Join Date
    Mar 2010
    Gender
    male
    Posts
    3
    Reputation
    10
    Thanks
    0
    hey sorry to bother u voltage, I don't know what happened but I did everything you said up to point where it says "Click the green arrow on the top to debug / release. Alternately, you can just build / rebuild (for those who know how to use C++ IDE)" I pressed it and it says "Please specify the name of the executable file to be used for the debug session" It's my first time using Visual C++ 2008 so I would be extremely glad if you explained it >.<. Thanks for the release!

  11. #8
    Void's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Location
    Inline.
    Posts
    3,198
    Reputation
    205
    Thanks
    1,445
    My Mood
    Mellow
    Quote Originally Posted by andybuibee View Post
    hey sorry to bother u voltage, I don't know what happened but I did everything you said up to point where it says "Click the green arrow on the top to debug / release. Alternately, you can just build / rebuild (for those who know how to use C++ IDE)" I pressed it and it says "Please specify the name of the executable file to be used for the debug session" It's my first time using Visual C++ 2008 so I would be extremely glad if you explained it >.<. Thanks for the release!
    DLL's can't be loaded into memory alone, you have to have an executable loading it. Or you can ignore that, press cancel, and inject.

  12. The Following 2 Users Say Thank You to Void For This Useful Post:

    andybuibee (03-24-2010),why06 (03-24-2010)

  13. #9
    why06's Avatar
    Join Date
    Jul 2009
    Gender
    male
    Location
    IBM
    Posts
    4,304
    Reputation
    170
    Thanks
    2,203
    My Mood
    Flirty
    What David said. Just build it normally. You don't have to debug it unless you want to. =/
    Just click F7. (no u will not die)

    "Every gun that is made, every warship launched, every rocket fired signifies, in the final sense, a theft from those who hunger and are not fed, those who are cold and are not clothed. This world in arms is not spending money alone. It is spending the sweat of its laborers, the genius of its scientists, the hopes of its children. The cost of one modern heavy bomber is this: a modern brick school in more than 30 cities. It is two electric power plants, each serving a town of 60,000 population. It is two fine, fully equipped hospitals. It is some fifty miles of concrete pavement. We pay for a single fighter plane with a half million bushels of wheat. We pay for a single destroyer with new homes that could have housed more than 8,000 people. This is, I repeat, the best way of life to be found on the road the world has been taking. This is not a way of life at all, in any true sense. Under the cloud of threatening war, it is humanity hanging from a cross of iron."
    - Dwight D. Eisenhower

  14. The Following User Says Thank You to why06 For This Useful Post:

    andybuibee (03-24-2010)

  15. #10
    andybuibee's Avatar
    Join Date
    Mar 2010
    Gender
    male
    Posts
    3
    Reputation
    10
    Thanks
    0
    Thanks! So I've done all of the things said above.. where do I go to get my DLL?

  16. #11
    Void's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Location
    Inline.
    Posts
    3,198
    Reputation
    205
    Thanks
    1,445
    My Mood
    Mellow
    Debug or release folder in your project folder. You should consider learning C++ from the beginning. Doing this won't really get you anywhere.

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

    andybuibee (03-24-2010)

  18. #12
    andybuibee's Avatar
    Join Date
    Mar 2010
    Gender
    male
    Posts
    3
    Reputation
    10
    Thanks
    0
    Quote Originally Posted by Davidm44 View Post
    Debug or release folder in your project folder. You should consider learning C++ from the beginning. Doing this won't really get you anywhere.
    Thanks once again! I'm going to try to learn it :X.

  19. #13
    Gordon`'s Avatar
    Join Date
    Dec 2007
    Gender
    male
    Posts
    283
    Reputation
    24
    Thanks
    325
    i dont recommend to use GetStreamSource. it drops alot of fps (in warrock and ca)


  20. #14
    Void's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Location
    Inline.
    Posts
    3,198
    Reputation
    205
    Thanks
    1,445
    My Mood
    Mellow
    Quote Originally Posted by Gordon` View Post
    i dont recommend to use GetStreamSource. it drops alot of fps (in warrock and ca)
    He's right, hook SetStreamSource and record the stride from there. More FPS = good.

  21. #15
    boxxymays's Avatar
    Join Date
    Mar 2010
    Gender
    male
    Posts
    1
    Reputation
    10
    Thanks
    0
    How would you go about finding the stride number for other games?

Page 1 of 2 12 LastLast

Similar Threads

  1. [Tutorial]Create your own IWNet Emulation Server
    By eJustin in forum Call of Duty Modern Warfare 2 Private Servers
    Replies: 60
    Last Post: 07-14-2010, 06:31 AM
  2. [Tutorial] Create Matrial Wallhack
    By ~Mafioso~ in forum CounterStrike (CS) 1.6 Hacks / Counter Strike: Source (CSS) Hacks
    Replies: 5
    Last Post: 03-07-2010, 10:03 PM
  3. [Tutorial]Create Windows Service in Express
    By NextGen1 in forum Visual Basic Programming
    Replies: 1
    Last Post: 03-06-2010, 10:57 AM
  4. [Tutorial] Create Counter-Strike:Source Hacks
    By ~Mafioso~ in forum Visual Basic Programming
    Replies: 9
    Last Post: 01-31-2010, 05:42 PM
  5. [Tutorial] Make ur January Wallhack work!!
    By [M][P][G][H] FAN in forum CrossFire Hacks & Cheats
    Replies: 16
    Last Post: 01-06-2010, 11:44 AM