[Workaround] On packet redirection menu

User Tag List

Results 1 to 3 of 3
  1. #1
    Cromon's Avatar Legendary


    Reputation
    840
    Join Date
    Mar 2008
    Posts
    714
    Thanks G/R
    0/7
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [Workaround] On packet redirection

    Hello everyone!

    As you maybe have noticed blizzard now uses that interesting opcode SMSG_REDIRECT_CLIENT which opens a second connection in the client to a specified IP and port. Most packets then will be sent using the new connection. If this connection is not opened packets will be queued and sent when the connection gets opened.

    Now thats where the problems begin. Unfortunately some dev had the very bad idea to encrypt the content of SMSG_REDIRECT_CLIENT using the RSA-algorithm. We have a hardcoded modulus and private key but we do not know the servers "public" key and as a main feature of RSA this is at the moment safe. We would have to factorize modulus to calculate phi(modulus) and then we could calculate the public key from the private key.

    There are basically two workarounds:
    Nr. 1: Patch WoW.exe and change the hardcoded modulus to a large number we know its factors p and q. So we can easily calculate the public key from there.

    Nr. 2:
    Code:
            static void Main(string[] args)
            {
                Memory mem = new Memory("WoW");
                uint netClient = gNetClient + mem.Base;
                uint basePtr = mem.Read<uint>(netClient);
                uint ofs1 = basePtr + 0x464C; // bool QueuePacketsForConnection1;
                uint ofs2 = basePtr + 0x464D; // bool QueuePacketsForConnection2;
                uint ofs3 = basePtr + 0x461C; // ServerConnection* pConnection1;
                uint ofs4 = basePtr + 0x4620; // ServerConnection* pConnection2;
                byte val1 = mem.Read<byte>(ofs1); 
                uint ptr1 = mem.Read<uint>(ofs3);
                mem.Write(ofs4, ptr1); // pConnection2 = pConnection1;
                mem.Write(ofs2, val1); // QueuePacketsForConnection2 = QueuePacketsForConnection1;
                Console.ReadKey();
            }
    The code is pretty self explaining id say. Its just saying the client, that the redirected connection is initialized and sets its pointer to the initial connection. By running this at the characterlist and then enter the world the server again receives every packet. There are of course also issues with that. When falling back to login-screen (disconnected from sever) you have to restart Wow or reverse the changes made, else delete is used on the same connection twice which results in an access violation. The same happens if you close WoW. Connections are freed twice which gives you an access violation, but that doesnt hurt.

    Greetings
    Cromon
    Last edited by Cromon; 11-07-2010 at 05:02 AM.

    [Workaround] On packet redirection
  2. #2
    Hiperzone's Avatar Member
    Reputation
    10
    Join Date
    Nov 2009
    Posts
    19
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    gonna try a new method soon but your workarround #1 is my second sujestion as the second one is too troublesome for servers that wanna have redirection support as intended by blizzard.

    Im not sure how to patch N and Priv Key on wow(i dont even know the locations on IDA atm), maybe you can try ;P
    there should be RSA key generators somewhere.

  3. #3
    abdula123's Avatar Sergeant
    Reputation
    14
    Join Date
    Feb 2010
    Posts
    46
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Hiperzone View Post
    gonna try a new method soon but your workarround #1 is my second sujestion as the second one is too troublesome for servers that wanna have redirection support as intended by blizzard.

    Im not sure how to patch N and Priv Key on wow(i dont even know the locations on IDA atm), maybe you can try ;P
    there should be RSA key generators somewhere.
    you can use openssl to generate RSA key:
    openssl genrsa -out privkey.pem 2048
    openssl rsa -in privkey.pem -text

    public exponent E, used in openssl is same as used in WOW (0x10001)
    so you need only modulus N - to replace WOW.EXE one with your, and private exponent D - to encrypt data on your server side.

    but before encryption, you need to do (in reverse order of course) all crap, that blizzies do with data (shuffling, checksuming and all other).


    imho, simplest way to do redirection - is patching SMSG_REDIRECT_CLIENT handler to:
    1. remove decryption sub call (so you don't need to encrypt packet and deal with rsa key in wow.exe)
    2. remove shuffling sub call (so you save bunch of time to implement it in reverse order in server side)
    3. disable xor checking (so you save bunch of time to implement it in reverse order in server side)

Similar Threads

  1. Possible workaround for personal rating exploit nerf
    By Custer in forum World of Warcraft Exploits
    Replies: 11
    Last Post: 12-15-2007, 01:02 PM
  2. Annoying trade bug workaround
    By drognir in forum World of Warcraft Guides
    Replies: 4
    Last Post: 11-17-2007, 01:06 AM
  3. Guide: Scamfix Workaround
    By Ergoim in forum WoW Scam Prevention
    Replies: 8
    Last Post: 08-13-2007, 09:44 AM
  4. Packet Injecting Items
    By yungen2003 in forum World of Warcraft General
    Replies: 7
    Last Post: 08-07-2007, 07:02 AM
  5. WoW packets.. where are they?
    By Stretch in forum World of Warcraft General
    Replies: 0
    Last Post: 01-28-2007, 01:54 PM
All times are GMT -5. The time now is 04:23 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search