Post Pacific

Post Pacific (https://postpacific.loc-online.com/index.php)
-   Темы без сохранившегося раздела (https://postpacific.loc-online.com/forumdisplay.php?f=10001)
-   -   [Fix] Buffs Exploit (https://postpacific.loc-online.com/showthread.php?t=103)

Digital 20.02.2005 10:50

[Fix] Buffs Exploit
 
check the post below

Thalone 20.02.2005 17:55

all i see above is boxes :/

theRAGE 20.02.2005 18:08

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

Digital 21.02.2005 03:18

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

elcapo 03.07.2005 12:17

...but...

set @blockflag=1 will block this user for ever, isnt it?

Fduch 04.07.2005 08:26

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?

BiGBoY 04.07.2005 08:31

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

Fduch 04.07.2005 08:39

Hmm.. DELETE_SKILL_PATTERN
Do you think this command will clear skill cache?

Dubie 04.07.2005 17:41

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.

Sakumi 04.07.2005 18:00

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.

Vicious 04.07.2005 22:06

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...

Sakumi 05.07.2005 15:31

Vicious it doesnt STOP them 100%, but.. its enough of a hurdle that ive seen zero buff sploiters since I did that.

RmzVoid 04.10.2005 02:16

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.

Sht{u} 04.10.2005 14:27

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.

Sprinkle 08.10.2005 14:40

and how would i implement buff_erase_on_quit ? All 3 of the script edits do not solve.

Adelaide 08.10.2005 18:00

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.

Livid 08.10.2005 19:10

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.

lydiagr 23.10.2005 19:05

Is it really a FIX about this exploit..?

Cause all of your "FIXs" will cause lag or will not work..

SolarWind 04.11.2005 02:00

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 04.01.2006 08:15

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 17.01.2006 07:11

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

TheOrder 17.01.2006 07:14

Tnx SolarWind , i will test it right now !!!

Livid 06.03.2006 16:01

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.


All times are GMT. The time now is 15:13.