Page 1 of 1

Icarus project - need help with encryption

Posted: Fri Apr 17, 2009 9:50 pm
by Illiousten
Hi, a new member here :)

I'm developing an assistant much similar to famous Injection called Icarus. It's crucial for me to unpack and understand packets sent by client. I think there can't be a better place than this to ask for.

In order to keep things simple for a change, I'm using the client 2.0.0x. I'm well aware that this client uses blowfish as its encryption method.

The first two packets: 0x80(login) and 0xA0(server select) my assistant doesn't bother to sniff. In other words I don't have a reason to implement the login crypt thing.

In the second login, my assistant activates both: huffman compression/decompression(for server packets) and blowfish encrypt/decrypt (for client packets).

At this point, client is sending 0x91(Game Server Login) with the following encrypted data:

Code: Select all

149 , 74 , 5 , 81 , 233 , 50 , 77 , 138 , 127 , 204 , 97 , 51 , 110 , 64 , 149 , 52 , 143 , 205 , 0 , 0 , 46 , 212 , 86
, 24 , 6 , 82 , 11 , 218 , 205 , 66 , 150 , 56 , 82 , 238 , 138 , 24 , 7 , 125 , 84 , 219 , 106 , 148 , 11 , 160 , 165 , 60 , 39 , 94 , 161 , 66 , 26 , 43 , 35 , 189 , 204 , 94 , 101 , 67 , 181 , 230 , 154 , 147 , 12 , 1 , 80
65
[code]

Turns out decryption yields the correct following result:

[code]
145 , 127 , 0 , 0 , 1 , 115 , 97 , 100 , 114 , 97 , 113 , 117 , 101 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0
, 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 106 , 101 , 115 , 117 , 115 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ,
0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0

Now here's the problem. For every and each following client packet, blowfish seems not be decrypting them correctly.

This is a 0x00 (Character Creation) packet encrypted:

Code: Select all

226 , 114 , 134 , 74 , 70 , 14 , 170 , 168 , 195 , 14 , 69 , 11 , 51 , 200 , 18 , 203 , 13 , 114 , 167 , 255 , 134 , 237 , 10 , 94 , 153 , 58 , 184 , 155 , 114 , 10 , 255 , 182 , 19 , 112 , 103 , 116 , 237 , 186 , 183 , 182 , 242 , 93 , 115 , 26 , 105 , 65 , 103 , 147 , 75 , 241 , 189 , 143 , 214 , 201 , 4 , 217 , 1 , 206 , 82 , 223 , 192 , 46 , 38 , 67 , 252 , 192 , 26 , 164 , 174 , 25 , 52 , 118 , 122 , 175 , 110 , 120 , 249 , 205 , 0 , 107 , 23 , 226 , 15 , 187 , 172 , 59 , 22 , 198 , 104 , 254 , 25 , 91 , 140 , 189 , 221 , 127 , 244 , 55 , 155 , 146 , 97 , 8 , 161 , 35
Decrypted:

Code: Select all

230 , 71 , 131 , 27 , 174 , 79 , 134 , 70 , 209 , 64 , 157 , 42 , 34 , 153 , 154 , 84 , 171 , 90 , 102 , 210 , 152 , 147 , 204 , 164 , 114 , 190 , 231 , 242 , 131 , 20 , 2 , 118 , 169 , 126 , 49 , 161 , 16 , 145 , 26 , 172 , 37 , 131 , 152 , 137 , 243 , 39 , 141 , 138 , 38 , 13 , 4 , 19 , 29 , 119 , 97 , 11 , 144 , 244 , 153 , 230 , 63 , 254 , 210 , 165 , 236 , 157 , 37 , 76 , 34 , 214 , 138 , 131 , 103 , 187 , 121 , 130 , 50 , 6 , 93 , 88 , 236 , 30 , 7 , 212 , 220 , 86 , 245 , 145 , 136 , 207 , 48 , 48 , 0 , 130 , 97 , 47 , 25 , 190 , 176 , 168 , 200 , 229 , 68 , 34

I'm using UOEncryption library by Necropotency. What I am missing?


thank you all,
Ill