1.http://123.57.240.205:4002/
首先進行了一些常規的操作,沒有得到任何信息
直接訪問flag.php
得到flag
2.http://123.57.240.205:4005/
/m修飾符表示正則開啓多⾏匹配
得到flag
3.http://123.57.240.205:4003/
變換非字母、數字的字符
![在這裏插入圖片描述](https://img-blog.csdnimg.cn/20200314005451658.png
現在就可以閱讀flag了
0=readfile('/flag');
得到flag
4.http://123.57.240.205:4001/
<!DOCTYPE html>
<html>
<head>
<title>level 3</title>
</head>
<body>
<!--
$sandbox = './sandbox/' . md5("xxx" . $_SERVER['REMOTE_ADDR']);
@mkdir($sandbox);
@chdir($sandbox);
echo $sandbox;
file_put_contents('flag.php','<\?php $flag="flag{***}";');
if (isset($_GET['cmd']) && strlen($_GET['cmd']) <= 5) {
@exec($_GET['cmd']);
} else if (isset($_GET['reset'])) {
@exec('/bin/rm -rf ' . $sandbox);
header('Location:index.php');
}else{
die('die');
}
-->
</body>
</html>
./sandbox/146ee567e1f8fb7aaa84684f100fc6ac<br>die