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

1. php://filter

文件包含漏洞:https://blog.csdn.net/fageweiketang/article/details/80699051

38be01e09502961784a0fc8b9680dce1.png

筛选过滤应用:

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)

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值