Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Kal Online
You last visited: Today at 23:58

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

Advertisement



[Question] Sending data

Discussion on [Question] Sending data 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] Sending data

I have 2 questions.

I know that packets are encrypted. I found address of send in engine, not ws2 send but engineSend func that takes data before it's encrypted.

I am able to use it but i can't hook it because of memory manipulation detection. Mid function hook doesn't work also, so i guess there has to be somekind of checksum of memory part.

I hooked IAT send function, but sniffed sent data is encrypted. I know that I am sending packets to server because when I use engineSend then I see sniffed packets client->server, but they are always different so they has to be encrypted.

Code:
typedef int (__stdcall *Send_org)(DWORD type,LPCSTR szFormat,...);

DWORD dwEngineSendA = CMemory::dwFindPattern(0x401000,0x2bc000,(BYTE*)"\x55\x8B\xEC\x83\xEC\x18\x83\x3D\x00\x00\x00\x00\x00\x00\x00\x33\xC0","xxxxxxxx???????xx");
	sendAdd = CMemory::dwFindPattern(dwEngineSendA+1,0x2bc000,(BYTE*)"\x55\x8B\xEC\x83\xEC\x18\x83\x3D\x00\x00\x00\x00\x00\x00\x00\x33\xC0","xxxxxxxx???????xx");
	LogTextBox("[Send Address]: 0x%x",sendAdd);

void KalTools::SendEngine(DWORD Header,LPCSTR szFormat,...)
{
	((Send_org)sendAdd)(Header,szFormat);
}
This is how I'm finding the address and SendEngine is just using their function.

When i for example write

Code:
KalTools::SendEngine(0x3d,"db",pid,14);
I see in sniffer that it was sent but nothing happens in game. Am i doing something wrong?
iszoPL is offline  
Old 02/25/2013, 15:59   #2




 
bloodx's Avatar
 
elite*gold: 55
Join Date: Mar 2006
Posts: 4,582
Received Thanks: 1,537
u need to decrypt the packets also.
upload unpacked engine for me and I give u encrypt + decrypt call + table

the key u get from 0x2a packet also.

position 7 or smth

and Send is no __stdcall its __cdecl

+ u also dont pass the last " ... " parameter to the send function, so what he should do ?
bloodx is offline  
Old 02/25/2013, 16:13   #3
 
meak1's Avatar
 
elite*gold: 220
Join Date: Jun 2007
Posts: 3,768
Received Thanks: 1,126
the Whole engine.exe is checked by HS

Decrypt packets or just use the Send function, u didnt need any hook there... Just use the func for sending them ;d
meak1 is offline  
Old 02/25/2013, 16:21   #4
 
elite*gold: 0
Join Date: Nov 2007
Posts: 35
Received Thanks: 0
I changed calling convention to cdecl already. I've noticed it after posting ;p.

@meak
I am using their send function. I just got address and sendEngine is executing it as u can see. I can't hook it because of hs. I only hooked send function at IAT but it's send from ws2_32 so packets intercepted in there are encrypted already.

What about last parameter? I think I am blind cuz i don't see any error ;p

I attached my dumped engine.exe. Tell me if it's ok
Attached Files
File Type: zip engine.zip (3.66 MB, 18 views)
iszoPL is offline  
Old 02/25/2013, 16:23   #5
 
meak1's Avatar
 
elite*gold: 220
Join Date: Jun 2007
Posts: 3,768
Received Thanks: 1,126
AS I SAID, NOT HOOK IT, ONLY USE IT........................................

GET RECV PACKET, ANSWER WITH CALL SEND, NOT HOOK IT... -.-#

Edit: or for what u wanna hook Send?
meak1 is offline  
Old 02/25/2013, 16:27   #6
 
elite*gold: 0
Join Date: Nov 2007
Posts: 35
Received Thanks: 0
I can hook IAT send. How can i answer to that if it needs socket,buf,len,flags.
It's easier to use engineSend than ws2 send. I'd have to crypt packet first in order to use IAT hooked send.

I didn't hook send in engine. I just have address and i'm trying to use it.

Btw. If i try to call

Code:
((Send_org)sendAdd)(Header,szFormat,...);
It gives me an error and I don't really know why because typedef is ok.
iszoPL is offline  
Old 02/25/2013, 16:30   #7
 
meak1's Avatar
 
elite*gold: 220
Join Date: Jun 2007
Posts: 3,768
Received Thanks: 1,126
i didnt said any other method, its puplic how to send over engineFunc

PHP Code:
DWORD SendPacketMain_ SearchPattern("55 8B EC 83 EC 18 83 3D x x x x 00 74 07 33 C0 E9 x x x x 8A 45 08",0x00400000,0x007FFFFF);
DWORD SendPacketMain  SearchPattern("55 8B EC 83 EC 18 83 3D x x x x 00 74 07 33 C0 E9 x x x x 8A 45 08",SendPacketMain_+1,0x007FFFFF);
DWORD SendPacketBack  SendPacketMain 0x06;

int Naked PacketSend(DWORD type,LPCSTR format,...)
{

    
__asm
    
{
        
push ebp
        mov ebp
esp
        sub esp
,18h
        jmp SendPacketBack
    
}
}

PacketSend(0x0D,"bbd",1,1,TargetID); <- behead 
meak1 is offline  
Old 02/25/2013, 16:37   #8
 
elite*gold: 0
Join Date: Nov 2007
Posts: 35
Received Thanks: 0
Yes i know this example. But in order for this to work you need to place JMP over first 5 bytes of this func to ur function right? And if I try that hs detects memory corruption.

Edit.

@blood

I've changed it so it's passing va_list args but it is still not working

Code:
void KalTools::SendEngine(DWORD Header,LPCSTR szFormat,...)
{
    va_list args;
    va_start(args, szFormat);
    ((Send_org)sendAdd)(Header,szFormat,args);
    va_end(args);
}
What's the easiest way of checking it. I mean what packet can I use to check. Maybe my problem is with trying to use it ;p
iszoPL is offline  
Old 02/25/2013, 16:50   #9
 
meak1's Avatar
 
elite*gold: 220
Join Date: Jun 2007
Posts: 3,768
Received Thanks: 1,126
U DONT UNDERSTAND?
NOT HOOK IT JUST USE IT, THIS IS UR FUNCTION AND THIS JUMP BACK TO ENGINE, ENGINE DIDNT NEED TO JUMP TO UR FUNCTION -.-.................................................. .................................................

Said it now 5 times, if u dont get it, its ur problem.

U Just call the function, engine didnt need to jmp to ur function...
meak1 is offline  
Thanks
1 User
Old 02/25/2013, 16:59   #10
 
elite*gold: 0
Join Date: Nov 2007
Posts: 35
Received Thanks: 0
oh... i get it know. This kind of programming is new for me so don't be angry if i don't undestand how sometimes some things works.
iszoPL is offline  
Old 02/25/2013, 17:01   #11
 
meak1's Avatar
 
elite*gold: 220
Join Date: Jun 2007
Posts: 3,768
Received Thanks: 1,126
np, i like to rage ;D

U use the function from Engine, u call ur function with ur Paramaters and then the Function jumps to the Engine Send, the engine Send crypt ur Packet and send it..
meak1 is offline  
Thanks
1 User
Old 02/25/2013, 17:10   #12
 
elite*gold: 0
Join Date: Nov 2007
Posts: 35
Received Thanks: 0
Ye so pretty much my engineSend did the same thing but it was calling directly their function and passing parameters. Anyway is this sit packet ok? I want to check if it works

send(0x1F,"b",1);
iszoPL is offline  
Old 02/25/2013, 17:26   #13




 
bloodx's Avatar
 
elite*gold: 55
Join Date: Mar 2006
Posts: 4,582
Received Thanks: 1,537
static int (__cdecl* SendPacket)(DWORD,LPCSTR,...) = (int (__cdecl*)(DWORD,LPCSTR,...))0x005A0100;

u can do this ,too and than just use SendPacket(......);

if u want to sniff packets hook send from ws2 and decrypt packets there.

005A01F3 there should be the Encrypt call and @0073AEE0 should be Encrypt Table
bloodx is offline  
Thanks
1 User
Old 02/25/2013, 18:11   #14
 
RunzelEier's Avatar
 
elite*gold: 0
Join Date: Dec 2010
Posts: 1,196
Received Thanks: 682
Quote:
Originally Posted by meak1 View Post
PHP Code:
DWORD SendPacketMain_ SearchPattern("55 8B EC 83 EC 18 83 3D x x x x 00 74 07 33 C0 E9 x x x x 8A 45 08",0x00400000,0x007FFFFF);
DWORD SendPacketMain  SearchPattern("55 8B EC 83 EC 18 83 3D x x x x 00 74 07 33 C0 E9 x x x x 8A 45 08",SendPacketMain_+1,0x007FFFFF);
DWORD SendPacketBack  SendPacketMain 0x06;

int Naked PacketSend(DWORD type,LPCSTR format,...)
{

    
__asm
    
{
        
push ebp
        mov ebp
esp
        sub esp
,18h
        jmp SendPacketBack
    
}

so you add 6 Bytes to SendPacketMain
so you can reconstruct those 6 Bytes and jump to SendPacketBack.
This is one big NOP
why dont you call SendPacketMain directly?
RunzelEier is offline  
Old 02/25/2013, 20:17   #15
 
elite*gold: 0
Join Date: Nov 2007
Posts: 35
Received Thanks: 0
Thanks blood

I changed my send to

Code:
void KalTools::SendEngine(DWORD Header,LPCSTR szFormat,...)
{
    va_list args;
    va_start(args, szFormat);
    ((Send_org)sendAdd)(Header,szFormat,args);
    va_end(args);
}
so it should now pass all data to func But ur way is also great. Good trick xD
Ye i found this encrypt func and ida pseudocode looks like bakabug's one so i guess it is it ;p Encrypt table is pretty big oO. Well i guess i can use pointer to it and use the one from engine directly.

And about that packet sending. I am hooked already to IAT send so i can sniff sent data. Now i have to decrypt them in order to learn more. Are some packets changed now because this sit packet

0x1f,"b",1 is not working I can see that it was sent, because sniffed functions shows it but nothing happens.
iszoPL is offline  
Reply


Similar Threads Similar Threads
[Question] Sending Money with onebip
05/17/2013 - DarkOrbit - 1 Replies
Hi every body! I need help, i have one bip acc and need to send money on my friends acc, but dont know how... i know, but it's write that can not be send because it is not supported in my country... i tried using proxy but its write again same... What do to? All Best
Question about sending packets with usigned variables
12/28/2010 - CO2 Programming - 6 Replies
Ok so I started making a proxy in java and Have got up to receiving the password seed. But I've run into a problem java doesn't have unsigned variables so I had to edit the auth cryption to use short values. I can get the password seed perfectly its just forwarding it to the client I'm not sure how to do because the socket doesn't send a short array. I try sending the origional byte array but got no response from the client. If anyone can give me some pointers on how to do this I would...
[Question]Sending packets
10/28/2010 - RF Online - 3 Replies
I'm working on a hack involving sending packets back to the server, but every time i try and set a packet back, it cuts me of. I get disconnected when I try to send a packet. Can someone enlighten me to why is this happening and how can I avoid it? Thanks. P.S. Don't go posting in my thread saying im a noob and shit. I ask cos I wanna learn. At least I do it on my own and not beg for hacks and cheats.
[Question] Sending job info to server.
08/18/2009 - CO2 Private Server - 2 Replies
Hey, Using hybrid's rev 3: case "@job": { byte NewJob = byte.Parse(args); Client.Job = NewJob; Client.Send(PacketBuilder.CharacterInfo(Client)); break;
question packet sending
07/14/2008 - Dekaron - 22 Replies
Where can I find tut about packet sending I wish to learn about it.



All times are GMT +2. The time now is 23:58.


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.