Thread: Altering Encryption to block clients

Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1 Altering Encryption to block clients 
    Registered Member

    Join Date
    Jun 2007
    Posts
    2,237
    Thanks given
    267
    Thanks received
    411
    Rep Power
    1283
    Description: Change the encryption on the client and server to block unwanted clients.

    Difficulty: -1

    Assumed Knowledge: Basic number changing, Memory.

    Tested Server: Winterloves.

    Files/Classes Modified: You will need a client and a server for this to work

    Procedure
    Step 1: [i]For this to work you need to have your own personal client.
    Open class17 client side to open the clients encryption.

    It should look like this
    [php]
    public final class Class17
    {

    public Class17(int i, int ai[])
    {
    anInt332 = -436;
    anInt333 = -431;
    anIntArray336 = new int[256];
    anIntArray335 = new int[256];
    for(int j = 0; j < ai.length; j++)
    anIntArray335[j] = ai[j];

    if(i >= 0)
    anInt333 = -242;
    method248();
    }

    public final int method246()
    {
    if(anInt334-- == 0)
    {
    method247();
    anInt334 = 255;
    }
    return anIntArray335[anInt334];
    }

    private final void method247()
    {
    anInt338 += ++anInt339;
    for(int i = 0; i < 256; i++)
    {
    int j = anIntArray336[i];
    if((i & 3) == 0)
    anInt337 ^= anInt337 << 13;
    else
    if((i & 3) == 1)
    anInt337 ^= anInt337 >>> 6;
    else
    if((i & 3) == 2)
    anInt337 ^= anInt337 << 2;
    else
    if((i & 3) == 3)
    anInt337 ^= anInt337 >>> 16;
    anInt337 += anIntArray336[i + 128 & 0xff];
    int k;
    anIntArray336[i] = k = anIntArray336[(j & 0x3fc) >> 2] + anInt337 + anInt338;
    anIntArray335 = anInt338 = anIntArray336[(k >> 8 & 0x3fc) >> 2] + j;
    }

    }

    private final void method248()
    {
    int i1;
    int j1;
    int k1;
    int l1;
    int i2;
    int j2;
    int k2;
    int l = i1 = j1 = k1 = l1 = i2 = j2 = k2 = 0x9e3779b9;
    for(int i = 0; i < 4; i++)
    {
    l ^= i1 << 11;
    k1 += l;
    i1 += j1;
    i1 ^= j1 >>> 2;
    l1 += i1;
    j1 += k1;
    j1 ^= k1 << 8;
    i2 += j1;
    k1 += l1;
    k1 ^= l1 >>> 16;
    j2 += k1;
    l1 += i2;
    l1 ^= i2 << 10;
    k2 += l1;
    i2 += j2;
    i2 ^= j2 >>> 4;
    l += i2;
    j2 += k2;
    j2 ^= k2 << 8;
    i1 += j2;
    k2 += l;
    k2 ^= l >>> 9;
    j1 += k2;
    l += i1;
    }

    for(int j = 0; j < 256; j += 8)
    {
    l += anIntArray335[j];
    i1 += anIntArray335[j + 1];
    j1 += anIntArray335[j + 2];
    k1 += anIntArray335[j + 3];
    l1 += anIntArray335[j + 4];
    i2 += anIntArray335[j + 5];
    j2 += anIntArray335[j + 6];
    k2 += anIntArray335[j + 7];
    l ^= i1 << 11;
    k1 += l;
    i1 += j1;
    i1 ^= j1 >>> 2;
    l1 += i1;
    j1 += k1;
    j1 ^= k1 << 8;
    i2 += j1;
    k1 += l1;
    k1 ^= l1 >>> 16;
    j2 += k1;
    l1 += i2;
    l1 ^= i2 << 10;
    k2 += l1;
    i2 += j2;
    i2 ^= j2 >>> 4;
    l += i2;
    j2 += k2;
    j2 ^= k2 << 8;
    i1 += j2;
    k2 += l;
    k2 ^= l >>> 9;
    j1 += k2;
    l += i1;
    anIntArray336[j] = l;
    anIntArray336[j + 1] = i1;
    anIntArray336[j + 2] = j1;
    anIntArray336[j + 3] = k1;
    anIntArray336[j + 4] = l1;
    anIntArray336[j + 5] = i2;
    anIntArray336[j + 6] = j2;
    anIntArray336[j + 7] = k2;
    }

    for(int k = 0; k < 256; k += 8)
    {
    l += anIntArray336[k];
    i1 += anIntArray336[k + 1];
    j1 += anIntArray336[k + 2];
    k1 += anIntArray336[k + 3];
    l1 += anIntArray336[k + 4];
    i2 += anIntArray336[k + 5];
    j2 += anIntArray336[k + 6];
    k2 += anIntArray336[k + 7];
    l ^= i1 << 11;
    k1 += l;
    i1 += j1;
    i1 ^= j1 >>> 2;
    l1 += i1;
    j1 += k1;
    j1 ^= k1 << 8;
    i2 += j1;
    k1 += l1;
    k1 ^= l1 >>> 16;
    j2 += k1;
    l1 += i2;
    l1 ^= i2 << 10;
    k2 += l1;
    i2 += j2;
    i2 ^= j2 >>> 4;
    l += i2;
    j2 += k2;
    j2 ^= k2 << 8;
    i1 += j2;
    k2 += l;
    k2 ^= l >>> 9;
    j1 += k2;
    l += i1;
    anIntArray336[k] = l;
    anIntArray336[k + 1] = i1;
    anIntArray336[k + 2] = j1;
    anIntArray336[k + 3] = k1;
    anIntArray336[k + 4] = l1;
    anIntArray336[k + 5] = i2;
    anIntArray336[k + 6] = j2;
    anIntArray336[k + 7] = k2;
    }

    method247();
    anInt334 = 256;
    }

    private int anInt332;
    private int anInt333;
    private int anInt334;
    private int anIntArray335[];
    private int anIntArray336[];
    private int anInt337;
    private int anInt338;
    private int anInt339;
    }
    [/php]


    Step 2: All there is to do is change a variable around in that code.

    In Cryption.java server side change the exact same number!
    The best place to change is this method
    [php]
    public void initializeKeySet()
    {
    int i1;
    int j1;
    int k1;
    int l1;
    int i2;
    int j2;
    int k2;
    int l = i1 = j1 = k1 = l1 = i2 = j2 = k2 = 0x9e3779b9;
    for(int i = 0; i < 4; i++)
    {
    l ^= i1 << 11;
    k1 += l;
    i1 += j1;
    i1 ^= j1 >>> 2;
    l1 += i1;
    j1 += k1;
    j1 ^= k1 << 8;
    i2 += j1;
    k1 += l1;
    k1 ^= l1 >>> 16;
    j2 += k1;
    l1 += i2;
    l1 ^= i2 << 10;
    k2 += l1;
    i2 += j2;
    i2 ^= j2 >>> 4;
    l += i2;
    j2 += k2;
    j2 ^= k2 << 8;
    i1 += j2;
    k2 += l;
    k2 ^= l >>> 9;
    j1 += k2;
    l += i1;
    }

    for(int j = 0; j < 256; j += 8)
    {
    l += keySetArray[j];
    i1 += keySetArray[j + 1];
    j1 += keySetArray[j + 2];
    k1 += keySetArray[j + 3];
    l1 += keySetArray[j + 4];
    i2 += keySetArray[j + 5];
    j2 += keySetArray[j + 6];
    k2 += keySetArray[j + 7];
    l ^= i1 << 11;
    k1 += l;
    i1 += j1;
    i1 ^= j1 >>> 2;
    l1 += i1;
    j1 += k1;
    j1 ^= k1 << 8;
    i2 += j1;
    k1 += l1;
    k1 ^= l1 >>> 16;
    j2 += k1;
    l1 += i2;
    l1 ^= i2 << 10;
    k2 += l1;
    i2 += j2;
    i2 ^= j2 >>> 4;
    l += i2;
    j2 += k2;
    j2 ^= k2 << 8;
    i1 += j2;
    k2 += l;
    k2 ^= l >>> 9;
    j1 += k2;
    l += i1;
    cryptArray[j] = l;
    cryptArray[j + 1] = i1;
    cryptArray[j + 2] = j1;
    cryptArray[j + 3] = k1;
    cryptArray[j + 4] = l1;
    cryptArray[j + 5] = i2;
    cryptArray[j + 6] = j2;
    cryptArray[j + 7] = k2;
    }

    for(int k = 0; k < 256; k += 8)
    {
    l += cryptArray[k];
    i1 += cryptArray[k + 1];
    j1 += cryptArray[k + 2];
    k1 += cryptArray[k + 3];
    l1 += cryptArray[k + 4];
    i2 += cryptArray[k + 5];
    j2 += cryptArray[k + 6];
    k2 += cryptArray[k + 7];
    l ^= i1 << 11;
    k1 += l;
    i1 += j1;
    i1 ^= j1 >>> 2;
    l1 += i1;
    j1 += k1;
    j1 ^= k1 << 8;
    i2 += j1;
    k1 += l1;
    k1 ^= l1 >>> 16;
    j2 += k1;
    l1 += i2;
    l1 ^= i2 << 10;
    k2 += l1;
    i2 += j2;
    i2 ^= j2 >>> 4;
    l += i2;
    j2 += k2;
    j2 ^= k2 << 8;
    i1 += j2;
    k2 += l;
    k2 ^= l >>> 9;
    j1 += k2;
    l += i1;
    cryptArray[k] = l;
    cryptArray[k + 1] = i1;
    cryptArray[k + 2] = j1;
    cryptArray[k + 3] = k1;
    cryptArray[k + 4] = l1;
    cryptArray[k + 5] = i2;
    cryptArray[k + 6] = j2;
    cryptArray[k + 7] = k2;
    }

    generateNextKeySet();
    keyArrayIdx = 256;
    }
    [/php]
    (It must be the same as Cliet side!)

    NOTE: Remember which one you changed!

    In my client and server i changed
    [php]
    int l = i1 = j1 = k1 = l1 = i2 = j2 = k2 = 0x9e3779b9;
    [/php]
    To
    [php]
    int l = i1 = j1 = k1 = l1 = i2 = j2 = k2 = 0x9e3769b9;
    [/php]

    I tested it with four clients and not one could connect with me



    Step 3: Now is any client tries to connect to the server without the same encryption the client will get a t1 error and disconnect.
    Its that simple



    Credits: Jagex for the client.
    Don't worry, Be happy.
     

  2. #2  
    Diljot
    Guest
    Awesome job, quite simple but never though of it.
     

  3. #3  
    Registered Member

    Join Date
    Dec 2007
    Posts
    621
    Thanks given
    9
    Thanks received
    9
    Rep Power
    163
    Very good idea Surfer.
     

  4. #4  
    SERGEANT OF THE MASTER SERGEANTS MOST IMPORTANT PERSON OF EXTREME SERGEANTS TO THE MAX!


    S Quare Quxx's Avatar
    Join Date
    Jun 2007
    Posts
    8,868
    Thanks given
    1,859
    Thanks received
    4,677
    Rep Power
    5000
    Awsome job, surfer



     

  5. #5  
    Expert Programmer


    Join Date
    Dec 2007
    Posts
    2,020
    Thanks given
    59
    Thanks received
    84
    Rep Power
    986
    Karma++; This is way better than using UID now my client can be downloadable thanks
     

  6. #6  
    Registered Member xvfy's Avatar
    Join Date
    Jan 2008
    Age
    25
    Posts
    286
    Thanks given
    0
    Thanks received
    0
    Rep Power
    16
    Great job on this, this really helped me.
     

  7. #7  
    Registered Member

    Join Date
    Jun 2007
    Posts
    2,237
    Thanks given
    267
    Thanks received
    411
    Rep Power
    1283
    I haven't seen this before so i hope no one says leeched

    And thank you guys
    Don't worry, Be happy.
     

  8. #8  
    Registered Member

    Join Date
    Oct 2007
    Posts
    1,063
    Thanks given
    155
    Thanks received
    162
    Rep Power
    286
    Good work
     

  9. #9  
    x19
    Guest
    Great job surfer babe.
     

  10. #10  
    Registered Member

    Luke132's Avatar
    Join Date
    Dec 2007
    Age
    30
    Posts
    12,416
    Thanks given
    154
    Thanks received
    3,912
    Rep Power
    5000
    awesome job Surfer, ive never seen something like this before.

    EDIT : are you sure that method isnt used by anything else?

     

Page 1 of 2 12 LastLast

Thread Information
Users Browsing this Thread

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

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •