Popular Post Aleos Posted March 14, 2015 Group: Development Manager Topic Count: 56 Topics Per Day: 0.01 Content Count: 732 Reputation: 525 Joined: 12/13/11 Last Seen: June 13 Popular Post Share Posted March 14, 2015 Packet Obfuscation SupportAs 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! 16 Link to comment Share on other sites More sharing options...
Radian Posted March 14, 2015 Group: Members Topic Count: 162 Topics Per Day: 0.04 Content Count: 1546 Reputation: 192 Joined: 07/23/14 Last Seen: June 24 Share Posted March 14, 2015 Thanks for the hard work applying this Link to comment Share on other sites More sharing options...
Dev Blaze Posted March 14, 2015 Group: Members Topic Count: 68 Topics Per Day: 0.01 Content Count: 212 Reputation: 5 Joined: 01/24/12 Last Seen: February 19, 2019 Share Posted March 14, 2015 Thank you Sir Link to comment Share on other sites More sharing options...
a91323 Posted March 14, 2015 Group: Members Topic Count: 15 Topics Per Day: 0.00 Content Count: 99 Reputation: 10 Joined: 01/13/12 Last Seen: December 6, 2020 Share Posted March 14, 2015 good job! Link to comment Share on other sites More sharing options...
Cydh Posted March 14, 2015 Group: Developer Topic Count: 153 Topics Per Day: 0.03 Content Count: 2285 Reputation: 746 Joined: 06/16/12 Last Seen: June 10 Share Posted March 14, 2015 enabled by default @_@ I should rediff all my test clients https://github.com/rathena/rathena/commit/9d247d88c1f8a5d04a386ac6891726724ee226f9#diff-508730e79da0e272d574830f2b49609bR829 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. Link to comment Share on other sites More sharing options...
Aleos Posted March 14, 2015 Group: Development Manager Topic Count: 56 Topics Per Day: 0.01 Content Count: 732 Reputation: 525 Joined: 12/13/11 Last Seen: June 13 Author Share Posted March 14, 2015 Yeah I was thinking just that, Cydh. Link to comment Share on other sites More sharing options...
Conflicts Posted March 14, 2015 Group: Members Topic Count: 14 Topics Per Day: 0.00 Content Count: 317 Reputation: 63 Joined: 11/13/11 Last Seen: July 14 Share Posted March 14, 2015 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 Link to comment Share on other sites More sharing options...
Yonko Posted March 15, 2015 Group: Members Topic Count: 166 Topics Per Day: 0.04 Content Count: 789 Reputation: 50 Joined: 04/16/12 Last Seen: July 8, 2022 Share Posted March 15, 2015 (edited) nice i've waiting for this my salute to the developers of this WPE Free rAthena ! 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 March 15, 2015 by Yonko Link to comment Share on other sites More sharing options...
Lelouch vi Britannia Posted March 15, 2015 Group: Members Topic Count: 45 Topics Per Day: 0.01 Content Count: 715 Reputation: 83 Joined: 01/05/12 Last Seen: April 10, 2023 Share Posted March 15, 2015 Finally the update that ive been waiting for So whats next on rAthena? maybe you should try to implement this also from herc... • Roulette and Per-Character Gender But anyways Great Work rA team Link to comment Share on other sites More sharing options...
Niktout Posted March 15, 2015 Group: Members Topic Count: 7 Topics Per Day: 0.00 Content Count: 19 Reputation: 2 Joined: 07/11/13 Last Seen: August 7 Share Posted March 15, 2015 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 ? Link to comment Share on other sites More sharing options...
Akbare Posted March 15, 2015 Group: Members Topic Count: 31 Topics Per Day: 0.01 Content Count: 491 Reputation: 20 Joined: 11/19/11 Last Seen: June 5, 2023 Share Posted March 15, 2015 thanks for hardwork update sir.... diff again all my client Link to comment Share on other sites More sharing options...
Sapito Sucio Posted March 16, 2015 Group: Members Topic Count: 11 Topics Per Day: 0.00 Content Count: 174 Reputation: 92 Joined: 04/10/12 Last Seen: 4 hours ago Share Posted March 16, 2015 With this, the Maya Purple Filter doesn't work ? Link to comment Share on other sites More sharing options...
nanakiwurtz Posted March 16, 2015 Group: Members Topic Count: 81 Topics Per Day: 0.02 Content Count: 1654 Reputation: 583 Joined: 08/09/12 Last Seen: January 14, 2020 Share Posted March 16, 2015 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 Link to comment Share on other sites More sharing options...
Aureon Posted March 16, 2015 Group: Members Topic Count: 34 Topics Per Day: 0.01 Content Count: 281 Reputation: 14 Joined: 10/14/13 Last Seen: October 9, 2017 Share Posted March 16, 2015 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 Link to comment Share on other sites More sharing options...
Cydh Posted March 16, 2015 Group: Developer Topic Count: 153 Topics Per Day: 0.03 Content Count: 2285 Reputation: 746 Joined: 06/16/12 Last Seen: June 10 Share Posted March 16, 2015 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> 1 Link to comment Share on other sites More sharing options...
nanakiwurtz Posted March 16, 2015 Group: Members Topic Count: 81 Topics Per Day: 0.02 Content Count: 1654 Reputation: 583 Joined: 08/09/12 Last Seen: January 14, 2020 Share Posted March 16, 2015 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 1 Link to comment Share on other sites More sharing options...
Radian Posted March 16, 2015 Group: Members Topic Count: 162 Topics Per Day: 0.04 Content Count: 1546 Reputation: 192 Joined: 07/23/14 Last Seen: June 24 Share Posted March 16, 2015 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? Link to comment Share on other sites More sharing options...
Aleos Posted March 16, 2015 Group: Development Manager Topic Count: 56 Topics Per Day: 0.01 Content Count: 732 Reputation: 525 Joined: 12/13/11 Last Seen: June 13 Author Share Posted March 16, 2015 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. Link to comment Share on other sites More sharing options...
Cydh Posted March 16, 2015 Group: Developer Topic Count: 153 Topics Per Day: 0.03 Content Count: 2285 Reputation: 746 Joined: 06/16/12 Last Seen: June 10 Share Posted March 16, 2015 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. 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 ) //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; } Link to comment Share on other sites More sharing options...
Radian Posted March 16, 2015 Group: Members Topic Count: 162 Topics Per Day: 0.04 Content Count: 1546 Reputation: 192 Joined: 07/23/14 Last Seen: June 24 Share Posted March 16, 2015 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. Screenshot_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 ) //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. Link to comment Share on other sites More sharing options...
Hnomkeng Posted March 17, 2015 Group: Members Topic Count: 29 Topics Per Day: 0.01 Content Count: 99 Reputation: 2 Joined: 02/23/14 Last Seen: September 5 Share Posted March 17, 2015 (edited) /ok Edited March 17, 2015 by indybigza Link to comment Share on other sites More sharing options...
nanakiwurtz Posted March 17, 2015 Group: Members Topic Count: 81 Topics Per Day: 0.02 Content Count: 1654 Reputation: 583 Joined: 08/09/12 Last Seen: January 14, 2020 Share Posted March 17, 2015 //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 Try to put "0x87654321" on all 3 keys Link to comment Share on other sites More sharing options...
KamiShi Posted March 17, 2015 Group: Members Topic Count: 21 Topics Per Day: 0.00 Content Count: 345 Reputation: 230 Joined: 03/21/12 Last Seen: May 14, 2023 Share Posted March 17, 2015 This is amazing! This feature is so useful! Good job!!! /lv Link to comment Share on other sites More sharing options...
Hnomkeng Posted March 17, 2015 Group: Members Topic Count: 29 Topics Per Day: 0.01 Content Count: 99 Reputation: 2 Joined: 02/23/14 Last Seen: September 5 Share Posted March 17, 2015 (edited) 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 new custome key work 1 key Edited March 17, 2015 by indybigza Link to comment Share on other sites More sharing options...
Aureon Posted March 17, 2015 Group: Members Topic Count: 34 Topics Per Day: 0.01 Content Count: 281 Reputation: 14 Joined: 10/14/13 Last Seen: October 9, 2017 Share Posted March 17, 2015 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 Thank you so much for this. Very much appreciated Link to comment Share on other sites More sharing options...
Recommended Posts