BUUCTF:[HarekazeCTF2019]encode_and_encode ----Unicode编码绕过 --- php://filter再敏感一点啊 --- 细心看代码,,被骗了,,

一、自己做:

尝试了,但是页面没有反应,再加上不知道怎样去读取,就看wp了

还是粗心了,我看到他说 不能有伪协议,:

        // no stream wrapper
        '(php|file|glob|data|tp|zip|zlib|phar):',

然后,虽然有 file_get_content()函数,我也没有去想用php伪协议来。
后来发现in_valild()这个函数并没有对 page这个变量进行过滤啊。。大意了。。

    $content = file_get_contents($page);

这个看到 file_get_contents()函数,还是要时刻注意:ph://filter这个读取协议。

二、学到的:

  1. 还有unicode的知识点,json_decode会自动解析unicode编码。然后

三、学WP:

jason_decode会自动解析unicode编码,然后就用Unicode编码来进行绕过了
读取的话就{"page":"php://filter/convert.base64-encode/resource=flag.php"}

然后编码,提交

在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/Zero_Adam/article/details/114832980