Luigi Auriemma

aluigi.org (ARCHIVE-ONLY FORUM!)
It is currently 19 Jul 2012 16:25

All times are UTC [ DST ]





Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 8 posts ] 
Author Message
 Post subject: Chat login protocol
PostPosted: 06 Jul 2010 15:01 

Joined: 01 Jun 2010 05:58
Posts: 18
Hi guys,

i set myself a little task to learn a bit more in this.
I found this chat website runnning a Java based chat. As far as i know of my research the chat software is called VolanoChat and its Client + its Server are Java based.
How ever the Network protocol looks simple, i'll try writeing my own client.
But right after the start i got my first problem.

The connection looks likes this (TCP):
-> Call to the server
<- Server sends random numbers (I'm pretty sure used to authenticate)
-> Response to that
<- Server sends the roomlist.

I captured the original clients network to see how its done.
The first paragraph is the server sending the random numbers and the second the correct response from the original client.
I captured this 3 times so far

Code:
    00000000  00 01 00 00 00 04 00 00  00 01 00 00 00 00 08 84 ........ ........
    00000010  29 fa 63 17 5b fd 6f                             ).c.[.o
000000B0  00 d1 00 00 00 01 2e 30  2c 02 14 36 c7 b6 3d 50 .......0 ,..6..=P
000000C0  c8 92 f0 7c 7e 6e e2 84  f7 08 b6 f0 52 5d a5 02 ...|~n.. ....R]..
000000D0  14 43 db a0 9e 3e 65 1b  1d 24 c2 8b c2 60 bd d1 .C...>e. .$...`..
000000E0  2e 42 95 6f 6a 


Code:
    00000000  00 01 00 00 00 04 00 00  00 01 00 00 00 00 08 98 ........ ........
    00000010  4d 1c db 76 b7 5e 81                             M..v.^.
000000B0  00 d1 00 00 00 01 2e 30  2c 02 14 7e 96 b0 dd 24 .......0 ,..~...$
000000C0  ce f9 0f 10 23 58 08 ac  9b 30 63 d7 58 16 a6 02 ....#X.. .0c.X...
000000D0  14 37 90 3f fb 30 6c c0  c2 06 24 f8 cc 01 b2 43 .7.?.0l. ..$....C
000000E0  b6 81 c5 6a 7d 


Code:
    00000000  00 01 00 00 00 04 00 00  00 01 00 00 00 00 08 d3 ........ ........
    00000010  d9 7a 64 18 0c d8 7e                             .zd...~
000000B0  00 d1 00 00 00 01 2e 30  2c 02 14 27 37 ae fe 6c .......0 ,..'7..l
000000C0  05 00 0a 34 0b 3a 22 52  82 cd fa 0f b2 b4 bd 02 ...4.:"R ........
000000D0  14 12 a9 ec 7d 5b a5 5b  88 a9 dd 9a 45 30 83 fd ....}[.[ ....E0..
000000E0  31 d8 4d 47 11 


So im not asking you guys to fix this problem for me, im asking for a way how i coud find this out.
I want to learn something from this.
Is it even possible or should i just forget it?

Best regards Neo


Top
 Profile  
 
 
 Post subject: Re: Chat login protocol
PostPosted: 06 Jul 2010 22:50 

Joined: 13 Aug 2007 21:44
Posts: 4068
Location: http://aluigi.org
it's not possible to guess what are the operations that result in that output only having the packets but if it's in java you can decompile it and so retrieving the full source code.

while the format of the packets is enough simple, but I guess it's not a problem


Top
 Profile  
 
 Post subject: Re: Chat login protocol
PostPosted: 07 Jul 2010 05:08 

Joined: 01 Jun 2010 05:58
Posts: 18
So like you said, i got the client and decompiled it. But even after 2 hours stare at it, it's still japanese to me.
I was close to give up but then the little internet fairy showed me a treasure. A guy allready did what i'm trying to do and there is a sourcecode.
i thought to myself "yay :D" but a couple seconds later i thought "ohhh :("
His client is written in C# (i think) but for the authentication he somehow uses java classes.
Looks like he took the original clients source and removed everything execpt for the authentication part.
My problem is still that i dont understand how it works. I want to be able to recreate this in VB.

I know it's maybe a little to much to ask, but would you take a look at it?
Volano.cs can be opend with any texteditor, AccessToServer() is the void where the magic happens.
In there ..\Resources\main.class is used in a way i dont get.

I took the exe in ..\bin\Debug\ and hex-edit it to connect to the right ip+port, so i do know his authentication works correct.

http://www.sendspace.com/file/3xhw1j

-----------------
Edit
I have found a second client working just fine. Im starting to feel dumb, i just cant figure it out...
http://xvcc.codeplex.com/SourceControl/ ... 37#1191607

I should really get some sleep.


Top
 Profile  
 
 Post subject: Re: Chat login protocol
PostPosted: 07 Jul 2010 08:18 

Joined: 13 Aug 2007 21:44
Posts: 4068
Location: http://aluigi.org
in the last link you pasted the code you need is in IllSoft.Xvcc.Volano.Client\KeyGen.cs while in the other project it's in the AccessToServer function.

so it's DSA with the keys that change between the various versions of VolanoChat, that's why in the first code there are those of 2.7.1 commented


Top
 Profile  
 
 Post subject: Re: Chat login protocol
PostPosted: 07 Jul 2010 09:11 

Joined: 01 Jun 2010 05:58
Posts: 18
Yeah i got that, but i just dont understand the sourcecode.
DSA puhh im starting to get headache.
It dosnt look like VB 6 is capable of this.

Im back at my "i give up" point...


Top
 Profile  
 
 Post subject: Re: Chat login protocol
PostPosted: 08 Jul 2010 09:38 

Joined: 01 Jun 2010 05:58
Posts: 18
Im still "learning" on this one.
I took some code from the second client i found to debug it:

Code:
private void Form1_Load(object sender, EventArgs e)
        {
            byte[] NeoKey = { 196, 144, 150, 158, 110, 181, 209, 189 };

            KeyGen keyGen = new KeyGen();
            byte[] NeoR = keyGen.GenerateSignedKey(NeoKey);
        }


KeyGen is the KeyGen.cs from the xvcc client doing all this fancy DSA stuff.
But everytime i run this code (with the same inputkey) it returns a different ouputkey (NeoR).

How can that be? Are they anyhow still valid?


Top
 Profile  
 
 Post subject: Re: Chat login protocol
PostPosted: 08 Jul 2010 16:59 

Joined: 24 Jun 2010 10:04
Posts: 70
Location: aluigi not @ home
isn't more simple if you contact directly the authors of those 2 projects?


Top
 Profile  
 
 Post subject: Re: Chat login protocol
PostPosted: 08 Jul 2010 17:27 

Joined: 01 Jun 2010 05:58
Posts: 18
i have allready tryed that.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 8 posts ] 

All times are UTC [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for: