美文网首页
内部选拔赛WEB部分解题报告

内部选拔赛WEB部分解题报告

作者: 蓝小俊 | 来源:发表于2019-07-10 23:51 被阅读0次

EASY-WEB

  • 题目界面
图片.png

-解题过程

  1. 点击myserver访问相关页面,发现网页源代码中存在敏感文件信息
图片.png
  1. 陆续访问相关页面,发现只有files_up_api.phpwebindex.php是可以访问的,首先访问webindex.php,界面如下:
    图片.png
    根据右键源代码中密码是4位数字的提示进行相应的爆破,用户名使用``lxj`,密码使用四位数进行爆破,burp抓包爆破如下:
    图片.png
  2. 最后密码是9988,登录之后页面重定向下载文件,将文件下载好后进行代码审计:
under development index<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<?php
    //....
?>
<body>
    <a href="myserver.php">myserver</a>
</body>
</html>


<?php
error_reporting(0);



class Server{
    public $file='myserver.php';

    function get_file(){
        include_once($this->file);
    }

    function __toString()
    {
        $this->get_file();
    }
}


$file = unserialize($_GET['file']?:'');
echo $file;
  1. 根据文件泄露代码审计的结果发现index.php页面存在反序列化漏洞,构造payload进行读取相关文件信息

相关文章

网友评论

      本文标题:内部选拔赛WEB部分解题报告

      本文链接:https://www.haomeiwen.com/subject/ttllkctx.html