![]() |
|
|
#1 |
|
Архивный участник
Join Date: May 2005
Posts: 63
|
I know that some game passwords online checkers are exists now, so there a way to make this process slowly.
This is SQL Server side modification, already checked under SQL2005 EXPRESSS 1) you need to add table user_auth_log to lin2db Code:
USE [lin2db] GO SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO SET ANSI_PADDING ON GO CREATE TABLE [dbo].[user_auth_log]( [sid] [int] IDENTITY(1,1) NOT NULL, [account] [varchar](14) COLLATE Cyrillic_General_CI_AS NULL, [success] [tinyint] NOT NULL CONSTRAINT [DF_user_auth_log_success] DEFAULT ((2)), [dt] [datetime] NOT NULL CONSTRAINT [DF_user_auth_log_dt] DEFAULT (getdate()) ) ON [PRIMARY] GO SET ANSI_PADDING OFF 2) You need to modify lin2db..ap_GPwd stored procedure: Code:
set ANSI_NULLS OFF set QUOTED_IDENTIFIER OFF GO ALTER PROCEDURE [dbo].[ap_GPwd] @account varchar(14), @pwd binary(16) output AS --exec ap_GPwd_log @account -- Created By darkangel -- 20xx.xx.19 -- updated 20xx.xx.14 by KEMBL -- set Account's auth logging -- updated 20xx.xx.31 Logrus, Drone -- added login counts per time check SET NOCOUNT ON if (SELECT COUNT(*) FROM lin2db..user_auth_log WHERE account=@account AND DATEDIFF(mi, dt, GETDATE()) < 16) > 4 OR (SELECT COUNT(*) FROM lin2db..user_auth_log WHERE account=@account AND DATEDIFF(ss, dt, GETDATE()) < 3) > 0 BEGIN INSERT INTO user_auth_log (account,success) VALUES (@account, 0) SET NOCOUNT OFF SELECT @pwd = 0xC3371572F8F9BF71A8D31A1EB2436D6C END ELSE BEGIN INSERT INTO user_auth_log (account,success) VALUES (@account, 1) SET NOCOUNT OFF SELECT @pwd=password FROM user_auth with (nolock) WHERE account=@account END So, now rules are: 5 login tryes per 15 minutes and not less than 2 seconds between tryes. One more bad things exists with this code Change binary 16 string in value @pwd Code:
SELECT @pwd = 0xC3371572F8F9BF71A8D31A1EB2436D6 P.S. If you have got hex fix (or other) to login two users with one char (for self clone, selling and dupe resources), please share it. Torune's patch is great, but ability for char cloning still exists. |
|
|
|
|
#2 |
|
Архивный участник
Join Date: Oct 2005
Posts: 330
|
cypher's dll fixes cloning issues
|
|
|
|
|
#3 |
|
Архивный участник
Join Date: Aug 2005
Posts: 605
|
thanks for the share. i think there is a setting that if someone is already logged and you try to login, it doesn't kick the first person. So that way the cloning or duping has to be impossible
|
|
|
|
|
#4 |
|
Архивный участник
Join Date: Jan 2006
Posts: 13
|
Well as the title of this topic says..this should prevent "stealing" out players acc via bruteforce, there is no word about cloning.
|
|
|
|
|
#5 |
|
Архивный участник
Join Date: Jun 2005
Posts: 374
|
Thanks a lot for sharing man.
|
|
|
|
|
#6 | |
|
Архивный участник
Join Date: May 2005
Posts: 63
|
So, today i check prevent system SQL table user_auth_log, and i think it works fine. But for now i see that bruteforce spot target to account web manager. Add similar block for it, is a nice idea.
if you dont know yet, lineage2 password hash system, is a fake, look there https://postpacific.loc-online.com/f...ead.php?t=4421 password la2hash passw950 0xB5394575C865BD7247DEF8F835AF8989 passw951 0xB5394575C865BD7247DEF8F835AF8989 passw952 0xB5394575C865BD7247DEF8F835AF8989 passw953 0xB5394575C865BD7247DEF8F835AF8989 passw954 0xB5394575C865BD7247DEF8F835AF8989 so bruteforcing is not so hard on several passwords Quote:
![]() >cypher's dll fixes cloning issues Who can get a link to it? Forum search returns wrong matches
|
|
|
|
|
|
#7 | |
|
Архивный участник
Join Date: Oct 2006
Posts: 17
|
Quote:
I'm not good in SQL , but this , in my mind , fixed problem with static @PWD... Decrypt password is easy , if I use , for example only small letter , it take about 3 minutes at my computer... This is more security, if randomise generate password every time. Code:
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
go
ALTER PROCEDURE [dbo].[ap_GPwd] @account varchar(14), @pwd binary(16) output
AS
--exec ap_GPwd_log @account
-- Created By darkangel
-- 20xx.xx.19
-- updated 20xx.xx.14 by KEMBL
-- set Account's auth logging
-- updated 20xx.xx.31 Logrus, Drone
-- added login counts per time check
-- update 20xx.xx.25 by Stpavel
-- added random generate password
DECLARE @RandPass varchar(32)
DECLARE @counter smallint
DECLARE @RandNum float
DECLARE @RandNumInt tinyint
DECLARE @CurrChar varchar(1)
DECLARE @ValidChar varchar(255)
SET @ValidChar = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-=+&$'
DECLARE @ValidCharLength int
SET @ValidCharLength = len(@ValidChar)
SET @CurrChar = ''
SET @RandNum = 0
SET @RandNumInt = 0
SET @RandPass = ''
SET NOCOUNT ON
if (SELECT COUNT(*) FROM lin2db..user_auth_log WHERE account=@account AND DATEDIFF(mi, dt, GETDATE()) < 16) > 4
OR
(SELECT COUNT(*) FROM lin2db..user_auth_log WHERE account=@account AND DATEDIFF(ss, dt, GETDATE()) < 3) > 0
BEGIN
INSERT INTO user_auth_log (account,success) VALUES (@account, 0)
SET @counter = 1;
WHILE @counter < (17)
BEGIN
SET @RandNum = Rand();
SET @RandNumInt = Convert(tinyint, ((@ValidCharLength - 1) * @RandNum + 1))
SELECT @CurrChar = SUBSTRING(@ValidChar, @RandNumInt, 1);
SET @counter = @counter + 1;
SET @RandPass = @RandPass + @CurrChar;
END
SET NOCOUNT OFF
SELECT @pwd=convert(binary(16),@RandPass);
END
ELSE
BEGIN
INSERT INTO user_auth_log (account,success) VALUES (@account, 1)
SET NOCOUNT OFF
SELECT @pwd=password FROM user_auth with (nolock) WHERE account=@account
END
|
|
|
|
|
|
#8 |
|
Архивный участник
Join Date: Apr 2006
Posts: 461
|
Why not make the built-in password you use when they fail the check really long, like 25-32 binary characters? It would be impossible for an L2 password hash to ever exceed 16 binary characters, afaik.
I'm not an SQL guru, and stored procedures are not my specialty, but if someone knows if making the hash extremely long would make it impossible to get access to an account after the 5 fails, let me know. It'd be safer than using the random password of 16 characters since that can still randomly match (tho extremely rare chance). |
|
|
|
|
#9 |
|
Архивный участник
Join Date: Oct 2006
Posts: 9
|
There's a major flaw... if you know a persons account name you can spam login and basically lock their account.
I've created a real time logging feature that'll log not only account names, but will log ips. so it'll keep track of x failed logins in x minutes, and ban that ip for x amount of time. Ban by adding ip to BlockIPS.txt will use this in conjunction with https://postpacific.loc-online.com/f...t=BlockIPS.txt |
|
|
|
|
#10 | ||
|
Архивный участник
Join Date: Mar 2006
Posts: 104
|
Quote:
Quote:
|
||
|
|
| Thread Tools | Search this Thread |
| Display Modes | |
|
|