Jump to content

[Exploit + fix]Lets hack: Anti-Target (Unsanitized input exploit ).


Recommended Posts

Posted

So there was that issue going around, and apparently anti-target was and is the hot topic around. I talked with some "server admins" most of them had the exploit, could use it, couldnt not fix it ( shouldnt wonder why not ... ) but they didnt reply back cause they didnt probably believe that i can fix it or find it. Some others, which i thank, contacted me in msn ( about 8 guys in total ) , sent me the phx script ( which was so messy coded, whos the noob that created  it ? ). Anyway one thing i didnt like about the contacts was that they didnt prepare the ground for me to fix it, so i had to try the exploit myself, get phx, get interlude , etc. At least flash got most of the parts ready, so after a good 3 hours of testing we managed to get it working. For that mysticism and the behaviour of most admins i wont release a patch that fixes it, i will just share the "idea" and the "solution" behind it so as only good packs get it fixed ( aCis etc ) and the garbages ( l2jfrozen/brazil/teon and so on have it running and rot to the hack-hell they deserve to).

 

 

So the famous anti-target exploit.

 

Where does it work ?

 

Every server that supports freight system atm.

Versions: L2J/L2Jfree's and their forks.

 

How does it work ?

 

The idea behind the exploit, is that with a certain packet crafting, you can force the server to create a new L2PcInstance of you while you are already ingame. There is a section in the code where that can happen. In the same section of the code, few lines lower, the game calls .deleteMe() on that object. The object gets removed, but due to same id with your , the real l2pcinstance that is attacked to the client , it removes you from the L2World since L2World maps the objects based on the id. That makes the player appear missing from L2World as a result, no kicks no targets etc. ( Parodically it gets removed from knownlists too till they get updated ). For more spoiling : RequestPackageSend.java :)

 

How to fix it ?

 

Do not allow L2PcInstance creation if for the requested id, another character exists in the game ( check l2world for it ).

 

Tested on:

 

aCis pack latest revision.

 

Verdict:

I hope that way only the good cheaters will get to do the exploit  ( i did it without the script that goes around so if you cant do it, you are probably a noobish script-kiddo) and only the professional and serious developers making packs will have it fixed in their packs. I may release a patch in the future, but not right now, since both communities ( cheaters and admin-wannabes ) are way too immature to even cooperate with me for their own good. I dive in the mud for 1 week to get the exploit and for another 3 hours to make it working and fix it.

 

Cya :)

 

EDIT: Since im a good guy, here's the fix:

### Eclipse Workspace Patch 1.0
#P gameserver
Index: java/net/sf/l2j/gameserver/network/clientpackets/RequestPackageSend.java
===================================================================
--- java/net/sf/l2j/gameserver/network/clientpackets/RequestPackageSend.java	(revision 70)
+++ java/net/sf/l2j/gameserver/network/clientpackets/RequestPackageSend.java	(working copy)
@@ -24,6 +24,7 @@
import net.sf.l2j.Config;
import net.sf.l2j.gameserver.model.ItemContainer;
import net.sf.l2j.gameserver.model.L2ItemInstance;
+import net.sf.l2j.gameserver.model.L2World;
import net.sf.l2j.gameserver.model.PcFreight;
import net.sf.l2j.gameserver.model.actor.L2Npc;
import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
@@ -78,6 +79,9 @@
        if (player == null)
        	return;
        
+        if(L2World.getInstance().getPlayer(_objectID) != null)
+        	return;
+        
		L2PcInstance target = L2PcInstance.load(_objectID);
		PcFreight freight = target.getFreight();
		getClient().getActiveChar().setActiveWarehouse(freight);

 

And here is the exploit:

 

9F + yourCharId+ somerandomitems = RequestPackageSend = Send a freight to yourself, not the other chars ;)

 

yourCharId , get it with phx its a 4 byte number like 4D AA 00 12. So the packet will look like this :

 

9F 4D AA 00 12 01 00 00 00 5D 14 08 32 02 00 00 00

 

Posted

A "tough badass, pantpooping noob-cheaters asswooper", smartass. :) You want exploits, you gonna work for them. Same goes for pack owners for fixes. ;) This is the only way of improvement. You learn when someone gives you the cheating theory and you do the practice. If you get the exploit served in a golden plate you will never learn. And the same goes for those that call themselves l2j interlude developers. You learn by knowing the theory and doing the practice, not by blindly adding a patch in your code.

Posted

A "tough badass, pantpooping noob-cheaters asswooper", smartass. :) You want exploits, you gonna work for them. Same goes for pack owners for fixes. ;) This is the only way of improvement. You learn when someone gives you the cheating theory and you do the practice. If you get the exploit served in a golden plate you will never learn. And the same goes for those that call themselves l2j interlude developers. You learn by knowing the theory and doing the practice, not by blindly adding a patch in your code.

good answer Leluche anyway good job mate keep working ;)
Posted

Speaking of l2inc, l2inc is not unhackable as you may think. I mean, sure they are the most experienced team around atm, but they are humans. There is no possibility they have eliminated every unsanitized input, every single race condition every bla bla.

 

For the records, ill tell you two stories that happened between me, my clan  and l2inc that will backup some things i said previously ( i hope ).

 

Story one : How back2business ruled l2inc.

 

Six months before i open l2relapse, we were playing in l2inc. We kinda ruled the server. Aden , full wins in pvp in a server which was peaking back then at around 4k people. Pretty tough isnt it ? Well how did we do it ? Sure we were great pvpers, but there were many other great clans too. Short answer. We cheated. A lot.  One of the gang members, found accidentaly, an enchant exploit. It was a race condition as far as i remember ( i had no idea what a race condition was back then ) , all i know is that he gave me the exploit, and i coded "The factory of fantasy isle ( or Issle :P)". Basically we produced full +30 items for the whole clan day after day having a script "interacting" with clan members and enchanting their gear. And that kept going for about a month. If im correct nBd attempted to fix it once before he succeeded ( unconfirmed ).  The verdict : Even the most developed and advanced servers will have exploits. Few, rare, but occasionally there may be exploits coming up to surface.

 

Story two: How a noob couldnt fix an underflow for 3 hours.

 

That noob was me, posing as a server admin, with 800 players online. Sure i coded some cool things, but i pointed fingers ( as someone said :) ) a lot. So apparently i took some players from servers i shouldnt and some people got pissed :) And then something cool happened that made me start thinking. Someone hacked us :) He knows, i dont hold any grudge on him anymore :) He may still. There was an unckecked buffer reading in the GamePacketHandler ( cant remeber the packet ) , that was causing an underflow exception. I had no idea about underflows or overflows back then. So i turned to BigBoss. Apparently he didnt either, back then :) So bigboss talked to nBd of l2inc, and i went to his chatroom to contact me. And i still remember what nBd said, "You know i will help you, but i shouldnt, after all that shit you have talked about my server in public." And here is the critical point, where someone becomes a beggar or a lion. I didnt accept the help. Nor did i got ask help from l2jserver.com I said : "Doesnt matter if it takes me 5 mins with you , or 5 hours myself, ill go read the theory and fix it myself buddy." Which i did some hours later that midday.

 

Verdict of those two stories: If you want to evolve, you should get your hands dirty and never rely on others to fix things of you. And only by doing things by yourself and getting only "pushed" by others you will evolve to the next stage.

 

"So if you cant make exploits out of vulnerabilities, do not cheat. If you cant fix known vulnerabilities, dont make a server." - Issle :)

 

Posted

I love your answers xD

but still i need a hax for inc xD

 

 

BTW nBd is a great dev but he got no imagination as I can see from the gameplay, so what's the point of having a "robot" server? :)

 

 

 

(PS. I remember your clan)

Posted

I love your answers xD

but still i need a hax for inc xD

 

 

BTW nBd is a great dev but he got no imagination as I can see from the gameplay, so what's the point of having a "robot" server? :)

 

 

 

(PS. I remember your clan)

 

You know, the reason we opened relapse was just that. nBd was great admin/dev, but when it came to gameplay, boy did he sux :) So, one day after an aden siege someone said in clan chat : "Hey lets open a server ! We go find some pro admin developer and tell him to make us a server." Well, they did never find an experienced admin to do that at the end. They found a player ... :)

 

So anyway since the asshole-self got expired, i go make a patch and release ;)

Posted

Wow just tried it out and works like a charm. Thank you for sharing it

+1 Karma. You rly deserved it!

 

Edit: You should hide your exploits here for a good amount and post the fix in the l2j section.

Posted

Wow just tried it out and works like a charm. Thank you for sharing it

+1 Karma. You rly deserved it!

 

doh, can you tell me how you use the exploit ? cheers :)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.




  • Posts

    • @Vedi don't give up bro. We are waiting for this project to come back stronger.  
    • Welcome to L2EpicFail Server developed by gamers for gamers!  OBT - 7th March 2024 at 18:00 GMT+0 GRAND OPENING - 14th March 2025 at 18:00 GMT+0 Website : https://l2epic.fail/ Discord : https://discord.gg/6hwhrkrHBG     Server Features and Rates Xp – 15x Sp – 9x Adena – 6x Drop – 2x Spoil - 2x Seal Stones drop -  3x   Epic Raid Boss drop - 1x Regular RBs - EXP 5x, SP 5x, drop 4x   Quest drop - 1x (some quests customized to 3x) Quest reward - 1x, Adena 3x, EXP 3x, SP 3x     Premium Account Xp +20% Sp +20% Adena +20% Drop +20% Spoil +20% Quest reward +20%   get by vote or donate World chat 20 times/day use ">" in chat. Buff Book outside of town. Applies to all accounts.     Special Features Classic interface ActiveAnticheat Vote System Missions Attendance check And more in information below     Noblesse There are 3 ways how to make noblesse 1 - Retail Quest with killing barakiel 2 - Modifed Quest, choose killing mobs for 100 items instead of barakiel 3 - Can be bought for Epic Coins     Raid Rank Killing regular Raids gives points according to the level of the RB to the clan of the player who killed the boss. At the end of every month, there will be rewards for top clans. For more info, follow our Discord.   monthly period killing RB = points to clan according to RB level rewards up to Valakas Necklace (not the first month) current statistics can be checked online     Epic Bosses & Respawns   Queen Ant 20 - 30 hours respawn window 1 hour always displayed in .epic auto PvP zone (max 43 level) HP boosted drop chance 40% guards, nurses lvl 40   Orfen 20 - 30 hours respawn window 1 hour always displayed in .epic auto PvP zone (max 56 level) HP boosted drop chance 40% earring gives +1 WIT, +1 INT   Core 20 - 30 hours respawn window 1 hour always displayed in .epic auto PvP zone (max 56 level) HP boosted drop chance 40% ring gives +1 STR, +1 DEX   Zaken 44 - 54 hours respawn window 1 hour always displayed in .epic auto PvP zone (max A grade) doors opened only 5 mins HP boosted   Baium Every Sunday 20:30 - 21:30 window 1 hour always displayed in .epic auto PvP zone (13 - 14th ToI level) regular HP   Frintezza Every Monday, Wednesday, Friday 20:00 - 21:00 window 1 hour always displayed in .epic auto PvP zone (all IT entrance) max 5 parties to entry max 500 range from NPC   Antharas Every two weeks on Saturday 21:00 - 22:00 window 1 hour always displayed in .epic auto PvP zone (bridge to heart)   Valakas Every two weeks on Saturday 21:00 - 22:00 window 1 hour always displayed in .epic auto PvP zone (Klein to heart)   every Epic RB drops Epic Medals equal to RB level x 10     Regular Bosses all regular RBs HP boosted M. def boosted a bit to give advantage to fighters all regular RBs respawn 24 - 30 hours every RB drops Epic Medals equal to RB level     Added Skills Mass Sweep - All Bounty Hunters 40+ Block Buff - All Characters, toggle Escape: 20 seconds - All Characters, no more SoEs   Skills autolearn. Losing skills after 16 levels of delevel. Max buffs 24 + 4 with books (no autolearn)     Augments NoGrade - 4% chance MidGrade - 5% chance HighGrade - 7% chance TopGrade - 6% chance   GM shop weapon/armor/jwl (max C grade) shots/spiritshots (max C grade) mana potions (500 MP, 5s)     NPC buffer all buffs, songs, dances including 3rd prof + resists 1 hour duration all chars Buff Book in inventory     Global Gatekeeper all towns including cata/necro ToI 3/5/7/10th     Olympiad Thursday to Saturday 18:00 - 23:50 UTC+0 period 7 days no class participants min 5 base class participants min 10 max enchant +6     Class Transfer 1st class 50k adena 2nd class 500k adena 3rd class 20kk adena + 700 Halisha marks (tradeable)     Noblesse Quest Quest retail like. Moonstone Shards, Demons Blood etc. quest drop boosted     Subclass Quest To get the quest, you have to be 75+ on your main character (start Reorin in Giran) Bring item from Cabrio chest Bring items from Hallate, Kernon and Golkonda chests Bring this back to Reorin Bring 984 B-grade crystals and top B weapon to Reorin Get low A-grade weapon as reward Done , you can take subclass (up to 5) from any Master in town     Clans all clan members get clan skills (no need for titles) max clan slots 65, max ppl in PvP zone 63 leave/dismiss penalty 0 hours max clans in ally 3     Others   max 3 windows per HWID (only one in PvP zone) protection after teleport for 20 seconds arrows and spellbooks drop turned off weight limit 10x, stackable enchants and LS champions blue (5x HP) min level for trade = 40, chat = 20 BoM/MoM spawned in towns Edited November 1, 2024 by NevesOma
    • Im searching to developer to help me 🙂 pm me 🙂
    • DISCORD : utchiha_market telegram : https://t.me/utchiha_market SELLIX STORE : https://utchiha.sellpass.io/ Join our server for more products : https://discord.gg/uthciha-services https://campsite.bio/utchihaamkt  
    • DISCORD : utchiha_market telegram : https://t.me/utchiha_market SELLIX STORE : https://utchiha.sellpass.io/ Join our server for more products : https://discord.gg/uthciha-services https://campsite.bio/utchihaamkt  
  • Topics

×
×
  • Create New...