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/
变换非字母、数字的字符

现在就可以阅读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','<\?phpflag="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
文章评论