Ok, first thx for this nice tuto, then sorry for my bad english, i'm french so perhaps i don't see it but can u precise where is store the first and second key ? there is a routine to calculate them too or this key are fixe ?
sorry for noobish question, i'm not at home and i can't disassemble, thx a lot
Originally posted by meow`@Jul 21 2005, 08:38 Ok, first thx for this nice tuto, then sorry for my bad english, i'm french so perhaps i don't see it but can u precise where is store the first and second key ? there is a routine to calculate them too or this key are fixe ?
sorry for noobish question, i'm not at home and i can't disassemble, thx a lot
OK there are two keys that are used by conquer those two of the tutorial!
They are hardcoded don`t know where they are but they are fixed!
thoses keys are used for encryption and decryption but after logging into the server you get 2 keys from it.
with those you make two new keys that are used for communication with the server but only the packets from client to server are encrypted with those
the communication from server to client uses the old first two keys hope that makes thinks clear
Hy all,
first sorry for my bad english, but i'm french, so if u don't understand something please tell me and i'll try to correct my sentences
Ok so, i'm trying to study the protocol and i've got a problem with the second packet i send to the gameserver, so it's the client to the server's packet send after the language packet send.
In my example, the decrypt packet look like:
1C 00 F2 03 3F 5A 11 00 63 22 11 00 00 00 00 00 00 00 00 00 00 00 00 00 89 00 00 00
and the real encrypt packet send is:
74 2D B7 18 07 CE 4E 6F 06 88 04 A4 7B EC D5 EF B4 28 9F 29 FB 6E 5A 64 A7 A5 18 A5
this encrypt packet change on every session, so i think it's the first packet encrypt with the random key3 and key4 we receive.
so i try to generate this 2 new key with the second packet receive.
In my example, the real encrypt packet is:
47 48 AA 12 5A 2D 6B 2E 2D 88 01 CA 52 9F 24 14 F6 7A 08 C0 2A 64 6F 3E 6D 00 E3 2A FA 2D 87 C6
and the decrypt packet is:
20 00 1F 04 35 97 45 00 0D 87 23 09 31 32 37 2E 30 2E 30 2E 31 00 00 00 00 00 00 00 B8 16 00 00
So i extract the two vector like this:
first vector = 12th + 11th + 10th + 9th byte:
31 09 23 87
second vector = 8th + 7th + 6th + 5th byte:
0D 00 45 97
first 4 bytes of my key3:
8A83909D xor 0F0009B8 = 85839925
25998385
first 4 bytes of my key4:
15E84F62 xor 905E7440 = 85B63B22
223BB685
So now, if i apply my 2 new key on the second packet i send to the gameserver, i must find the real encrypt packet..
1C xor 25 = 39
39 xor 22 = 1B
invert 1B = B1
B1 xor AB = 1A
i find "1A" for my first byte, and i want to find "74"...
So perharps i've got a problem with my counter, don't know, i would appreciated if someone can correct my mistake.
SEND:1C 00 1C 04 xx xx xx xx 00 00 00 00 72 65 73 2E 64 61 74 00 00 00 00 00 00 00 00 00 |:ASCII:| ÉD res.dat
[type 4 ] [ key3 ] [ ] [r e s . d a t]
this is the 2nd packet sent to the server
it uses the recv packet encryption (using keys 1 and 2)
but it starts from 0 and the counter is independant from the recv packets counter
so for this packet your counter should be at 52 since the first packet is 52 bytes
yep but no i think we dont talk with the same packet, i have no problem with the res.dat packet, it's the second packet on the gameserver, not on the login server.
my problem is with the packet send just after the english lang packet, and i think i must use the key3 and key4 here.
Originally posted by meow`@Aug 2 2005, 07:15 Hy all,
first sorry for my bad english, but i'm french, so if u don't understand something please tell me and i'll try to correct my sentences
Ok so, i'm trying to study the protocol and i've got a problem with the second packet i send to the gameserver, so it's the client to the server's packet send after the language packet send.
In my example, the decrypt packet look like:
1C 00 F2 03 3F 5A 11 00 63 22 11 00 00 00 00 00 00 00 00 00 00 00 00 00 89 00 00 00
and the real encrypt packet send is:
74 2D B7 18 07 CE 4E 6F 06 88 04 A4 7B EC D5 EF B4 28 9F 29 FB 6E 5A 64 A7 A5 18 A5
this encrypt packet change on every session, so i think it's the first packet encrypt with the random key3 and key4 we receive.
so i try to generate this 2 new key with the second packet receive.
In my example, the real encrypt packet is:
47 48 AA 12 5A 2D 6B 2E 2D 88 01 CA 52 9F 24 14 F6 7A 08 C0 2A 64 6F 3E 6D 00 E3 2A FA 2D 87 C6
and the decrypt packet is:
20 00 1F 04 35 97 45 00 0D 87 23 09 31 32 37 2E 30 2E 30 2E 31 00 00 00 00 00 00 00 B8 16 00 00
So i extract the two vector like this:
first vector = 12th + 11th + 10th + 9th byte:
31 09 23 87
second vector = 8th + 7th + 6th + 5th byte:
0D 00 45 97
first 4 bytes of my key3:
8A83909D xor 0F0009B8 = 85839925
25998385
first 4 bytes of my key4:
15E84F62 xor 905E7440 = 85B63B22
223BB685
So now, if i apply my 2 new key on the second packet i send to the gameserver, i must find the real encrypt packet..
1C xor 25 = 39
39 xor 22 = 1B
invert 1B = B1
B1 xor AB = 1A
i find "1A" for my first byte, and i want to find "74"...
So perharps i've got a problem with my counter, don't know, i would appreciated if someone can correct my mistake.
thx
first thing to say you got the wrong key of the key packet
Quote:
and the decrypt packet is:
20 00 1F 04 35 97 45 00 0D 87 23 09 31 32 37 2E 30 2E 30 2E 31 00 00 00 00 00 00 00 B8 16 00 00
you took
Quote:
So i extract the two vector like this:
first vector = 12th + 11th + 10th + 9th byte:
31 09 23 87
second vector = 8th + 7th + 6th + 5th byte:
0D 00 45 97
hum in the old guide about the old 28 key packet length, the guy say to take the 11th,10th,9th,8th and 7th,6th,5th,4th bytes but in the example, he take the 12th,11th,10th,9th and the 8th,7th,6th,5th bytes.
now like it say, the packet are 32 length and u need to decal this selection, so i just say like the guide i take the 12th,11th,10th,9th and the 8th,7th,6th,5th bytes but in real i take the 13th,12th,11th,10th and 9th,8th,7th,6th, perhaps its a mistake, dont know, i try like u say and i dont find the same packet again..
in the guide he's counting from 0
you should end up with this
but to encrypt the language packet (110 English) you should use key1 and 2 with counters at 0
the first packet send to the gameserver is not encrypted with key 3 and 4 cause in that packet you tell the game server the keys you get from the login server and after that packet key 3 and 4 are used
but after the change from login to gameserver you have to reset the counter thats all
yep yep i have no problem to send the english packet too, and my counter for the key3 and key4 are set to 0.
behelit: i find the same key then u, but dont find the good encrypt packet again like this.
1C xor F3 = EF
EF xor 26 = C9
inv = 9C
9C xor AB = 37
Yes it's ok, thx for ur help ultima and behelit !
So we need to jump the length of the lang packet without use it with this key...
Just a little think, there a mistake in the soft u have use to post the screenshot, the key isn't correct, there some bytes in excess, i think the buffer isn't proper correctly
Originally posted by wondersven+Jan 12 2005, 03:09--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td>QUOTE (wondersven @ Jan 12 2005, 03:09)</td></tr><tr><td id='QUOTE'> <!--QuoteBegin--razorwolf@Jan 12 2005, 04:28 AM
Reverse engineering
ya, I know that.
but what indicates the algorythm? [/b][/quote]
Generally you can start by breakpointing or hooking the winsock send and receive funcs and backtracing the functions called in succession to them using a simple stack check and find the encryption/decryption algorithms this way then reverse into C++ and reproduce the same exact effect that the game does for your own use.
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...
Packet encryption. 06/22/2009 - Shaiya - 2 Replies Not sure if anyone has tried making a proxy yet, other than the one that is stickied (which is injected and I imagine directly hooks the games send function bypassing the need for encryption?).
Anyway, just curious if anyone knows what sort of encryption is being used on packets?
US server for the record.
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
Packet Encryption 02/22/2007 - General Coding - 4 Replies so heute mal nichts zu tun also hab ich mal nach einem opfer ausschau gehalten und stieß dabei auf steam
steam ist wie vermutlich jeder weiß eine online platform zum kaufen und spielen von spielen
einige dinge die ich mir ueberlegt hab:
steam bruter
no-recoil hack fuer cs
ein steam bruter gab es soweit ich weiß noch nicht und koennte sich als sehr nuetzlich erweisen natuerlich sollte er interface unabhaengig sein und rein auf packet basis arbeiten
keke wireshark angeschmissen...
Packet encryption 09/19/2005 - Lineage 2 - 1 Replies Hi,I'm trying to make a simple L2 bot, but i got stuck in begginning - in the packet encryption. I rewrote the l2j login thread sources (those about encryption) but it doesn't work. Has anyone any description of L2 packet encryption. And second question - what Init packet (server packet,nr. 0) means? I guess that it something related with encryption, but in l2j sources that packet content is hardcoded.
Thanks for replies (if any ;) )