[ZJCTF 2019]NiZhuanSiWei 审题 看到可以传入file,text,和password三个参数。 知识点 php伪协议,反序列化 解题 传入text,看到有file_get_content函数,这个函数表示读取$text文件里的值,返回字符串。 所以要传入text的为一个文件值,所以使用data协议写入参数。 text=data://text/plain;base64,d2VsY29tZSB0byB0a...
题目链接:https://buuoj.cn/challenges#[ZJCTF 2019]NiZhuanSiWei 打开环境后如下所示。 <?php $text = $_GET["text"]; $file = $_GET["file"]; $password = $_GET["password"]; if(isset($text)&&(file_get_contents($text,'r')==="welcome to the zjctf")){ echo "".file_get_contents...
https://buuoj.cn/challenges#[ZJCTF%202019]NiZhuanSiWei 逆转思维!,没看到哪里逆转了,一来给了很经典的php源代码: 给了三个GET参数: 第一个if告诉我们传入一个text内容为welcome to the zjctf 然后是存在file参数 和useless.php参数有关 最后是如果password参数等于反序列化的password的话输出password参数内容 ...
ZJCTF-NiZhuanSiWei是什么意思? ZJCTF-NiZhuanSiWei与CTF比赛有关吗? ZJCTF-NiZhuanSiWei是一个安全研究项目吗? 题目地址:buuctf 首先要满足传入一个text文件,使文件内容为welcome to the zjctf,可以用php://input伪协议 代码语言:javascript 复制 ?text=data://text/plain;base64,d2VsY29tZSB0byB0aGUgempjdGY...
[ZJCTF 2019]NiZhuanSiWei 超详题解 changeTheWay 2023-09-05 23:31:57 168861 本文由 changeTheWay 创作,已纳入「FreeBuf原创奖励计划」,未授权禁止转载 进入题目,看到一段PHP代码。首先是三个GET参数text,file,password。 file_get_contents file_get_contents() 函数把整个文件读入一个字符串中。通常括号...
} ?> 代码审计走起,一步一步分析,首先是这里 if(isset($text)&&(file_get_contents($text,'r')==="welcome to the zjctf")){ echo "".file_get_contents($text,'r').""; 首先判断text是否传进来,并且传进来的参数是否等于welcome to the zjctf,这时我们就可以利用data伪协议进行文件php文件执行,(dat...
第一个if告诉我们传入一个text内容为welcome to the zjctf 然后是存在file参数 和useless.php参数有关 最后是如果password参数等于反序列化的password的话输出password参数内容 附上伪协议内容: 关于第一个if内容: isset — 检测变量是否已设置并且非 NULLfile_get_contents — 将整个文件读入一个字符串 ...
详解[ZJCTF 2019]NiZhuanSiWei 1(PHP两种伪协议、PHP反序列化漏洞、PHP强比较)还有那道题有这么经典? 题目环境: <?php$text=$_GET["text"];$file=$_GET["file"];$password=$_GET["password"];if(isset($text)&&(file_get_contents($text,'r')==="welcome to the zjctf")){echo"".file_get_con...
24.[ZJCTF 2019]NiZhuanSiWei 打开一段源码:看了下源码,这题主要考察伪协议data:写入,和php://filter读取文件以及反序列化。 data用法:data://text/plain;base64, php://filter用法:php://filter/read=convert.base64-encode/resource= 访问 http://68a56f51-a28e-415e-b2dd-79cf3197e5cd.node3.buuoj...
题目地址:https://buuoj.cn/challenges#[ZJCTF%202019]NiZhuanSiWei 老题目了 /?text=php://input&file=php://filter/read=convert.base64-encode/resource=useless.php 1. POST内容 welcome to the zjctf 1. useless.php <?php class Flag{ //flag.php ...