当前位置:网站首页>[极客大挑战 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:
边栏推荐
- Huawei releases the first electric drive system driveone: charging for 10 minutes, endurance of 200km
- JVM 内存布局详解(荣耀典藏版)
- Buuctf questions upload labs record pass-11~pass-20
- 怎样巧用断言+异常处理类,使代码更简洁!(荣耀典藏版)
- 基于Xception-TD的中华传统刺绣分类模型构建
- 顶级“Redis 笔记”, 缓存雪崩 + 击穿 + 穿透 + 集群 + 分布式锁,NB 了
- First week of internship diary
- LeetCode链表问题——面试题02.07.链表相交(一题一文学会链表)
- 关键路径的分析
- Another installation artifact
猜你喜欢

技术选型Rust——事后分析

基于Xception-TD的中华传统刺绣分类模型构建

Explain C language 12 in detail (C language series)

PyQt5快速开发与实战 5.4 网页交互

MySQL 是如何归档数据的呢?

Icml2022 | timing self-monitoring video transformer

Adventures of little mouse: behind the scenes gags of moss 2

Coding with these 16 naming rules can save you more than half of your comments!

Meta opens the project aria pilot dataset and will develop real-time 3D maps in the future

怎样巧用断言+异常处理类,使代码更简洁!(荣耀典藏版)
随机推荐
ICML2022 | 时序自监督视频transformer
(PMIC) full and half bridge drive csd95481rwj PDF specification
Two excellent software of my love cracking, batch search text, image and video image quality enhancement
Leetcode linked list problem -- 142. circular linked list II (learn the linked list by one question and one article)
Api 接口优化的几个技巧
30.学习Highcharts 标签旋转柱形图
不用Swagger,那我用啥?
Bully is filed for bankruptcy! The company has become a "Lao Lai", and the legal person is restricted from high consumption
Talk about row storage and column storage of database
MySQL 是如何归档数据的呢?
传微软已获得向华为供货许可!华为将迎来全面解禁?
Leetcode linked list question - interview question 02.07. linked list intersection (learn linked list by one question and one article)
Modify the port number of MySQL (is there a problem modifying the port number of MySQL)
Study - Summary of geometric calculations
如何优雅的设计工作流引擎(荣耀典藏版)
The general strike of three factories in St France may make the shortage of chips more serious!
Learning typescript (II)
作价11.5亿元,1206件设备注入合资公司!SK海力士抢食大陆晶圆代工市场!
With the help of domestic chip manufacturers, the shipment of white brand TWS headphones has reached 600million in 2020
The greatest romance of programmers~