Post Pacific

Post Pacific (https://postpacific.mmorpg-game.online/index.php)
-   Tutorials & Guides (https://postpacific.mmorpg-game.online/forumdisplay.php?f=44)
-   -   [Share] server side html exploit fix, cloning char fix (https://postpacific.mmorpg-game.online/showthread.php?t=2152)

avatard 12.12.2005 12:55

@tontor

not using l2admin at all, only non-native services ran on the server platform are FireDaemon, L2npc, l2server. However the wndproc thing somehow hasn't happened for a few days. ;[

kembl 15.12.2005 15:49

Quote:

Originally Posted by klemka
Clone char still working :cry:

Same for us, ability for cloning still exists :(

tontor 16.12.2005 12:45

Quote:

Originally Posted by drzoom
I can explain new way clns are working, if u need!

pm'd you with no response, please provide details.


There was a mistake made while changing something awhile ago, allowing sql injection via bbs to be possible, the dll below should remedy it. Thanks to who brought the problem to my attention.

drzoom 16.12.2005 14:02

WAY!!!
 
Sorry, hadn't time to write to u :( Decided to write this way for all!
That someone, who wrote about sql-injections, was me:) And it's cool that it wouldn't be problem.

So, the way clones are working:
1) u have 2 accounts and use l2walker
2) at 1st u have 2 characters, at 2nd u have 3 characters
3) at 2nd account use "manual login char"
4) leave the window with list of chars
5) enter login and pass for of 1st account
6) enter 1st char to login
7) LOGIN IT
8) place ur character for example in market
9) use window from step 4 and login with 3rd char
10) l2walker after same amount of time will display "enter char failed"
and will disconnect, BUT! CHAR FROM 1ST ACC WILL BE ONLINE
11) after that u may login with account u want, except 1st account.

This way we produce clone. Cheater may use it for endless trader.

drzoom 16.12.2005 14:08

!
 
Tontor, it will be better if u ICQ me by 203833915

horyfilipe 19.12.2005 02:19

Tontor, there is a new builtin help.htm inside some dll.. well i dont know if this has some to do with what i am going to tell, but the fact is that recipe bug is working, but also i have LINK(offset patch) FAILED.. do you think its because of the link failed? If yes, please tell me how to fix (offset/value)?

Thanks!

tontor 19.12.2005 04:42

Quote:

Originally Posted by horyfilipe
Tontor, there is a new builtin help.htm inside some dll.. well i dont know if this has some to do with what i am going to tell, but the fact is that recipe bug is working, but also i have LINK(offset patch) FAILED.. do you think its because of the link failed? If yes, please tell me how to fix (offset/value)?

Thanks!

It is absolutely the problem, check this thread earlier for details on offset/values to change for link/teleport. If link patch fails, link related (this includes recipes, reading local files) are vulnerable!

Flamestrike 19.12.2005 06:32

I got the same thing too link patch failed.

Phantom2005 19.12.2005 16:36

(how to fix link prob.)
hex offset: .005154b9

change to: 89 9c 24 24 01 00 00 66 89 5c 24 0c

toolpunk 19.12.2005 17:02

thx a lot phantom :)

Flamestrike 20.12.2005 00:53

Yeah like thanks :D

Domzelan 20.12.2005 12:55

tontor can you make a update - i said about logs, can you add in your patch loging. log.txt - and all logs save in this file?

Kryak 21.12.2005 05:12

Still it would be quite good to see time of attempt exploit

RmzVoid 21.12.2005 06:14

Quote:

Originally Posted by Domzelan
tontor can you make a update - i said about logs, can you add in your patch loging. log.txt - and all logs save in this file?

l2server/log/err/ here logs (also with tontor's messages)

serjr 21.12.2005 09:14

Tontor DLL was bypassed by BBS Inject.

Domzelan 21.12.2005 13:14

Quote:

Originally Posted by serjr
Tontor DLL was bypassed by BBS Inject.

yes :(

Mirror 21.12.2005 13:16

hasn't tontor blocked bbs inject in his last .dll version .. ?

serjr 21.12.2005 14:50

My message was about last version of DLL

Radmin 22.12.2005 05:34

need a fix plz %)

BBS Add Favorites and more... MORE... MORE!!!! other....
NEED a FIX PLZ!

serjr 22.12.2005 08:03

Афтар убей себя ап стену, кто такое пишет то открытым тексом?
For what reason you post here exploit? Maybe you don't know how to use PM?

srh 22.12.2005 08:52

2radmin: читай мой пост на тему того как это фиксить
2all: read my topic about [fix] "bug" ....

Mirror 22.12.2005 09:56

yes edit your post radmin or some mod do it

serjr 22.12.2005 10:21

Quote:

Originally Posted by srh
2radmin: читай мой пост на тему того как это фиксить
2all: read my topic about [fix] "bug" ....

2Srh you write right ideas but that will not help because inject work in stored procedure environment, not direct to base. Your post is not a panacea.

srh 22.12.2005 12:58

Quote:

Originally Posted by serjr
2Srh you write right ideas but that will not help because inject work in stored procedure environment, not direct to base. Your post is not a panacea.

ok, logging in as server login in QA, selecting db lin2world
query (as server do):
exec lin_AddBlockList 1, N''delete from ....--
we get reply:
Server: Msg 2627, Level 14, State 1, Procedure lin_AddBlockList, Line 41
Violation of PRIMARY KEY constraint 'PK_user_blocklist'. Cannot insert duplicate key in object 'user_blocklist'.
Server: Msg 50000, Level 16, State 1, Procedure lin_AddBlockList, Line 44
Cannot find add blocklist: char id = [1], target naem[]
The statement has been terminated.
Server: Msg 229, Level 14, State 5, Line 1
DELETE permission denied on object '....', database 'lin2world', owner 'dbo'.

testdude 22.12.2005 15:16

Quote:

Originally Posted by srh
Cannot find add blocklist: char id = [1], target naem[]

<offtopic> nice typo by ncsoft there xD </offtopic>
is there not a way to limit the size of the execute line for the store procedure? i noticed that if u do anything longer than delete from...... it cuts the end off, would this be because of the NVARCHAR(50) in the procedures veriabley thingies? change the 50 to 17 maybe fix this problem? i dunno, i r teh nub at sql stuffs xD

serjr 22.12.2005 15:22

what about bbs ?

RmzVoid 22.12.2005 16:02

srh's fix helps, but still need keep select and insert rights for DB user.
IMHO tontor can make parser for sql injections in command parameters ))

kembl 22.12.2005 16:59

So, what if hack@#s try to use exec?
The right way to solve this injection is replace any quote to double quote ' -> '' on any request from client, maybe torune can add this to his magic dll?

I think not far this day, when l2server will be only addon for torune's dll :)

top-gear 23.12.2005 02:39

RmzVoid delete your post, dont post direct commands like these!!!

I think the solution is to disable the block command server side. Is that possible? It surely requires hexing

srh 23.12.2005 04:36

Quote:

Originally Posted by RmzVoid
srh's fix helps, but still need keep select and insert rights for DB user.
IMHO tontor can make parser for sql injections in command parameters ))

as i say in my post u need some select only rights on few tables (builder... and user_data) and all (for server account).

HF 23.12.2005 05:05

Quote:

Originally Posted by srh
Quote:

Originally Posted by RmzVoid
srh's fix helps, but still need keep select and insert rights for DB user.
IMHO tontor can make parser for sql injections in command parameters ))

as i say in my post u need some select only rights on few tables (builder... and user_data) and all (for server account).

i cant make setting in sql2005. You can help me? tutorial guide :)

top-gear 23.12.2005 06:55

yes,that would be nice.tell me for sql 2000 too pls

Please someone tell me how to hex friendinvite and block. I don't want them to work at all. I don't know about bbs but those two commands are a serious problem right now.

srh 23.12.2005 07:49

okok i tried to read PM :) i've check out few fings and then write some tutorial :P

kembl 23.12.2005 08:11

Quote:

Originally Posted by HF
Quote:

Originally Posted by srh
Quote:

Originally Posted by RmzVoid
srh's fix helps, but still need keep select and insert rights for DB user.
IMHO tontor can make parser for sql injections in command parameters ))

as i say in my post u need some select only rights on few tables (builder... and user_data) and all (for server account).

i cant make setting in sql2005. You can help me? tutorial guide :)

Check here https://postpacific.mmorpg-game.onli...?p=26910#26910
this soluton for both 2000 and 2005, cause it in RAW-t-sql command format.
that script still under update! be aware!

tontor 23.12.2005 12:21

Quote:

Originally Posted by RmzVoid
srh's fix helps, but still need keep select and insert rights for DB user.
IMHO tontor can make parser for sql injections in command parameters ))

Already working on it :). It will be posted here when finished, as far as BBS injection still goes. I tested it with example you provided as well as my own (serjr) and the injection failed. Since you said you were not 100% sure was still through BBS I'll assume it was through /block /friendinvite etc unless can provide more details.

top-gear 23.12.2005 12:34

tontor if you find a solution pls post it at a seperate patch. My server freezes if I use help fix, I suppose cause of the too many accounts and online ppl. I would like to have a seperate tool to fix those probs.

I have the BBS function disabled,so its a bit difficult to inject through there don't you think?

horyfilipe 23.12.2005 13:11

top-gear how many players you have? Whats linerror says? I think last tontor's dll is 100% stable, i run 15 hours and since it was released, my server never crashed because of dll, only cause of the holy USERSOCKET.

Btw.. about usersocket, i realized when i optimize and reindex database, it happens less often.

tontor 23.12.2005 18:26

sql injection
 
I've added a hijack in assemble checking if the return is to CDBSocket::SendV if so, and the packet contains a unicode string to be assembled, it is filtered. It appears all sends to cached no matter what cdb send function is used will at one time call CDBSocket::SendV, this should cover all input to cached. All user input seems to be unicode not ascii.

So here you go, hopefully should solve sql injection problems. Filters are for ' " and -. Upon attempt it is logged to l2server with not much detail, just the string that was attempted and the packet gets dropped, you'll see an assemble error too, because i fail the assemble of the packet if filter matches, causing packet to be dropped.

Flamestrike 23.12.2005 18:42

In testing tontor. Big thanks

vex 23.12.2005 19:07

tontor the best!!!

testing too


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