本题出题者出的是名为ipip的题目,被不法负责人改成1p1p,不过影响不大,进入正题。
打开题目:看到ip=,首先想到的是命令执行。
尝试输入127.0.0.1, 可以:
然后尝试使用ls命令:
发现有flag.php,于是开心的使用cat flag.php:
禁止使用空格,我们就想到了linux的隔离符号${IFS}:
发现禁止使用符号 ,例如{}这种,那么就使用$IFS$1,
发现过滤了flag这个符号,那么可以尝试将其拆分:
成功
在其它题目可以尝试编码绕过,如base64:
echo Y2F0IGZhbGcucGhw|base64 -d|bash
但是此题过滤了bash,不适用。
也可以使用ls内部执行绕过:
最后只需要查看源码,即可发现flag。