当前位置:网站首页>[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
边栏推荐
- Buuctf missing through time and space
- L2-010 排座位 (25 分) 并查集
- Enterprises choose to privatize the deployment of IM instant messaging software to fully protect information security!
- IMX6ULL裸机开发之GPT通用定时器分析及配置过程
- C introduction of variable parameter params
- The more "intelligent" the machine is, the easier it is for data taggers to be eliminated? Manfu Technology
- 体育训练中心项目电力监控系统的研究与应用
- 软件测试神仙文档,连阿里面试官都说太详细了,搞懂这些直接是P7级
- L2-002 链表去重 (25 分) 标程
- 多测师杭州拱墅校区肖sir_高级金牌讲师_简历实战
猜你喜欢

Deep learning basic learning - residual

SynchronousQueue 源码解析

【以太网交换安全】--- 交换机流量控制/DHCP Snooping/IP Source Guard

Information system project management - project initiation management

SSM framework

【服务器数据恢复】服务器硬盘进水后服务器崩溃的数据恢复案例

Change your posture to look at hooks, the combination of inspiration sources and the separation of new ideas from logical view in hoc mode

Mp2459 is a perfect replacement for 60v0 with power MOSFET fs2459 integrated inside 5A step-down IC

如何成为真正的数字化企业,锐捷网络发布数字原力觉醒计划

曦智科技沈亦晨入选2022达沃斯世界经济论坛“全球青年领袖”
随机推荐
体育训练中心项目电力监控系统的研究与应用
IMX6ULL裸机开发之GPT通用定时器分析及配置过程
Elk setup (IV): monitor MySQL slow query and error log
Snap installation repo problem
【服务器数据恢复】服务器硬盘进水后服务器崩溃的数据恢复案例
Information system project management - project initiation management
L2-020 功夫传人 (25 分)
ifconfig如何获得网卡的统计信息
C# 11 对 ref 和 struct 的改进
为什么进入上一个输入框后,下一个输入框光标进不去(是只能在前部分才能点击光标进入输入框,光标点击输入框后部分不起作用)
员工公寓楼建设项目电力监控系统的研究与应用
[what is istio?] You're out before you know it. You can understand it quickly in 40 minutes
Flash project cross domain interception and DBM database learning [Baotou cultural and creative website development]
Software testing immortal documents, even Ali interviewers said it was too detailed. Understanding these directly is P7 level
jsp 转换为thymeleaf格式的部分方式
C#/. Net uses questpdf operation to generate PDF faster and more efficient!
Amazon Aurora's ability to read and write: shardingsphere proxy
idea中使用thymeleaf 模板 <img th:src=“${map.user.headerUrl}“ 报错Cannot resolve ‘user‘
ethtool查看网卡统计信息的流程
Acrel-2000型电力监控系统在兴庆坊新兴广场配电所配电回路用电的实时监控和管理