Post Pacific  

Go Back   Post Pacific > Lineage 2 > Lineage 2 Help

Notices

 
 
Thread Tools Search this Thread Display Modes
Old 10.04.2007, 05:18   #1
tpuNIsher
Архивный участник
 
Join Date: Mar 2006
Posts: 685
Default

Sent you a pm.
tpuNIsher is offline  
Old 10.04.2007, 05:20   #2
nish
Архивный участник
 
Join Date: May 2006
Posts: 237
Default

ok so if im getting this right... if i see this

Code:
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

Code:
[.\DBSocket.cpp][17118]account map error. erase and continue. [15336](1127)(?)
nish is offline  
Old 10.04.2007, 05:23   #3
tpuNIsher
Архивный участник
 
Join Date: Mar 2006
Posts: 685
Default

It's the person being exploited's id. Dunno, how to catch, only thinking on how to prevent right now.
tpuNIsher is offline  
Old 10.04.2007, 06:49   #4
astrid
Архивный участник
 
Join Date: May 2006
Posts: 55
Default

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.
astrid is offline  
Old 10.04.2007, 07:00   #5
tpuNIsher
Архивный участник
 
Join Date: Mar 2006
Posts: 685
Default

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.
tpuNIsher is offline  
Old 10.04.2007, 07:05   #6
HF
Архивный участник
 
Join Date: Aug 2005
Posts: 1,531
Default

Quote:
Originally Posted by tpuNIsher View Post
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.
HF is offline  
Old 10.04.2007, 07:12   #7
tpuNIsher
Архивный участник
 
Join Date: Mar 2006
Posts: 685
Default

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 is offline  
Old 10.04.2007, 07:29   #8
HF
Архивный участник
 
Join Date: Aug 2005
Posts: 1,531
Default

Quote:
Originally Posted by tpuNIsher View Post
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.
HF is offline  
Old 10.04.2007, 07:16   #9
tpuNIsher
Архивный участник
 
Join Date: Mar 2006
Posts: 685
Default

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.
tpuNIsher is offline  
Old 10.04.2007, 07:33   #10
tpuNIsher
Архивный участник
 
Join Date: Mar 2006
Posts: 685
Default

Hows that possible? I mean.. if they can't make hlapex work, how'd they do that?
tpuNIsher is offline  
Old 10.04.2007, 07:50   #11
HF
Архивный участник
 
Join Date: Aug 2005
Posts: 1,531
Default

Quote:
Originally Posted by tpuNIsher View Post
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).
HF is offline  
Old 10.04.2007, 09:47   #12
Aikeleer
Архивный участник
 
Join Date: Jun 2005
Posts: 374
Default

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.
Aikeleer is offline  
Old 10.04.2007, 10:56   #13
Aikeleer
Архивный участник
 
Join Date: Jun 2005
Posts: 374
Default

Some work recently was shared to be honest.
Aikeleer is offline  
Old 10.04.2007, 15:45   #14
hhk31257
Архивный участник
 
Join Date: May 2006
Posts: 166
Default

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?
hhk31257 is offline  
Old 10.04.2007, 20:07   #15
mcrabben7
Архивный участник
 
Join Date: Apr 2006
Posts: 461
Default

Quote:
Originally Posted by hhk31257 View Post
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.
mcrabben7 is offline  
Old 10.04.2007, 21:04   #16
hhk31257
Архивный участник
 
Join Date: May 2006
Posts: 166
Default

Quote:
Originally Posted by mcrabben7 View Post
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.
hhk31257 is offline  
Old 10.04.2007, 15:46   #17
tpuNIsher
Архивный участник
 
Join Date: Mar 2006
Posts: 685
Default

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 is offline  
Old 10.04.2007, 18:34   #18
testdude
Архивный участник
 
Join Date: Nov 2005
Posts: 504
Default

Quote:
Originally Posted by tpuNIsher View Post
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...
testdude is offline  
Old 10.04.2007, 18:57   #19
hhk31257
Архивный участник
 
Join Date: May 2006
Posts: 166
Default

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)
hhk31257 is offline  
Old 10.04.2007, 16:00   #20
tpuNIsher
Архивный участник
 
Join Date: Mar 2006
Posts: 685
Default

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..
tpuNIsher is offline  
Old 10.04.2007, 16:26   #21
Mio
Архивный участник
 
Join Date: Feb 2007
Posts: 202
Default

Quote:
Originally Posted by tpuNIsher View Post
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.
Mio is offline  
Old 10.04.2007, 19:13   #22
Le][u$
Архивный участник
 
Join Date: Aug 2006
Posts: 57
Default My fix

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
Code:
"SELECT user_data FROM user_data WITH (nolock) WHERE uid = %d"
=>
Code:
"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.
Code:
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
Code:
<?
#$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!
Le][u$ is offline  
Old 11.04.2007, 19:46   #23
khelben
Архивный участник
 
Join Date: Mar 2006
Posts: 104
Default

Quote:
Originally Posted by Le][u$ View Post
3.
Code:
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.
khelben is offline  
Old 12.04.2007, 05:33   #24
TheTester
Архивный участник
 
Join Date: Oct 2006
Posts: 112
Default

Quote:
Originally Posted by khelben View Post
Turning the flag off after being checked increases the security.
And what about 'relogin'?
TheTester is offline  
Old 12.04.2007, 12:25   #25
-sky-
Архивный участник
 
Join Date: Apr 2005
Posts: 15
Default

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

Code:
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
Code:
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 байт
-sky- is offline  
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 18:04.