1. php://filter
文件包含漏洞:https://blog.csdn.net/fageweiketang/article/details/80699051
筛选过滤应用:
1、 字符串过滤器:
- string.rot13 对字符串执行ROT13转换
- string.toupper转换为大写
- string.tolower 转换为小写
- string.strip_tags去除html和php标记
2、 转换过滤器:
- convert.base64-encode & convert.base64-decode :base64编码/解码
- convert.quoted-printable-encode & convert.quoted-printable-decode:将 quoted-printable 字符串转换为 8-bit 字符串
3、 压缩过滤器:
- zlib.deflate和 zlib.inflate
- bzip2.compress和 bzip2.decompress
4、 加密过滤器:
- mcrypt.tripledes和mdecrypt.tripledes等
利用例子:Bugku flag在index里
像这样:http://120.24.86.145:8005/post/index.php?file=php://filter/read=convert.base64-encode/resource=index.php
说说file=php://filter/read=convert.base64-encode/resource=index.php的含义
首先这是一个file关键字的get参数传递,php://是一种协议名称,php://filter/是一种访问本地文件的协议,/read=convert.base64-encode/表示读取的方式是base64编码后,resource=index.php表示目标文件为index.php。
2.php://input
php://input是个可以访问请求的原始数据的只读流。
可以接收post请求作为输入流的输入,将请求作为PHP代码的输入传递给目标变量,以达到以post 的形式进行输入的目的。
(例:bugku welcome to bugkuctf)