An exploit (from the verb to exploit, in the meaning of using something to one’s own advantage) is a piece of software, a chunk of data, or sequence of commands that takes advantage of a bug, glitch or vulnerability in order to cause unintended or unanticipated behaviour to occur on computer software, hardware, or something electronic (usually computerised). Such behavior frequently includes such things as gaining control of a computer system or allowing privilege escalation or a denial-of-service attack.
what is the most common exploits people use here ? it is the sequence of commands and what follow it
what i mean by sequence of commands and checks ? for example : you check for a condition (lets say if user got cps let him choose where to go to)
so user trade this cps on the choosing pram
and when the user click the npc it does let him in
and not just that :O
it may also give him a huge amount of cps to avoid overflow as there is no -ve cps and it's unsigned int
as you will see example in part 3 of this thread
well here guys i was checking out stuff over epvp and found this thread
which did actually piss me that he can't fix it on his own and he own a server , so i want to see how hard is it and how far it will takes me
by going throw the problem i did imagined what may cause this problem and i did step by step solve it , i failed couple of times while trying to get it done which i mentioned it and mentioned everything i've done on purpose so you learn how to fix exploits and bugs on your server and how to get better understanding about it
please go to the main thread if you need more information about the exploit , forgive me if i type like BLOCKTEXTBLOCKTEXTBLOCKTEXT but im really too sleepy to make it look better
also if i said something wrong correct me
here is the post (copy/past)
yes because you never thought of writing your own base and adding check to them
lemme try to think about it with some logic
does the client even bother sending to the server saying "someone trying to socket an item" ? yes indeed it does so the server send back saying "take the dragonballs" (visual take off inventory) then server does take them from database and updated the socketed item , right ?
so lets assume what i said was right or close to what really happen
so your problem is when someone try to put an item at the socketing npc the client do a check if this item is valid item to be socketed , if it's not it doesn't agree to put it inside else it put it and send this request/packet to the server , then server check if you got dbs and take them and update the item , right ?
the exploit is : they change the item id at the pointer or what fucking ever , right ?
so what you should be doing is adding a check at the server at this npc to make sure it's valid item else you ban/disconnect/botjail this mothafuckers , right ?
so simply when you get the packet of this npc trying to socket handle it by disconnect and ban
or to make it easier for you , add a check beside the dbs amount check saying the following
if itemtype is crop , steed , gourd , garment
user disconnect
user ban
else proceed to check how many dbs/stardrills he got if sucess update the item in the system
and don't worry about other players who will try to socket a non valid item because the client already do a check but if they fake it with the cheat engine then they worth trying the ban hammer
this was my logic and i believe it's close enough or actually what happens and what you should be doing
but if you want the truth ? what you should be doing is shutting down your mother fucking server and go to learn and write your own source and make sure it's free to exploits or atleast got none of the well knowen exploits
please any expert confirm if what i said was right or wrong cuz im curious to know if i was right or close enough
i can't find where it handle this at the source you are using , all i found in dialogs is when you send packet clicking the npc it update the client to open the socketing window you are on , so yeah try to get packets to actually understand what's going on and see how the server handle them and edit/add to it or even handle them on your own , will try this when i wake up
umm i like that subject so im working right now
well here is the packet of requesting the dialog and what the server reply with (opening dialog)
and here comes the important part
when i add the item it doesn't send a packet for server about the item information
but the good part is
once u click socket button it server does send this
that doesn't really make sense for me as how the fuck the server knew that you want updated this item and how it take the dbs if the client didn't send to it , prolly i blocked some packets from packet logging but atleast i can go now to search for packet 1008 at server and figure out what's going on
well yup i was blocking 1009 1033 , lemme try again now
yeah 1009 was the deal over here
now lemme have a look at the source
client send 1009 packet , ill search the entire solution for it while looking to the packet structure at korvacs packet structure
the packet structure pretty the same since 5295 till 5500
well again what was the packet length ? 144 ?
oh i didn't find it with a check on the length but there is a check also on the type inside the packet , oh you didn't look at the packet structure , did you ?
well doesn't really matter because you must do it now to understand what's going on up here
#region Item/Ping (1009)
case 1009:
{
if (client.Action != 2)
return;
ItemUsage usage = new ItemUsage(false);
usage.Deserialize(packet);
if (!client.Entity.Dead || usage.ID == ItemUsage.Ping)
{
switch (usage.ID)
{
case 52:
{
var item = Database.ConquerItemTable.LoadItem(usage.UID);
item.Mode = Conquer_Online_Server.Game.Enums.ItemMode.ChatItem;
item.Send(client);
break;
}
case 41:
{
var item = Database.ConquerItemTable.LoadItem(usage.UID);
usage.dwParam = 5;
client.Send(usage);
break;
}
case ItemUsage.ArrowReload:
{
ReloadArrows(client.Equipment.TryGetItem(ConquerItem.LeftWeapon), client);
break;
}
case ItemUsage.ShowBoothItems:
{
ShowBoothItems(usage, client);
break;
}
case ItemUsage.AddItemOnBoothForSilvers:
case ItemUsage.AddItemOnBoothForConquerPoints:
{
AddItemOnBooth(usage, client);
break;
}
case ItemUsage.BuyFromBooth:
{
BuyFromBooth(usage, client);
break;
}
case ItemUsage.RemoveItemFromBooth:
{
RemoveItemFromBooth(usage, client);
break;
}
case ItemUsage.EquipItem:
{
EquipItem(usage, client);
break;
}
case ItemUsage.UnequipItem:
{
UnequipItem(usage, client);
break;
}
case ItemUsage.BuyFromNPC:
{
HandleBuyFromNPC(usage, client);
break;
}
case ItemUsage.SellToNPC:
{
HandleSellToNPC(usage, client);
break;
}
case ItemUsage.Repair:
{
HandleRepair(usage, client);
break;
}
case ItemUsage.MeteorUpgrade:
case ItemUsage.DragonBallUpgrade:
{
UpgradeItem(usage, client);
break;
}
case ItemUsage.Ping:
{
if (Time32.Now < client.LastPing.AddSeconds(2))
{
client.PingCount++;
if (client.PingCount == 40)
{
client.Send(new Message("Speed hack detected!", System.Drawing.Color.BlanchedAlmond, Message.TopLeft));
client.Disconnect();
return;
}
}
if (client.Entity != null)
{
if (client.Entity.UID != 0)
{
if (!ServerBase.Kernel.GamePool.ContainsKey(client.Entity.UID))
{
ServerBase.Kernel.GamePool.Add(client.Entity.UID, client);
}
}
}
client.LastPingT = client.LastPing;
client.LastPing = Time32.Now;
if (client.LastPing > client.LastPingT.AddSeconds(2))
client.PingCount = 0;
usage.TimeStamp += 120;
// client.Send(ReturnFinal(packet));
//Network.PacketHandler.HandleBuffer(packet, client);
client.Send(usage);
if (!ServerBase.Kernel.GamePool.ContainsKey(client.Entity.UID))
if (client.Socket.Connected)
{
ServerBase.Kernel.GamePool.Add(client.Entity.UID, client);
client.Screen.FullWipe();
client.Screen.Reload(null);
}
break;
}
case ItemUsage.ViewWarehouse:
{
usage.dwParam = client.MoneySave;
client.Send(usage);
break;
}
case ItemUsage.WarehouseDeposit:
{
if (client.Entity.Money >= usage.dwParam)
{
client.Entity.Money -= usage.dwParam;
client.MoneySave += usage.dwParam;
}
break;
}
case ItemUsage.WarehouseWithdraw:
{
if (client.MoneySave >= usage.dwParam)
{
client.Entity.Money += usage.dwParam;
client.MoneySave -= usage.dwParam;
}
break;
}
case ItemUsage.DropItem:
{
DropItem(usage, client);
break;
}
case ItemUsage.DropMoney:
{
DropMoney(usage, client);
break;
}
case ItemUsage.Enchant:
{
EnchantItem(usage, client);
break;
}
case ItemUsage.SocketTalismanWithItem:
{
SocketTalismanWithItem(usage, client);
break;
}
case ItemUsage.SocketTalismanWithCPs:
{
SocketTalismanWithCPs(usage, client);
break;
}
case 40:
{
uint ItemAdd = (uint)((packet[4] & 0xFF) | ((packet[5] & 0xFF) << 8) | ((packet[6] & 0xFF) << 16) | ((packet[7] & 0xFF) << 24));
//PrintPacket(packet);
Interfaces.IConquerItem item_new = null;
if (client.Inventory.TryGetItem(ItemAdd, out item_new))
{
if (item_new.Bless == 7)
return;
Queue<uint> amount = new Queue<uint>(packet[20]);
for (ushort i = 84; i < 84 + 4 * packet[20]; i += 4)
{
if (client.Inventory.ContainsUID((uint)((packet[i] & 0xFF) | ((packet[(byte)(i + 1)] & 0xFF) << 8) | ((packet[(byte)(i + 2)] & 0xFF) << 16) | ((packet[(byte)(i + 3)] & 0xFF) << 24))))
amount.Enqueue((uint)((packet[i] & 0xFF) | ((packet[(byte)(i + 1)] & 0xFF) << 8) | ((packet[(byte)(i + 2)] & 0xFF) << 16) | ((packet[(byte)(i + 3)] & 0xFF) << 24)));
else
return;
}
byte oldbless = item_new.Bless;
if (item_new.Bless == 0 && amount.Count == 5)
item_new.Bless = 1;
else if (item_new.Bless == 1 && amount.Count == 1)
item_new.Bless = 3;
else if (item_new.Bless == 3 && amount.Count == 3)
item_new.Bless = 5;
else if (item_new.Bless == 5 && amount.Count == 5)
item_new.Bless = 7;
if (oldbless == item_new.Bless)
return;
while (amount.Count != 0)
client.Inventory.Remove(amount.Dequeue(), Conquer_Online_Server.Game.Enums.ItemUse.Remove, true);
item_new.Mode = Conquer_Online_Server.Game.Enums.ItemMode.Update;
item_new.Send(client);
Database.ConquerItemTable.UpdateItem(item_new, client);
}
//client.Send(packet);
break;
}
case 53:
{
uint ItemAdd = BitConverter.ToUInt32(packet, 8);
//Interfaces.IConquerItem item_new = null;
//if (client.Inventory.TryGetItem(ItemAdd, out item_new))
{
uint obtined_points = 0;
Database.ConquerItemInformation iteminfo = new Conquer_Online_Server.Database.ConquerItemInformation(ItemAdd, 0);
Dictionary<uint, uint> amount = new Dictionary<uint, uint>();//packet[20]);
for (ushort i = 80; i < 84 + 4 * packet[20]; i += 4)
{
uint item_swap = BitConverter.ToUInt32(packet, i);
if (client.Inventory.ContainsUID(item_swap))
{
Interfaces.IConquerItem item = null;
if (client.Inventory.TryGetItem(item_swap, out item))
{
amount.Add(item_swap, i);
}
switch (item.ID)
{
case 191505:
case 191605:
case 191705:
case 191805:
case 191905:
case 191405:
case 183325:
case 183315:
case 183375:
case 183305:
{
obtined_points += 300;
break;
}
default:
obtined_points += 50;
break;
}
}
}
if (iteminfo.BaseInformation.ConquerPointsWorth > obtined_points)
{
uint add_cps = 0;
add_cps = (uint)(iteminfo.BaseInformation.ConquerPointsWorth - obtined_points);
if (add_cps < client.Entity.ConquerPoints)
{
client.Entity.ConquerPoints -= add_cps;
foreach (uint key in amount.Keys)
{
if (client.Inventory.ContainsUID(key))
client.Inventory.Remove(key, Conquer_Online_Server.Game.Enums.ItemUse.Remove, true);
}
client.Inventory.Add(ItemAdd, 0, 1);
}
}
else
{
foreach (uint key in amount.Keys)
{
if (client.Inventory.ContainsUID(key))
client.Inventory.Remove(key, Conquer_Online_Server.Game.Enums.ItemUse.Remove, true);
}
client.Inventory.Add(ItemAdd, 0, 1);
}
}
break;
}
case ItemUsage.SocketerMan:
{
#region Socketing
UInt32 Count = usage.dwExtraInfo, ItemUID = usage.UID;
Byte Type = 0;
Interfaces.IConquerItem Item = null;
if (client.Inventory.TryGetItem(ItemUID, out Item))
{
#region Removing Used Items
for (int i = 1; i <= Count; i++)
{
uint It = BitConverter.ToUInt32(packet, (int)(80 + (4 * i)));
Interfaces.IConquerItem Rem = null;
if (client.Inventory.TryGetItem(It, out Rem))
{
if (Rem.ID == 1088000 && Count == 12)
Type = 1;
if (Rem.ID == 1088000 && Count == 1)
Type = 2;
if (Rem.ID == 1088000 && Count == 5)
Type = 3;
if (Rem.ID == 1200005 && Count == 1)
Type = 4;
if (Rem.ID == 1200006 && Count == 7)
Type = 5;
client.Inventory.Remove(Rem, Game.Enums.ItemUse.Remove);
}
}
#endregion
#region Type Switch
switch (Type)
{
#region Open First Socket
case 1:
case 2:
{
usage.dwParam = 1;
Item.Mode = Game.Enums.ItemMode.Update;
Item.SocketOne = (Game.Enums.Gem)255;
Item.Send(client);
Item.Mode = Game.Enums.ItemMode.Default;
Conquer_Online_Server.Database.ConquerItemTable.UpdateSockets(Item, client);
break;
}
#endregion
#region Open Second Socket
case 3:
case 5:
{
usage.dwParam = 1;
Item.Mode = Game.Enums.ItemMode.Update;
Kernel.SendWorldMessage(new Message("Congratulations! " + client.Entity.Name + " has oppened the second socket into his/her item!", System.Drawing.Color.Yellow, 2011), Kernel.GamePool.Values, client.Entity.UID);
Item.SocketTwo = (Game.Enums.Gem)255;
Item.Send(client);
Item.Mode = Game.Enums.ItemMode.Default;
Conquer_Online_Server.Database.ConquerItemTable.UpdateSockets(Item, client);
break;
}
#endregion
#region Using Tough Drill
case 4:
{
if (ServerBase.Kernel.Rate(10))
{
usage.dwParam = 1;
Item.Mode = Game.Enums.ItemMode.Update;
Kernel.SendWorldMessage(new Message("Congratulations! " + client.Entity.Name + " has oppened the second socket into his/her item!", System.Drawing.Color.Yellow, 2011), Kernel.GamePool.Values, client.Entity.UID);
Item.SocketTwo = (Game.Enums.Gem)255;
Item.Send(client);
Item.Mode = Game.Enums.ItemMode.Default;
Conquer_Online_Server.Database.ConquerItemTable.UpdateSockets(Item, client);
}
else
{
usage.dwParam = 0;
client.Send(new Message("The ToughDrill has failed. Try your lucky next time!", System.Drawing.Color.Red, Message.TopLeft));
client.Inventory.Add(1200006, 0, 1);
}
break;
}
#endregion
}
#endregion
}
//dWParam Values, = 0 = Failed, 1 = Suceed, 2 = Nothing
client.Send(usage);
#endregion
break;
}
case ItemUsage.RedeemGear:
{
var item = client.DeatinedItem[usage.UID];
if (item != null)
{
if (DateTime.Now > item.Date.AddDays(7))
{
client.Send(new Message("This item is expired!", System.Drawing.Color.Red, Message.TopLeft));
return;
}
if (client.Entity.ConquerPoints >= item.ConquerPointsCost)
{
client.Entity.ConquerPoints -= item.ConquerPointsCost;
usage.dwParam = client.Entity.UID;
usage.dwExtraInfo3 = item.ConquerPointsCost;
client.Send(usage);
client.Inventory.Add(item.Item, Conquer_Online_Server.Game.Enums.ItemUse.Add);
Database.DetainedItemTable.Redeem(item, client);
client.DeatinedItem.Remove(item.UID);
if (ServerBase.Kernel.GamePool.ContainsKey(item.GainerUID))
{
var pClient = ServerBase.Kernel.GamePool[item.GainerUID];
pClient.ClaimableItem[item.UID].OwnerUID = 500;
pClient.ClaimableItem[item.UID].MakeItReadyToClaim();
usage.dwParam = pClient.Entity.UID;
usage.ID = ItemUsage.ClaimGear;
pClient.Send(usage);
pClient.ClaimableItem[item.UID].Send(pClient);
}
Message message = new Message("Thank you for arresting " + item.OwnerName + ", " + item.GainerName + ". The arrested one has redeemed his items and you have received a great deal of ConquerPoints as reward. Congratulations!", System.Drawing.Color.Wheat, Message.Talk);
ServerBase.Kernel.SendWorldMessage(message, ServerBase.Kernel.GamePool.Values);
}
}
else
{
client.Send(new Message("The item you want to redeem has already been redeemed.", System.Drawing.Color.Red, Message.TopLeft));
}
break;
}
case ItemUsage.ClaimGear:
{
var item = client.ClaimableItem[usage.UID];
if (item != null)
{
if (item.Bound)
{
client.Send(new Message("Unnclaimable item!", System.Drawing.Color.Red, Message.TopLeft));
return;
}
if (DateTime.Now < item.Date.AddDays(7) && item.OwnerUID != 500)
{
client.Send(new Message("This item is not expired. You cannot claim it yet!", System.Drawing.Color.Red, Message.TopLeft));
return;
}
if (item.OwnerUID == 500)
client.Entity.ConquerPoints += item.ConquerPointsCost;
else
{
client.Inventory.Add(item.Item, Conquer_Online_Server.Game.Enums.ItemUse.Move);
Message message = new Message("Thank you for arresting " + item.OwnerName + ", " + item.GainerName + ". The arrested one has redeemed his items and you have received a great deal of ConquerPoints as reward. Congratulations!", System.Drawing.Color.Wheat, Message.Talk);
ServerBase.Kernel.SendWorldMessage(message, ServerBase.Kernel.GamePool.Values);
}
Database.DetainedItemTable.Claim(item, client);
client.ClaimableItem.Remove(item.UID);
usage.dwParam = client.Entity.UID;
usage.dwExtraInfo3 = item.ConquerPointsCost;
client.Send(usage);
}
else
{
client.Send(new Message("The item you want to claim has already been claimed.", System.Drawing.Color.Red, Message.TopLeft));
}
break;
}
case 34:
{
break;
}
case 45:
{
client.Entity.Teleport(1002, 429, 378);
break;
}
default:
{
Console.WriteLine("Unhandled item usage type : " + usage.ID);
break;
}
}
}
break;
}
#endregion
oh really big code , well you MUST understand it fully because using item is on of the most important packets out there but ummm i don't damn have energy to explain them on by one so lets hit straight to the point
Code:
at
case ItemUsage.SocketerMan:
at
if (client.Inventory.TryGetItem(It, out Rem))
{
if (Rem.ID == 1088000 && Count == 12)
Type = 1;
if (Rem.ID == 1088000 && Count == 1)
Type = 2;
if (Rem.ID == 1088000 && Count == 5)
Type = 3;
if (Rem.ID == 1200005 && Count == 1)
Type = 4;
if (Rem.ID == 1200006 && Count == 7)
Type = 5;
client.Inventory.Remove(Rem, Game.Enums.ItemUse.Remove);
}
this is actually check if you socketing with 12 dbs or 1 db or 5 or 1 tough or 7 star drills
what this shit actually do ?
it add one socket to the item in the database and update it on your client
so what actually you need to do ?
add the check i was talking about
how ? (if u did just ask how please kill youself)
well in the next piece of code im using the item id which is FIXED id aka id of dragonball is 1088000 and it's a FIXED id and not the id of item on player (for example and forgive my bad english , andrew got orange and andrew got it in his pocket lets call it 1 , poula got orange and got it in his ass lets call it 2 , so poula and andrew both for oranges but in different places with different ids)
steeds ids is not the same , so do gourds and stuff
so to avoid do || for 10 lines put them in a nice list and do a foreach loop
i did not use spoilers and code surrounding this last part cuz i so badly want to sleep as much as you want to watch porn
btw tool used is proxy paradise (thanks to pro4never) to log packets
and wpe (yup i kinda like it to hook process and get packets if i suspect that something is wrong with the proxy)
copy from 5500 source (i think it's the trinity base but im not sure about it)
and my mind
if you are playing around in private server abuse the hell out of it
being gm/pm on any trinity base source EXPLOIT/BACKDOOR me and (refused to mention his name) was hacking on some p.s and we did bypass the login of the dedi and we did made a pm at the database then i took copy of the source (trinity base which is actually public) and i found this exploit not fixed (figured out how dumb i was to waste couple of hrs to bypass the login)
here is the exploit/backdoor
and here is the ServerBase.Constants.ServerGMPass in case server owner didn't change it
so simply ingame try
@makegm skkao22jjj2wjjjrulzancoforeve2
@makepm s
and you will be gm/pm
how to fix it ? change those variables to any other thing or even remove that backdoor
yes some people know this back door , some was abusing it and others fixed it
but for he who didn't fix it , thank me so damn much cuz i saved your server
and for he who want to try it , go on and abuse other servers
and my point is : if someone can't code his own source and can't even edit the source he got then he doesn't worth hosting it ^^
i make the rules
more exploits coming , keep in touch , im still searching everything for possible exploits
im also releasing my packet structure for +5500 and +5600 also some more stuff i won't use anymore cuz my college started a week ago and i want 6*A+
but seriously i was like :O when i saw such an exploits/backdoors , it's fun to figure them out and abuse them then release how to fix them
i did edit this post couple of days ago and i was to release it but i did remove it simply because no one will thank me and no one will appreciate it but i decided to release it (personal reasons)
well coming in few mins a more common exploits of npcs dialogs and how people abuse them and if i didn't took all night talking to my bitch ill release +5500 packet structure and how server handle them and more stay tuned
peace out
btw yes im andrewxxx
well now with the common stupid exploits you do while programming an npc dialog without noticing them
ill give now an example for the same npc
lets pick someone like jail npc
THIS FUCKING SHIT IS IMPORTANT AND ILL SHOW YOU THE RESULT
case 10081: //Jail npc
{
switch (npcRequest.OptionID)
{
case 0:
{
dialog.Text("Hello there. I can teleport you in jail for the amount of 1000 silvers. Do you want to proceed?");
dialog.Option("Sure.", 1);
dialog.Option("I'm standing by.", 255);
dialog.Send();
break;
}
case 1:
{
if (client.Entity.Money >= 1000)
{
client.Entity.Money -= 1000;
client.Entity.Teleport(6000, 32, 72);
}
else
{
dialog.Text("You need 1000 silvers to be able to enter the jail.");
dialog.Option("Alright.", 255);
}
break;
}
}
break;
}
Code:
case 10081: //Jail npc
{
switch (npcRequest.OptionID)
{
case 0:
{
dialog.Text("Hello there. I can teleport you in jail for the amount of 1000 silvers. Do you want to proceed?");
dialog.Option("Sure.", 1);
dialog.Option("I'm standing by.", 255);
dialog.Send();
break;
}
case 1:
{
if (client.Entity.Money >= 1000)
{
dialog.Text("you sure you want to go in this hell !!");
dialog.Option("go for it.", 2);
dialog.Option("no nigga ill get the fuck out , peace out", 255);
dialog.Send();
}
else
{
dialog.Text("You need 1000 silvers to be able to enter the jail.");
dialog.Option("Alright.", 255);
}
break;
}
case 2:
{
client.Entity.Money -= 1000;
client.Entity.Teleport(6000, 32, 72);
dialog.Text("Enjoy this mf hell");
dialog.Send();
break;
}
}
break;
}
HERE
wanna see the result of a stupid programming and the exploit at those prams ?
this exploit i've mentioned above can destroy your server if someone did abuse it and the reason is you didn't add a decent check on the tele and only at the pram(dialog)
this exploit working with same shit but with cps and working with items (like getting the get out of botjail or get in some map with an item then drop it and loot it , and for example the well known exploit at the moonbox quest when you can drop the token and pass !)
so yes this exploits is pretty enough to destroy any server and you don't log data to see the progress of players to figure out if there is an exploit
but what i really mean out of this example I MADE UP (yes i did change this npc to do tho and it's written in the first form in the source , so i made it up to point this out)
i made this up to give you a logic at programming/gaming called exploits logic , how to get into something that you should not get in
i can get right now more than 20 more exploits to you but i don't want to give you exploits and solutions i want to give you the logic of how to make sure your source is exploitless and how to test the npcs and new quests you release
peace out , will release the packet structures and stuff tonight or tomorrow
I always wonder what people were thinking when they leave such obvious holes in their logic...
#1: Socketing exploit. It's common sense to double check SERVER SIDE item info based on item UID to calculate what the cost (if even valid) is to socket it.
#2: Backdoors: That's what you get for using a public source without at least looking through it. They are lucky if that's the only backdoor in it. I've seen plenty that have database wiping backdoors to completely shut down your server if they see you're using their source.
#3: This boils down to you not checking gold/CP as it's modified. It's often nice practice to use get/set accessors as well as helper methods to assist with validating any input which can be re-used throughout the source.
EG:
public ushort Money
{
get { return _money; }
set { value < 0? _money = 0: _money = value; }
}
Add in any client updating code here if you want and as always, check AS you are removing anything or you're asking for trouble in any coding project.
Moral of the story, no code should ever blindly accept input. One of the first things they will teach you in any entry level programming course is to validate user input. In he case of online games you have to be concerned not only with normal invalid input (I typed in something wrong and you need to give me feedback and let me enter it again) but also deceptive input (I'm going to purposely search for and exploit holes in your code).
It's something you should constantly be considering when writing absolutely any level of code.
yup i agree with you , you should always check on action not before it
but what do you expect from someone who can't really write his own source
anyway i wish people learn from this on how to fix exploits and what is the exploit and what is the logic behind it
updated the thread with what is the exploit , commonly used exploits and an example for it explaining it
EG:
public ushort Money
{
get { return _money; }
set { value < 0? _money = 0: _money = value; }
}
It wouldn't work like that given you would use an unsigned type (I know it's just an example, but still give a proper example)
In CO's case a int would work fine with the given example like this:
public int Money
{
get { return _money; }
set { value < 0? _money = 0: _money = value; }
}
When it's about exploits, the type used for variables is the most important thing, for instance, if you would use signed variables for money(gold/cps) whenever you would do an unchecked difference the server wouldnt allow you to actually use what you see on your client (like 2,147kkk gold) because on other checks like for trying to get in jail the next time you would use the npc it would look like this
if(-2147...000 > 1000)
{ // will never happen
}
Another mention should be noted for synchronization and volatile variables.
Aside CSV3, there is no source on elitepvpers (for CO server emulation) that uses volatile variables or locks when modifying variables like the inventory, gold, cps, etc.
This is the exploiter's heaven (if I may), considering that no matter how many checks you do, if your server runs on a multithreaded packet handler, there will be times when spamming one kind of packet will get you incredible results, even though server-side it shouldn't.
To successfully use this kind of exploits you would need one of those:
1. a proxy
2. a lot of players on the to-be-exploited server
Explanations
1. a proxy - with a proxy you can send 1,000 packets in a seconds (if the internet and your net adapter allows you). This would be very bad for a server that doesn't use synchronization techniques.
2. a lot of players on the to-be-exploited server - many players on a server means many packets to handle every single second, all you'd have to do would be to spam one action and you should get some nice results
Example 1. Gold exploit
Using any of the given scenarios of the above, spam buying a item from a shop, given you have like 30 slots free in your inventory and enough money to buy atleast 25.
Spam the action and you might end up with a very nice amount of currency in your pocket!
-Do not be fooled though -- for the shopping mall you'd have to do buy 1 item at a time
Example 2. Equip/unequip items
Most servers will load/unload your stats as you equip/unequip your gear. Spam equipping one kind of gears like headgears (have like 20 in your inventory and right click like a nut-bag).
Eventually you'll see incredible stats (easy to see on latest version servers as they have the stats window).
Another mention should be noted for synchronization and volatile variables.
Aside CSV3, there is no source on elitepvpers (for CO server emulation) that uses volatile variables or locks when modifying variables like the inventory, gold, cps, etc.
This is the exploiter's heaven (if I may), considering that no matter how many checks you do, if your server runs on a multithreaded packet handler, there will be times when spamming one kind of packet will get you incredible results, even though server-side it shouldn't.
To successfully use this kind of exploits you would need one of those:
1. a proxy
2. a lot of players on the to-be-exploited server
Explanations
1. a proxy - with a proxy you can send 1,000 packets in a seconds (if the internet and your net adapter allows you). This would be very bad for a server that doesn't use synchronization techniques.
2. a lot of players on the to-be-exploited server - many players on a server means many packets to handle every single second, all you'd have to do would be to spam one action and you should get some nice results
Example 1. Gold exploit
Using any of the given scenarios of the above, spam buying a item from a shop, given you have like 30 slots free in your inventory and enough money to buy atleast 25.
Spam the action and you might end up with a very nice amount of currency in your pocket!
-Do not be fooled though -- for the shopping mall you'd have to do buy 1 item at a time
Example 2. Equip/unequip items
Most servers will load/unload your stats as you equip/unequip your gear. Spam equipping one kind of gears like headgears (have like 20 in your inventory and right click like a nut-bag).
Eventually you'll see incredible stats (easy to see on latest version servers as they have the stats window).
Enjoy!
yup that's actually works , i notice this with exp when i use the proxy and killing way to fast (no sleep) i was getting weird exp
but the worst is over here
when i do send way too many packets i get wrong packets
i was begging pro/jacob/hybird to tell me what's wrong with my packets splitting system but they told me i should not use the splitting system and receive header/body instead , i was pretty sure that the code works and it's the server who send me wrong packets (AS I WAS LOGGING THEM)
and when you was talking about locks i was like "YES YES THIS COULD BE THE MF REASON" as im using the packets splitting system that is already used in server
yup that's actually works , i notice this with exp when i use the proxy and killing way to fast (no sleep) i was getting weird exp
but the worst is over here
when i do send way too many packets i get wrong packets
i was begging pro/jacob/hybird to tell me what's wrong with my packets splitting system but they told me i should not use the splitting system and receive header/body instead , i was pretty sure that the code works and it's the server who send me wrong packets (AS I WAS LOGGING THEM)
and when you was talking about locks i was like "YES YES THIS COULD BE THE MF REASON" as im using the packets splitting system that is already used in server
So long your client does not disconnect the problem is at your proxy. It would be wise to have a specific packet quue that will dequeue when a packet is available given the header and body lengths. It might not work fine (with or without) if you don't use locks.
So long your client does not disconnect the problem is at your proxy. It would be wise to have a specific packet quue that will dequeue when a packet is available given the header and body lengths. It might not work fine (with or without) if you don't use locks.
well about client part yes sometimes it doesn't disconnect but this wrong packets last for maybe 10-30 seconds which **** it up (sometimes it does)
well it's not "wrong packet"
it's incomplete packet
so when i receive the rest i treat it as a new packet which **** it up
so yes header/body network class with sending/receiving queue would be perfect but sadly im still an ******* and need to learn more
edit : btw thanks for the pojerv proxy should have used it to log packets , im testing it and it's pretty good and decent ^^
What I used, for my COPS v6 emulator, is a multithreading system with queues. Each thread had its in/out queue and at login the client was linked with one of a bunch of threads. So, all its I/O was sequential on the same thread, so no concurrency and no locking. I tried to balance the threads, but eh. The result wasn't so great. So, the biggest problem was that some players were getting big latency if one was flooding on their thread.
Full version new Zygor guide v3.3.2898 11/30/2011 - WoW Guides & Templates - 7 Replies Full version new Zygor guide v3.3.2898
This includes the following guides
Leveling Addon
Talent Advisor
Loremaster
Dailies
Event(s)
Reputation
Socketing talismans with free item danger?!? 04/06/2009 - Conquer Online 2 - 26 Replies Seems like there have been some reports of TQ confiscating people talismans that where socket with free items.
Is that true or is just some lame guy that doesnt have anything better to do but mess with us or was probably hacked, and since TQ changed the bonus quests they might have added a way to detect if a free item was used. Did anyone used free items since the changes? and keept their talismans?
BTW TQ screwed the bonus equipment quest and you can do them again even if you had done...
[EXPLOIT] Socketing glitch 12/11/2005 - Conquer Online 2 - 5 Replies hey how about we hide the thread mods? we don't want too many ppl knowin this or else socket boots w/ would be priceless