Post Pacific  

Go Back   Post Pacific > Восстановленный архив > Темы без сохранившегося раздела
FAQ Community Calendar Today's Posts Search

Notices

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old 09.10.2005, 06:50   #1
tontor
Архивный участник
 
Join Date: May 2005
Posts: 109
Default [Share] server side html exploit fix, cloning char fix

[edit] be sure to look for updates later on in the thread [/edit]
Heres my solution for html exploits, I'll explain how it works. Each time a client requests a html the server will parse the requested html for valid commands, crc them, and store them in a vector referenced by this characters accountid. each call that handles a bypass or link cmd has been hooked, so every bypass or link cmd the client sends to the server, now gets, crcd and checked against the users table in the vector. If the cmd crc matches one that was previously stored for this user, the cmd is verified and the user is permitted to pass the cmd, when it fails to match the cmd and account are is logged to the l2server console and error log files as a possible exploit attempt. Every time a user successfully completes a cmd or enterworld is called (if they relog), their table is cleared. Link is handled the same way, only on failure it will retrieve the file linkerr.htm displaying it to the user, just put an access denied msg or whatever you please here.


The vector size supports a default of 200,000 accounts, and a cmdlist of no more then 40 commands per html. At allocation time this uses ~30mb of memory, should you exceed 200,000 accounts it will double its size, until it can accomodate that high of account id(this will be buggy and cause problems in most cases cause of threading). So long as your html does not have more then 40cmds or a teleport list larger then 40 locations will work fine, and if you exceed that limit of 40, all cmds past the 40th will be ignored, and logged as an exploit.


Now that said there are a few things to explain about the effects this can cause.

First off, the method most versions of l2walker (maybe other bot clients also) handle htmls differs from ncsofts client, a side effect of this is that a majority of l2walker users will be logged as exploiters every time they access an npc, and denied access to use them. (not a bad side effect). If you see alot of failed teleport requests, warehouse withdraws, recipe crafting, from a certain account id, they are using a 3rd party client such as l2walker.

Second, didn't feel the need to handle in-game BBS since i don't think anyone ever uses it because it causes a lot of stability problems. So all _bbs commands logged as html exploit can be ignored, its simply an unhandled call.

Next, there appears to be a a few htmls for quests and such where the htmls include a link command that has extra spaces between "link nameof.htm", if you see alot of warnings for a html similar to something like name_q017_9823.htm, use grep or some other regexp program on all the html files in your html folder and locate the html that is calling link for this, and check it, it will have an extra space or something similar to this that is causing it to be reported incorrectly, and denying users access. (powergrep for windows is what i use).

(the following have link followed by 2 spaces and need to be corrected)
terry_q0213_22.htm
terry_q0213_21.htm
terry_q0213_18.htm
terry_q0213_08.htm
terry_q0213_06.htm
blacksmith_pushkin_q0218_07.htm

(the following have a space before the link cmd)
charkeren_q0412_01.htm

This patch should work for all, or most C1, C2, and C3 servers. I've tested it with c1 and c3 but not c2. Make a backup of your original l2server.exe, extract patch.exe and patch.dll into a folder with l2server.exe and run patch.exe once, after this you may discard patch.exe. l2server.exe will now force load of patch.dll opening a new console as you run it, displaying a list of calls that were hooked. Be sure that all of these are patched successfully, and if any fail then your l2server already has a modification at this address and wont be applied, most likely causing crashes and who knows what else. If you used my link+tp patch I posted on the forum awhile ago i suggest you use n l2server.exe without it, if you don't i believe link and teleport patches will fail but may still run fine.


Also this patch fixes the issue with people using l2walker to clone chars (livid mentioned something about there was a duping method using this), instead of just closing the user socket this calls leaveworld also making this method not work any longer.

I believe that covers about everything.
I've attached the patch and some fixed htmls.
tontor is offline  
 


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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 15:34.