当前位置:网站首页>[actf2020 freshman competition]
[actf2020 freshman competition]
2022-04-23 00:55:00 【-There are stars in your eyes-】
There are links open tips, Click in again and find a sentence
Can you find out the flag?
And a parameter passed in later is file=flag.php
http://39f0e8ed-769a-4b4b-84d3-52367874da03.node4.buuoj.cn:81/?file=flag.php
And the title is include, So this must be a problem that the file contains vulnerabilities
Next, let's learn about pseudo protocol
php://Access individual inputs / Output stream (I/O streams), stay CTF Often used inphp://filterandphp://input,php://filterbe used for Read the source code ,php://inputbe used for perform php Code .
Here are the functions of common pseudo protocols
| agreement | effect |
|---|---|
| php://input | Read only stream that can access the requested raw data , stay POST Access in request POST Of data part , stay enctype="multipart/form-data" When php://input It's invalid . |
| php://output | Write only data streams , Allow to use print and echo Write to the output buffer in the same way . |
| php://fd | (>=5.3.6) Allows direct access to the specified file descriptor . for example php://fd/3 Referenced file descriptor 3. |
| php://memory php://temp | (>=5.1.0) A data stream similar to a file wrapper , Allow reading and writing temporary data . The only difference between the two is php://memory Always store data in memory , and php://temp After the amount of memory reaches the predefined limit ( The default is 2MB) Save in temporary file . Decision and of temporary file location sys_get_temp_dir() In the same way . |
| php://filter | (>=5.0.0) A meta wrapper , Designed for filtering applications when data flow is open . For all-in-one (all-in-one) The file function of is very useful , similar readfile()、file() and file_get_contents(), There is no chance to apply other filters before the data stream content is read . |
php://filter Parameters,
The parameters of the protocol will be passed on the protocol path , Multiple parameters can be passed in one path . Specific reference is as follows :
| php://filter Parameters | describe | |
|---|---|---|
| resource=< Data stream to filter > | Must be . It specifies the data stream you want to filter . | |
| read=< Read chain filter > | optional . You can set one or more filter names , With a pipe (*\ | *) Separate . |
| write=< Write chain filter > | optional . You can set one or more filter names , With a pipe (\ | ) Separate . |
| <; Two chain filters > | Anything that doesn't read= or write= Prefixed filter lists are applied to read or write chains as appropriate . |
For more information or other pseudo protocols, please refer to PHP Pseudo protocol summary - SegmentFault Think no
structure payload
?file=php://filter/read=convert.base64-encode/resource=flag.php
Got base64 String re decode You'll get flag
<?php
echo "Can you find out the flag?";
//flag{e3d42595-f7bc-4a09-a43c-c7a7eb6aa3e3}
版权声明
本文为[-There are stars in your eyes-]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204230052114425.html
边栏推荐
- 换个姿势看 hooks,灵感来源组合和 HOC 模式下逻辑视图分离新创意
- 安全用电管理平台在靖边博物馆安全用电管理系统的应用
- 移动端京东商城
- Mp2459 is a perfect replacement for 60v0 with power MOSFET fs2459 integrated inside 5A step-down IC
- Openresty installation and introduction
- Alternative scheme of 24V ~ 48V magnetic absorption track lamp fs2459 to mp2459
- Multi surveyor Xiao sir_ Senior gold medal lecturer_ Interview questions
- Android development interview questions collection and sorting (including answers), [work perception]
- leetcode 396. Rotation function
- Ethtool process of viewing network card statistics
猜你喜欢

Can you really cross with a k-fold? Thoughts on k-fold intersection

信息系统项目管理-立项管理

Why should I object to DBA's participation in business (issuing reports / changing data)

Information system project management - project initiation management

Amazon Aurora's ability to read and write: shardingsphere proxy

SSM framework

C# WPF UI框架MahApps切换主题

io_ Application of ring technology in distributed cloud native database

Essay 8: error in readpng (paste (location, "/", pattern. Type [i], ". PNG", Sep = "): unable to open C:/

Lightly: a new generation of go IDE
随机推荐
How does zhiting connect Xiaomi smart speakers?
C# 11 对 ref 和 struct 的改进
flask项目跨域拦截处理以及dbm数据库学习【包头文创网站开发】
Multi surveyor Xiao sir, Gongshu campus, Hangzhou_ Senior gold medal lecturer_ Resume making explanation
2.56 - try running show with different sample values_ Bytes code.
Alibaba cloud container & Service Grid product technology trends (202203)
Jijian cloud x servicego: help hardware manufacturers realize intelligent management of equipment repair and maintenance
Information system project management - project initiation management
Improvement of ref and struct in C 11
L2-010 row seats (25 points) and check the collection
thymeleaf 的templates子集目录下不能引入common公共页面,否则报错:模板解析错误,错误原因:公共页面的引用路径错误(缺少子目录名)
Steps to apply for a CA certificate
深度学习基础学习-残差
智能照明控制系统在医院的设计与应用
Secret of 66% performance surge: AMD 25000 yuan 768mb 3D cache Xiaolong opened the cover for the first time
[what is istio?] You're out before you know it. You can understand it quickly in 40 minutes
Type conversion in C - Custom implicit and explicit conversion
L2-011 playing with binary tree (25 points)
Lightly: a new generation of cloud IDE
What is tooljet and how about it—— Evaluation of low code development platform