View Full Version : Hack L2AuthD
Same time ago we found a trouble with L2AuthD.
User conects to L2AuthD with self account and passoword and than choose char on other account.
For example some modified log:
2007-03-31 22:53:xx.xx7> Authed (801), Ip: xxx.xxx.xxx.xxx, account XXXXX(43337)
2007-03-31 22:53:xx.xx7> Login (802), Ip: xxx.xxx.xxx.xxx - account owner ip
2007-03-31 22:55:xx.xx7> EnterWorld (803), Ip: xxx.xxx.xxx.xxx, Char YYYYYY(75), account YYYYYY(1)
Enyone know about similar L2AuthD bug and fix solutions?
Check new chars in user_data if account names there match account ids. Probably you will find bunch of chars with stupid names, on one account, but with different account ids. I think this is the way how they manage to get access to char on someone's else account. Fix is easy - SQL lin_createchar. At least I hope this is enough. So far no more hacks.
TheTester
06.04.2007, 07:58
Check new chars in user_data if account names there match account ids. Probably you will find bunch of chars with stupid names, on one account, but with different account ids. I think this is the way how they manage to get access to char on someone's else account. Fix is easy - SQL lin_createchar. At least I hope this is enough. So far no more hacks.
Hope dies last
djvogans
06.04.2007, 11:13
paste amped log at that time
_Untitled
06.04.2007, 12:05
there is possibility to login to any account without password ....
TheTester
07.04.2007, 05:25
there is possibility to login to any account without password ....
And without name... just by ID.
And without name... just by ID.
Using CreateChar... or you know another way which should be fixed?
testdude
07.04.2007, 11:26
i saw on a russian forum a method using ........, but ive tried it and havent yet got it to work... but this exploit is definatly out there, on a server i work for there were russians logging onto gm accounts that are banned and with passwords 18 chars of random numbers and letters... its a pretty closely guarded exploit and no one seems to want to reveal it... so yeah untill someone figures out how its done, outside of the cheat community that is, its not gonna be fixed...
if anyone here is willing to have it fixed i will give u some info on how to make this exploit work......... i will only share how to do it with people that have knowledge and more then 2 posts lol..... or if i some what know who you are.....
i will not share it with just anyone so dont bother pming me if u just want to screw servers over.....
it is CHEATERs !!!
Use new HACK packet ! you can use any account !
HELP ! HELP ! HELP ! HELP ! HELP ! HELP ! HELP ! HELP ! HELP !
HOW FIX it ^
IT very BIG problem!
806,CreateChar,character,cached-in
give full log from this time pls.
Its old exploit, i dont belive it is working now
BTW: fucking sign, repair it pls.
mcrabben7
08.04.2007, 05:01
I know how it works, but I have never gotten it to work successfully. It exploits the login packets, afaik. Won't go into the details.
djvogans
08.04.2007, 21:38
this is what u must search in logs
"account not found... account_id(1)"
this hack with $08 packet is VERY dangerous. Anyone can login at ANY account on the server.
Ready for the storm? Main wave will be soon...
tpuNIsher
09.04.2007, 06:50
To be more precise, login any character but anyways, l2j servers mostly vulnerable to this. Storm? main wave? it is not even a breeze just cos' the cheating community was hiding it so long. And this will be fixed now that we know how it works.
fix? when? Servers are owning now. Fix will be soon i hope, but many accs will be riped.
djvogans
09.04.2007, 14:38
big servers already have that fixed . i always said that "to handle a private server u will need a good coder in your team"
testdude
09.04.2007, 18:25
no one has it fixed, believe me...
TheTester
09.04.2007, 18:45
no one has it fixed, believe me...
'No one' - servers with online 100-.
> no one has it fixed, believe me...
sorry, but i don't believe you
testdude
09.04.2007, 19:06
oh yeah sorry l2j has it fixed, so yeah... but so far all big servers ive tested it on, it works... even those with so called "good coders"... but w/e... i already have it mostly fixed... was digging thru the authd <-> l2server verifications in the c1 server, and as it happens they are identical to the c4 server so yeah... maybe ill share it when im done... maybe i wont... i dont really feel like fixing another exploit just to make it easier for the plug and play kiddies to come and make thousands of dollars without any effort....
djvogans
09.04.2007, 21:48
so if u have in l2server logs something like this :
03/28/2007 15:58:xx.xx6, [.\db.cpp][480] account not found... account_id(179)
03/28/2007 15:58:xx.xx6, [.\db.cpp][480] account not found... account_id(180)
someone is playing with your server .
testdude
09.04.2007, 22:12
amped fixed it a long time ago right thats why it works with amped 154?
and also, give me an account for ur server, or atleast a serial, and i will be happy to log onto one of your gms accounts and prove to you that even you do not have it fixed.
i think he talking about some other exploit
_Untitled
09.04.2007, 22:23
amped not fixed this exploit
djvogans
09.04.2007, 22:58
info for coders ^^
testdude
10.04.2007, 00:44
testdude u have a link there to get serial(Register for a new account
*- Request serial: Click here (http://www.lineage.ro/l2.php?page=reqs)!)
. ...did anyone bother to see the date of amped 152,154 ? amped is a private project. some updates were leaked . some with a reason to help community , some without . Please think before u post . but since u went able to make an account there ..why the hell do i care . a good coder will fix the exploit using what i've posted here.
btw : my builder acc name is catalin.
if u want i can tell u a few server were THAT exploit is not working.
i'm waiting your feedback :) . and take it easy with words . i just wanted to help posting those info . this is not a race.
that info u posted has no relevance to this exploit... whats that shit supposed to be? char create? char select info? this exploit has nothing to do with u creating a char or anything the only thing doing anything with char create is gonna do is make it so once someone access someone elses account they cant create a char on it... USELESS.
and as for ur lil request serial thing, 1 hour and a half and still waiting, no serial, hence why i said give me one and ill prove u wrong
djvogans
10.04.2007, 01:20
updated: it's just info from char selection screen
EOF
mcrabben7
10.04.2007, 01:28
Yea, let's post TOO MUCH INFO for the kiddies =/
hhk31257
10.04.2007, 01:33
well gg, another nice exploit for the russians.
and they wonder why they get russian ip ranges banned on most servers...
again, such an exploit which ruins a whole server...
and djvogans, you also got amped shared by someone
so why do you brag about it? just because you have good friends?
im not attacking you, just showing that you are not exactly helping at the moment...
StaticVoid
10.04.2007, 01:34
I will agree with mcrabben,
To moderators: Please make an edit of the specifics - packet numbers etc.
The community knows which people can have a hold on this information and we can talk the details through pms.
djvogans
10.04.2007, 01:38
i've edited my posts ..sry about that .. my bad .
hhk31257
10.04.2007, 01:40
this hack with $08 packet is VERY dangerous. Anyone can login at ANY account on the server.
Ready for the storm? Main wave will be soon...
yep, this hack exists for some time now.
but just like the server crash exploit, the mainstream hacker got a hold of this.
storm is on its way.
This is whats about to happen to 99% of the l2servers soon.
http://rs52.rapidshare.com/files/19024294/Linch_ALLMMORPG_.wmv
tpuNIsher
10.04.2007, 02:53
CDB::RequestLogin(sAccountName, nAccountId, nOneTimeKey, nSession1, nSession2, CUserSocket*pSocket)
Now who wanna be next cypher?
mcrabben7
10.04.2007, 02:57
I've looked at the function. I hardly think you can fix it there, but I'm too busy to do a debug and try.
tpuNIsher
10.04.2007, 03:00
Well that's the closest to 08 that i've seen. Maybe you have an idea? Maybe you can point to something? Please don't tell me you are too busy to do a debug. I'm pretty damn sure you want it fixed on yours, if you haven't yet. And if you have ....
And im also sure you have known about this for longer than i did.
tpuNIsher
10.04.2007, 03:21
Man... i feel liek fucken punching and blowing the brains out of some ppl here.. but nvm.. ill control my anger..
oh ya to some ppl..
get the sentence below through ur heads..
"YOU ARE USING NCSOFT'S WORK. YOU ARE JUST A FUC*** PRIVATE SERVER DEVELOPER, YOU ARE NOT A ELITE GOD. YOU DO NOT HAVE THE RIGHT TO BE IN THIS COMMUNITY, BE IN THIS WORLD, IF YOU CRITICIZE AND THINK ONLY PPL LIKE YOU DESERVE TO HAVE A SERVER. L2 IS NOT LIFE. LOOK OUT THE FUCKEN WINDOW."
Ok, i feel much better now. Now, back to debugging...if anyone wanna work on this, come irc, contact me. Let's not wait for another cypher or tontor. It'll be too late by then..
_Untitled
10.04.2007, 03:43
(''\(o.0)/'') ПревеДЪ !
(''\(o.0)/'') ПревеДЪ !
2 days ban.
mcrabben7
10.04.2007, 03:51
Well that's the closest to 08 that i've seen. Maybe you have an idea? Maybe you can point to something? Please don't tell me you are too busy to do a debug. I'm pretty damn sure you want it fixed on yours, if you haven't yet. And if you have ....
And im also sure you have known about this for longer than i did.
I have a real life. I have a job. I help run two l2 servers. I just got done moving the past week. Get off my back. You act like I owe you something.
I said I looked at the function, but I don't think that you can make a proper fix there. The login packets end up there, that is true, but I hardly think you can trust the data the client is sending you. Some verification with AuthD sounds in order, but I honestly need to look at it more before I can do anything with it.
Now, stop being so pissy. I share on PP all the time, so don't even start your high and mighty crusade with me.
Is there any error/system message in server or cached console _exacly_ after hijaked char enter in world?
Someone, please PM me method to reproduce exploit, i have some idea.
tpuNIsher
10.04.2007, 04:21
I wasn't even talking to you. Why would you get hurt by me venting? Read posts that our famous developers made whose posts if you do some search here you'll see them begging to know shit. And now, they act like they are gods. " oh i dunno maybe ill fix it maybe i wont, only i deserve to have a server", "oh maybe ill share maybe i wont", "oh i have it fixed on my server", "oh come try my server".
Those type of comments sicken me. I have been in PP for a real long time. I don't need to mention names, but you should know which group of ppl i was venting on if you look the posts up in this thread. I have seen you share enough. I have seen most of your posts since when you joined this community. You have my respect. Just don't change...
Anyways, if anyone has the brain and heart to contribute, you are welcome. Please do contact us. I do not compete with any servers, i am not in a race. But this time it is a race to save our own asses. Please do come on PP irc. I have no problem in buying the fix if you have one / helping making the fix and then sharing to this community if needed.
mcrabben7
10.04.2007, 04:43
I have managed to reproduce the hack myself on my dev server.
The console will log this when you do it:
04/09/2007 23:25:xx.xx2, [.\DBSocket.cpp][4792] account not found... account_id(2562)
If you see that log, it means someone is logging into an account that isn't authed properly, at least, isn't loaded yet. I will try doing it when that account is logged in before, is online at the same time, etc. later.
tpuNIsher
10.04.2007, 04:53
How about this?
(12:36) · &NeosinneR · when player connects to l2authd in db..
(12:36) · &NeosinneR · it sets flag "online = 1"
(12:36) · &NeosinneR · if they lgo off = 0
(12:36) · &NeosinneR · how about a stored proc which checks..
(12:37) · &NeosinneR · the flag "online"
(12:37) · &NeosinneR · if online <> 1, 05 kick char packet through cached.
(12:37) · &NeosinneR · so if someone else tries to login another character
(12:37) · &NeosinneR · through their account... bam.
(12:38) · &NeosinneR · thats just idea o_o
An idea someone gave. Researching on this if it works.
so, if
04/09/2007 23:25:xx.xx2, [.\DBSocket.cpp][4792] account not found... account_id(2562)
error always appear when cheater uses exploit, we can just get list of chars on victim account (2562 in your example), and send cached kick packet to all chars on victim acc using realtime log monitor software (i have one fast and small enough, selfwritten).
It will result like this: when cheater enter world with hijacked char it wil be kicked after 0.2-1 sec.
I know its dirty workaround not a fix but should work. correct me if i wrong.
tpuNIsher
10.04.2007, 04:58
Theorytically should work, yah that's around what the idea is too.
To test it i need to reproduce exploit. Again, please PM me how it can be reproduced.
tpuNIsher
10.04.2007, 05:18
Sent you a pm.
ok so if im getting this right... if i see this
04/09/2007 23:25:xx.xx2, [.\DBSocket.cpp][4792] account not found... account_id(2562)
is the exploiters account ID "2562" or is that the person being exploited ID
what im trying to get at is with that info how do you catch the person doing it
i have also seen this error
[.\DBSocket.cpp][17118]account map error. erase and continue. [15336](1127)(?)
tpuNIsher
10.04.2007, 05:23
It's the person being exploited's id. Dunno, how to catch, only thinking on how to prevent right now.
Nope, my idea is useless. No errors if exploit done right, so we cant catch it by logs. SQL workaround should help but to really fix this i think only hexing helps.
tpuNIsher
10.04.2007, 07:00
Well, workaraound i said in this thread works. However, im not 100% sure if there's a way to work around that sql workaround -_-
Anyways, hint's hauthd blocks all of this same for la2guard and bakedice's thing. Chinese been using it and dunno..
However imo, blocking isnt what needs to be done. Fixing is what needs to be done. I can't seem to trace that call to authd. But let's see if my brain starts working.
Well, workaraound i said in this thread works. However, im not 100% sure if there's a way to work around that sql workaround -_-
Anyways, hint's hauthd blocks all of this same for la2guard and bakedice's thing. Chinese been using it and dunno..
However imo, blocking isnt what needs to be done. Fixing is what needs to be done. I can't seem to trace that call to authd. But let's see if my brain starts working.
hint hauthd very good, but current bug work with l2server directly. HAuth dont protect this. astrid told correct - need filter or hexing in exec code.
tpuNIsher
10.04.2007, 07:12
Well his hauthd blocks client from getting injected. Without his client dlls cannot start client. In a sense it blocks from hlapex and such packet explorers itself. So, it's blocking. Not fixing, i agree.
If could find the correct function - though im sure requestlogin or it has to be around that. However, there has to be a communication with authd as mcrabben7 said.
Btw, all of this might be fixed _if_ we can use a proxy exec to communicate with client <-> authd <-> server. So, again my topic of c4 authd comes in my mind. NCsoft uses a GateD to communicate. So, Client -> GateD -> AuthD -> L2server, and vice versa.
So, as i was saying on sec-soc irc, im beginning to strongly believe the inspectors.*, gated was not leaked or didnt reach our hands because nc wanted us to perish.
tpuNIsher
10.04.2007, 07:16
Well, for starters, changing auth ports will help. Will keep the average and majority google search cheaters. As in. ppl who just searches the packet explorers off google and clicks some buttons. However, the issue will remain and it can get very severe if someone with half the brain who knows how to change ports knows about this.
Well his hauthd blocks client from getting injected. Without his client dlls cannot start client. In a sense it blocks from hlapex and such packet explorers itself. So, it's blocking. Not fixing, i agree.
...
It no right :) Hack user open access to any account for... for creating/removing items to any another account. It can be used for "restore" bugitems from banned account to another nobanned account. And for etc.
tpuNIsher
10.04.2007, 07:33
Hows that possible? I mean.. if they can't make hlapex work, how'd they do that?
Hows that possible? I mean.. if they can't make hlapex work, how'd they do that?
I'm a not buguser and no use no one bug/hack/bot programs. But i know what it worked without autorization on l2auth server and can do request for open any account. Example as you can do request "Show me account id =..." and server answer you full line from lin2world.user_data for this account_id. And etc.
Hint told what this backdoor existed in all l2 servers anytime.
For protect need check and fix or lin_GetCharByAccountId or work with char packet (where check login status and etc). But it only my theory (i'm protected).
Aikeleer
10.04.2007, 09:47
Guys, sorry to interupt, but when someone's posting too much information about this exploit, feel free to PM me. I'll remove the data.
testdude
10.04.2007, 10:51
I wasn't even talking to you. Why would you get hurt by me venting? Read posts that our famous developers made whose posts if you do some search here you'll see them begging to know shit. And now, they act like they are gods. " oh i dunno maybe ill fix it maybe i wont, only i deserve to have a server", "oh maybe ill share maybe i wont", "oh i have it fixed on my server", "oh come try my server".
neo... no one wants to share any of this shit because right now, any 5 year old with $200 can come to this forum, download all the server files, and make a 100% perfect c4 server, and make thousands of dollars from donations... this forum is 98% plug and play kiddies now, thats why no one that knows how to, or has fixed it, wants to share it...
also, you dont need hlapex to make this work, anyone with even the smallest programming knowledge could make their own dll, and someone will sooner or later bypass who ever has only their client protected.
Aikeleer
10.04.2007, 10:56
Some work recently was shared to be honest.
djvogans
10.04.2007, 14:10
neo... no one wants to share any of this shit because right now, any 5 year old with $200 can come to this forum, download all the server files, and make a 100% perfect c4 server, and make thousands of dollars from donations... this forum is 98% plug and play kiddies now, thats why no one that knows how to, or has fixed it, wants to share it...
also, you dont need hlapex to make this work, anyone with even the smallest programming knowledge could make their own dll, and someone will sooner or later bypass who ever has only their client protected.
+1 to that
neo... no one wants to share any of this shit because right now, any 5 year old with $200 can come to this forum, download all the server files, and make a 100% perfect c4 server, and make thousands of dollars from donations... this forum is 98% plug and play kiddies now, thats why no one that knows how to, or has fixed it, wants to share it...
also, you dont need hlapex to make this work, anyone with even the smallest programming knowledge could make their own dll, and someone will sooner or later bypass who ever has only their client protected.
No one shares it because they prefer selling it to those 5 years old kiddies that have thousands of dollars. After all the fix is out there only for those who have the money which is lame, hiding behing the n00b excuse but at the same time selling it to those n00b. With this i don't say you are doing it but probably the other 98% is.
I have stuff i don't share because of the leechers so i understand what you posted but I don't sell it neither.
hhk31257
10.04.2007, 15:45
not everyone is a leecher here, just because they dont post anything.
honestly, tell me what there is to leech from pp these days?
i could share lots of things, but why should i?
last time i asked for the amped which fixed the crash exploit no one of those so called "distributors" wanted to help
people like mcrabben who only brag about it that they have it etc.
i know cypher didnt want to have it shared, so im not gonna blame you for it mcrabben... but in the end it still true what i say.
it is true though, i was sad when the retail C4 files got leaked.
people who dont event want to put time in lineage have shit servers running all over the place just because they can start it up....
we put like 15 hours per day into our l2 server, and if you see those kids spam voting their crap server to nr1 in the gamesites 200 listing... its just a shame.
i myself am not a c++ coder, and thats the only reason why i even asked for amped.
you dont have to know who i am, since it doesnt matter
it doesnt mean because some ppl pretend they are noobs that the necceseraly have to be noobs.
last time my mate posted some things on pp he got banned.
what did he post? a simple php script to verify AI handlers.
ofcourse those who have something do want to share it, but is it worth to be shared on pp like it is today?
tpuNIsher
10.04.2007, 15:46
This community shouldn't exist if ppl are worried about what someone else can get out of your work. Ppl sells my fuckign c5 item share 5 monthes back naming it c5.. and modding some..
if ppl are stupid enough to fall for that, sure.. it's their money.. let them get fucked..
same goes for players. if they are willing to spend money and give these 5 year old kiddies thousands of dollars, sure...
Besides, 100% perfect c4 server ain't a big deal now.. servers that doesn't have c5 soon will prolly perish.
tpuNIsher
10.04.2007, 16:00
Hello,
(12:36) · &NeosinneR · when player connects to l2authd in db..
(12:36) · &NeosinneR · it sets flag "online = 1"
(12:36) · &NeosinneR · if they lgo off = 0
(12:36) · &NeosinneR · how about a stored proc which checks..
(12:37) · &NeosinneR · the flag "online"
(12:37) · &NeosinneR · if online <> 1, 05 kick char packet through cached.
(12:37) · &NeosinneR · so if someone else tries to login another character
(12:37) · &NeosinneR · through their account... bam.
The above works 100%. That will kick them within 0.2-1 sec of logging in with the hacked chars. Maybe some one wanna make script for this..
Hello,
(12:36) · &NeosinneR · when player connects to l2authd in db..
(12:36) · &NeosinneR · it sets flag "online = 1"
(12:36) · &NeosinneR · if they lgo off = 0
(12:36) · &NeosinneR · how about a stored proc which checks..
(12:37) · &NeosinneR · the flag "online"
(12:37) · &NeosinneR · if online <> 1, 05 kick char packet through cached.
(12:37) · &NeosinneR · so if someone else tries to login another character
(12:37) · &NeosinneR · through their account... bam.
The above works 100%. That will kick them within 0.2-1 sec of logging in with the hacked chars. Maybe some one wanna make script for this..
Would be nice to see such script here.
testdude
10.04.2007, 18:34
Besides, 100% perfect c4 server ain't a big deal now.. servers that doesn't have c5 soon will prolly perish.
wrong, 90% of the servers today are nothing but plain c4 server with public shares FROM THIS FORUM and they make thousands of $$$ every month, they wont "perish" any time soon, and they dont have to know well... anything, all they need is $200 for a server pc and the guides/files from this forum... its pathetic, i agree with hhk31257, well atleast in the part reguarding the c4 server, the leak of the c4 server killed l2off as a developing community, and turned it into a race for donations... atleast with the c1 server you have to have actual knowledge to be able to make a good server, that isnt overpowered, doesnt crash every 2 hours, and to keep it up to date with content, but now all u gotta do is... plug and play...
in reguards to your little auth idea neo... its not hard to do but there are many more effective and tbh easier ways to stop this exploit...
hhk31257
10.04.2007, 18:57
creating scripts to check the database is as easy as baking cookies.
if someone has "the" solution on how to block it then we can code it in minutes and share it.(database wise)
I can't bye some *.dll for my server to prevent this bug completly, and i do that:
1. Add custom field in lin2db (in my db it's "online") with INT value.
2. I use hAuthd by Hint and set online = 1 when user logged on (or you can use Authd with modded query "SELECT user_data FROM user_data WITH (nolock) WHERE uid = %d" => "UPDATE user_account SET online = 1 WHERE uid = %d". You can find it near 0046752C. Tested. Work normal (but in console Authd: "Fetch error -1" when login).
3. ALTER PROCEDURE [dbo].[lin_GetUnreadMailCount]
(
@char_id int,
@path varchar(64) = 'C:\php\php.exe'
)
AS
SET NOCOUNT ON
SELECT COUNT(*)
FROM user_mail_receiver(NOLOCK)
WHERE receiver_id = @char_id
AND mailbox_type = 0
AND read_status = 0;
if (SELECT online FROM lin2db.dbo.user_account WHERE uid = (SELECT account_id FROM lin2world.dbo.user_data WHERE char_id = @char_id))<>1
begin
set @path= @path +' C:\php\kick.php id=' +convert(varchar(5),@char_id)
EXEC xp_cmdshell @path
RETURN -1
end
kick.php
<?
#$char_id=$_GET['id'];
//----Convert string to unicode---- >
function tounicode($string){
$rs="";
for($i=0;$i<strlen($string);$i++)
$rs.=$string[$i].chr(0);
return($rs.chr(0).chr(0));}
//<<<
function KickCharacterPacket($char_id){
include("config.php");$buf=pack("cV",5,$char_id).tounicode("admin");
$cachedsocket=@fsockopen($cached['host'],$cached['port'],$errno,$errstr,1) or die($notconnected);
fwrite($cachedsocket,pack("s",(strlen($buf)+2)).$buf);
$len=unpack("v",fread($cachedsocket,2));$rid=unpack("c",fread($cachedsocket,1));
for($i=0;$i<(($len[1]-4)/4);$i++){$read=unpack("i",fread($cachedsocket,4));$rs.=$read[1];}
fclose($cachedsocket);return GetError($rs);}
$a = KickCharacterPacket($char_id);
if(!$a){
echo 'some errors ocured!';
}else{
echo 'Successed!';
}
?>
thats all. if you can optimized it and/or can add some stuff for it, or you known how to do this better => plz post it there!
mcrabben7
10.04.2007, 20:07
not everyone is a leecher here, just because they dont post anything.
honestly, tell me what there is to leech from pp these days?
i could share lots of things, but why should i?
last time i asked for the amped which fixed the crash exploit no one of those so called "distributors" wanted to help
people like mcrabben who only brag about it that they have it etc.
i know cypher didnt want to have it shared, so im not gonna blame you for it mcrabben... but in the end it still true what i say.
it is true though, i was sad when the retail C4 files got leaked.
people who dont event want to put time in lineage have shit servers running all over the place just because they can start it up....
we put like 15 hours per day into our l2 server, and if you see those kids spam voting their crap server to nr1 in the gamesites 200 listing... its just a shame.
i myself am not a c++ coder, and thats the only reason why i even asked for amped.
you dont have to know who i am, since it doesnt matter
it doesnt mean because some ppl pretend they are noobs that the necceseraly have to be noobs.
last time my mate posted some things on pp he got banned.
what did he post? a simple php script to verify AI handlers.
ofcourse those who have something do want to share it, but is it worth to be shared on pp like it is today?
When did I brag? Damn, you're really annoying to throw that crap at me. Who shared an entire working C1 DLL project? Me. I'm the only one, ever, so get off your high horse.
I didn't share it with everyone because of Cypher's request, nothing more.
hhk31257
10.04.2007, 21:04
When did I brag? Damn, you're really annoying to throw that crap at me. Who shared an entire working C1 DLL project? Me. I'm the only one, ever, so get off your high horse.
I didn't share it with everyone because of Cypher's request, nothing more.
i know, my bad then if it wasnt like that.
mcrabben7
11.04.2007, 04:00
A nice way to fix this 90% is to implement an array in memory where you store account names and account IDs. When someone tries to login, check that the ID and Name are both correct. If they are not, log it as an exploit and kick the player.
Of course, this requires a coder and is probably beyond simple SQL, however, it might be possible to add a check for this into the stored procedures for logging in.
Only thing missing from this fix is some sort of unique session key that can validate that the user has a valid session with authd, and isn't simply trying to exploit an account.
what about setting a flag at login when checking for the other flags. (ap_Gstat)
then when loading the character, check for the flag. Proc has to be one that fires even when exploiter loads account. Maybe (lin_CharLogin)?
if flag not present... kick.
at end of proc, clear the flag.
Just thinking out loud here...
made same way as said Le][u$. Just edit char_login and char_logout+added new field+script in l2auth.
php was stupid, so solution is to use wget --spider to send kick packet
does char_logout fire on kick?
made same way as said Le][u$. Just edit char_login and char_logout+added new field+script in l2auth.
php was stupid, so solution is to use wget --spider to send kick packet
I wouldn't call the PHP solution stupid, it's the only solution that has been shared in a viable / implementable solution.
All the other posts have been vague references or theory.
Instead of tearing someone's idea down, why not just offer your solution as an alternative and site reasons why your way is better. I mean, if I'm going to go out of my way to share something with you and you just tear it down and say it's stupid, why would I share anything again?
You'll still need to launch wget much in the same way you'd launch the php compiler, and you'll still need the php with the kick code in it...
Thanks Le][u$ for contributing. Reirus, thanks for the alternative.
mcrabben7
11.04.2007, 12:14
Those aren't really fixes. If the flag is on they can STILL inject ANY online account. That's NOT really a fix.
tpuNIsher
11.04.2007, 12:40
Correct and agreed, that isn't a fix. That is only a way around that works half as good.
There is a dll being made, however, it is up to the creator if it will be shared. As much as i would like to see it be shared, if the creator decides for it to be close quarter and among "sec-soc" community only, so it will be. Don't ask what is sec-soc.
Anyways, for all those that have helped me, i'll be sure to repay the debt, thanks. I don't have anything useful for this topic anymore.
-eof-
Those aren't really fixes. If the flag is on they can STILL inject ANY online account. That's NOT really a fix.
Right, I don't think anyone is arguing that fact.
But right now we're hemorrhaging, we're just trying to stop the bleeding. Not everyone can write code to attach to a process and inject itself. I wouldn't know where to start with that, but I've always shared everything I've made, it might not be much and it might not be great, but it's what I have.
If I could I'd rewrite the entire AuthD and add features that I feel should have been there from the start. But I'm not an experienced C programmer. I can hold my own in VB, which from what I hear is very similar to C#. But I'm digressing.
Anyway, true, these aren't fixes, but it's better than nothing atm. =/
mcrabben7
11.04.2007, 13:11
Well I agree it's better than nothing. Not arguing here at all.
Those aren't really fixes. If the flag is on they can STILL inject ANY online account. That's NOT really a fix.
Yes, it's true, but if flag is on AND player in game - bug not work(bug with **-packet).
/rus
пох что могут зайти на акк и посмотреть че там есть, сделать-то ниче не смогут. а это главное, имхо. будем ждать когда появится полноценный фикс
/rus
Alamar, а вот это я думаю смогут. Зайти в мир только не смогут :)
2All, When hacker enter account, they cannot enter game, but can delete characters? or not? i'm stuck :P
yes, thy can. but only chars with builder>0, chars with builder=0 must wait 7 days before deleted.
/rus: удалить могут, только опасно это для админских акков - т.к. удаляются сразу же, а у простого игрока - неделю сидеть будет еще на удаление... а можно попробывать проверку забубенить и в процедуру которая удаляет чара...
[u$;83458']
3. ALTER PROCEDURE [dbo].[lin_GetUnreadMailCount]
....
if (SELECT online FROM lin2db.dbo.user_account WHERE uid = (SELECT account_id FROM lin2world.dbo.user_data WHERE char_id = @char_id))<>1
begin
set @path= @path +' C:\php\kick.php id=' +convert(varchar(5),@char_id)
EXEC xp_cmdshell @path
RETURN -1
end
else
UPDATE user_account SET online = 0 WHERE uid = (SELECT account_id FROM lin2world.dbo.user_data WHERE char_id = @char_id)
Turning the flag off after being checked increases the security.
TheTester
12.04.2007, 05:33
Turning the flag off after being checked increases the security.
And what about 'relogin'?
And what about 'relogin'?
I'm not sure what you mean by relogin.
Relogin would not be affected because it's just setting the flag when you login.
Additionally you could add a date column to the flag and check it as well and make sure it isn't 'stale'
Again, this isn't a fix, it's just something temporary until we can get something better.
Hopefully one of these guys that knows how to dll inject will be kind enough to help us out. If I knew something, about it I'd gladly write it, but the most programming exp i have is in VB. And it's with relational databases, not anything where i had to attach to a process and inject anything.
tpuNIsher
12.04.2007, 12:11
injecting dlls is easy as pie but coding in assembly isnt. 64 bit = even tougher . for me atleast.. anyways.. it will be fixed eventually. just dont pass the exploit around..to everyone that asks for how to do it..
2 .... (but in console Authd: "Fetch error -1" when login).
Replace (in authd.exe):
SELECT user_data FROM user_data WITH (nolock) WHERE uid = %d
=>
EXEC ap_Online %d
CREATE PROCEDURE [dbo].[ap_Online]
@uid int
AS
SET NOCOUNT ON
UPDATE user_account SET online=1 WHERE uid=@uid
SET NOCOUNT OFF
SELECT user_data FROM user_data with (nolock) WHERE uid=@uid
GO
and check user_data table
3. ...thats all. if you can optimized it and/or can add some stuff for it, or you known how to do this better => plz post it there!
allow using xp_cmdshell is a big security hole, use mssql external proc
exec sp_l2kick @char_id
im to lazy to add extra params for this function :) its just connect to 127.0.0.1 2012 and kick char... no need xp_cmdshell and php script...
Вложения из исходного сообщения (сами файлы в копии отсутствуют):
sp_l2kick.zip — 1782 байт
testdude
12.04.2007, 13:50
injecting dlls is easy as pie but coding in assembly isnt. 64 bit = even tougher . for me atleast.. anyways.. it will be fixed eventually. just dont pass the exploit around..to everyone that asks for how to do it..
assembly is easyish... and 64bit is not that much different to 32bit once u get used to the stack ordering and that just about everything is 8bytes instead of 4... reguardless nearly all of the work can be done without assembly, as long as u can read and understand assembly it doesnt matter if u can code it or not because then you have everything you need for making a dll in C++
and as for the sql version of this fix.. there is no 100% secure way to make it work, the online thing is a cool concept but its all dependant on if it does write online = 0 when you log out, otherwise mr sploiter will still be able to access the acc... also you can still harrass gms/players with this exploit by kicking them off their acc, even though you cant login people will still be stupid enough to go and kick people off, send them ss' of their char select and say like "omg i hacked you, give me this or i will steal everything", and idiots will fall for it... imo best way to deal with this is to stop the injecting of the malformed packet...
Set login=0 when any char of logged account enters the world, plus set job to set login=0 every xx minutes for all accounts. This way Restart function of client won't work... but well, can't have everything.
testdude
12.04.2007, 14:55
thats retarded, how many people are gonna wanna play a server that u have to completely relog every time u wanna change chars? considering theres like 4 servers now that have actual fixes that dont suck me thinks ideas like this will make ur players go elsewhere.
you could use a "date" field instead of a integer.
update that field with NOW() when loggin correctly. (i dont remember the stored procedure that excecute when login).
check for time difference at the time to take characters.
if (field.time > 5 seconds) then, return char_id = -1
otherwise, give it the correct char_ids
This way, u dont want to bother for updating to 0. Time is always running.
What u think?
I would to the change in this procedure: lin_GetCharByAccountId
Why to give char_ids to someone who we dont know if is the owner? check first for that.
Check too, at the time to create a new char.
you could use a "date" field instead of a integer.
update that field with NOW() when loggin correctly. (i dont remember the stored procedure that excecute when login).
check for time difference at the time to take characters.
if (field.time > 5 seconds) then, return char_id = -1
otherwise, give it the correct char_ids
This way, u dont want to bother for updating to 0. Time is always running.
What u think?
I would to the change in this procedure: lin_GetCharByAccountId
Why to give char_ids to someone who we dont know if is the owner? check first for that.
Check too, at the time to create a new char.
that's how i did it, i used auth_login as datetime instead of online and instead of checking online = 1 i checked datediff(ss, auth_login, getdate()) <= 30
also on char logout you can set the auth login flag again, that would allow another 30 seconds for them to choose a character, no restart required.
I'm going to package what i did here as soon as i can to make it easier on peeps, unless someone wants to share the dll fix..
Here's AuthD that calls ap_Online
you must have the following set in your config.txt:
UserData=True
http://www.2shared.com/file/1836692/38463525/L2AuthD.html
http://rapidshare.com/files/25634619/L2AuthD.rar.html
can someone help me out with the sp_l2kick.dll?
I've never loaded Extended Proceedures into SQL before.
I tried the following:
sp_addextendedproc 'sp_l2kick', 'c:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Binn\sp_l2kick.dll'
but when i try to run the command it pukes with this message:
Msg 17750, Level 16, State 0, Procedure sp_l2kick, Line 1
Could not load the DLL c:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Binn\sp_l2kick.dll, or one of the DLLs it references. Reason: 193(%1 is not a valid Win32 application.).
Will this work in SQL Server 2K5?
can someone help me out with the sp_l2kick.dll?
I've never loaded Extended Proceedures into SQL before.
I tried the following:
sp_addextendedproc 'sp_l2kick', 'c:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Binn\sp_l2kick.dll'
but when i try to run the command it pukes with this message:
Msg 17750, Level 16, State 0, Procedure sp_l2kick, Line 1
Could not load the DLL c:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Binn\sp_l2kick.dll, or one of the DLLs it references. Reason: 193(%1 is not a valid Win32 application.).
Will this work in SQL Server 2K5?
Just copy the .dll into "binn" folder in your mssql2005 folder, and then
sp_addextendedproc 'sp_l2kick', 'sp_l2kick.dll'
Here's AuthD that calls ap_Online
you must have the following set in your config.txt:
UserData=True
http://www.2shared.com/file/1836692/38463525/L2AuthD.html
http://rapidshare.com/files/25634619/L2AuthD.rar.html
Whats that? i dont understand
Just copy the .dll into "binn" folder in your mssql2005 folder, and then
sp_addextendedproc 'sp_l2kick', 'sp_l2kick.dll'
That's basically what i did and when i call the function i get the error message i posted. I don't think it should matter if i run the sp_addextendedproc with or without the full path.
Whats that? i dont understand
It's just a modded AuthD that calls the function from page 9 instead of the original SQL.
You still need to actually create the function in the database.
-sky-, Good work, are you can share dll sources? Please :)
Ok.
Here's what i did.
First, modify your USER_ACCOUNT table in lin2db.
Add a column 'auth_login' as datetime
create the following stored proc in lin2db
[lin2db].[dbo].[ap_Online]
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
go
ALTER PROCEDURE [dbo].[ap_Online]
@uid int
AS
SET NOCOUNT ON
UPDATE user_account SET auth_login=GETDATE() WHERE uid=@uid
SET NOCOUNT OFF
SELECT uid FROM user_account with (nolock) WHERE uid=@uid
Alter the following stored procs in lin2world
[lin2world].[dbo].[lin_CharLogin]
ALTER PROCEDURE [dbo].[lin_CharLogin]
(
@char_id INT,
@path varchar(64) = 'C:\php\php.exe'
)
AS
SET NOCOUNT ON
UPDATE user_data SET login = GETDATE() WHERE char_id = @char_id
if (SELECT datediff(ss, isnull(auth_login, 0), getdate()) FROM lin2db.dbo.user_account WHERE uid = (SELECT account_id FROM lin2world.dbo.user_data WHERE char_id = @char_id)) > 30
begin
--I couldn't get sky's sp_l2kick.dll to work, so i went this route
set @path= @path +' -f C:\php\kick.php ' +convert(varchar(5),@char_id)
EXEC xp_cmdshell @path;
RETURN -1
end
alter this proc, also in lin2world
[lin2world].[dbo].[lin_CharLogout]
ALTER PROCEDURE [dbo].[lin_CharLogout]
(
@char_id INT,
@usedTimeSec INT
)
AS
SET NOCOUNT ON
DECLARE @logoutDate DATETIME
SET @logoutDate = GETDATE()
UPDATE user_data SET Logout = @logoutDate, use_time = use_time + @usedTimeSec WHERE char_id = @char_id
UPDATE lin2db..user_account SET auth_login=GETDATE() WHERE uid=(SELECT account_id from user_data where char_id = @char_id)
SET NOCOUNT OFF
you'll also need to put this kick php somewhere, don't forget to adjust the charlogin stored proc to properly point to it.
kick.php
<?php
//----Convert string to unicode---- >
function tounicode($string){
$rs="";
for($i=0;$i<strlen($string);$i++)
$rs.=$string[$i].chr(0);
return($rs.chr(0).chr(0));}
//<<<
function KickCharacterPacket($char_id){
$buf=pack("cV",5,$char_id).tounicode("HACK Detect");
$cachedsocket=@fsockopen("127.0.0.1","2012",$errno,$errstr,1) or die($notconnected);
fwrite($cachedsocket,pack("s",(strlen($buf)+2)).$buf);
$len=unpack("v",fread($cachedsocket,2));$rid=unpack("c",fread($cachedsocket,1));
for($i=0;$i<(($len[1]-4)/4);$i++){$read=unpack("i",fread($cachedsocket,4));$rs.=$read[1];}
fclose($cachedsocket);return $rs;}
$a = KickCharacterPacket($argv[1]);
if(!$a){
echo 'some errors ocured!';
}else{
echo 'Successed!';
}
?>
also use the authd i shared in an earlier post.
that should about cover it.
you must have the following set in your config.txt:
UserData=True
http://www.2shared.com/file/1836692/...5/L2AuthD.html
http://rapidshare.com/files/25634619/L2AuthD.rar.html
We can prevent them to give Chars Information giving them back fake chars_id if we detect the exploit?
lin_GetCharsByAccountID is not the procedure that give to server the chars owned by an account ? if we modify that procedure checking for auth_login date, we can send them back fake chars_ids . isnt it??
the proc lin_GetCharsByAccountID doesn't seems to have any effect i change it and also temporary delete it and there wasn't any changes so this is no the proc that give out the informations for the accounts/char
i found the correct proc:
lin_LoadAccount
I would also like to give here a solution but I can't test my solution at the moment because I don't know how the exploit works so when someone can send me a PM how the exploit works I would be very happy
the proc lin_GetCharsByAccountID doesn't seems to have any effect i change it and also temporary delete it and there wasn't any changes so this is no the proc that give out the informations for the accounts/char
i found the correct proc:
lin_LoadAccount
I would also like to give here a solution but I can't test my solution at the moment because I don't know how the exploit works so when someone can send me a PM how the exploit works I would be very happy
Excelent news. I will check that procedure.
The exploit give you access to the "charSelect" screen, so that means that server have to look for all chars in that account.
If you say lin_LoadAccount is the one in charge of that, then modifying it and checking about account's owner, will deny exploiters to access to the account characters.
Excelent news. I will check that procedure.
The exploit give you access to the "charSelect" screen, so that means that server have to look for all chars in that account.
If you say lin_LoadAccount is the one in charge of that, then modifying it and checking about account's owner, will deny exploiters to access to the account characters.
useless proc... cached store account info and use lin_LoadAccount only once...
Sky, you can share dll sources?
I want change cached ip address.
Plzz))
useless proc... cached store account info and use lin_LoadAccount only once...
You are completly right.
No more ideas.
but if we use lin_GetUnreadMailCount instead of lin_LoadAccount ?
but if we use lin_GetUnreadMailCount instead of lin_LoadAccount ?
lin_GetUnreadMailCount is used once you're in the game, lin_LoadAccount before that...
lin_GetUnreadMailCount isnt cached (i think, i dont check it, I only try to use the logic)
well guyz can any1 inform me about this well-said exploit and hgow exactly it works????if ya try to stop it y are you afraid of sharing it?
anyway ty and hope i can help u anyway
well guyz can any1 inform me about this well-said exploit and hgow exactly it works????if ya try to stop it y are you afraid of sharing it?
anyway ty and hope i can help u anyway
lol, that is stupid :D
well guyz can any1 inform me about this well-said exploit and hgow exactly it works????if ya try to stop it y are you afraid of sharing it?
anyway ty and hope i can help u anyway
Yeah, i was thinking in give a "how to exploit" to a guy with 1 post...
fswffssfs
13.04.2007, 20:17
well i would also like to knwo how this thing works pals ;)
testdude
13.04.2007, 22:27
well guyz can any1 inform me about this well-said exploit and hgow exactly it works????if ya try to stop it y are you afraid of sharing it?
anyway ty and hope i can help u anyway
you are from maxbastards, why the fuck would any of us want to give it to a fucking moron like yourself
PyroMaker
14.04.2007, 01:21
lol... Script kiddies for those lose?
tpuNIsher
14.04.2007, 02:31
A pm:
well pal im new here but i would like to ask you if you could share with me the l2authd hack..soz but im not good at developping and im also a greek and i dont get you at the topic..anyway ty for reading here and plz tell em what this is all about..c ya
MewMew
oLOLOLOLOLOLlolooolOOOLOL. sorry, couldn't stop myself =x
And to think someone like Anarchy helps ppl like these in maxbastards...what the fuck was he thinking? -_-
rofl..anyways, back to looking at gibberish codes..
i think he sent everyone a pm like that i got one to LMAO
Is there possibility to close this forum for unlogged users?
hhk31257
14.04.2007, 10:02
Is there possibility to close this forum for unlogged users?
indeed..................
/offtopic
Is there possibility to close this forum for unlogged users?
when i asked why the forum became an open forum ( without need of being registered user in order to read it) none even cared.
edit :
btw, i have kinda quit the deving for some time now, but since this sounds so severe, if someone provides me the theory of it in pm always - since everyone can read the forum - i could spent some time too, in trying to find a solution.
edit2 :
what is this weird signature we all got ?!
what is this weird signature we all got ?!
https://postpacific.loc-online.com/forums/showthread.php?t=7297
How to solve this big problem? I cant fix this exploit...
How to solve this big problem? I cant fix this exploit...
try 1 use amped 2.0 8)
xari0n check your pm please.