包含系统敏感文件

  • Windows 常见文件
文件 说明
C:\boot.ini 查看系统版本
C:\windows\system32\inetsrv\MetaBase.xml iis 配置文件
C:\windows\repair\same 存储 Windows 系统初次安装密码
C:\ProgramFiles\mysql\my.ini mysql 配置信息
C:\ProgramFiles\mysql\data\mysql\user.MYD mysql root密码
C:\windows\win.ini 系统信息
  • Linux 常见敏感文件
文件 说明
/etc/passwd 账户信息
/etc/shadow 账户密码文件
/etc/apache2/apache2.conf Apache2 默认配置文件
/etc/my.conf mysql 配置文件
/etc/php/5.6/apache2/php.ini php 相关配置
/etc/httpd/conf/httpd.conf apache 配置信息

PHP 伪协议

PHP 支持的协议与封装协议,可医用这些伪协议完成一些命令执行;

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
file:// — 访问本地文件系统
http:// — 访问 HTTP(s) 网址
ftp:// — 访问 FTP(s) URL
php:// — 访问各个输入 / 输出流( I/Ostreams )
zlib:// — 压缩流
zip://
bzip://
zip:// 绝对 ( 相对 ) 路径 /xx.zip%23 被压缩的文件
data:// — 数据( RFC 2397 )
glob:// — 查找匹配的文件路径模式
phar:// — PHP 归档
phar://相对路径/xx.zip/被压缩的文件
ssh2:// — Secure Shell 2
rar:// — RAR
ogg:// — 音频流
expect:// — 处理交互式的流

php://filter 一种元封装器,用于数据流打开时的筛选过滤;

使用不同的参数可以达到不同的目的和效果:

名称 描述 备注
resource=<要过滤的数据流> 指定了你要筛选过滤的数据流 必选
read=<读链的筛选列表> 可以设定一个或多个过滤器名称,以管道符(|)分隔 可选
write=<写链的筛选列表> 可以设定一个或多个过滤器名称,以管道符(|)分隔 可选

其他过滤器:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
(1)字符串过滤器
string.rot13 进行rot13转换
string.toupper 将字符全部大写
string.tolower 将字符全部小写
string.strip_tags 去除空字符、HTML 和 PHP 标记后的结果

(2)转换过滤器
convert.base64-encode base64 编码
convert.base64-decode base64 解码
convert.quoted-printable-encode quoted-printable 编码(也是另一种将二进制进行编码的方案)
convert.quoted-printable-decode quoted-printable 解码
convert.iconv 实现任意两种编码之间的转换

(3)压缩过滤器
zlib.deflate 压缩过滤器
zlib.inflate 解压过滤器
bzip2.compress 压缩过滤器
bzip2.decompress 解压过滤器

(4)加密过滤器
mcrypt.* 加密过滤器
mdecrypt.* 解密过滤器