Aleos

Packet Obfuscation Support

Recommended Posts

Packet Obfuscation Support
As of 9d247d8, rAthena is now able to support encrypted packets making servers WPE free!

Thanks to Hercules for the initial base of it. Thanks to @Napster for getting it applied to rA.

Enabling support for your server:

  • Packet Obfuscation support is enabled by default. It can be disabled in src/config/core.h by commenting out #define PACKET_OBFUSCATION.
  • When diff'ing your client, make sure to not apply the "Disable encrypted packet" diff.
  • A new definition has been added in db/packet_db.txt called packet_keys_use. Make sure this corresponds to the packet_ver you are using!
  • Clients 2011-10-05 and newer will contain a new definition in db/packet_db.txt called packet_keys. These will have the three default keys for their specific client version. These keys can be changed if you use the diff to change the default key of the client.
    • Keyworld was nice enough to provide a nice GUI to test custom keys. You can find that here.
    • If you happen to change your keys, make sure the ones you apply in the diff match the order in the packet_keys definition.
  • If your server supports multiple clients, make sure all clients are using the same 3 keys.
  • Keep in mind, the maximum key value is 0x7FFFFFFF!
  • Upvote 14

Share this post


Link to post
Share on other sites

Thanks for the hard work applying this  /no1

Share this post


Link to post
Share on other sites
enabled by default @[email protected]

I should rediff all my test clients

 

 


eh, add a note aleos, since it's enabled by default, if user change the packetver under 20110817, or just make if below that ver, undef the PACKET_OBFUSCATION.

Share this post


Link to post
Share on other sites

Yeah I was thinking just that, Cydh. :)

Share this post


Link to post
Share on other sites

This is awesome! Thank you Aleos, and everyone else who helped to make this feature possible for rA, finally.

 

PS: Wow. I will need to re-diff my 2012 / 2013 clients  /omg

Share this post


Link to post
Share on other sites

nice i've waiting for this my salute to the developers of this WPE Free rAthena !  /no1


EDIT: if my client has a broken keys will this Packet obfuscation still work?
         My client is 2013-12-23 and seems on this link CLICK ME  2013-12-23 is broken?

Edited by Yonko

Share this post


Link to post
Share on other sites

Hello,

Thanks for the update but i'm unable to disable the feature by commenting out #define PACKET_OBFUSCATION. in src/conf/core.h I've recompiled the sources of course. Any idea on how to truly disable it ?

Share this post


Link to post
Share on other sites

thanks for hardwork update sir....

diff again all my client /ok

Share this post


Link to post
Share on other sites

if my client has a broken keys will this Packet obfuscation still work?

Diff your client with your own custom keys and change the server side keys too

Share this post


Link to post
Share on other sites

 

if my client has a broken keys will this Packet obfuscation still work?

Diff your client with your own custom keys and change the server side keys too

 

How to have that custom packet keys? Is it random? How to generate my own custom packet keys?

@topic: Finally! good work rAthena developers :)

Share this post


Link to post
Share on other sites

 

 

if my client has a broken keys will this Packet obfuscation still work?

Diff your client with your own custom keys and change the server side keys too

 

How to have that custom packet keys? Is it random? How to generate my own custom packet keys?

@topic: Finally! good work rAthena developers :)

 

 

Use NEMO to diff ur client, and...

Do NOT select:

  • Disable Packet Encryption (Recommended)

Select:

  • Packet First Key Encryption, and following ur 1st key
  • Packet Second Key Encryption, and following ur 2nd key
  • Packet Third Key Encryption, and following ur 3rd key
  • Then make sure put your custom keys on db/[import/]packet_db.txt, in packet_keys_use: <key1>,<key2>,<key3>
  • Upvote 1

Share this post


Link to post
Share on other sites

How to have that custom packet keys? Is it random? How to generate my own custom packet keys?

Use this free tool to generate your own custom keys /no1
  • Upvote 1

Share this post


Link to post
Share on other sites

One Question : because i am using 2013 - 12 - 23 client and the keys are broken.

  • I did not patch packet first key encryption and the rest of it that's fine right?

Share this post


Link to post
Share on other sites

Hello,

Thanks for the update but i'm unable to disable the feature by commenting out #define PACKET_OBFUSCATION. in src/conf/core.h I've recompiled the sources of course. Any idea on how to truly disable it ?

Commenting that line out and then recompiling your server will disable the feature.

 

With this, the Maya Purple Filter doesn't work ?

This is meant to stop the spamming of packets sent to the client. There are some checks server-side for Maya Purple hacks but I haven't really tested it on the client to know if it's still working or not.

 

One Question : because i am using 2013 - 12 - 23 client and the keys are broken.

  • I did not patch packet first key encryption and the rest of it that's fine right?

If you don't use your own keys then eventually the default keys on the client aren't sent as encrypted anymore.

Share this post


Link to post
Share on other sites

One Question : because i am using 2013 - 12 - 23 client and the keys are broken.

  • I did not patch packet first key encryption and the rest of it that's fine right?

 

broken?

Here I'm using 2013-12-23c with default keys, diffed by NEMO.

post-5421-0-50898500-1426523095_thumb.png

 

well, if u're using NEMO, it might tell "Second Packet Key is copy of Third for this date - change Third one instead", just comment the lines on NEMO's /Patches/PacketEncryptionKeys.qs (note: idk the side effect :P)

	//Duplicate Check
	switch(keyindex) {
		case 0:
			if (keyaddrs[2] == keyaddrs[0]) {
				return "First Packet Key is copy of Third for this date - change Third one instead";
			}
			if (keyaddrs[1] == keyaddrs[0]) {
				return "First Packet Key is copy of Second for this date - change Second one instead";
			}
			break;
		case 1:
			if (keyaddrs[2] == keyaddrs[1]) {
				return "Second Packet Key is copy of Third for this date - change Third one instead";
			}
			break;
	}

Share this post


Link to post
Share on other sites

 

One Question : because i am using 2013 - 12 - 23 client and the keys are broken.

  • I did not patch packet first key encryption and the rest of it that's fine right?

 

broken?

Here I'm using 2013-12-23c with default keys, diffed by NEMO.

attachicon.gifScreenshot_18.png

 

well, if u're using NEMO, it might tell "Second Packet Key is copy of Third for this date - change Third one instead", just comment the lines on NEMO's /Patches/PacketEncryptionKeys.qs (note: idk the side effect :P)

	//Duplicate Check
	switch(keyindex) {
		case 0:
			if (keyaddrs[2] == keyaddrs[0]) {
				return "First Packet Key is copy of Third for this date - change Third one instead";
			}
			if (keyaddrs[1] == keyaddrs[0]) {
				return "First Packet Key is copy of Second for this date - change Second one instead";
			}
			break;
		case 1:
			if (keyaddrs[2] == keyaddrs[1]) {
				return "Second Packet Key is copy of Third for this date - change Third one instead";
			}
			break;
	}

 

Oh so if i still use the default packet keys its okay? because what i did is i changed the default keys of the client im using.

Share this post


Link to post
Share on other sites
	//Duplicate Check
	switch(keyindex) {
		case 0:
			if (keyaddrs[2] == keyaddrs[0]) {
				return "First Packet Key is copy of Third for this date - change Third one instead";
			}
			if (keyaddrs[1] == keyaddrs[0]) {
				return "First Packet Key is copy of Second for this date - change Second one instead";
			}
			break;
		case 1:
			if (keyaddrs[2] == keyaddrs[1]) {
				return "Second Packet Key is copy of Third for this date - change Third one instead";
			}
			break;
	}

I think those line aren't needed, because actually a same key can be used to make it to work /hmm

Try to put "0x87654321" on all 3 keys ;)

Share this post


Link to post
Share on other sites

This is amazing! This feature is so useful! Good job!!! /lv /lv

Share this post


Link to post
Share on other sites

 

How to have that custom packet keys? Is it random? How to generate my own custom packet keys?

Use this free tool to generate your own custom keys /no1

 

 

ls6opF.jpg

 

new custome key work 1 key 

Edited by indybigza

Share this post


Link to post
Share on other sites

 

 

 

if my client has a broken keys will this Packet obfuscation still work?

Diff your client with your own custom keys and change the server side keys too

 

How to have that custom packet keys? Is it random? How to generate my own custom packet keys?

@topic: Finally! good work rAthena developers :)

 

 

Use NEMO to diff ur client, and...

Do NOT select:

  • Disable Packet Encryption (Recommended)

Select:

  • Packet First Key Encryption, and following ur 1st key
  • Packet Second Key Encryption, and following ur 2nd key
  • Packet Third Key Encryption, and following ur 3rd key
  • Then make sure put your custom keys on db/[import/]packet_db.txt, in packet_keys_use: <key1>,<key2>,<key3>

 

 

 

 

How to have that custom packet keys? Is it random? How to generate my own custom packet keys?

Use this free tool to generate your own custom keys /no1

 

Thank you so much for this.

Very much appreciated  /no1

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.