任意⽂件读取漏洞⼩记
漏洞介绍
很多⽹站由于业务需求,往往需要提供⽂件(附件)下载的功能块,但是如果对下载的⽂件没有做限制,直接通过绝对路径对其⽂件进⾏下载,那么,恶意⽤户就可以利⽤这种⽅式下载服务器的敏感⽂件,对服务器进⾏进⼀步的威胁和攻击。
漏洞存在的地⽅
系统中存在⽂件(附件/⽂档/图⽚等等资源)下载的地⽅。
任意⽂件读取常见参数名:
&RealPath=
&FilePath=
&file=
&filename=
&Path=
&path=
&inputFile=
&url=
&urls=
&Lang=
&dis=
&data=
&readfile=
&filep=
&src=
&menu=
&META-INF=
&WEB-INF=
任意⽂件读取常⽤敏感⽂件路径:
Windows:
C:\boot.ini //查看系统版本
C:\Windows\System32\l //IIS配置⽂件
C:\Windows\repair\sam //存储系统初次安装的密码
C:\Program Files\mysql\my.ini //Mysql配置
C:\Program Files\mysql\data\mysql\user.MYD //Mysql root
C:\Windows\php.ini //php配置信息
C:\Windows\my.ini //Mysql配置信息
Linux:
/root/.ssh/authorized_keys
/root/.ssh/id_rsa
/root/.ssh/id_ras.keystore
/root/.ssh/known_hosts //记录每个访问计算机⽤户的公钥
mysql下载后的初次使用/etc/passwd
/etc/shadow
/etc/myf //mysql配置⽂件
/etc/httpd/f //apache配置⽂件
/root/.bash_history //⽤户历史命令记录⽂件
/
root/.mysql_history //mysql历史命令记录⽂件
/proc/mounts //记录系统挂载设备
/ //内核配置⽂件
/var/lib/mlocate/mlocate.db //全⽂件路径
/porc/self/cmdline //当前进程的cmdline参数
apache:
/etc/httpd/f
/etc/f
/etc/f
nginx:
nginx:
/
etc/f
/usr/local/nginx/f
/usr/local/etc/f
redis:
/f
以上是根据⾃⾝经验和阅读其他师傅的帖⼦所总结的,⽇后再加以完善。

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。