Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Kal Online
You last visited: Today at 15:30

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

Advertisement



[Question] Recv hook

Discussion on [Question] Recv hook within the Kal Online forum part of the MMORPGs category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Nov 2007
Posts: 35
Received Thanks: 0
[Question] Recv hook

I'm having a bit weird problem with that. I've managed to hook recv function directly in winsock dll and i can sniff the data being exchanged between client and server. I guess that they are encrypted because i didn't hook recv in engine exactly but in dll.

In main thread:
Code:
RealRecv = (RecvPtr)GetProcAddress(GetModuleHandle(L"ws2_32.dll"), "recv");
RealRecv = (RecvPtr)Detour((BYTE*)RealRecv, (BYTE*)&OurRecv, 5);
OurRecv func:
Code:
INT WINAPI OurRecv(SOCKET sock, CHAR* buf, INT len, INT flags)
{
	cout << "Received: ";
	for(int i=0;i<strlen(buf);i++)
		cout <<  hex << static_cast<WORD>(buf[i]) << ' ';
	cout << '\n';
	return RealRecv(sock, buf, len, flags);
}
This works and i'm getting sniffed data but only for a while. After minute or so it just stops receiving data. My guess was that maybe it somehow maganed to unhook function so i was checking if some func addresses changed but it wasn't it. Trying to hook again also doesn't work. The wird think is that hook on send function seems to be working all the time.

So is the game using some alternative function to recv data? Even that i know asm i don't know how to use olly so it can be useful. Tried to set a bp on loadlibrary in engine so i can look when ehsvc.dll is loaded or doing the same with recv but i guess i was doing something wrong because i failed

Any idea how to solve the problem?
iszoPL is offline  
Old 01/10/2013, 17:31   #2
 
meak1's Avatar
 
elite*gold: 220
Join Date: Jun 2007
Posts: 3,768
Received Thanks: 1,126
First 5 bytes get proofed...

Just place ur hook after those 5 bytes and GJ ;D
meak1 is offline  
Old 01/10/2013, 17:50   #3
 
elite*gold: 0
Join Date: Nov 2007
Posts: 35
Received Thanks: 0
I don't know if i understood. U are saying that address of my hook func got proofed so it's no longer called? If I for example make OurRecv2 and detour original func again with the new one it will work right?
iszoPL is offline  
Old 01/10/2013, 18:02   #4
 
meak1's Avatar
 
elite*gold: 220
Join Date: Jun 2007
Posts: 3,768
Received Thanks: 1,126
Hackshield proof if Recv is hooked by another programm....

So just hook after 5 bytes to bypass it?
meak1 is offline  
Reply


Similar Threads Similar Threads
[C++]Hook all Recv function Problem
08/21/2010 - C/C++ - 5 Replies
Hi Leute wenn ich send hooke egal welches läuft das alles super nur wenn ich irgendein recv hooke habe ich immer eine Packet size von 1000 bis 10000. sry das ich schon wieder nerve #include "WinSock2.h" #include <cstdio> #include <ctime> #include <fstream> #include <iomanip>
[Help]HackShield detected send,recv hook c++
08/17/2010 - C/C++ - 6 Replies
Entschuldigung für noch einen Thread am selben Tag aber das passt glaub ich nicht wirklich in das andere deswegen eröffne ich einen neuen. Wenn ich die Winsock send recv hooke detected das Hackshield nach ca. 2 minuten einen hack kann man das Bypassen ? Und wenn ja,wie sollte ich anfangen. Würde mich freuen auf eine Antwort. Mit freundlichen Grüßen :)
[Question] Hp and Mana Pointer / Recv
10/22/2009 - Kal Online - 5 Replies
Hey could anyone tell me what's the hp pointer and mana pointer on private servers? If i search myself my PC crashes How can i see what's inside the Recv packets(what type/number) Thanks
[help] recv
08/02/2009 - Kal Online - 3 Replies
Soo, man man behinderter tag. naja wayne. bin grad dabei mich etwas mehr mit den recv packets außeinander zu setzen. unter anderem mit den zahlen dahinter. Borsti sagte das ist die größe (size) naja also ich hab mir das mal als hex ausgeben lassen (das packet für empfangene nachrichten im chat ) ich hab mir das folgendermaßen "notiziert" 0c 00 3c //size 44 65 6e 4a 61 73//name
[Question] Hooking send() & recv() works, but recv hiding data for co???
05/06/2009 - CO2 Programming - 2 Replies
Hey guys, I've been making a DLL to allow another program to intercept the packets of conquer using windows pipes. (Then its the job of the main program to decrypt the packets, the DLL only gives a communication channel for the main program) (winsock functions btw) - hooking send() works fine for my internet browser - hooking recv() works fine for my internet browser - hooking send() works fine for conquer online



All times are GMT +1. The time now is 15:30.


Powered by vBulletin®
Copyright ©2000 - 2026, 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 ©2026 elitepvpers All Rights Reserved.