php://filter(文件包含漏洞利用)及php://input(转载)

2021/6/3 20:24:36

本文主要是介绍php://filter(文件包含漏洞利用)及php://input(转载),对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!

原文:https://www.cnblogs.com/RenoStudio/p/10355173.html

  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代码的输入传递给目标变量。

侵删



这篇关于php://filter(文件包含漏洞利用)及php://input(转载)的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!


扫一扫关注最新编程教程