Giriş yap
En iyi yollayıcılar
Hello EMO | ||||
EMO | ||||
eMoStyLe | ||||
BesimBICER | ||||
GameKinG | ||||
Crysis | ||||
~>!.DεvιLρяιεsт.!<~ | ||||
MeTaL | ||||
TrueCrime | ||||
djhayal3t |
Istatistikler
Toplam 203 kayıtlı kullanıcımız varSon kaydolan kullanıcımız: crayzboy76
Kullanıcılarımız toplam 1186 mesaj attılar bunda 862 konu
Arama
Sosyal yer imi
Sosyal bookmarking sitesinde Emo, Emo nedir, Emo resimleri, Emo Kıyafetleri, Emo Sözleri, Emo Oyunları, EmoTurkey, Emo Nickler, Emo Avatarları, Punk, Punk Resimleri, Punk Avatarları, Rock, Rock Resimleri, Rock Avatarları, Msn Nickleri, Msn Avatarları, Müzik adresi saklayın ve paylaşın
Sosyal bookmarking sitesinde EMO Style ForumPro - Hos Geldiniz adresi saklayın ve paylaşın
Kimler hatta?
Toplam 17 kullanıcı online :: 0 Kayıtlı, 0 Gizli ve 17 Misafir Yok
Sitede bugüne kadar en çok 217 kişi C.tesi Tem. 29, 2017 1:46 am tarihinde online oldu.
En son konular
Reklam
[C++] Hook ws2_32 send/recv
1 sayfadaki 1 sayfası
[C++] Hook ws2_32 send/recv
Hello everyone,
I'm back with another little tool.
This time it's a DLL that can be injected to hook ws2_32 send and recv functions.
If you understand the code below you will see how easy it is to place a hook.
For explanation go to #snoxd on Qnet because this is the snippet section, not tutorials.
I'm back with another little tool.
This time it's a DLL that can be injected to hook ws2_32 send and recv functions.
If you understand the code below you will see how easy it is to place a hook.
For explanation go to #snoxd on Qnet because this is the snippet section, not tutorials.
Quote#include
#include
#include
#include
BYTE SendAddy[6];
BYTE RecvAddy[6];
HRESULT _stdcall mySend(SOCKET s, const char* buf, int len, int flags);
HRESULT _stdcall myRecv(SOCKET s, char* buf, int len, int flags);
DWORD HookFunc(LPCSTR lpModule, LPCSTR lpFuncName, LPVOID lpFunction, unsigned char *lpAddress);
BOOL ReleaseFunc(LPCSTR lpModule, LPCSTR lpFuncName, unsigned char *lpAddress);
DWORD HookFunc(LPCSTR lpModule, LPCSTR lpFuncName, LPVOID lpFunction, unsigned char *lpAddress)
{
DWORD dwAddr = (DWORD)GetProcAddress(GetModuleHandle(lpModule), lpFuncName);
BYTE jump[6] = { 0xe9, 0x00, 0x00, 0x00, 0x00, 0xc3 };
ReadProcessMemory(GetCurrentProcess(), (LPVOID)dwAddr, lpAddress, 6, 0);
DWORD dwOffset = ((DWORD)lpFunction - dwAddr - 5);
memcpy(&jump[1], &dwOffset, 4);
if(WriteProcessMemory(GetCurrentProcess(), (LPVOID)dwAddr, jump, 6, 0))
return dwAddr;
}
BOOL ReleaseFunc(LPCSTR lpModule, LPCSTR lpFuncName, unsigned char *lpAddress)
{
DWORD dwAddr = (DWORD)GetProcAddress(GetModuleHandle(lpModule), lpFuncName);
return WriteProcessMemory(GetCurrentProcess(), (LPVOID)dwAddr, lpAddress, 6, 0);
}
HRESULT _stdcall myRecv(SOCKET s, char* buf, int len, int flags)
{
ReleaseFunc("Ws2_32.dll", "recv", RecvAddy);
HRESULT hResult = recv(s, buf, len, flags);
HookFunc("Ws2_32.dll", "recv", myRecv, RecvAddy);
return hResult;
}
HRESULT _stdcall mySend(SOCKET s, const char* buf, int len, int flags)
{
ReleaseFunc("Ws2_32.dll", "send", SendAddy);
HRESULT hResult = send(s, buf, len, flags);
HookFunc("Ws2_32.dll", "send", mySend, SendAddy);
return hResult;
}
BOOL APIENTRY DllMain(HINSTANCE hDll, DWORD callReason, LPVOID lpReserved) {
switch ( callReason ) {
case DLL_PROCESS_ATTACH:
MessageBox(0, "Attached.", "", MB_OK | MB_SETFOREGROUND);
HookFunc("Ws2_32.dll", "send", mySend, SendAddy);
HookFunc("Ws2_32.dll", "recv", myRecv, RecvAddy);
break;
case DLL_PROCESS_DETACH:
MessageBox(0, "Detached.", "", MB_OK | MB_SETFOREGROUND);
break;
}
return true;
}
Similar topics
» How do I hook the winsock send, recv, and connect in c#
» Simple Keyboard Hook within a DLL
» C++ Detour Trampoline (send/recv)
» [WIN x64]API Hook[Code overwriting]
» API’s that GameGuard hook
» Simple Keyboard Hook within a DLL
» C++ Detour Trampoline (send/recv)
» [WIN x64]API Hook[Code overwriting]
» API’s that GameGuard hook
1 sayfadaki 1 sayfası
Bu forumun müsaadesi var:
Bu forumdaki mesajlara cevap veremezsiniz
Cuma Ağus. 29, 2014 8:33 am tarafından Hello EMO
» goldenchase.net maden yaparak para kazanma
Cuma Ağus. 29, 2014 8:18 am tarafından Hello EMO
» etichal hacker görsel egitim seti
Çarş. Ağus. 06, 2014 4:57 am tarafından Hello EMO
» KO TBL Source C#
Ptsi Ara. 09, 2013 6:36 am tarafından Hello EMO
» x86 Registers
C.tesi Ağus. 24, 2013 5:02 am tarafından Hello EMO
» [Tutorial] Pegando Address, Pointers de WYD
Çarş. Tem. 10, 2013 7:25 am tarafından Hello EMO
» [Tutorial] Pegando Address, Pointers de CS Metodo²
Çarş. Tem. 10, 2013 7:23 am tarafından Hello EMO
» [Tutorial] Aprendendo basico deASM OLLYDBG
Çarş. Tem. 10, 2013 7:22 am tarafından Hello EMO
» Basic C# DLL injector
Ptsi Tem. 08, 2013 7:48 am tarafından Hello EMO