当前位置:网站首页>[极客大挑战 2019]Secret File&文件包含常用伪协议以及姿势
[极客大挑战 2019]Secret File&文件包含常用伪协议以及姿势
2022-07-28 19:53:00 【努力做大佬m0_68074153】
1.进入页面查看源码
找到提示有一个Archive_room.php文件,查看
点进去查看
回去看Archive_room.php的源码,发现url是action.php但是进来之后重定向导论了end.php。抓包重放查看相应包发现 secr3t.php
查看出现源码
2.文件包含
代码审计,这里可以文件包含并且过滤了一些特定字符,但是php没有被过滤。先直接包含flag.php看看。
存在文件,经典姿势查看源代码:php://filter/read=convert.base64-encode/resource=flag.php
base64解密
找到flag
文件包含常用协议(姿势)
一、协议:
1.php://filter 读取文件源码
php://filter 协议可以对打开的数据流进行筛选和过滤,常用于读取文件源码
使用文件包含函数包含文件时,文件中的代码会被执行,如果想要读取文件源码,
可以使用base64对文件内容进行编码,编码后的文件内容不会被执行,而是展示
在页面中,我们将页面中的内容使用base64解码,就可以获取文件的源码了
2.php://input 任意代码执行
php://input 可以访问请求的原始数据,配合文件包含漏洞可以将post请求体
中的内容当做文件内容执行,从而实现任意代码执行,需要注意的是,当
enctype=multipart/form-data时,php:/input将会无效
3.data://text/plain 任意代码执行
协议格式: data:资源类型;编码,内容
data://协议通过执行资源类型,使后面的内容当做文件内容来执行,从而造成任
意代码执行
4.zip:// 配合文件上传开启后门
ziip://协议用来读取压缩包中的文件,可以配合文件上传开启后门,获取
webshell将shell.txt压缩成zip,再将后缀名改为jpg上传至服务器,再通过
zip伪协议访问压缩包里的文件,从而链接木马
二、姿势:
?page=php://filter/read=string.rot13/resource=index.php
?page=php://filter/convert.base64-encode/resource=index.php
?page=pHp://FilTer/convert.base64-encode/resource=index.php
?page=zip://shell.jpg%23payload.php
?page=data://text/plain;base64,[base64_encode_shell]
?page=expect://id
?page=expect://ls
?page=php://input | POST DATA:
边栏推荐
- 怎么理解数据网格(Data Mesh)
- Library borrowing system "suggested collection"
- The 35 required questions in MySQL interview are illustrated, which is too easy to understand
- quii cordova-plugin-telerik-imagepicker插件多图上传乱序
- The greatest romance of programmers~
- 【英雄哥七月集训】第 28天:动态规划
- Paging function (board)
- Why on earth is it not recommended to use select *?
- 大学荒废三年,大四自学7个月测试,找到了12K的工作
- High salary in the workplace | "intermediate and advanced test" interview questions
猜你喜欢
Adventures of little mouse: behind the scenes gags of moss 2
怎么理解数据网格(Data Mesh)
融合LSTM与逻辑回归的中文专利关键词抽取
(PMIC) full and half bridge drive csd95481rwj PDF specification
The greatest romance of programmers~
Api 接口优化的几个技巧
Summary of 29 typical problems in Devops planning and construction of securities enterprises based on containerized PAAS platform
不用Swagger,那我用啥?
Leetcode linked list problem -- 142. circular linked list II (learn the linked list by one question and one article)
Discussion: if you want to land Devops, is it enough to only consider a good PAAS container platform?
随机推荐
蚂蚁集团境外站点 Seata 实践与探索
实现瀑布流效果
Buuctf questions upload labs record pass-11~pass-20
Baidu search is in line with expectations, but it involves the black hat strategy of the external chain. What is the reason?
Icml2022 | timing self-monitoring video transformer
聊一聊数据库的行存与列存
Capture video by buffering
The framing efficiency of setpreviewcallbackwithbuffer will become lower
软考 --- 数据库(3)数据操作
The ref value ‘xxx‘ will likely have changed by the time this effect function runs.If this ref......
分页功能(板子)
Maintenance of delta hot metal detector principle analysis of v5g-jc-r1 laser measurement sensor / detector
在子组件中使用el-date-picker报错
1162. Map analysis - non recursive method
Study and use of cobalt strike
职场高薪 |「中高级测试」面试题
Api 接口优化的几个技巧
国产芯片厂商助力,2020年白牌TWS耳机出货已达6亿部
Pytorch学习记录(四):过拟合、卷积神经网络CNN
What is the purpose of database read-write separation [easy to understand]