EASY-WEB
- 題目界面
圖片.png
-解題過程
- 點(diǎn)擊myserver訪問相關(guān)頁面囊颅,發(fā)現(xiàn)網(wǎng)頁源代碼中存在敏感文件信息
圖片.png
- 陸續(xù)訪問相關(guān)頁面固蚤,發(fā)現(xiàn)只有
files_up_api.php
和webindex.php
是可以訪問的槽片,首先訪問webindex.php
,界面如下:
圖片.png
根據(jù)右鍵源代碼中密碼是4位數(shù)字
的提示進(jìn)行相應(yīng)的爆破,用戶名使用``lxj`,密碼使用四位數(shù)進(jìn)行爆破焚鲜,burp抓包爆破如下:
圖片.png - 最后密碼是9988曲尸,登錄之后頁面重定向下載文件,將文件下載好后進(jìn)行代碼審計(jì):
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;
- 根據(jù)文件泄露代碼審計(jì)的結(jié)果發(fā)現(xiàn)
index.php
頁面存在反序列化漏洞比肄,構(gòu)造payload進(jìn)行讀取相關(guān)文件信息