[WoW] [C++] Hack Loader (DLL Injection Example) menu

User Tag List

Page 2 of 2 FirstFirst 12
Results 16 to 29 of 29
  1. #16
    namreeb's Avatar Legendary

    Reputation
    658
    Join Date
    Sep 2008
    Posts
    1,023
    Thanks G/R
    7/215
    Trade Feedback
    0 (0%)
    Mentioned
    8 Post(s)
    Tagged
    0 Thread(s)
    If you insist. I was avoiding that on purpose because I don't fully understand. My best guess is that when I tried yours and had it failed I had not yet rebooted after disabling DEP. Every time I've tried yours since, it has worked. As for mine, I forgot to call the function to prepend the absolute path to my library, so was passing my inject function an un-initialized variable.

    [WoW] [C++] Hack Loader (DLL Injection Example)
  2. #17
    amadmonk's Avatar Active Member
    Reputation
    124
    Join Date
    Apr 2008
    Posts
    772
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by bierstud View Post
    If you insist. I was avoiding that on purpose because I don't fully understand. My best guess is that when I tried yours and had it failed I had not yet rebooted after disabling DEP. Every time I've tried yours since, it has worked. As for mine, I forgot to call the function to prepend the absolute path to my library, so was passing my inject function an un-initialized variable.
    I haven't looked at Cypher's code, but I seriously doubt it has anything to do with DEP unless he's doing something really, really, really weird. Data Execution Prevention - Wikipedia, the free encyclopedia

    More likely, unaccounted-for solar neutrinos.

  3. #18
    namreeb's Avatar Legendary

    Reputation
    658
    Join Date
    Sep 2008
    Posts
    1,023
    Thanks G/R
    7/215
    Trade Feedback
    0 (0%)
    Mentioned
    8 Post(s)
    Tagged
    0 Thread(s)
    I turned it off after finding forum posts searching google (sorry, don't remember specifically which one) that said their injection attempts were unsuccessful on Vista until they disabled DEP. *shrug*

  4. #19
    Cypher's Avatar Kynox's Sister's Pimp
    Reputation
    1356
    Join Date
    Apr 2006
    Posts
    5,368
    Thanks G/R
    0/4
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quick question. Why the **** are you disabling DEP? That's like rejecting free health insurance.

    EDIT: Shit, left this window open too long before replying, missed the extra replies.


    Originally Posted by amadmonk View Post
    I haven't looked at Cypher's code, but I seriously doubt it has anything to do with DEP unless he's doing something really, really, really weird. Data Execution Prevention - Wikipedia, the free encyclopedia

    More likely, unaccounted-for solar neutrinos.
    Originally Posted by bierstud View Post
    I turned it off after finding forum posts searching google (sorry, don't remember specifically which one) that said their injection attempts were unsuccessful on Vista until they disabled DEP. *shrug*
    All of my CODE is DEP-safe, ASLR-safe, etc etc. I like to do things properly, not just do it as quickly as possible and pray it works.

  5. #20
    miyu's Avatar Member
    Reputation
    1
    Join Date
    May 2007
    Posts
    1
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The sample code can't be download?

  6. #21
    ziinus's Avatar Member
    Reputation
    2
    Join Date
    Nov 2008
    Posts
    22
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Link is dead, and doesn't work with 7 7600 x32, uac disabled runned as administrator, but works on XP 32, any idea ?

  7. #22
    Cypher's Avatar Kynox's Sister's Pimp
    Reputation
    1356
    Join Date
    Apr 2006
    Posts
    5,368
    Thanks G/R
    0/4
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by ziinus View Post
    Link is dead, and doesn't work with 7 7600 x32, uac disabled runned as administrator, but works on XP 32, any idea ?
    Use the other one I posted, this one is much much older.

  8. #23
    Tanaris4's Avatar Contributor Authenticator enabled
    Reputation
    148
    Join Date
    Oct 2008
    Posts
    646
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Link is dead, any chance of a re-post? I'll host it as well
    https://tanaris4.com

  9. #24
    Cypher's Avatar Kynox's Sister's Pimp
    Reputation
    1356
    Join Date
    Apr 2006
    Posts
    5,368
    Thanks G/R
    0/4
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Tanaris4 View Post
    Link is dead, any chance of a re-post? I'll host it as well
    Whoops. Cleaned out my dropbox a while ago. Figured something like this might happen.

    I don't know if I have a mirror tbh. HadesMem is open source though and contains a much better injector.

    I can hunt around for the code to this if you really want, but honestly, you're prob better off just using that to whip together a quick standalone injector.

  10. #25
    NerieX's Avatar Master Sergeant
    Reputation
    40
    Join Date
    Jul 2010
    Posts
    110
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i dont seem to understand what you mean with this :P

  11. #26
    SKU's Avatar Contributor
    Reputation
    306
    Join Date
    May 2007
    Posts
    565
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by NerieX View Post
    i dont seem to understand what you mean with this :P
    Please be less specific.

  12. #27
    mnbvc's Avatar Banned
    Reputation
    120
    Join Date
    Jul 2009
    Posts
    273
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    copy/pasta from anywhere out of teh interwebz, but works :P

    Code:
    #include "stdafx.h"
    #include <string>
    #include <windows.h>
    #include <iostream>
    
    using namespace std;
    
    HMODULE TryInjectDll(DWORD adw_ProcessId, const std::wstring& as_DllFile)
    {
        //Find the address of the LoadLibrary api, luckily for us, it is loaded in the same address for every process
        HMODULE hLocKernel32 = GetModuleHandleW(L"KERNEL32");
        FARPROC hLocLoadLibrary = GetProcAddress(hLocKernel32, "LoadLibraryW");
        
        //Adjust token privileges to open system processes
        HANDLE hToken;
        TOKEN_PRIVILEGES tkp;
        if(OpenProcessToken(GetCurrentProcess(), TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, &hToken))
        {
            LookupPrivilegeValue(NULL, SE_DEBUG_NAME, &tkp.Privileges[0].Luid);
            tkp.PrivilegeCount = 1;
            tkp.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED;
            AdjustTokenPrivileges(hToken, 0, &tkp, sizeof(tkp), NULL, NULL);
            CloseHandle(hToken);
        }
    
        //Open the process with all access
        HANDLE hProc = OpenProcess(PROCESS_ALL_ACCESS, FALSE, adw_ProcessId);
        if (hProc == NULL)
            return NULL;
    
        //Allocate memory to hold the path to the Dll File in the process's memory
        LPVOID hRemoteMem = VirtualAllocEx(hProc, NULL, as_DllFile.size()*sizeof(wchar_t), MEM_COMMIT, PAGE_READWRITE);
    
        //Write the path to the Dll File in the location just created
        DWORD numBytesWritten;
        WriteProcessMemory(hProc, hRemoteMem, as_DllFile.c_str(), as_DllFile.size()*sizeof(wchar_t), &numBytesWritten);
    
        //Create a remote thread that starts begins at the LoadLibrary function and is passed are memory pointer
        HANDLE hRemoteThread = CreateRemoteThread(hProc, NULL, 0, (LPTHREAD_START_ROUTINE)hLocLoadLibrary, hRemoteMem, 0, NULL);
    
        //Wait for the thread to finish
        ::WaitForSingleObject( hRemoteThread, INFINITE );
        DWORD  hLibModule = 0;
        ::GetExitCodeThread( hRemoteThread, &hLibModule );
    
        //Free the memory created on the other process
        ::VirtualFreeEx(hProc, hRemoteMem, as_DllFile.size()*sizeof(wchar_t), MEM_RELEASE);
    
        //Release the handle to the other process
        ::CloseHandle(hProc);
    
        return (HMODULE)hLibModule;
    }
    
    
    bool TryUnInjectDll(DWORD adw_ProcessId, HMODULE ah_ModuleHandle)
    {
        //Open the process with all access
        HANDLE hProc = OpenProcess(PROCESS_ALL_ACCESS, FALSE, adw_ProcessId);
        if (hProc == NULL)
            return false;
    
        bool lb_ReturnValue = false;
    
        HMODULE hLocKernel32 = GetModuleHandleW(L"KERNEL32");
        FARPROC hLocLoadLibrary = GetProcAddress(hLocKernel32, "FreeLibrary");
    
        if(ah_ModuleHandle != NULL)
        {
            HANDLE hRemoteThread = ::CreateRemoteThread(hProc, NULL, 0, (LPTHREAD_START_ROUTINE)hLocLoadLibrary, (void*)ah_ModuleHandle, 0, NULL );
    
            if( hRemoteThread != NULL )
            {
                DWORD ldw_ReturnCode;
                ::WaitForSingleObject( hRemoteThread, INFINITE );
                ::GetExitCodeThread( hRemoteThread, &ldw_ReturnCode );
                ::CloseHandle( hRemoteThread );
    
                lb_ReturnValue = ldw_ReturnCode != 0;
            }
        }
    
        ::CloseHandle(hProc);
    
        return lb_ReturnValue;
    }
    
    DWORD curwindowid;
    
    void getProcessIdCur(LPCWSTR window)
    {
    	HWND curwindow;
    	while(!(curwindow = FindWindow(NULL, window)));     //loop until we find the window
    
    	GetWindowThreadProcessId(curwindow, &curwindowid);  
    }
    
    
    int _tmain(int argc, _TCHAR* argv[])
    {
    	char bla;
    	HMODULE inj;
    	getProcessIdCur(L"World of Warcraft");
    	inj = TryInjectDll(curwindowid, L"C:\\haxx.dll");
    	scanf_s(&bla);
    	TryUnInjectDll(curwindowid, inj);
    	return 0;
    }

  13. #28
    Cypher's Avatar Kynox's Sister's Pimp
    Reputation
    1356
    Join Date
    Apr 2006
    Posts
    5,368
    Thanks G/R
    0/4
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by mnbvc View Post
    copy/pasta from anywhere out of teh interwebz, but works :P

    Code:
    #include "stdafx.h"
    #include <string>
    #include <windows.h>
    #include <iostream>
    
    using namespace std;
    
    HMODULE TryInjectDll(DWORD adw_ProcessId, const std::wstring& as_DllFile)
    {
        //Find the address of the LoadLibrary api, luckily for us, it is loaded in the same address for every process
        HMODULE hLocKernel32 = GetModuleHandleW(L"KERNEL32");
        FARPROC hLocLoadLibrary = GetProcAddress(hLocKernel32, "LoadLibraryW");
        
        //Adjust token privileges to open system processes
        HANDLE hToken;
        TOKEN_PRIVILEGES tkp;
        if(OpenProcessToken(GetCurrentProcess(), TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, &hToken))
        {
            LookupPrivilegeValue(NULL, SE_DEBUG_NAME, &tkp.Privileges[0].Luid);
            tkp.PrivilegeCount = 1;
            tkp.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED;
            AdjustTokenPrivileges(hToken, 0, &tkp, sizeof(tkp), NULL, NULL);
            CloseHandle(hToken);
        }
    
        //Open the process with all access
        HANDLE hProc = OpenProcess(PROCESS_ALL_ACCESS, FALSE, adw_ProcessId);
        if (hProc == NULL)
            return NULL;
    
        //Allocate memory to hold the path to the Dll File in the process's memory
        LPVOID hRemoteMem = VirtualAllocEx(hProc, NULL, as_DllFile.size()*sizeof(wchar_t), MEM_COMMIT, PAGE_READWRITE);
    
        //Write the path to the Dll File in the location just created
        DWORD numBytesWritten;
        WriteProcessMemory(hProc, hRemoteMem, as_DllFile.c_str(), as_DllFile.size()*sizeof(wchar_t), &numBytesWritten);
    
        //Create a remote thread that starts begins at the LoadLibrary function and is passed are memory pointer
        HANDLE hRemoteThread = CreateRemoteThread(hProc, NULL, 0, (LPTHREAD_START_ROUTINE)hLocLoadLibrary, hRemoteMem, 0, NULL);
    
        //Wait for the thread to finish
        ::WaitForSingleObject( hRemoteThread, INFINITE );
        DWORD  hLibModule = 0;
        ::GetExitCodeThread( hRemoteThread, &hLibModule );
    
        //Free the memory created on the other process
        ::VirtualFreeEx(hProc, hRemoteMem, as_DllFile.size()*sizeof(wchar_t), MEM_RELEASE);
    
        //Release the handle to the other process
        ::CloseHandle(hProc);
    
        return (HMODULE)hLibModule;
    }
    
    
    bool TryUnInjectDll(DWORD adw_ProcessId, HMODULE ah_ModuleHandle)
    {
        //Open the process with all access
        HANDLE hProc = OpenProcess(PROCESS_ALL_ACCESS, FALSE, adw_ProcessId);
        if (hProc == NULL)
            return false;
    
        bool lb_ReturnValue = false;
    
        HMODULE hLocKernel32 = GetModuleHandleW(L"KERNEL32");
        FARPROC hLocLoadLibrary = GetProcAddress(hLocKernel32, "FreeLibrary");
    
        if(ah_ModuleHandle != NULL)
        {
            HANDLE hRemoteThread = ::CreateRemoteThread(hProc, NULL, 0, (LPTHREAD_START_ROUTINE)hLocLoadLibrary, (void*)ah_ModuleHandle, 0, NULL );
    
            if( hRemoteThread != NULL )
            {
                DWORD ldw_ReturnCode;
                ::WaitForSingleObject( hRemoteThread, INFINITE );
                ::GetExitCodeThread( hRemoteThread, &ldw_ReturnCode );
                ::CloseHandle( hRemoteThread );
    
                lb_ReturnValue = ldw_ReturnCode != 0;
            }
        }
    
        ::CloseHandle(hProc);
    
        return lb_ReturnValue;
    }
    
    DWORD curwindowid;
    
    void getProcessIdCur(LPCWSTR window)
    {
    	HWND curwindow;
    	while(!(curwindow = FindWindow(NULL, window)));     //loop until we find the window
    
    	GetWindowThreadProcessId(curwindow, &curwindowid);  
    }
    
    
    int _tmain(int argc, _TCHAR* argv[])
    {
    	char bla;
    	HMODULE inj;
    	getProcessIdCur(L"World of Warcraft");
    	inj = TryInjectDll(curwindowid, L"C:\\haxx.dll");
    	scanf_s(&bla);
    	TryUnInjectDll(curwindowid, inj);
    	return 0;
    }
    For certain interpretations of the word 'works'.

  14. #29
    tymezz's Avatar Member
    Reputation
    9
    Join Date
    Nov 2007
    Posts
    44
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    "Hades-Memory/Injector.h" for a better example.

Page 2 of 2 FirstFirst 12

Similar Threads

  1. Replies: 8
    Last Post: 07-22-2013, 01:24 AM
  2. QQ my wow acc hacked and gone
    By Kazzin100 in forum World of Warcraft General
    Replies: 10
    Last Post: 06-11-2007, 08:23 PM
  3. Top wow bots/hacks
    By zorelf in forum World of Warcraft Bots and Programs
    Replies: 4
    Last Post: 04-14-2007, 04:50 PM
  4. First working WoW Gold Hack?
    By Basti51 in forum World of Warcraft General
    Replies: 13
    Last Post: 06-19-2006, 07:47 PM
All times are GMT -5. The time now is 02:17 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search