用PUT方法发送一个message得到flag
源码注释和http响应头里面藏有flag
源码中发现code.txt
<?php if(isset($_GET['v1']) && isset($_GET['v2']) && isset($_GET['v3'])){ $v1 = $_GET['v1']; $v2 = $_GET['v2']; $v3 = $_GET['v3']; if($v1 != $v2 && md5($v1) == md5($v2)){ if(!strcmp($v3, $flag)){ echo $flag; } } } ?>经典md5了,payload
?v1=240610708&v2=s878926199a&v3[]=1源码注释中发现include1.php 发现后面有一个?file=index 用伪协议读一下include1.php和index.php的源码
include1.php <html> </html> <?php error_reporting(0); @$file = $_GET["file"]; if(isset($file)) { if (preg_match('/http|data|ftp|input|%00|flag/i', $file) || strstr($file,"..") !== FALSE || strlen($file)>=100 || $file==="include1" ) //这里过滤掉了flag { echo "<p> error! </p>"; } else { include($file.'.php'); setcookie("tips","include2.php"); } } else { header('Location:include1.php?file=index'); } ?> index.php <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>include</title> </head> <body> <!-- include1.php --> </body> </html>发现cookie里面有提示,include2.php 读一下源码
include2.php <html> </html> <?php error_reporting(0); $file = $_GET["file"]; if(isset($file)) { if ( preg_match('/http|data|ftp|input|%00|base/i', $file) || strstr($file,"..") !== FALSE || strlen($file)>=100) //这里没有过滤flag,但是过滤了base { echo "<p> error! </p>"; } else { include($file.'.php'); } } else { echo "file not found"; } ?>根据过滤信息判断,flag应该在flag.php里面,include1.php是读取不了flag.php的,因为过滤了flag,虽然include2.php过滤了base,但是还可以用别的,比如rot13,读取flag payload
include2.php?file=php://filter/read=string.rot13/resource=flag解码即可
这里也就是目标要alert(/xxx/),先看一下回显格式 value这里"可能是可以闭合的,继续测试 果然闭合了,于是构造payload
"><script>alert(/xxx/)</script>得到key 提交的时候需要md5解密一下
根据这个提de示,没进去题目就知道怎么做了,构造后缀.php::DATA即可 这里也是传一个php
一张好像是损坏的jpg,保存下来,010,得到flag
一个shadow文件,丢进010发现是linux保存用户名密码的文件,用john工具跑,得到密码,也就是flag
三行,发现每隔三个取可以得到FLAG,就这样取就可以得到flag
CRC碰撞,得到flag.txt的密码We1c0meT0CTF 得到flag
题目有问题,这个不是rsa,给的n是个素数,但是题目说是rsa,这里就不写了
一串数字,先转ascii码 得到
mshn{l57i9l18i08imm0k05h3j59900i10???} \tk5:29j1kk3hm5ii698lmk81jh5ij1178l5m前面一部分得到 后面一部分得到 md5解密得到9a4,拼接起来得到flag
也就是检验文件的md5值,在在线网站上面算一下即可,得到c0c8e99bceac589013f553f28629004a,也就是flag
丢进010,应该是一个gif文件,不过文件头损坏了,添加修复一下即可 得到flag
丢进010,发现是一张字节反转了的png图片,换正即可,py脚本
with open('flag.png','rb') as f: with open('flag1.png','wb') as g: g.write(f.read()[::-1])得到flag
修改图片高度,得到flag
开始用了各种弱口令爆破i压缩包,无果,后来py群管理员得到个hint,5位数密码(小写字母加数字),爆破一下 得到密码 得到flag
