Thread: [Important] Protecting your server from WPE, packet abusers

Page 1 of 5 123 ... LastLast
Results 1 to 10 of 41
  1. #1 [Important] Protecting your server from WPE, packet abusers 
    Extreme Donator

    Genesis's Avatar
    Join Date
    Sep 2010
    Posts
    4,091
    Thanks given
    1,507
    Thanks received
    1,978
    Rep Power
    4928
    What you are adding and how this will benefit your server

    The code I'm providing you is a short snippet on how to prevent packet abusers from attacking your server. Why am I releasing this? Most packet abusers aren't looking to help an owner, that is why they are abusing it. So I'm going to step forward and help out a bit. This is important because using Winsock Packet Editor (A.K.A WPE), if done right can cause dupes onto your server, can crash your server, can be abused to change the abusers name to random letters making it near impossible to find him, and can end up making them invisible.

    Now for the actual code

    Packethandler.java

    Look for
    Code:
    public static void processPacket
    Replace that entire thing with this.

    Code:
    public static void processPacket(Client c, int packetType, int packetSize) {
            PacketType p = packetId[packetType];
            if(p != null && packetType > 0 && packetType < 257 && packetType == c.packetType && packetSize == c.packetSize) {
                if (Config.sendServerPackets && c.playerRights == 3) {
                    c.sendMessage("PacketType: " + packetType + ". PacketSize: " + packetSize + ".");
                }
                try {
                    p.processPacket(c, packetType, packetSize);
                } catch(Exception e) {
                    e.printStackTrace();
                }
            } else {
                c.disconnected = true;
                System.out.println(c.playerName + "is sending invalid PacketType: " + packetType + ". PacketSize: " + packetSize);
            }
        }
    Now go to Config.java and add this line of code anywhere.

    Code:
     public static boolean sendServerPackets = false;
    The "sendServerPackets" in Config just check's what packets are currently being sent (if set to true), should only be used for testing purposes only.

    Final notes

    • There are SO much better ways of doing this, this is nowhere near close to how Jagex does it (no RSPS is) and I made this nearly a year ago. But from experience it's effective and will save you a lot of trouble.


    • This packet abuse works on nearly 70-89% of Project Insanity servers, if you are unsure if it works on yours, add it anyway to ensure that your server is safe or up to date with the fix.


    • Optionally you can automatically IPBan the user too by placing an alternative code above "disconnected = true;" (not recommended until you fix all unhandled packets, example is the Duel Arena ledge)


    • If you know a better way of doing it, I can care less. Either release it, or stop posting the same stuff. This works. Thanks.
    Reply With Quote  
     


  2. #2  
    Officially Retired

    Huey's Avatar
    Join Date
    Jan 2008
    Age
    22
    Posts
    16,478
    Thanks given
    3,385
    Thanks received
    7,727
    Rep Power
    5000
    >_> yeah this won't fix all but ok
    Attached image
    Listen children don't become this guy.
    Quote Originally Posted by Owner Spikey View Post
    Why can I attack lower level npc's in a matter of a mouse hover but for a higher level npc the only choice to attack is by right clicking option attack?

    Reply With Quote  
     

  3. Thankful users:


  4. #3  
    Extreme Donator

    Genesis's Avatar
    Join Date
    Sep 2010
    Posts
    4,091
    Thanks given
    1,507
    Thanks received
    1,978
    Rep Power
    4928
    Quote Originally Posted by Tupac View Post
    >_> yeah this won't fix all but ok
    Not everything, but it slows them down. Best way is by validating packets
    Reply With Quote  
     

  5. Thankful user:


  6. #4  
    Officially Retired

    Huey's Avatar
    Join Date
    Jan 2008
    Age
    22
    Posts
    16,478
    Thanks given
    3,385
    Thanks received
    7,727
    Rep Power
    5000
    Quote Originally Posted by Genesis View Post
    Not everything, but it slows them down. Best way is by validating packets
    Not rlly simple solution don't use pi
    Attached image
    Listen children don't become this guy.
    Quote Originally Posted by Owner Spikey View Post
    Why can I attack lower level npc's in a matter of a mouse hover but for a higher level npc the only choice to attack is by right clicking option attack?

    Reply With Quote  
     

  7. Thankful user:


  8. #5  
    Donator


    Join Date
    Mar 2011
    Posts
    2,351
    Thanks given
    1,193
    Thanks received
    824
    Rep Power
    856
    Quote Originally Posted by Tupac View Post
    Not rlly simple solution don't use pi
    This doesn't only apply to PI server though.
    Reply With Quote  
     

  9. Thankful user:


  10. #6  
    Banned


    Join Date
    Dec 2007
    Age
    35
    Posts
    12,571
    Thanks given
    198
    Thanks received
    7,088
    Rep Power
    0
    I like the part where you explained what you changed
    Reply With Quote  
     

  11. #7  
    Extreme Donator

    Genesis's Avatar
    Join Date
    Sep 2010
    Posts
    4,091
    Thanks given
    1,507
    Thanks received
    1,978
    Rep Power
    4928
    Quote Originally Posted by Luke132 View Post
    I like the part where you explained what you changed
    This is the snippet section is it not?
    Reply With Quote  
     

  12. #8  
    Officially Retired

    Huey's Avatar
    Join Date
    Jan 2008
    Age
    22
    Posts
    16,478
    Thanks given
    3,385
    Thanks received
    7,727
    Rep Power
    5000
    Quote Originally Posted by Jerba View Post
    This doesn't only apply to PI server though.
    Hello this is Rune-Server Land of PI 317 era.
    Attached image
    Listen children don't become this guy.
    Quote Originally Posted by Owner Spikey View Post
    Why can I attack lower level npc's in a matter of a mouse hover but for a higher level npc the only choice to attack is by right clicking option attack?

    Reply With Quote  
     

  13. #9  
    Extreme Donator

    Genesis's Avatar
    Join Date
    Sep 2010
    Posts
    4,091
    Thanks given
    1,507
    Thanks received
    1,978
    Rep Power
    4928
    Quote Originally Posted by Jerba View Post
    This doesn't only apply to PI server though.
    Quote Originally Posted by Tupac View Post
    Hello this is Rune-Server Land of PI 317 era.
    Okay I'll clear it up then. This code was made for Project Insanity. I stopped working with PI and since moved to a better source (Hyperion). Also this was made nearly a year ago.

    I haven't checked if it works with Hyperion, RuneSource, Azure, etc.

    If it does, you should be experienced enough to not use this code and actually use packet validation seeing as you're starting a project from nothing.

    I released this code for anyone using Project Insanity, that wants it. It will pretty much stop people from packet abusing to a large extent. It doesn't 100% get rid of the problem, but it will slow it down to a point where the majority will just give up and leave your server alone (as most things abused cannot be abused with the code). Meaning you will no longer be able to turn into an Anvil/Car or whatever and manipulate your names.

    Anyway, if you don't want to use it, don't. If you want to use it, do. But please don't stray this topic away, if you can release something better then please do, it'll help the entire community. I just wanted to provide this code so people will stop abusing WPE on servers as if they're some kind of god.
    Reply With Quote  
     

  14. #10  
    q.q


    Join Date
    Dec 2010
    Posts
    6,519
    Thanks given
    1,072
    Thanks received
    3,535
    Rep Power
    4752
    just enabled RSA and ISAAC and your set..

    as well validating all packet data
    Reply With Quote  
     

Page 1 of 5 123 ... LastLast

Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. Wpe pro - ?
    By Kylee123456 in forum Help
    Replies: 5
    Last Post: 01-04-2012, 12:08 AM
  2. Replies: 2
    Last Post: 08-30-2010, 09:55 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •