[php代码审计] php://filter

时间:2017-07-27 00:56:08   收藏:0   阅读:2339

技术分享

技术分享

 

筛选过滤应用: 

1、 字符串过滤器:

2、 转换过滤器:

3、 压缩过滤器:

4、 加密过滤器:

readfile("php://filter/read=string.toupper/resource=http://www.example.com");//将www.example.com中的内容转换为大写后输出

file_put_contents("php://filter/write=string.rot13/resource=example.txt","Hello World");//将字符串”hello world”经过rot13编码后写入example.txt

 

例子:

url:

/index.php?a=php://filter/read=convert.base64-encode/resource=index2.php

index.php:

<?php
include($_GET[‘a‘]);
?>

结果如图:

技术分享

技术分享

 https://www.leavesongs.com/PENETRATION/php-filter-magic.html

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!