Post Pacific  

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

Notices

 
 
Thread Tools Search this Thread Display Modes
Old 20.02.2005, 10:50   #1
Digital
Архивный участник
 
Join Date: Nov 2004
Posts: 1,405
Default [Fix] Buffs Exploit

check the post below
Digital is offline  
Old 20.02.2005, 17:55   #2
Thalone
Архивный участник
 
Join Date: Feb 2005
Posts: 134
Default

all i see above is boxes :/
Thalone is offline  
Old 20.02.2005, 18:08   #3
theRAGE
Архивный участник
 
Join Date: Feb 2005
Posts: 82
Default

Ummmm... thats a SQL script... o_O

I guess it'll be useful for figuring out the new client-side add-ins like private workshop and recommend, etc... Anyone wanna hex the client and see what command is sent for these actions so we can make a corresponding SQL script? :P
theRAGE is offline  
Old 21.02.2005, 03:18   #4
Digital
Архивный участник
 
Join Date: Nov 2004
Posts: 1,405
Default

solving BUFF has 3 methods,
1:
edit database lin_GetUserDataByCharId
find
(SELECT * FROM user_ActiveSkill (nolock) WHERE char_id = @char_id) as uas

changed the red portion to a char without any buff on any acc ID

example:
(SELECT * FROM user_ActiveSkill (nolock) WHERE char_id = 1) as uas

this solves BUFF stacking problem,side-effects,when char goes online, no buffs

2:

simple fix for BUFF --- stored procedure need testing!

in lin2db,there's this stored procedure ap_GStat check it's element!
inside is transaction's code

change to:

/*CREATE PROCEDURE [dbo].[ap_GStat]
@account varchar(14), @uid int OUTPUT, @payStat int OUTPUT, @loginFlag int OUTPUT, @warnFlag int OUTPUT, @blockFlag int OUTPUT, @blockFlag2 int OUTPUT, @subFlag int OUTPUT, @lastworld tinyint OUTPUT
AS
SELECT @uid=uid, @payStat=pay_stat, @loginFlag = login_flag, @warnFlag = warn_flag, @blockFlag = block_flag, @blockFlag2 = block_flag2, @subFlag = subscription_flag , @lastworld=last_world FROM user_account WITH (nolock)
WHERE account=@account
GO*/

CREATE PROCEDURE [dbo].[ap_GStat]
@account varchar(14),
@uid int OUTPUT,
@payStat int OUTPUT,
@loginFlag int OUTPUT,
@warnFlag int OUTPUT,
@blockFlag int OUTPUT,
@blockFlag2 int OUTPUT,
@subFlag int OUTPUT,
@lastworld tinyint OUTPUT,
@block_end_date datetime OUTPUT
AS

DECLARE @JianGe INT

SET NOCOUNT ON


SELECT @uid=uid,
@payStat=pay_stat,
@loginFlag = login_flag,
@warnFlag = warn_flag,
@blockFlag = block_flag,
@blockFlag2 = block_flag2,
@subFlag = subscription_flag ,
@lastworld=last_world,
@block_end_date=block_end_date
FROM user_account WITH (nolock)
WHERE account=@account


SELECT @JianGe = DATEDIFF(ss, last_logout, getdate()) FROM user_account WITH (nolock) WHERE account=@account

IF @JianGe < 60
BEGIN
set @blockFlag2 = 1
END
GO

test first!!!!! can防BUFF叠加

IF @JianGe < 60 means delay of 60seconds

3:
edit ap_Gstat,solves BUFF


open ap_Gstat stored procedure,since this procedure reads account state info, solving this problem becomes alot easier

ok, in this procedure paste the code below above the word GO:

declare @lastlogin datetime
SELECT @lastlogin=last_login from user_account (nolock) where account=@account
if @lastlogin is not null and DateDiff(ss,@lastlogin,GetDate())<180
Begin
set @blockflag=1
End
Digital is offline  
Old 03.07.2005, 12:17   #5
elcapo
Архивный участник
 
Join Date: Mar 2005
Posts: 107
Default

...but...

set @blockflag=1 will block this user for ever, isnt it?
elcapo is offline  
Old 04.07.2005, 08:26   #6
Fduch
Архивный участник
 
Join Date: Jun 2005
Posts: 15
Default

This isn't solve over buff bug, because all information about buffs stored in cache. You need to restart server for clear it.
May be anybody know how to clear cache without restarting?
Fduch is offline  
Old 04.07.2005, 08:31   #7
BiGBoY
Архивный участник
 
Join Date: May 2005
Posts: 216
Default

Quote:
Originally Posted by Fduch
May be anybody know how to clear cache without restarting?
https://postpacific.loc-online.com/forum/viewtopic.php?t=1094
BiGBoY is offline  
Old 04.07.2005, 08:39   #8
Fduch
Архивный участник
 
Join Date: Jun 2005
Posts: 15
Default

Hmm.. DELETE_SKILL_PATTERN
Do you think this command will clear skill cache?
Fduch is offline  
Old 04.07.2005, 17:41   #9
Dubie
Архивный участник
 
Join Date: Mar 2005
Posts: 133
Default

This does fix it, they can not use the bug exploit if they can not log right back in. The exploit is based off of timeing.
So if you use this and stop them from being able to login & logout over and over then its fixed.
Dubie is offline  
Old 04.07.2005, 18:00   #10
Sakumi
Архивный участник
 
Join Date: Apr 2005
Posts: 555
Default

This does not fix the buff duping.


Sorry.... But I tested it
(My SQL was correct, im a Microsoft Certified Database Administrator, so im not some random newb editing stored procs etc.)

The only way (at the moment) to fix it, is change your authd and network.dll. This makes it NEARLY impossible for l2walker ppl to get in (what is used for the exploit, for the quick logging etc).

Id move this back to the general discussion as it will give people false hope.

But, it doesnt work.
Sakumi is offline  
Old 04.07.2005, 22:06   #11
Vicious
Архивный участник
 
Join Date: Jun 2005
Posts: 6
Default

Quote:
Originally Posted by Sakumi
This does not fix the buff duping.


Sorry.... But I tested it
(My SQL was correct, im a Microsoft Certified Database Administrator, so im not some random newb editing stored procs etc.)

The only way (at the moment) to fix it, is change your authd and network.dll. This makes it NEARLY impossible for l2walker ppl to get in (what is used for the exploit, for the quick logging etc).

Id move this back to the general discussion as it will give people false hope.

But, it doesnt work.
change your authd and network.dll don't solve problem with ingame bot, therefore it don't solve problem wuth overbufs...
and for outgame bote exist L2UnPro utility...
Vicious is offline  
Old 05.07.2005, 15:31   #12
Sakumi
Архивный участник
 
Join Date: Apr 2005
Posts: 555
Default

Vicious it doesnt STOP them 100%, but.. its enough of a hurdle that ive seen zero buff sploiters since I did that.
Sakumi is offline  
Old 04.10.2005, 02:16   #13
RmzVoid
Архивный участник
 
Join Date: Apr 2005
Posts: 357
Default

Easyiest way and, I think, more practical is erase all buffs on exit. Not so important, we buy no overbuffing and cost for it - erase buff on exit.
RmzVoid is offline  
Old 04.10.2005, 14:27   #14
Sht{u}
Архивный участник
 
Join Date: Jul 2005
Posts: 15
Default

Quote:
Originally Posted by RmzVoid
Easyiest way and, I think, more practical is erase all buffs on exit. Not so important, we buy no overbuffing and cost for it - erase buff on exit.
Thats right buff_erase_on_quit its a best way.
Sht{u} is offline  
Old 08.10.2005, 14:40   #15
Sprinkle
Архивный участник
 
Join Date: Mar 2005
Posts: 82
Default

and how would i implement buff_erase_on_quit ? All 3 of the script edits do not solve.
Sprinkle is offline  
Old 08.10.2005, 18:00   #16
Adelaide
Архивный участник
 
Join Date: Jun 2005
Posts: 82
Default

I cant understand this :

-----------------------------------------------------
SELECT @JianGe = DATEDIFF(ss, last_logout, getdate()) FROM user_account WITH (nolock) WHERE account=@account

IF @JianGe < 60
BEGIN
set @blockFlag2 = 1
END
GO

test first!!!!! can防BUFF叠加

IF @JianGe < 60 means delay of 60seconds
-----------------------------------------------------


Is @JianGe an... example ? Coz it looks like an account to me.
Adelaide is offline  
Old 08.10.2005, 19:10   #17
Livid
Архивный участник
 
Join Date: Apr 2005
Posts: 314
Default

Let me give you the idea how to make overbuff block.
First, it will require cacheD hexing.
You need to add extra peace of code to function which reads buffs (on user login). If there's a duplicate, discard it. That's it. So, it will take about (slot_numbers!-1)*10 operations, but it is called once per character enterworld(), so what's problem?
Start thinking.
Livid is offline  
Old 23.10.2005, 19:05   #18
lydiagr
Архивный участник
 
Join Date: Oct 2005
Posts: 1
Default

Is it really a FIX about this exploit..?

Cause all of your "FIXs" will cause lag or will not work..
lydiagr is offline  
Old 04.11.2005, 02:00   #19
SolarWind
Архивный участник
 
Join Date: Nov 2005
Posts: 7
Default

script starting by cron every 5 min:
Code:
select char_id from user_ActiveSkill
where (s1 = s2) or (s1 = s3) or (s1 = s4) or (s1 = s5) or (s1 = s6)
 or (s1 = s7) or (s1 = s8) or (s1 = s9) or (s1 = s10) or (s1 = s11)
 or (s1 = s12) or (s1 = s13) or (s1 = s14) or (s1 = s15) or (s1 = s16)
 or (s1 = s17) or (s1 = s18) or (s1 = s19) or (s1 = s20);
just ban on FW if any.
SolarWind is offline  
Old 04.01.2006, 08:15   #20
SolarWind
Архивный участник
 
Join Date: Nov 2005
Posts: 7
Default

Quote:
Originally Posted by talmage
select char_id from user_ActiveSkill
where (s1 = s2) or (s1 = s3) or (s1 = s4) or (s1 = s5) or (s1 = s6) [etc]


Bad idea, remember, if there isint a skill there the value is 0 it will match.

Ie, if someone has no buffs

s1 = 0
s2 = 0

s1 and s2 are equal.

Also cron is a bad idea, hint: stored procedure that saves user_activeSkill
WHERE (s1 != NULL AND ((s1 = s2) or ....)
work finely, also automatically fills up cheaters list on site (relieves from superfluous bodymoving )
but nevertheless i shall look that is possible make through stored proc

i hate MSSQL

==
sorry 4 my terrable eng, my native lang is perl
SolarWind is offline  
Old 17.01.2006, 07:11   #21
SolarWind
Архивный участник
 
Join Date: Nov 2005
Posts: 7
Default

Without any extrnal scripts.

Just edit your stored procedure lin_CharLogout in lin2world DB
Code:
/********************************************    
lin_CharLogout    
 log character Logout    
INPUT    
 char_id    
OUTPUT    
return    
 week play time by sec    
made by    
 carrot    
date    
 2002-06-11    
change    
 2002.-12-20    
  add usetime set    
 2004-03-29    
  add function to write today's used sec    
********************************************/    
CREATE 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

/***** SolarWind: Check for OVERBUFF and BAN account if any *****/


IF EXISTS(SELECT 1 AS obuff FROM lin2world.dbo.user_ActiveSkill
 WHERE (s1 <> 0) AND (s1 = s2 OR s1 = s3 OR s1 = s4 OR s1 = s5 OR s1 = s6 OR s1 = s7 OR s1 = s8 OR s1 = s9 OR s1 = s10
 OR s1 = s11 OR s1 = s12 OR s1 = s13 OR s1 = s14 OR s1 = s15 OR s1 = s16 OR s1 = s17 OR s1 = s18 OR s1 = s19 OR s1 = s20)
 AND (char_id = @char_id))
BEGIN
 DECLARE @account_id INT
 SELECT @account_id = account_id FROM lin2world.dbo.user_data WHERE char_id = @char_id
 UPDATE lin2db.dbo.user_account SET block_flag = 1 WHERE uid = @account_id
END
GO
But i'm still hate this MSSQL
SolarWind is offline  
Old 17.01.2006, 07:14   #22
TheOrder
Архивный участник
 
Join Date: Sep 2005
Posts: 731
Default

Tnx SolarWind , i will test it right now !!!
TheOrder is offline  
Old 06.03.2006, 16:01   #23
Livid
Архивный участник
 
Join Date: Apr 2005
Posts: 314
Default

Well, since it was some time... and I was given a permission to post it... for those who can't solve overbuff problem yet...
the hex i talked about
Code:
0044E290   . /E9 FEFC0400   JMP Cached.0049DF93
Code:
0049DF93   > \8B8C30 FC0100>MOV ECX,DWORD PTR DS:[EAX+ESI+1FC]
0049DF9A   .  8BD6          MOV EDX,ESI
0049DF9C   >  3B4C14 24     CMP ECX,DWORD PTR SS:[ESP+EDX+24]
0049DFA0   .  74 0D         JE SHORT Cached.0049DFAF
0049DFA2   .  83FA 00       CMP EDX,0
0049DFA5   .  83EA 10       SUB EDX,10
0049DFA8   .^ 7F F2         JG SHORT Cached.0049DF9C
0049DFAA   .^ E9 E802FBFF   JMP Cached.0044E297
0049DFAF   >  6A 00         PUSH 0
0049DFB1   .^ E9 E202FBFF   JMP Cached.0044E298
You can add
0049DF92 90 NOP
if needed of course.
Livid 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 20:55.