• Welcome to Valhalla Legends Archive.
 

warden key generation

Started by aton, July 17, 2008, 06:34 PM

Previous topic - Next topic

aton

iago, on your wiki you have the source in c for the key generation, but you reference two header files:
#include "Warden_SHA1.h"
#include "Warden_random.h"


i cannot find those anywhere on the wiki...

Barabajagal

Read through the Rudimentary Warden information topic. I've posted full source code for handling warden in vb6, which you can probably convert to whatever you need.

aton

has nobody converted this to c yet? i'd be thankful for saving me the time...

Dale

Quote from: aton on July 17, 2008, 07:07 PM
has nobody converted this to c yet? i'd be thankful for saving me the time...

It was originally written in C...

iago

Quote from: aton on July 17, 2008, 06:34 PM
iago, on your wiki you have the source in c for the key generation, but you reference two header files:
#include "Warden_SHA1.h"
#include "Warden_random.h"


i cannot find those anywhere on the wiki...
The code for them is in the Crypto and Hashing page. They aren't named that, and they aren't put in handy .h files, but the code itself should work.

Quote from: Dale on July 17, 2008, 07:11 PM
Quote from: aton on July 17, 2008, 07:07 PM
has nobody converted this to c yet? i'd be thankful for saving me the time...

It was originally written in C...
I sort of wrote it in C, but the first clean version (that I'm aware of) was Java.

I'm dedicating this weekend to sorting through my code and version controlling, uploading, combining, etc. So after that shuffle, it should be easier to find what you need.
This'll make an interesting test for broken AV:
QuoteX5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*


aton

#5
okay i think i got everything ready so far, i am creating the random hashes, i am creating the rc4 keys for each bot and when 0x5e arrives i decrypt it and ... get garbage.

could someone post a hexdump of:

1. an encrypted warden packet
2. a seed for the random data functions
3. the resulting hashes (out and in)
4. the resulting rc4 keys (out and in)
5. the decrypted warden packet

mine looks like this:
warden seed: 7b2670d6
warden out hash: bff661de0ce4a9d93603d2490c1651c1
warden in hash: 3c7216c9a15cd4c080f5f615f6ce1d04
warden data in: bb 71 d4 5b 83 4d 04 6d 78 b2 6a 35 6c f7 b9 22 a3 5c 5f 1a 83 77 4b ba 7b 71 a4 a5 96 25 d7 67 7a c8 ec 69 7c 00
after decryption: 1e cc 2b 2d 4e 62 f1 51 bf 64 81 36 c5 72 87 d8 3c bb 1d bb b9 e9 ec f3 5f 9d 76 43 6d 92 db dd 93 3f ec 04 bd 44


... would be a great help to me.

iago: i recoded the function in c:
int RotateLeft32(unsigned int val, int bits) { return ((val<<bits)|(val>>(32-bits))); }

greetings, aton

aton

heh i got it, i had the seed in the wrong byte order:

warden seed: 7b2670d6
warden out hash: b0c352ac82276dace197cd12b4c71d9f
warden in hash: ac8da57f57094ab2013c607f73fcfe59
warden data in: bb 71 d4 5b 83 4d 04 6d 78 b2 6a 35 6c f7 b9 22 a3 5c 5f 1a 83 77 4b ba 7b 71 a4 a5 96 25 d7 67 7a c8 ec 69 7c 00
after decryption: 00 4f ac a3 67 b9 94 89 6f c7 de 13 ec c9 45 a1 a7 66 0f cf f4 0c 7e 4e 83 dd 6e 41 5d 94 a4 ad 64 48 40 00 00 0c

aton

hey could someone give me their values so i can check if my stuff is working correctly?