|
You last visited: Today at 13:22
Advertisement
Packet MsgTick (1012) and its encryption
Discussion on Packet MsgTick (1012) and its encryption within the CO2 PServer Guides & Releases forum part of the CO2 Private Server category.
01/20/2015, 16:17
|
#1
|
elite*gold: 0
Join Date: Aug 2014
Posts: 22
Received Thanks: 6
|
Packet MsgTick (1012) and its encryption
Hello,
the encryption of packet ,it's very simple.
from server to client.
there's no encryption it's some junks only
PHP Code:
Byte Length = 44 (ushort)36 (ushort)1012 (int)timegettime (uint)UIDPlayer (uint)0 byte[16] Random Numbers (uint)0
from client to server there's encryption and some junks
PHP Code:
Byte Length = 44 (ushort)36 (ushort)1012 (uint)timegettime (uint)UIDPlayer (uint)(timegettime ^ UIDPlayer) byte[16] Random Numbers (int)if (lengthofname < 4) {return -1656006909} else {return NamePlayerBytes[0] ^ 0x23 + (NamePlayerBytes[1] ^ 0x98) << 8}
The importance of packet depends on your used of it  .
Done  .
|
|
|
01/20/2015, 16:28
|
#2
|
elite*gold: 0
Join Date: Mar 2013
Posts: 87
Received Thanks: 6
|
Wow Good Thread bro
|
|
|
01/20/2015, 17:56
|
#3
|
elite*gold: 0
Join Date: Jul 2014
Posts: 2
Received Thanks: 0
|
thank you ♥
|
|
|
01/20/2015, 18:44
|
#4
|
elite*gold: 0
Join Date: Dec 2011
Posts: 35
Received Thanks: 1
|
Awesome Thread Thx
|
|
|
01/20/2015, 23:57
|
#5
|
elite*gold: 20
Join Date: Jan 2008
Posts: 2,012
Received Thanks: 2,885
|
this isn't true at all, unless it's changed you could compute the "expected" junk and thus this packet could be used to test for forgery/stand alone bots which is what it was originally used for
|
|
|
01/21/2015, 07:23
|
#6
|
elite*gold: 0
Join Date: Aug 2014
Posts: 22
Received Thanks: 6
|
InfamousNoone
see that pics.
|
|
|
01/22/2015, 01:24
|
#7
|
elite*gold: 20
Join Date: Jan 2008
Posts: 2,012
Received Thanks: 2,885
|
RandGet (the function being called there) is previously seeded to this packets creation with timeGetTime(), so, like I stated you could test for predictability, given you tested +1/-1 tgt.
|
|
|
01/22/2015, 04:00
|
#8
|
elite*gold: 0
Join Date: Aug 2010
Posts: 992
Received Thanks: 1,110
|
Quote:
Originally Posted by InfamousNoone
RandGet (the function being called there) is previously seeded to this packets creation with timeGetTime(), so, like I stated you could test for predictability, given you tested +1/-1 tgt.
|
Actually it is not seeded at all.
Here is the actual function
PHP Code:
00656EC8 CMP DWORD PTR SS:[ARG.1],0 00656ECD JNE SHORT 00656ED2 00656ECF XOR EAX,EAX 00656ED1 RETN //ARG 2 is 0 so it naturally jumps to //00656EE6 ignoring timeGetTime and srand. 00656ED2 CMP DWORD PTR SS:[ARG.2],0 00656ED7 JE SHORT 00656EE6 00656ED9 CALL <JMP.&WINMM.timeGetTime> 00656EDE PUSH EAX 00656EDF CALL DWORD PTR DS:[<&MSVCR90.srand>] 00656EE5 POP ECX 00656EE6 CALL DWORD PTR DS:[<&MSVCR90.rand>] 00656EEC CDQ 00656EED IDIV DWORD PTR SS:[ARG.1] 00656EF1 MOV EAX,EDX 00656EF3 RETN
However he is just copying what he sees in that little window and has no clue what goes on at run time so don't waste your time.
On a second thought lets waste my time too  .
Here is how the client responds.
PHP Code:
TQPacket Packet(1012, 36); WriteUInt32(timeGetTime(), 4); WriteUInt32(UID, 8); WriteUInt32(UID ^ timeGetTime(), 12); WriteUInt32(Name.length() > 4 ? ((Name[1] ^ 0x98) << 0x8) + (Name[0] ^ 0x23) : 0x9D4B5703, 32);
for (byte i = 16; i < 32; i += 4) { int RAND = 0; __asm { PUSH 0xFFFF; CALL rand; CDQ; IDIV DWORD PTR SS:[ESP];//0xFFFF MOV RAND, EDX; SHL RAND, 0x10; CALL rand; CDQ; IDIV DWORD PTR SS:[ESP];//0xFFFF ADD RAND, EDX; ADD ESP, 0x4; } WriteUInt32(RAND, i); }
To sum it all up its just ((rand / 0xFFFF) << 0x10) + (rand / 0xFFFF).
|
|
|
01/23/2015, 14:12
|
#9
|
elite*gold: 0
Join Date: Aug 2014
Posts: 22
Received Thanks: 6
|
there's no seed.
if you see the pics you will see sub_656EC8(0xFFFF,0)
0 is mean false
then it ignore timegettime to be its rand seed.
anyway it's stupid packet  .
but i use it in private server for other things  .
|
|
|
01/26/2015, 22:55
|
#10
|
elite*gold: 20
Join Date: Jan 2008
Posts: 2,012
Received Thanks: 2,885
|
ya you're right i dont know why but i thought i recalled an srand being there back when i looked into it a very long time ago, haha
|
|
|
 |
Similar Threads
|
kal int packet encryption
11/20/2014 - Kal Online - 5 Replies
hi,
Im trying to find out how the data of the packets are encrypted. I wasted many hours on reverse engineering already(since Im totally unexperienced and new into asm).
I also tried to download the engine source, but all links are dead. can someone reupload the engine or give me some tips/references to go on.
my goal is to rewrite the encryption/decryption in c# or c++.
I appreciate any help.
edit: is the packet encryption algorithm/key still the same like in old days, or did it...
|
Packet encryption
02/20/2013 - DarkOrbit - 37 Replies
Hi guys, i know that some of you know the packet encryption mechanism used by DarkOrbit, so I was wondering if you might share it.
I am trying to figure it out but with no luck whatsoever :/ ...
I know that they use RC4 to encrypt their data, but i can't find the key. I have an idea, that they are sending the key over the connection, where the unique ID = 9098 , but i am not sure. the code decrypted by SWF Decompiler is so hard to understand ...
Any ideas here?
Thanks.
|
BOI Packet Encryption
09/28/2011 - Battle of the Immortals - 13 Replies
I've made some research about the packet encryption used in this game and I thought I'd share them.
BOI uses a simple XOR-Algorithm. Each byte of a packet is being XORed with the value of the previous byte. The first byte of every packet indicates its length. Furthermore the first byte of the very first packet sent after the connection was established is being XORed with the value 0xCD.
Example:
Let's say the client sends this packet right after connecting to the server.
0x06 0xA7 0x57...
|
Help with Packet Encryption?
04/16/2009 - General Coding - 9 Replies
can someone help with these packets? im completely lost lol.i typed in A,B,ABC aand recorded the 3 packets
A
2C 35 52 66 BF 66 15 E1 2C 3A D6 AD E3 29 82 A9 BC C5 EE F5 90 A9 1A 71 0C CD 06 3D FC 3A F6 5C A7 A1 4C 30 63 CD 03 AE 12 A6 20 88 1E C0 E8 95 19 F3 3D A7 42 3A 09 22
B
A7 9E F9 6D D4 5D 9E 6A F7 81 0D D6 B8 22 D9 52 57 8E E5 9E 9B 92 31 9A 97 F6 DD 46 A7 11 ED A7 6C 8A E7 7B 08 F6 48 65 09 EE C8 80 76 78 00 1D 81 8B 85 BF 79 F2 D1 BA
|
All times are GMT +1. The time now is 13:22.
|
|