Register for your free account! | Forgot your password?

You last visited: Today at 08:23

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

Advertisement



HandshakeRequest

Discussion on HandshakeRequest within the DarkOrbit forum part of the Browsergames category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Jul 2018
Posts: 5
Received Thanks: 1
HandshakeRequest

Hello !

I'm currently working on a Java emulator for the last client version for my personnal entertainment, I don't plan to sell it nor create a private server with it, this is just for the knowledge and the challenge.

I manage to go through the VersionRequest and ObfuscationRequest (by sending an abc.swf with empty encode/decode functions) but I've some struggle with and after the HandshakeRequest, here's what I understand:

* The HandshakeRequest and response are keys for ARC4 encoding.
* The ARC4 keys are RSA encoded.

Which, I guess, give something like this :
ARC4 plain key > RSA > abc ("by-passed" with empty functions).

So I manage to go through by sending the same packets that I found with Wireshark, to have an exemple of what's after that.

But I figured out that I can't go through HandshakeRequest without really understanding it.

This is where I'm asking for your help, could someone explain me how the Handshake keys work and if my understanding of HandshakeRequest is right? I'm not asking for code.

I tried to reproduce the PandorasBox encryption but I've struggle with the BigInteger class.

I can give more informations and samples of my code if needed !

I'll understand if nobody wants to help me but thank you very much anyway and have a nice day!

Best regards,
Ksama
Ksama_04 is offline  
Old 04/22/2019, 23:59   #2
 
Freshek's Avatar
 
elite*gold: 0
Join Date: Aug 2015
Posts: 803
Received Thanks: 1,359
You basically need to implement their asymmetrical encryption algorithm. I'd rather not bother with that and remove it from the client.
Freshek is offline  
Old 04/23/2019, 12:01   #3
 
elite*gold: 0
Join Date: Jul 2018
Posts: 5
Received Thanks: 1
Quote:
Originally Posted by Freshek View Post
You basically need to implement their asymmetrical encryption algorithm. I'd rather not bother with that and remove it from the client.
Thank you for answer !

I understand the encryption better since my original post, but I struggle by sending a "valid" key to the client, it always give me the following error:
Code:
PKCS#1 unpad: i=1, expected b[i]==[0,1,2], got b[i]=xx
(where xx is a hexadecimal number)

I think that's because of the Java's encryption (using javax.crypto.Cipher) or my key generation method (which is the same that the client uses to send his key in the HandshakeRequest, but in Java) :
Code:
private BigInteger generateRandomBI() {
	int j = 0;
	String hex = new String();
	String code = new String();
	for(int i = 0; i < 128; i++) {
		j = (int)(new Random().nextFloat() * 256);
		hex = Integer.toHexString(j);

		if(hex.length() == 1)
			hex = "0" + hex;

		code = code + hex;
	}

	return new BigInteger(code, 16);
}
I like your idea to modify the main.swf, but won't it be harder to reobfusctate it properly to be read by the preloader, instead of implementing the encryption algorithm?

Anyway, thank you again for your answer and have a nice day!
Ksama_04 is offline  
Old 04/23/2019, 13:44   #4
 
Freshek's Avatar
 
elite*gold: 0
Join Date: Aug 2015
Posts: 803
Received Thanks: 1,359
Are you implementing the algorithm located in main.swf or in PandorasBox?

And no, modifying the preloader to load a decrypted version of main.swf is a matter of 5minutes and changing about 2 lines of code.
Freshek is offline  
Old 04/23/2019, 15:57   #5
 
elite*gold: 0
Join Date: Jul 2018
Posts: 5
Received Thanks: 1
The one in PandorasBox, which is, I guess, the one encoding the packets.

Okay thank you, I'm looking for this in the preloader.swf.
But after that, I think that I'll try to implement the algorithm anyway, I spent too much time to give up now .

Thanks again!
Ksama_04 is offline  
Old 04/29/2019, 18:18   #6
 
MGL_Reload's Avatar
 
elite*gold: 0
Join Date: Aug 2018
Posts: 84
Received Thanks: 55
good luck
MGL_Reload is offline  
Reply




All times are GMT +1. The time now is 08:24.


Powered by vBulletin®
Copyright ©2000 - 2025, 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 ©2025 elitepvpers All Rights Reserved.