Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Conquer Online 2 > CO2 Guides & Templates
You last visited: Today at 16:43

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

Advertisement



*HOT* Packet Encryption - Decrypt/ReEncrypt HowTo

Discussion on *HOT* Packet Encryption - Decrypt/ReEncrypt HowTo within the CO2 Guides & Templates forum part of the Conquer Online 2 category.

Reply
 
Old 08/06/2005, 19:31   #61
 
(GAME)Master's Avatar
 
elite*gold: 0
Join Date: Aug 2005
Posts: 568
Received Thanks: 43
Quote:
Originally posted by Lowfyr+Jan 11 2005, 20:12--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td>QUOTE (Lowfyr @ Jan 11 2005, 20:12)</td></tr><tr><td id='QUOTE'> all lvl2 epvp Members quitted playing Conquer Online, so we release our Packet Encryption Guide, I hope it is usefull for all AGH's out there

Urheberrechte und Copyright dieser Guide liegen bei elitepvpers.com

You will not use any information obtained from this guide for malicious purposes.
All information from this guide is for intellectual purposes only, and you are responsible for how you use it.

This guide may only be posted on the elitepvpers network, so if you see it anywhere else, please let me know about it.


Posted on: Nov 8 2004

Contact me for copy & paste permission
DO NOT PM ME, if you want to know how to make hacks with these informations


Update:

<!--QuoteBegin--Ultima

one month after the guide came out they made litle change in the firs packet you recive its now 32 bytes long not 28 like in the guide and for the key you have to start taking the keys now at the 5th position not the 4th thats all they won`t patch anything cause its most likeley to complex and they don`t even make money with conquer only with the dbs so i dont think the ll make anything
Guide zur Conqueronline packet Ver- und Entschlüsselung

Inhalt:

1. Die Schlüssel
a. Allgemein
b. Die beiden ersten Schlüssel
c. Erstellen des 3. und 4. Schlüssels

2. Entschlüsseln von Paketen
a. Die Zähler
b. Das entschlüsseln von Empfangenen Paketen
c. Das entschlüsseln von "vom Client gesendeten Paketen"

3. Das Ver- und Entschlüsseln als Server


Die Schlüssel

Allgemein

Es werden 4 Schlüssel für die Conquer Verschlüsselung benutzt. Eigentlich sind es nur zwei. Diese zwei werden jedoch, nach dem Anmelden am Login Server, durch 2, vom Server gesendete Schlüssel, Verschlüsselt und als neue Schlüssel für die ausgehenden Pakete benutzt. So entstehen 4 Schlüssel.

Die beiden ersten Schlüssel:

1. Schlüssel

Code:
9D 90 83 8A D1 8C E7 F6 25 28 EB 82 99 64 8F 2E
2D 40 D3 FA E1 BC B7 E6 B5 D8 3B F2 A9 94 5F 1E
BD F0 23 6A F1 EC 87 D6 45 88 8B 62 B9 C4 2F 0E
4D A0 73 DA 01 1C 57 C6 D5 38 DB D2 C9 F4 FF FE
DD 50 C3 4A 11 4C 27 B6 65 E8 2B 42 D9 24 CF EE
6D 00 13 BA 21 7C F7 A6 F5 98 7B B2 E9 54 9F DE
FD B0 63 2A 31 AC C7 96 85 48 CB 22 F9 84 6F CE
8D 60 B3 9A 41 DC 97 86 15 F8 1B 92 09 B4 3F BE
1D 10 03 0A 51 0C 67 76 A5 A8 6B 02 19 E4 0F AE
AD C0 53 7A 61 3C 37 66 35 58 BB 72 29 14 DF 9E
3D 70 A3 EA 71 6C 07 56 C5 08 0B E2 39 44 AF 8E
CD 20 F3 5A 81 9C D7 46 55 B8 5B 52 49 74 7F 7E
5D D0 43 CA 91 CC A7 36 E5 68 AB C2 59 A4 4F 6E
ED 80 93 3A A1 FC 77 26 75 18 FB 32 69 D4 1F 5E
7D 30 E3 AA B1 2C 47 16 05 C8 4B A2 79 04 EF 4E
0D E0 33 1A C1 5C 17 06 95 78 9B 12 89 34 BF 3E

2. Schlüssel

Code:
62 4F E8 15 DE EB 04 91 1A C7 E0 4D 16 E3 7C 49
D2 3F D8 85 4E DB F4 01 8A B7 D0 BD 86 D3 6C B9
42 2F C8 F5 BE CB E4 71 FA A7 C0 2D F6 C3 5C 29 
B2 1F B8 65 2E BB D4 E1 6A 97 B0 9D 66 B3 4C 99
22 0F A8 D5 9E AB C4 51 DA 87 A0 0D D6 A3 3C 09
92 FF 98 45 0E 9B B4 C1 4A 77 90 7D 46 93 2C 79
02 EF 88 B5 7E 8B A4 31 BA 67 80 ED B6 83 1C E9
72 DF 78 25 EE 7B 94 A1 2A 57 70 5D 26 73 0C 59
E2 CF 68 95 5E 6B 84 11 9A 47 60 CD 96 63 FC C9
52 BF 58 05 CE 5B 74 81 0A 37 50 3D 06 53 EC 39
C2 AF 48 75 3E 4B 64 F1 7A 27 40 AD 76 43 DC A9
32 9F 38 E5 AE 3B 54 61 EA 17 30 1D E6 33 CC 19
A2 8F 28 55 1E 2B 44 D1 5A 07 20 8D 56 23 BC 89
12 7F 18 C5 8E 1B 34 41 CA F7 10 FD C6 13 AC F9
82 6F 08 35 FE 0B 24 B1 3A E7 00 6D 36 03 9C 69
F2 5F F8 A5 6E FB 14 21 AA D7 F0 DD A6 F3 8C D9

Erstellen des 3. und 4. Schlüssels:

Den dritten und vierten Schlüssel erhält man indem man den ersten und zweiten Schlüssel, mit dem vom Server gesendeten Schlüsseln, Verschlüsselt.
Der Schlüssel dafür ist im ersten Packet das man nach dem Senden des Login Paketes erhält. Also genau das 2. Paket überhaupt.

Das Packet mit dem Schlüssel sieht wie folgt aus:

Code:
*** RECV - size&#58; 28
1C 00 1C 04 2E A6 44 00 F4 48 5C 20 36 34 2E 31 * * . ..¦D.ôH&#092; 64.1
35 31 2E 38 31 2E 32 30 34 00 00 00 * * * * * * * * * * 51.81.204...
Key im Empfangenen packet sind das 11. + 10. + 9. + 8. byte vom start aus.
Hier also: 20 5C 48 F4

Der 2. Key sind das 7. + 6. + 5. + 4. byte im packet.
Hier also: 00 44 A6 2E

Um nun den dritten und vierten Schlüssel zu erhalten muss folgendes getan werden

1. Man addiere Key 1 und 2 205C48F4 + 0044A62E = 20A0EF22
2. XOR Ergebnis aus 1. mit 4321 XOR 20A0EF22, 4321 = 20A0AC03
3. XOR Key 1 mit Ergebnis aus 2. XOR 205C48F4, 20A0AC03 = 00FCE4F7
4. IMUL Ergebnis 3 mit Ergebnis 3 IMUL FCE4F7, FCE4F7 = F9D39310E651
(Logische Multiplikation // Ergebnis nur 4 byte lang also 9310E651)

Um nun den 3. und 4. Schlüssel richtig zu erzeugen muss noch folgendes getan werden
Immer 4 byte des 1. Schlüssels mit dem Ergebnis aus 3. per XOR erzeugen also:

Die ersten 4 byte des 1. Schlüssels (verkehrt herum Original: 9D 90 83 8A):
8A 83 90 9D

Mit dem Ergebnis aus 3.
00 FC E4 F7

Das Ergebnis
8A 7F 74 6A

Das Ergebnis muss auch Falschrum gewertet werden. Also die ersten 4 byte des Schlüssels lauten nun:

6A 74 7F 8A

Das wiederholt man bis das erste Schlüssel komplett umgewandelt ist.

Den 2. Schlüssel muss man nach dem gleichen Muster umwandeln nur mit dem Unterschied das als schlüssel nicht das Ergebnis aus 3. benutzt wird sondern das aus 4.

Die ersten 4 byte des 2. Schlüssels (verkehrt herum Original: 62 4F E8 15):
15 E8 4F 62

Mit dem Ergebnis aus 4.
93 10 E6 51

Das Ergebnis
86 F8 A9 33
Das Ergebnis muss auch Falschrum gewertet werden. Also die ersten 4 byte des Schlüssels lauten nun:

33 A9 F8 86

Nun hat man den 3. und 4. Schlüssel die für das Versenden von Paketen benötigt werden.


Entschlüsseln von Paketen:

Die Zähler

Um die Verschlüsselten Pakete zu entschlüsseln benötigt man die vier 256 byte Schlüssel die ich eben vorgestellt habe.
Um Pakete zu entschlüsseln die man vom Server zugesandt bekommt braucht man den 1. und 2. Schlüssel. Für Pakete die der Client zum Server Sendet benötigt man den 3. und 4. Schlüssel.
Es muss zwischen Login und Spiele Server unterschieden werden. Nicht aber weil die art der Entschlüsselung unterschiedlich ist sondern weil es Insgesamt 4 Zähler gibt. 2 für die Gesendeten Pakete und 2 für die Empfangenen Pakete. Diese 4 Zähler werden zu beginn alle auf 00 gesetzt. Die Pakete werden immer byte weise ver- und entschlüsselt. Nach jedem byte das ver- oder entschlüsselt wird wird der entsprechend erste Zähler um 1 erhöht. Erreicht einer der ersten beiden Zähler FF und wird um 1 erhöht so wird dieser auf 00 gesetzt und der entsprechend 2. Zähler um 1 erhöht. Hat auch dieser den Wert FF und wird erhöht so werden beide Zähler auf 00 gesetzt.
Es gibt für Login und Spiele Server jeweils 4 Zähler.

Wofür man die Zähler eigentlich braucht? Wartet es ab das folgt nun.


Das Entschlüsseln von Empfangenen Paketen

So nun zum verschlüsseln an sich. Es läuft in 4 schritten ab.

Als Beispiel nehmen wir das Login Paket das der Client an den Login Server sendet.

Unverschlüsseltes Paket:
Code:
34 00 1B 04 54 65 73 74 54 65 73 74 00 00 00 00 00 00 00 00 51 15 EE 1B 19 45 2C 6E 5C 01 5C 41 56 25 F6 D7 45 61 67 6C 65 00 00 00 00 00 00 00 00 00 00 00
Verschlüsseltes Paket:
Code:
17 84 04 65 D5 13 C4 A5 9A 59 04 E2 14 CB 75 6F 5F 89 B0 22 86 17 18 52 47 54 FC 44 D2 D4 BD 78 33 D0 D0 56 C6 55 83 26 8F 05 35 AB 16 C1 7F 6D 59 87 BA 20
1. XOR von zu verschlüsselnden byte und dem X-ten byte des schlüssels (x = 1. Zähler)

XOR 34, 9D ---> A9

2. Das Ergebnis von eben wird mit dem N-ten byte des 2. schlüssels per XOR verschlüsselt
(N = 2. Zähler)

XOR A9, 62 ---> CB


3. Das Ergebnis wird nun umgedreht.

CB wird zu BC (CB -> BC)


4. Das Ergebnis von 3. wird nun per XOR mit AB verschlüsselt und fertig.

XOR ESI, 0AB ---> 17

Dies wird nun für das gesamte Paket wiederholt. Nach jedem byte das verschlüsselt wurde wird der erste Zähler erhöht. Nach 256 byte wird der 2. Zähler um 1 erhöht. Nach 65536 byte werden beide Zähler auf Null gesetzt und der Spaß fängt von vorne an. Nach dem Anmelden Am Login Server beginnt das Zählen bei 00 sobald die Kommunikation mit dem Spiele Server beginnt.

Das Entschlüsseln von ?Vom Client Gesendeten Paketen?

Um Pakete die der Client an den Server sendet entschlüsseln zu können muss dasselbe Verfahren angewendet werden wie zum Entschlüsseln von Empfangenen Paketen nur Andersrum.

Also:

1. XOR byte Packet, AB

2. E1 umkehren

3. XOR E2, 62

4. XOR E3, 9D

(E1, E2, E3 = Ergebnis von 1., 2. und 3.)


Ver- und Entschlüsselung als Server

Wenn wir einen Server aufsetzen wollen, müssen wir dieselben Ver- und Entschlüsselungsprozeduren benutzen wie für den Client jedoch jeweils andersrum. Die Schlüssel bleiben alle gleich. Jeder Spieler erhält vom Server einen Individuellen Schlüssel mit dem der Client seine Pakete verschlüsselt ehe er sie an den Server Sendet. [/b][/quote]
could u explain this in english pls
(GAME)Master is offline  
Old 08/06/2005, 19:35   #62
 
elite*gold: 0
Join Date: May 2005
Posts: 4,271
Received Thanks: 81
ich versteh kein wort
Nx² is offline  
Old 08/06/2005, 23:08   #63
 
elite*gold: 0
Join Date: Jul 2004
Posts: 980
Received Thanks: 46
the englisch version of this is just a few posts below this or go ---> <---
Ultima is offline  
Old 08/07/2005, 18:46   #64
 
elite*gold: 0
Join Date: Jul 2005
Posts: 4
Received Thanks: 0
thnx u
lildevils666 is offline  
Old 08/16/2005, 12:39   #65
 
elite*gold: 0
Join Date: Aug 2005
Posts: 20
Received Thanks: 1
umm, yeh sounds interesting but your all forgetting the point. What the hell is the point of making your own server?
i cant really think of one
krazynayba is offline  
Old 08/16/2005, 14:01   #66
 
elite*gold: 0
Join Date: Jul 2004
Posts: 980
Received Thanks: 46
Quote:
Originally posted by krazynayba@Aug 16 2005, 12:39
umm, yeh sounds interesting but your all forgetting the point. What the hell is the point of making your own server?
i cant really think of one
own server so you can play with friends at home on a lan party with lvl 120 chars in you own self made co world

but the main purpose for the packet decryption is to be able to send your own packets without the need for the original co client like the new bjx bot
Ultima is offline  
Old 09/12/2005, 06:22   #67
 
elite*gold: 0
Join Date: Sep 2005
Posts: 14
Received Thanks: 0
yea, can you tell me what is
XOR and that imul thing? I am noob in game hacking, but i am willing ot learn.
nightmarepaladin is offline  
Old 11/16/2005, 17:21   #68
 
elite*gold: 0
Join Date: Jul 2004
Posts: 980
Received Thanks: 46
Quote:
Originally posted by nightmarepaladin@Sep 12 2005, 05:22
yea, can you tell me what is
XOR and that imul thing? I am noob in game hacking, but i am willing ot learn.
XOR = Exclusiv OR

Code:
Table&#58;
0 XOR 0 = 0
0 XOR 1 = 1
1 XOR 0 = 1
1 XOR 1 = 0
imul = multiplication with sign
(so it means out normal mathematical multiplication rules are applyed)

1*1=1
1*(-1)=-1
-1*1=-1
-1*(-1)=1

if its not with sign
(the normal multiplication rules are not applyed)

-1*1=1 instead of -1*1=-1

i posted a asm reference my post is in german but if i remember correct the guide is in english


Ultima is offline  
Old 01/14/2006, 19:11   #69
 
elite*gold: 0
Join Date: Nov 2005
Posts: 119
Received Thanks: 154
2 quick questions:

1) Does this still work with 2.0 (the same keys/methods, etc)

[Edit]
New info:
First Login packet (Client->Server) decrypted so guess it still works...
...now to generate the "Server->Client" key and add a proxy to the new CryptoLib class
[/Edit]

2) Does anyone have a working program to display decrypted info?

Im considering adding a module to the vb.net BotResourcePackage for packet decryption/encryption (proxy).

[Edit]
Following section removed, please ignore:
Im on my way out atm but will do some testing later with Ethereal... if anyone knows for sure about the 2 above questions then please lemme know & it might save me a little work
[/Edit]
Lurker3 is offline  
Old 07/20/2006, 19:46   #70
 
elite*gold: 0
Join Date: Dec 2005
Posts: 28
Received Thanks: 3
Can anyone maybe explain how to find the two fixed keys? I want to try applying this to another game.
jackyyll is offline  
Old 08/02/2006, 15:31   #71
 
elite*gold: 0
Join Date: Dec 2005
Posts: 42
Received Thanks: 0
Quote:
Originally posted by Ultima@Nov 16 2005, 18:21
XOR = Exclusiv OR

Code:
Table&#58;
0 XOR 0 = 0
0 XOR 1 = 1
1 XOR 0 = 1
1 XOR 1 = 0
This part i understood from wikipedia, what i don't get is how to apply it in hex. are we supposed to pass the hex numbers to binary and then aply xor and hex the result?
HFMuRdOc is offline  
Old 08/02/2006, 15:36   #72
 
elite*gold: 0
Join Date: Aug 2004
Posts: 166
Received Thanks: 4
Quote:
Originally posted by HFMuRdOc+Aug 2 2006, 15:31--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td>QUOTE (HFMuRdOc @ Aug 2 2006, 15:31)</td></tr><tr><td id='QUOTE'> <!--QuoteBegin--Ultima@Nov 16 2005, 18:21
XOR = Exclusiv OR

Code:
Table&#58;
0 XOR 0 = 0
0 XOR 1 = 1
1 XOR 0 = 1
1 XOR 1 = 0
This part i understood from wikipedia, what i don't get is how to apply it in hex. are we supposed to pass the hex numbers to binary and then aply xor and hex the result? [/b][/quote]
You can xor the bytes it will do all the work for you so tmpByte(0) XOr tmpByte(1) will work, None of the programming languages I have used have ever had a Type for HEX as its just a numeric anyway. Convert you Hex to Int or byte and perform the xor on that
tester is offline  
Old 08/02/2006, 15:49   #73
 
elite*gold: 0
Join Date: Dec 2005
Posts: 42
Received Thanks: 0
Quote:
Originally posted by tester+Aug 2 2006, 15:36--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td>QUOTE (tester @ Aug 2 2006, 15:36)</td></tr><tr><td id='QUOTE'>
Quote:
Originally posted by -HFMuRdOc@Aug 2 2006, 15:31
<!--QuoteBegin--Ultima
Quote:
@Nov 16 2005, 18:21
XOR = Exclusiv OR

Code:
Table&#58;
0 XOR 0 = 0
0 XOR 1 = 1
1 XOR 0 = 1
1 XOR 1 = 0

This part i understood from wikipedia, what i don't get is how to apply it in hex. are we supposed to pass the hex numbers to binary and then aply xor and hex the result?
You can xor the bytes it will do all the work for you so tmpByte(0) XOr tmpByte(1) will work, None of the programming languages I have used have ever had a Type for HEX as its just a numeric anyway. Convert you Hex to Int or byte and perform the xor on that [/b][/quote]
oh, so u'r actually applying xor using a programming language. i thought u we're doing it manually. Okay, i guess now i can make the keys. Another thing I dont get: this tut explains how to encrypt received packets. aren't they supposed to be encrypted already? :s

"- To decrypt the packets wich you get from the server you need the 1st and the 2nd key."

ok, got everything from here xept this:

"step 4

finally you have to encrypt (XOR) the result from step 3 with AB.

XOR ESI, 0AB ---> 17"

but the result from step 3 is BC not ESI :|
HFMuRdOc is offline  
Old 08/02/2006, 16:33   #74
 
elite*gold: 0
Join Date: Aug 2004
Posts: 166
Received Thanks: 4
they are encrypted already, you could write a proxy that simple relayed the packets from the client - > server and vice versa. The reason for doing all this is so you can intercept the packet modify it and relay it.

You just XOR the result by 171 or AB

so as an example:

myBtye=myBtye XOR Key1(Counter1)
myBtye=myByte XOR Key2(Counter2)
myBtye=ReverseString(ConvertToHex(myByte))
myBtye=myBtye XOR 171
tester is offline  
Old 08/02/2006, 19:32   #75
 
elite*gold: 0
Join Date: Dec 2005
Posts: 42
Received Thanks: 0
so... to decrypt packet:

D3 33 EF AD FB E3 7D 21 7A FB E8 05 A6 EF F4 C9 3F F3 E0 6D FE 77 2C 71 1A 8B 58 D5

i'd have to do:

Code:
11010011 -> D3
10101011 -> AB
= 01111000 -> 78

78 -> 87

10000111 -> 87
01100010 -> 62
= 11100101 -> E5

11100101 -> E5
10011101 -> 9D
= 01111000 -> 78



00110011 -> 33
10101011 -> AB
= 10011000 -> 98

98 -> 89

10001001 -> 89
01100010 -> 62
= 11101011 -> EB

11101011 -> EB
10010000 -> 90
= 01111011 -> 7B
and so forth with the following bytes of keys and code?
HFMuRdOc is offline  
Reply


Similar Threads Similar Threads
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 ;) )



All times are GMT +1. The time now is 16:44.


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.