View Full Version : [SHARE] server crash new exploit fix *UPDATED*
humordwarf
07.07.2007, 20:36
*UPDATED*
inside l2server.exe we have code (dont ask me how i got it):
Log->Add(2,L"[%s][%d] user[%s] failed to ride. no collar[%d]", CharName, CorallID);
so, as u see, here is mistake, first arg should be string, second - number, 3rd - string, 4th - number (4 parameters)
but in args there is TWO only, last two args Log->Add gets from stack garbage...
someone got the way how to invoke this error,
and server, when try to format this text crashes
IOThread [0][875] (ahehe): void IOThread_common(void *arglist) -> CUserSocket::OnRead -> IconAction -> User::IconAction() -> void User::Ride(CPet* pStrider) -> CLog::Add -> CLog::AddV -> Log::AddV - vswprintf_s
how to fix:
in any hex editor find UNICODE text
"[%s][%d] user[%s] failed to ride. no collar[%d]"
and change to
"user[%s] failed to ride. no collar[%d]"
edit: and dont forget to put 0000 after text as zero char (null termitnated string rule)
thats all, folks
корейские программисты - конина блядская
зы. тоже чтоль расшарить чё-нить....
а для буржуинов пора делать кнопки "thanks" и "good job"
good job, man
awesome share, big thanks humordwarf, cash for you! (Oh where is the cash system?? :/ )
Edit: Humordwarf we must fix that too?
[.%.s.].[.%.d.]. .u.s.e.r.[.%.s.]. .f.a.i.l.e.d. .t.o. .u.n.r.i.d.e... . .n.o. .c.o.l.l.a.r.[.%.d.]
to
[.%.s.].[.%.d.]. .u.s.e.r.[.%.s.]. .f.a.i.l.e.d. .t.o. .u.n.r.i.d.e... . .n.o. .c.o.l.l.a.r.[.%.s.]
humordwarf
07.07.2007, 21:07
Edit: Humordwarf we must fix that too?
[.%.s.].[.%.d.]. .u.s.e.r.[.%.s.]. .f.a.i.l.e.d. .t.o. .u.n.r.i.d.e... . .n.o. .c.o.l.l.a.r.[.%.d.]
to
[.%.s.].[.%.d.]. .u.s.e.r.[.%.s.]. .f.a.i.l.e.d. .t.o. .u.n.r.i.d.e... . .n.o. .c.o.l.l.a.r.[.%.s.]
no
unride thing pass correct parameters to log
there is call: Log->Add(2,L"[%s][%d] user[%s] failed to unride. no collar[%d]",_T(__FILE__),__LINE__,CharName,CollarID);
all fine here
Great, thanks.
Хумор, малацца! :)
Меня иногда эта пиздень доставала.
По поводу корейцев - всеми руками согласен xD
Big thanks, hat from head _o_ :)
humordwarf
07.07.2007, 21:47
*UPDATE*
sorry ppl, mistake
confused with params order (first %s, then %d)
new text should be "user[%s] failed to ride. no collar[%d]"
(updated 1st post)
Please, tell me,
1) what fix it? Same what do Amped "BlockRide=true" ?
2) maybe someone can do hex-text file for me?
and main question
This is only l2server error unicode message. Why fix it is a new message? So strange for me. Because so easy.
This is only l2server error unicode message. Why fix it is a new message? So strange for me. Because so easy.
error got from function vswprintf_s because not enough parameters
humordwarf
08.07.2007, 09:55
Please, tell me,
1) what fix it? Same what do Amped "BlockRide=true" ?
2) maybe someone can do hex-text file for me?
and main question
This is only l2server error unicode message. Why fix it is a new message? So strange for me. Because so easy.
1) see 1st message. BlockRide is not same
2) each ppl may have different exe's, why do not try urself? its not hard
main: if you know c++ even little... look on printf-like functions, printf("%s","text") gets from stack address of "text", then read from address, chars and output to console.... but if you try use printf("%s",123) - u'll get exception (crash). like access violation read from address 123 (printf tries read text from address 123)
so look again at first message, there is "%s%d%s%d", but on stack there only one string and only one number... second string address (3rd arg) undefined on stack
main: if you know c++ even little... look on printf-like functions, printf("%s","text") gets from stack address of "text", then read from address, chars and output to console.... but if you try use printf("%s",123) - u'll get exception (crash). like access violation read from address 123 (printf tries read text from address 123)
so look again at first message, there is "%s%d%s%d", but on stack there only one string and only one number... second string address (3rd arg) undefined on stack
Ah! I understood! :) No more params for function calling!
Big thanks.
Question two.
What power for this bug? It's only server error? or maybe it server error on bug using? Bug cause server crash?
This is only for information.
humordwarf
08.07.2007, 15:44
What power for this bug? It's only server error? or maybe it server error on bug using? Bug cause server crash?
oh... relax...
as soon as u get that crash log, u'll know what to do...
i repeat, someone got the way, special or not, cheater or not, not matter... matter - it happens.
oh... relax...
as soon as u get that crash log, u'll know what to do...
i repeat, someone got the way, special or not, cheater or not, not matter... matter - it happens.
Fixed, thx HD. ;)
kanziguy
08.07.2007, 22:51
fixed file upload please please
kanziguy use an hex editor to correct it...
Osito2Dancer
08.07.2007, 23:07
Fixed, thx HD. ;)
Which editor can i use to fix this? I tried UltraEdit 32, but cant find the damned line.
Could you teach me how to?
You can use any editor, you just don't know how to search... Like Humordwarf said
in any hex editor find UNICODE text
5b 00 25 00 73 00 5d 00 5b 00 25 00 64 00 5d 00 20 00 75 00 73 00 65 00 72 00 5b 00 25 00 73 00 5d 00 20 00 66 00 61 00 69 00 6c 00 65 00 64 00 20 00 74 00 6f 00 20 00 72 00 69 00 64 00 65 00 2e 00 20 00 20 00 6e 00 6f 00 20 00 63 00 6f 00 6c 00 6c 00 61 00 72 00 5b 00 25 00 64 00 5d
petre1980
09.07.2007, 03:35
Thx HD, i have made the corections but i don't know what you mean by that:
"edit: and dont forget to put 0000 after text as zero char (null termitnated string rule)"
Thx HD, i have made the corections but i don't know what you mean by that:
"edit: and dont forget to put 0000 after text as zero char (null termitnated string rule)"
rtfm about unicode strings..
unicode strings look in hex like this
20 00 6e 00 6f 00 20 00 63 00 6f 00 6c 00 6c 00 61 00 72 00 5b 00 25 00 64 00 5d 00 00 00
after unicode string he must ended '\x00\x00", 00 00 its zero char
in ASCII strings 1 symbol =1 byte... ex. "a" in ASCII = 61
in UNICODE 1 symbol = 2 bytes.. ex. "a" in UNICODE = 61 00
So. Short fix - 4 byte. I do easy
"5b 00 25 00 73 00 5d" [%s]
->
"5b 00 20 00 20 00 5d" [ ]
:)
Line lenght without changes, bug fixed.
some corrections..this is 4 byte fix)
"5b 00 25 00 73 00 5d 00" [%s]
->
"5b 00 20 00 20 00 5d 00" [ ]
and
"5b 00 25 00 64 00 5d 00" [%d]
->
"5b 00 20 00 20 00 5d 00" [ ]
= "[ ][ ] user[%s] failed to ride. no collar[%d]"
:: Eru ::
02.08.2007, 14:49
Thanks! Fixed.
Anyway, I'm still being attacked...I have to test everything again :(
GmZenBrasil
11.08.2007, 06:21
:) thanks ^^