Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > C/C++
You last visited: Today at 05:36

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



help hook

Discussion on help hook within the C/C++ forum part of the Coders Den category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Dec 2007
Posts: 39
Received Thanks: 8
help hook

this is my code:
PHP Code:
#include<Windows.h>
#include<TlHelp32.h>
#include<iostream>

using namespace std;

DWORD getPid(LPWSTR procName);
int privileges();
static 
DWORD Stub_for_mgsbox();

int MyMessageBoxW(IN HWND hWndIN LPWSTR lpTextIN LPWSTR lpCaptionIN UINT uType)
{
        return 
true;
}

static 
DWORD Stub_for_mgsbox(){
    return 
0;
}


DWORD HookFunction(HANDLE ProcessLPVOID lpFunctionunsigned char *lpBackup)
{
    
DWORD dwAddr = (DWORD)::GetProcAddress(::GetModuleHandleA("user32.dll"), "MessageBoxW");
    
BYTE jmp[5] = { 0xE9,0x000x000x000x00 };

    
ReadProcessMemory(Process, (LPVOID)dwAddrlpBackup60);

    
DWORD dwCalc = ((DWORD)lpFunction dwAddr 5);

    
DWORD pPrevious 0;

    
VirtualProtectEx(Process,(void*)dwAddr6PAGE_EXECUTE_READWRITE, &pPrevious);

    
memcpy(&jmp[1], &dwCalc4);

    
WriteProcessMemory(Process, (LPVOID)dwAddrjmp60);

    
VirtualProtectEx(Process, (void*)dwAddr6pPrevious, &pPrevious);
    return 
dwAddr;
}
__declspec(nakedint RMesage(IN HWND hWndIN LPWSTR lpTextIN LPWSTR lpCaptionIN UINT uType)
{
    
__asm
    
{
        
ret 0x10
    
}
}
int main()
{
    
DWORD Pid getPid(L"test.exe");
    if (
Pid == 0) return 10;
    
HANDLE OpenProc OpenProcess(PROCESS_ALL_ACCESSfalsePid);
    if (
OpenProc == 0) return 20;
    
DWORD szHookFSize = (PBYTE)Stub_for_mgsbox - (PBYTE)RMesage;
    
LPVOID szHookFAddr VirtualAllocEx(OpenProc0szHookFSizeMEM_RESERVE MEM_COMMITPAGE_READWRITE);
    
WriteProcessMemory(OpenProcszHookFAddr, (void*)RMesageszHookFSize0);
    
BYTE hook[6];
    
HookFunction(OpenProcszHookFAddrhook);
    return 
ERROR_SUCCESS;
}

int privileges(){
    
HANDLE Token;
    
TOKEN_PRIVILEGES tp;
    if (
OpenProcessToken(GetCurrentProcess(), TOKEN_ADJUST_PRIVILEGES TOKEN_QUERY, &Token))
    {
        
LookupPrivilegeValue(NULLSE_DEBUG_NAME, &tp.Privileges[0].Luid);
        
tp.PrivilegeCount 1;
        
tp.Privileges[0].Attributes SE_PRIVILEGE_ENABLED;
        if (
AdjustTokenPrivileges(Token0, &tpsizeof(tp), NULLNULL) == 0){
            return 
1;
        }
        else{
            return 
0
        }
    }
    return 
1;
}

DWORD getPid(LPWSTR procName){
    
HANDLE hsnap;
    
PROCESSENTRY32 pt;
    
hsnap CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS0);
    
pt.dwSize sizeof(PROCESSENTRY32);
    do{
        if (!
lstrcmpW(pt.szExeFileprocName)){
            
DWORD pid pt.th32ProcessID;
            
CloseHandle(hsnap);
            return 
pid;
        }
    } while (
Process32Next(hsnap, &pt));
    
CloseHandle(hsnap);
    return 
0;

Why??, when i set click for call messagebox, this crash?

fenixelfenix is offline  
Reply


Similar Threads Similar Threads
[Selling] * FIFA HOOK 14 [PC] - ULTIMATE TEAM & PRO-CLUBS HOOK - AUTOBOT *
10/16/2014 - Fifa Trading - 112 Replies
currently not available - stay tuned!
WarLord Public Hook (Client Hook) 01.03 Rleased Official Epvp Release by pastalov.
03/03/2012 - WarRock Hacks, Bots, Cheats & Exploits - 4 Replies
hi. Endlich hat WarLord seinen Public Hack mal geupdated :handsdown: Hier habt ihr Ihn: http://img715.imageshack.us/img715/7504/frecky.pn g Der Download befindet sich im anhang! Virus Check: https://www.virustotal.com/file/3792beba0863829ec 3e2b53f3b0c17d20bfc09c7d76f5f24967a79f1a82a4ddb/an alysis/1330708386/
<26.06.11> Chico™ Public Hook, //Invisible//Chams /Stamina/Mini Hook/NO CRASH VERSION
07/08/2011 - WarRock Hacks, Bots, Cheats & Exploits - 46 Replies
26.06.11 Hack Released 26.06.11 SuperNoSpread Problem Fixxen Status= Not in Hack Hej Com, leider hab ich eine schlechte nachricht xP^^ aus egendeinen Grund verursacht bei mir SuperNoSpread einen Direkten Crash sobald man in game ist, deshalb habe ich es entfernt O,o der Hack ist tortzdem nett und wird euch gefallen, sobald ich mehr addys habe kommen mehrere funktionen noch dazu ;) http://img4.fotos-hochladen.net/uploads/public24e lfvtrw1u.png STOP! VOR DEM DOWNLOAD! Mit Dem...



All times are GMT +2. The time now is 05:36.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.