Post Pacific  

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

Notices

 
 
Thread Tools Search this Thread Display Modes
Old 12.04.2007, 20:11   #101
khelben
Архивный участник
 
Join Date: Mar 2006
Posts: 104
Default

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]
Code:
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]
Code:
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]
Code:
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
Code:
<?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
khelben is offline  
Old 12.04.2007, 21:44   #102
elcapo
Архивный участник
 
Join Date: Mar 2005
Posts: 107
Default MY question is

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??
elcapo is offline  
Old 12.04.2007, 22:51   #103
alysia
Архивный участник
 
Join Date: Apr 2005
Posts: 151
Default

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
alysia is offline  
Old 13.04.2007, 02:56   #104
elcapo
Архивный участник
 
Join Date: Mar 2005
Posts: 107
Default

Quote:
Originally Posted by alysia View Post
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.
elcapo is offline  
Old 13.04.2007, 07:53   #105
-sky-
Архивный участник
 
Join Date: Apr 2005
Posts: 15
Default

Quote:
Originally Posted by elcapo View Post
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- is offline  
Old 13.04.2007, 09:17   #106
Forcer
Архивный участник
 
Join Date: Apr 2006
Posts: 554
Default

Sky, you can share dll sources?
I want change cached ip address.
Plzz))
Forcer is offline  
Old 13.04.2007, 12:31   #107
elcapo
Архивный участник
 
Join Date: Mar 2005
Posts: 107
Default

Quote:
Originally Posted by -sky- View Post
useless proc... cached store account info and use lin_LoadAccount only once...
You are completly right.
No more ideas.
elcapo is offline  
Old 13.04.2007, 14:56   #108
Ameron
Архивный участник
 
Join Date: May 2005
Posts: 85
Default

but if we use lin_GetUnreadMailCount instead of lin_LoadAccount ?
Ameron is offline  
Old 13.04.2007, 15:25   #109
FidoW
Архивный участник
 
Join Date: Sep 2005
Posts: 1,014
Default

Quote:
Originally Posted by Ameron View Post
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)
FidoW is offline  
Old 13.04.2007, 19:19   #110
MewMew
Архивный участник
 
Join Date: Apr 2007
Posts: 5
Default

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
MewMew is offline  
Old 13.04.2007, 19:40   #111
adriahu
Архивный участник
 
Join Date: Oct 2006
Posts: 47
Default

Quote:
Originally Posted by MewMew View Post
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
adriahu is offline  
Old 13.04.2007, 19:42   #112
FidoW
Архивный участник
 
Join Date: Sep 2005
Posts: 1,014
Default

Quote:
Originally Posted by MewMew View Post
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...
FidoW is offline  
Old 13.04.2007, 20:17   #113
fswffssfs
Архивный участник
 
Join Date: Apr 2007
Posts: 1
Default

well i would also like to knwo how this thing works pals
fswffssfs is offline  
Old 13.04.2007, 22:27   #114
testdude
Архивный участник
 
Join Date: Nov 2005
Posts: 504
Default

Quote:
Originally Posted by MewMew View Post
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
testdude is offline  
Old 14.04.2007, 01:21   #115
PyroMaker
Архивный участник
 
Join Date: Nov 2006
Posts: 277
Default

lol... Script kiddies for those lose?
PyroMaker is offline  
Old 14.04.2007, 02:31   #116
tpuNIsher
Архивный участник
 
Join Date: Mar 2006
Posts: 685
Default

A pm:
Quote:
Originally Posted by MewMew
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..
tpuNIsher is offline  
Old 14.04.2007, 02:45   #117
nish
Архивный участник
 
Join Date: May 2006
Posts: 237
Default

i think he sent everyone a pm like that i got one to LMAO
nish is offline  
Old 14.04.2007, 08:25   #118
adriahu
Архивный участник
 
Join Date: Oct 2006
Posts: 47
Default

Is there possibility to close this forum for unlogged users?
adriahu is offline  
Old 14.04.2007, 10:02   #119
hhk31257
Архивный участник
 
Join Date: May 2006
Posts: 166
Default

Quote:
Originally Posted by adriahu View Post
Is there possibility to close this forum for unlogged users?
indeed..................
hhk31257 is offline  
Old 14.04.2007, 10:38   #120
Forcer
Архивный участник
 
Join Date: Apr 2006
Posts: 554
Default

I for......
Forcer is offline  
Old 14.04.2007, 11:25   #121
Mirror
Архивный участник
 
Join Date: Oct 2005
Posts: 330
Default

/offtopic

Quote:
Originally Posted by adriahu View Post
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 ?!
Mirror is offline  
Old 14.04.2007, 11:54   #122
FidoW
Архивный участник
 
Join Date: Sep 2005
Posts: 1,014
Default

Quote:
Originally Posted by Mirror View Post
what is this weird signature we all got ?!
https://postpacific.loc-online.com/f...ead.php?t=7297
FidoW is offline  
Old 14.05.2007, 21:14   #123
ZeniMax
Архивный участник
 
Join Date: May 2006
Posts: 209
Default

How to solve this big problem? I cant fix this exploit...
ZeniMax is offline  
Old 14.05.2007, 21:22   #124
Xari0n
Архивный участник
 
Join Date: Jul 2006
Posts: 119
Default

Quote:
Originally Posted by ZeniMax View Post
How to solve this big problem? I cant fix this exploit...
try 1 use amped 2.0 8)
Xari0n is offline  
Old 14.05.2007, 21:25   #125
ZeniMax
Архивный участник
 
Join Date: May 2006
Posts: 209
Default

xari0n check your pm please.
ZeniMax 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 16:11.