Post Pacific

Post Pacific (https://postpacific.mmorpg-game.online/index.php)
-   Lineage 2 Server Modifications ONLY! (https://postpacific.mmorpg-game.online/forumdisplay.php?f=28)
-   -   L2CP Reborn. (https://postpacific.mmorpg-game.online/showthread.php?t=6488)

Phantom2005 24.12.2006 16:19

L2CP Reborn.
 
Hello it's been a while since i last helped PP out.
And since there's some new exploit out for L2CP i'd like to share a new type of L2CP. I re-did L2CP in a better and optimized way.
And i'll even add more features later on.
Thanks to Doraemon or whoever started with this project.

And thanks to testdude for the injection fix + checkhash idea

Feel free to post bugs/questions/problems/suggestions, have fun.

v1.05
- Added a security code and added hash check.

v1.00
- New Style/New Way of fixing SQL Injection Exploit and some new features.

Preview:
http://img245.imageshack.us/img245/8...oos2gr7.th.jpghttp://img214.imageshack.us/img214/2...oos3ef8.th.jpg

Вложения из исходного сообщения (сами файлы в копии отсутствуют):
l2cpreborn.rar — 84146 байт

testdude 24.12.2006 16:29

lawl w/e i might aswell be the person to say this

you didnt fix the sql injection
Code:

function checkcookie($where, $cookieuser, $cookiepass, $dbname, $sqladdress, $sqluser, $sqlpass) {
        $cookieuser=antiinjection($cookieuser);
        $cookiepass=antiinjection($cookiepass);
        connectdb($dbname,$sqladdress, $sqluser, $sqlpass);
        if($where==0) {
                $result = mssql_query(sprintf(SELECT_USER_PASS, $cookieuser));
                $rows=mssql_num_rows($result);
                if ($rows>0) {
                        $rows=mssql_fetch_assoc($result);
                        extract($rows);
                        $password = '0x' . bin2hex($password);
                        if(md5($password)==$cookiepass) {
                                quickrefresh('home.php');
                        } else {
                                resetcookies();
                        }
                } else {
                resetcookies();
                }
        } elseif($where==1) {
                $result = mssql_query(sprintf(SELECT_USER_PASS, $cookieuser));
                $rows=mssql_num_rows($result);
                if ($rows>0) {
                        $rows=mssql_fetch_assoc($result);
                        extract($rows);
                        $password = '0x' . bin2hex($password);
                        if(md5($password)!=$cookiepass) {
                                notloggedin();
                        }
                } else {
                        notloggedin();
                }
        }
}

that fixes the sql injection kthnx

<3 from l2e the practically ONLY server to have secured l2cp >.>

testdude 24.12.2006 16:32

and also... u might wanna add password hash size checking... if the length of the hash > 34 then that means that pw is corrupt, and cant be used, might wanna add it to register and changepassword

testdude 25.12.2006 08:11

27 downloads not a single reply... Welcome to Post Pacific.

I hope you leechers get a fucking letter bomb for christmas.

mcrabben7 25.12.2006 08:28

Thanks for sharing and welcome back Phantom :)

P.S. testdude, better watch your blood pressure xD

testdude 25.12.2006 08:42

Quote:

Originally Posted by mcrabben7 (Post 74921)
P.S. testdude, better watch your blood pressure xD

tho hey i guess the good thing is the leechers dont know how the fuck to put my code into l2cp xD

m4rk 25.12.2006 10:51

Quote:

tho hey i guess the good thing is the leechers dont know how the fuck to put my code into l2cp xD
you gave them the whole function, they'd have to be idiots not to know how to add it xD.

By the way thanks testude for pointing that out, I realised that the only way to be injected was through cookies but i didn't know shit about how they were handled by l2cp. After hacking my own server yesterday (for testing purposes xD) I finally understand almost everything. And thanks Phantom for your effort, I will surely study your l2cp reborn ^^

ismael66 25.12.2006 11:22

thank dude (reffering to phantom) and thanks testdude for the function :)
Merry Christmas!

dirkr 25.12.2006 15:09

i know its a nice panel and all but wouldnt it be easier ( and less exploitable ) to just leave cookies out of it and just check all the input given thru inputfields?
k you wont have a login function and all but just 3 pages with reg/change pw/recover pw
but isnt this more secure?

( feel free to flame me or to point out my dumbness )

m4rk 25.12.2006 15:38

Well, right now if you check cookies and you have restricted user in sql there should be no problem at all. They can't drop tables, they can't exec cmdshells... they can't do shit xD...

testdude 25.12.2006 16:29

actually right now if u use my function there is NO sql injection, PERIOD.

and btw cookies are used for logging in... theres not really a way to do it without cookies

Phantom2005 25.12.2006 20:23

v1.05
- Added a security code.


just change $CONFIG['securitycode'] = "0";
[0 (disabled), 1: enabled for all, 2: enabled for all except login]
$CONFIG['securitycode'] = "0";

(it's added for lostpassword, register, login)

http://img214.imageshack.us/img214/2...oos3ef8.th.jpg

nish 25.12.2006 21:35

damn nice share to bad somethin like this was not out before i got injected 2 months ago lol :)

im using a custom reg right now so i cant use this but great share man and merry xmas ;)

testdude 26.12.2006 08:14

dont thank or credit me for fixing ur sql hole and the hash check idea or anything phantom...

Phantom2005 26.12.2006 11:19

Thanks testdude.
It's just a release for people that do not know how to do it themselfs.
The people that download it should thank you.
I don't really care about it anyway, I'm just finishing the work of the one who started this, im doing it for fun, i dont need any credits.

AsterisKSM 27.12.2006 02:07

well... why it doesent work to make an account?all is good... user pass etc...
Every time i make an account i get this (Email length must be 7 to 50 characters long.)

i put even 40 caracters email.... lol but no effect... and account is not made...

kin 27.12.2006 20:12

nish
On every page where user enter any data (login, change pass, register, etc), I have this kind of protection! I never put the site on internet without it! It's too easy to implement :) You are a hero that put your site without it.

KOC2000 28.12.2006 02:27

Thank you.
I've the same problem as "AsterisKSM" plus I can't even login I always get a msgbox "You are not logged in".. also what does "Reser" at "Forgot your password?" do ?

Thanx.

AsterisKSM 28.12.2006 08:58

Yea Exactly!!!

valsha 28.12.2006 10:44

Quote:

Originally Posted by KOC2000 (Post 75069)
Thank you.
I've the same problem as "AsterisKSM" plus I can't even login I always get a msgbox "You are not logged in".. also what does "Reser" at "Forgot your password?" do ?

Thanx.

same problems

URANUS 28.12.2006 16:45

Quote:

Originally Posted by valsha (Post 75089)
same problems

same problems

SlayerX 28.12.2006 17:57

Ffs Nooob Admin

URANUS 28.12.2006 18:41

Quote:

Originally Posted by SlayerX (Post 75117)
Ffs Nooob Admin

)))) But yours post - great solution this problem )))))

AsterisKSM 29.12.2006 02:26

someone can fix this? (i`m not a php coder..)

cs991964 29.12.2006 10:39

in functions.php file at function checkhash instead of 34 u must put 32.

THANK YOU FOR THIS SCRIPT and HAPPY NEW YEAR !

AsterisKSM 29.12.2006 13:58

still not working.

Phantom2005 29.12.2006 14:13

Re-download it i made a couple of mistakes.

AsterisKSM 29.12.2006 14:30

NOTHING! Absolutly NOTHING fixed man ... In new vers

Onepex 29.12.2006 14:41

Quote:

Originally Posted by AsterisKSM (Post 75181)
NOTHING! Absolutly NOTHING fixed man ... In new vers

How about you be thankful over that he actually shares this instead of being a prick?

mcrabben7 29.12.2006 15:12

Problems might be your version of PHP, your web host, etc. Don't blame Phantom for your problems. If it works for him, it's probably something you don't have installed.

AsterisKSM 29.12.2006 15:17

wtf? i`m not the only one that has this problems... even Phantom sayd that he made some mistakes... so S.T.F.U if you`re words are only for have more posts. Onepex

ismael66 29.12.2006 15:32

lol man , he is not god , and also he didn't owe you this

URANUS 29.12.2006 15:47

New version fine work!

KOC2000 30.12.2006 14:25

Works now.. but for "Forgot Password" to work you MUST have 'securitycode' set to 1 or 2.. this needs to be fixed also..

AsterisKSM 30.12.2006 15:04

well for me ...still not working :(

AsterisKSM 02.01.2007 05:27

Well... now to login is working... but with
$CONFIG['securitycode'] = "0"; set to 0... and to make an account ... it doesent work...

Onepex 02.01.2007 23:59

Quote:

Originally Posted by AsterisKSM (Post 75310)
Well... now to login is working... but with
$CONFIG['securitycode'] = "0"; set to 0... and to make an account ... it doesent work...

If you can't figure that out, then you simply shouldn't run a L2-sever.

AsterisKSM 03.01.2007 06:23

Onepex i`m not a php scripter... and you shold f***k yourself before u speak something.

nasso 03.01.2007 21:42

check_cookie: user=' (sql command - shutdown-- )
work ?

m4rk 03.01.2007 22:49

nasso that's not a correct syntax for SQL...
and moreover, the antiinjection already fixes it so that you can't inject.


All times are GMT. The time now is 23:54.