Chapters
1.) Understanding the Server <--> Client Communication
2.) Mastering WPE
2.1) * ~Packet Creation
2.2) * ~Filter Creation
3.)Observing
4.)Exploiting itself
--------------------------------------------------------------------------------
~* Server <--> Client *~
1.1) Explanation ( Server <--> Client )
So, the Client is your Ragnarok Game you use to connect to the Server you play on. The Server saves all important things like Items, Characters, EXP, Position of your Char, Zeny and everything else. The blue'ish Part is basically your Computer, the part you can access, nothing usefull saves on this Side as you can see. The Client is just like a Remote Control it tells the Server what you want to do and the Server itself executes it.
1.2) The Comunication ( Server <--> Client)
Lets take a Real Life example for this, you just tell your friend to move to a certain spot by pointing on it, and he will move there as long as he can (or he starts refuse ). The communication between the Client and the Server happends in almost the same way but instead of talking a langauge like english, french, german or w/e they use PACKETS to communicate with each other.
Lets return to our example with our Friend, to get your Friend moving you would prolly say something like
Quote
Hey dude move over there please.
Hey now move over there thanks.
Please move over there.
and thats how the client would tell the server to move your character
Quote
A7 00 36 06 58 28 F8 00 2B C8 90
A7 00 36 06 58 28 F8 00 2B 48 C0
A7 00 36 06 58 28 F8 00 2C 08 80
this sure looks weired at the first view, but it isnt that hard. Those are 3 packets wich the Client sends out to move your Character on the Server. The packets consits always of a certain ammount of Hexadecimal Digits ( Hexadecimal have the base of 16 instead of 10 like decimal)
Hexa basically looks like this:
Code:
1 = 1
2 = 2
3 = 3
4 = 4
5 = 5
6 = 6
7 = 7
8 = 8
9 = 9
10 = a
11 = b
12 = c
13 = d
14 = e
15 = f
You can also use the standard Calculator that comes with Windows to calculate Decimal -> Hexadecimal and visa-verce.
make sure you change your view options
Now it should look like this, just enter the number you want to calculate and switch between the marked options.
Back to our packet
A7 00 36 06 58 28 F8 00 ** XX YY
The A7 is the packet header wich tells us what type of packet it is, in that case its a movement packet.
The last 3 numbers are the exact coordinates you want to move to, if you cant move there because thers a Building or something the server will move you to the closest possible location.
There are packets for all Actions that can be done ingame (Attacking, Skills, Movement, Item Drop, Pickup, ...).
So packets are basically the Langauge of the Server and the Client.
1.3) IDs (Server <--> Client)
As the Server communicates with Packets, it wont send out Player, Item and Monsternames instead of it it uses their IDs.
Everything in Ragnarok has a ID-Nummber, all Accounts, all Characters, all Pets, all Items, all NPCs, all Monsters even the Equipment in your Inventory gets a Equipment ID.
You can receive the ID of Players, Monsters, Pets and NPCs by using this Exploit #[[If you set your account id as gm in your sclientinfo.xml (or clientinfo, etc etc) you will be able to see the damage done in guild wars, and also you will see the emblem of the guild over the people that´s invisible.]]#, once you use that Exploit you can just Righclick anything ingame and you will see its ID in decimal. Ok if you want to send a Attack-Packet to attack a Lunatic now you will need its ID in Hex so use the Windows calculater to convert it from Dec to Hex. Ok and now there is one of the most important Parts about IDs, all IDs are inverted. To explain this I prepared this Example
Lets assume Lunatics ID is 1063, the calculater will give you as Hex Result 427, since its always 2 Digits per Number we need to add a 0, that makes 0427, now we devide it into couples 04 27. Ok we basically would have the ID ready to insert BUT Ragnarok sents all IDs Inverted so we gotta instert 27 04 into the packet as ID.
Well this might sound confusing now, but it will be clearer once we get to the ingame examples
So we basically know now how Server and Client Communicate with each other.
Chapter 1 - Summary
Nothing valuable is saved client-side.
Server and Client communicate with each other via Hexdecimal Strings so called Packets.
Instead of Names, IDs are beeing used within the Packets.
--------------------------------------------------------------------------------
~* Winsock Packet Editor *~
Tools
Winsock Packet Editor
Calculator (comes with Windows)
Ragnarok Online
2.1) Explanation ( WPE )
The Winsocket Packet Editor is a easy-to-use Packet Logger and Sender. We can use it to watch and modify the packets used between the Server and the Client. Well that should be enough explanation for now, lets do something with it
2.2) Basic WPE Usage ( WPE )
Start your Ragnarok Online Client and now run WPE.
Now hit "Target Programm" and select your Ragnarok Online Client (as shown above)
Log into Ragnarok and go to a calm place.
Now switch back to WPE and Press the "Play"-Button, it will now start logging all incoming and outgoing packets.
Now say something in Ragnarok Online (I said Hi there) and Press the Stop button.
It should now look like this:
So what do we see here ?
Basically those are the Packets the Client sends and receives, in that case its a Chatpacket (8C Packet Header) as you can see, but why are there 2 of em?
Thats because you send them to the Server and it doesnt get displayed yet, the Server first verfys the Chatmessage and then sends it back as 8E Packet, this one is going to be displayed in your Chatwindow.
Theres a Source and Destination Collum, those contain IPs, the Destination IP of the Send-Packet is the Servers IP the Source IP of the Send-Packet is your IP, visa verce for receive packet (source = servers ip, destination = your ip).
Note: If you're wondinger why those IPs are the same on the screenshots, its because I am running Server and Client on the same Computer
Right-Click the first packet (Send one) and select send (as above)
Now a window should pop up like this one:
This is the Main Packet-Sender Function of WPE, I´ve added some explanations to the picture altough most things are selfexplaining.
Now Click the Play-Button and check your Ragnarok Client, your char said the same line again, that is because you send the Chat-Packet again, but its kinda boring to hear the same line again and again isnt it ?
So lets modify the line !
Oh, your new message doesnt fit into this packet ? Simple: To increase the lenght of the packet press the arrow that has a Red Border on the picture (the one within the Packetsize Panel). Now just overwrite the ASCII Part (the one where you can see the Chat-Line), WPE will automatically translate it into Hexa-Decimal Numbers.
Now just hit "Play" again. Check your Ragnarok Client, your Character said the new line, pretty cool eh ?
Congratulations you just modified your first packet






