[Tutorial]Custom SHN Encryption

Dec

Experienced Elementalist
Joined
Aug 21, 2012
Messages
214
Reaction score
148
Note: This is extremely simple and will not be a major boost in security, it is simply to keep a majority of the noobs out of your SHN's

Tools required:
OllyDBG(I used a custom version of v1.10, but use v2.0 if you would like) -

Instructions:
1. Open your client in OllyDBG - File>Open
oOrQd51 - [Tutorial]Custom SHN Encryption - RaGEZONE Forums


2. Let it remain paused, we won't be doing much.
fDCMqOH - [Tutorial]Custom SHN Encryption - RaGEZONE Forums


3. Go into the clients executable module via the Executable Modules window(View>Executable Modules or Alt-E) and double click on the client, e.g. Fiesta.bin, Fiesta.exe, whatever you have named the client executable
UTMH0jm - [Tutorial]Custom SHN Encryption - RaGEZONE Forums


4. Right click in the CPU windows and go Search For > Binary string, and search for this string(Hex) - 8B 44 24 08 8D 48 FF 85 C9 88 44 24 08 7C 30 53 56 8B 74 24 0C 8A 14 31 32 D0 8A C1 88 14 31
I may need to update this step as the Dusk client may differ with this string

This should lead you to here:
6YwLMUz - [Tutorial]Custom SHN Encryption - RaGEZONE Forums


This is where SHN decryption takes place in the client.

5. Simply edit any of these 4 values, or hell, codecave that **** if you know how to use olly, not hard at all
These value's are BYTES, therefore 255 is the maximum for each value, if you do not know how to convert decimal to hex off the top of your head, just use this , and remember 0 - 255 are the only possible values here
kabC4gx - [Tutorial]Custom SHN Encryption - RaGEZONE Forums


You may sometimes get this problem, this is just a small bug in olly, simply append a 0 before the value, e.g. CE becomes 0CE to bypass this
KbZGT4T - [Tutorial]Custom SHN Encryption - RaGEZONE Forums


In the end it should look something like this
hiOKOas - [Tutorial]Custom SHN Encryption - RaGEZONE Forums


6. Save the modifications to an executable by simply doing so in the CPU window, Right Click > Copy To Executable > All Modifications, and save to any location, this is now your new executable


The server side:
Do the same to the server executable(s) as above, it seems to work(tested on the Dusk/Odin zones just now)
PVBlFTM - [Tutorial]Custom SHN Encryption - RaGEZONE Forums


The SHN Editor:
Same as above

Here's how it would look in C#:
(if you ask why I cast to byte a lot, notice the assembly uses 8 bit registers(AL, DL, BL, etc))
Code:
            byte xorBy = (byte)SHNData.Length;
            for (int i = (SHNData.Length - 1); i >= 0; i--)
            {
                SHNData[i] = (byte)(SHNData[i] ^ xorBy);

                byte xorByNext = (byte)i;
                xorByNext = (byte)(xorByNext & 0x0F); // 0x0F
                xorByNext = (byte)(xorByNext + 0x55); // 0x55
                xorByNext = (byte)(xorByNext ^ (byte)((byte)i * 0x0C)); // 0x0C
                xorByNext = (byte)(xorByNext ^ xorBy);
                xorByNext = (byte)(xorByNext ^ 0x0AA); // 0x0AA

                xorBy = xorByNext;
            }

This isn't much, but hey, it's something,
Dec

(I'll code a small tool too for mass converting(whole folders))
 
Last edited:
Back