<span id="7ztzv"></span>
<sub id="7ztzv"></sub>

<span id="7ztzv"></span><form id="7ztzv"></form>

<span id="7ztzv"></span>

        <address id="7ztzv"></address>

            原文地址:http://drops.wooyun.org/tips/2504

            0x00 Intruder Scan


            發送一個你想csrf_token的請求到intruder。

            1)Positions設置如下:

            enter image description here

            2)Options設置如下:

            Request Engine
            

            enter image description here

            options>Grep-Extract>add
            

            enter image description here

            enter image description here

            3)payloads設置如下

            enter image description here

            這里payload type設置遞歸(Recursive grep),在Initial payload for first request設置一個有效的csrf_token值作為第一項

            enter image description here

            0x01 Active Scan with sqlmap


            其實這個結合sqlmap有兩種方法,[email protected],我采用的也是他那個代碼,但是在注入的時候我發現在burpsuite里查看HTTP history(歷史記錄)里的token是沒有變化的,但是還是可以注入,剛開始挺納悶的,我以為他寫的那個代碼有問題,后來他說不是,在burpsuite里是看不到的,然后我也同意他說的,就是替換這個過程直接經過宏功能替換了,不會顯示在歷史記錄里。我這里就說下第二種方法吧。第一種點這里。

            1)首先是登錄csrf_token頁面,不需要攔截。然后選擇Options>Sessions>Add

            enter image description here

            enter image description here

            2)接著會彈出一個窗口選擇Select macro>add

            enter image description here

            3)點擊add後會彈出兩個頁面如圖所示:

            enter image description here

            4)選擇2-3個頁面,第一個頁面是請求頁面,第二個頁面是post數據的時候的頁面,為了便于查看我這里添加了3個頁面。

            enter image description here

            5)選擇第二個頁面點擊Configure item,指定root,添加一個自定義token參數

            enter image description here

            enter image description here

            6)最后配置完可以點擊Test macro看看我們配置成功了沒

            enter image description here

            enter image description here

            7)如果以上配置成功,再選擇Scope選擇應用范圍

            enter image description here

            enter image description here

            8)接著就是放到sqlmap里去跑數據咯

            如果是post頁面,這里是把post的數據保存到request.txt文件里,然后運行命令如下:

            ./sqlmap.py -r request.txt –proxy=http://127.0.0.1:8080
            

            如果是get頁面命令如下:

            ./sqlmap.py –u “www.target.com/vuln.php?id=1” –proxy=http://127.0.0.1:8080
            

            enter image description here

            0x02 Session Randomness Analysis Sequencer


            請求攔截一個地址,在響應內容中如果有cookie,或者我們可以在sequencer中自定義配置token參數

            enter image description here

            enter image description here

            然后點擊Start live capture進行分析

            enter image description here

            等分析完即可生成報告,通過報告我們可以看出token是否可以偽造。

            參考資料:http://resources.infosecinstitute.com/session-randomness-analysis-burp-suite-sequencer/

            <span id="7ztzv"></span>
            <sub id="7ztzv"></sub>

            <span id="7ztzv"></span><form id="7ztzv"></form>

            <span id="7ztzv"></span>

                  <address id="7ztzv"></address>

                      亚洲欧美在线