|
You last visited: Today at 13:09
Advertisement
My packet analyzer
Discussion on My packet analyzer within the Kal Online forum part of the MMORPGs category.
05/06/2011, 03:32
|
#1
|
elite*gold: 0
Join Date: Jan 2007
Posts: 76
Received Thanks: 124
|
My packet analyzer
Hey guys. So i made my own little proxy dll for kalonline that outputs the data sent to the send() and recv() functions to a console window. When i was done with it, i tested it out but it's only putting out data from send(). My guess would be that it's using a different function to receive data (WSArecv, recvfrom), but when i checked those functions they were never called. Anybody know something i don't?
Also, in the screenshot below, i put in a bogus username and password and expected to see them in the console's send() output, but i just get a bunch of garbage. Is the data encoded or encrypted or something?
|
|
|
05/06/2011, 11:53
|
#2
|
elite*gold: 0
Join Date: Dec 2010
Posts: 1,196
Received Thanks: 682
|
of course are the packets crypted
|
|
|
05/06/2011, 11:58
|
#3
|
elite*gold: 220
Join Date: Jun 2007
Posts: 3,768
Received Thanks: 1,126
|
jeah encryptet, use bakabug source. For int its the same, u only need to copy the new encrypt/decrypt table out of engine =P
|
|
|
05/06/2011, 11:59
|
#4
|
elite*gold: 0
Join Date: Jul 2008
Posts: 78
Received Thanks: 10
|
I dont know, there might be a problem with you're script because it workis fine with me. i send & recv packets quite well. the only problem with me is that the packets are encrypted so there i cant use them for anything.
What language did you use ?
|
|
|
05/06/2011, 12:06
|
#5
|
elite*gold: 0
Join Date: Jun 2006
Posts: 1,203
Received Thanks: 366
|
c++
|
|
|
05/06/2011, 15:15
|
#6
|
elite*gold: 0
Join Date: Jan 2007
Posts: 76
Received Thanks: 124
|
I made it in c++. Here's the code snippet
Code:
/* This is the "original" call to recv in my proxy dll.
extern "C" __declspec(naked) void __stdcall __E__109__()
{
__asm
{
jmp p[109*4];
}
}
*/
extern "C" int __stdcall __E__109__(SOCKET socket, char* buff, int len, int flags)
{
unsigned char* buffer = (unsigned char*) buff;
char s[512];
WriteToConsole("recv: "); // Just writes output to console window
if(len > 512)
len = 512;
for(int i = 0; i < len; i++)
{
sprintf(s, "%.2X", buffer[i]);
WriteToConsole(s);
}
WriteToConsole("\n");
for(int i = 0; i < len; i++)
{
if(buffer[i] < 0x20 && buffer[i] != '\r' && buffer[i] != '\n' && buffer[i] != '\t')
sprintf(s, ".");
else
sprintf(s, "%c", buffer[i]);
WriteToConsole(s);
}
WriteToConsole("\n\n");
// call original recv
typedef int (__stdcall *pS)(SOCKET,char*,int,int);
pS pps = (pS)p[109];
int rv = pps(socket, buff, len, flags);
return rv;
}
|
|
|
05/06/2011, 15:44
|
#7
|
elite*gold: 0
Join Date: Jun 2006
Posts: 1,203
Received Thanks: 366
|
This have to be on the start of your function.
int rv = pps(socket, buff, len, flags);
e.g.
Code:
extern "C" int __stdcall __E__109__(SOCKET socket, char* buff, int len, int flags)
{
typedef int (__stdcall *pS)(SOCKET,char*,int,int);
pS pps = (pS)p[109];
int rv = pps(socket, buff, len, flags);
unsigned char* buffer = (unsigned char*) buff;
|
|
|
05/08/2011, 02:52
|
#8
|
elite*gold: 0
Join Date: Jan 2007
Posts: 76
Received Thanks: 124
|
Quote:
Originally Posted by strik3r2k5
This have to be on the start of your function.
int rv = pps(socket, buff, len, flags);
e.g.
...
|
Thanks for your input, but i don't think moving the real function call to the beginning of my function would change anything.
I ran the engine in ollydbg with my dll loaded and set a breakpoint on every type of recv function there is for winsock2, turns out the game uses WSArecv.
Still, thanks to everyone who replied, i much appreciate it ^_^
Edit:
It works beautifully ^_^
Now to decrypt those packets...
|
|
|
05/08/2011, 19:40
|
#9
|
elite*gold: 0
Join Date: Dec 2010
Posts: 1,196
Received Thanks: 682
|
why dont you use the ms detours lib?
makes it much easieer to detour functions.
if you want to decrypt the packets it is much easier to hook the recv function after the engine has decrypted the packets.
if you want to decrypt it by hand there is a function by bakabug who has done this a while ago.
but why would you go the hard way?
|
|
|
05/08/2011, 20:41
|
#10
|
elite*gold: 55
Join Date: Mar 2006
Posts: 4,582
Received Thanks: 1,539
|
Quote:
Originally Posted by RunzelEier
why dont you use the ms detours lib?
makes it much easieer to detour functions.
if you want to decrypt the packets it is much easier to hook the recv function after the engine has decrypted the packets.
if you want to decrypt it by hand there is a function by bakabug who has done this a while ago.
but why would you go the hard way?
|
why would u go the **** way without de/encrypt?
|
|
|
05/09/2011, 08:49
|
#11
|
elite*gold: 0
Join Date: Jan 2007
Posts: 76
Received Thanks: 124
|
Well, i'm still looking for the function that encrypts/decrypts packets. Not only do i need it to analyze packets, i'll need the the ability to encrypt and decrypt packets so that i can make a packet bot.
What i've done so far is follow the buffer passed to WSARecv and set a memory breakpoint on the first byte of the buffer upon access. So far, it seems that the buffer is copied into a second buffer and the decryption is done there.
Edit:
By the way, i can't seem to find this en/decryptor that people keep mentioning.
|
|
|
05/09/2011, 11:44
|
#12
|
elite*gold: 220
Join Date: Jun 2007
Posts: 3,768
Received Thanks: 1,126
|
Hm, u just need to follow the send func or the recv where its decryptet, if u jump some address backwards from send with breakpoints u should get here
the beginning looks like
PUSH EBP
SUP BLAH
MOV ESB,0x14
or so
And in the call from decrypt/encrypt is the table
But as i said u didnt need to decrypt it by urself, Bakabug released Source for decrypt&encrypt.
|
|
|
05/10/2011, 08:15
|
#13
|
elite*gold: 0
Join Date: Jan 2007
Posts: 76
Received Thanks: 124
|
Thanks for the tip. I've searched for bakabug's source both on epvp and google, but all the links i have found 404 on me.
|
|
|
05/10/2011, 17:14
|
#14
|
elite*gold: 55
Join Date: Mar 2006
Posts: 4,582
Received Thanks: 1,539
|
|
|
|
05/10/2011, 17:48
|
#15
|
elite*gold: 0
Join Date: Dec 2010
Posts: 1,196
Received Thanks: 682
|
bloodx und das ist jetzt eine bessere methode, als sie die packets von kal entschlüsseln zu lassen?
|
|
|
 |
|
Similar Threads
|
[Source] Sro Packet Analyzer Using NuConnecter [VB6]
03/22/2013 - SRO Hacks, Bots, Cheats & Exploits - 10 Replies
Here i am releasing my sourcecode to my sro packet Analyzer ... this is what i use on a day to day base's to find opcodes and packets for my bot... have fun with it works well.. this has every call in it you would need to write your own packet based bot.. ....
|
ARENA ANALYZER
02/25/2012 - Atlantica Online - 7 Replies
REQUEST ARENA ANALYZER FOR ATLANTICA ONLINE INDONESIA WORK GUYS.;)
Please give me information betting arena.:D
|
Network Analyzer
07/07/2010 - Coding Releases - 2 Replies
Analyzes WLAN, LAN,WAN
Traffic IN / OUT going
PortScans
Trace
#UPX Packed C# EXE for scurity :)
#XOR Crypted by FlyCrypter (Public)
|
How i can do an acc for Query Analyzer?
05/06/2010 - Dekaron Private Server - 2 Replies
At the video i can`t see how TOMIK did an account.Please do a video or write the steps what i must do.
*******************Thank you for reading************************
:handsdown::handsdown::handsdown::handsdown: :handsdown: :handsdown: :handsdown: :handsdown: :handsdown: :handsdown: :handsdown: :handsdown: :handsdown: :handsdown: :handsdown:
|
Packet Analyzer
07/08/2006 - Conquer Online 2 - 11 Replies
Wondering if theres any working packet analyzer/sender avaliable since latest patch
*edit: made it bigger so some dumbasses dont start with the "search thing".
|
All times are GMT +1. The time now is 13:13.
|
|