<dd id="sga4y"><optgroup id="sga4y"></optgroup></dd>
<nav id="sga4y"><code id="sga4y"></code></nav>
  • <optgroup id="sga4y"></optgroup>

    原文地址:http://drops.wooyun.org/papers/4024

    0×00 簡述


    來自CVE的漏洞描述:

    enter image description here

    測試環境: Win7 SP1 + Flash ActiveX 15.0.0.167

    0×01 漏洞利用分析


    介紹有關漏洞關鍵代碼前,先看一下heap spray后的內存布局:

    enter image description here

    簡單描述為:

    enter image description here

    漏洞致使Uint Vector的length字段被改寫。

    漏洞關鍵代碼:

    enter image description here

    紅線標注的部分其操作流程:

    取預定大小0×1000的ByteArray對象_loc3,賦值給domainMemory,以便casi32函數操作此內存

    預置大小0×1000的ByteArray對象:

    enter image description here

    通過函數atomicCompareAndSwapLength將_loc3長度置0

    casi32函數內由于整數溢出造成執行流改變,致使向_loc3偏移0×1000處成功寫入0×40000001

    上述過程細節:

    enter image description here

    enter image description here

    enter image description here

    enter image description here

    這樣就可以以超長的Uint Vector為起點,讀取預置的對象數據。

    利用關鍵點:

    搜索預置的sound對象進而計算出flash控件基址

    預置的sound對象包含于噴射的少量Vector Object里,這里稱之為vec_3。

    具體的噴射代碼:

    enter image description here

    通過特征比對遍歷以獲取vec_3中元素:

    enter image description here

    搜索到的其中一項:

    計算flash控件基址:

    enter image description here

    在flash控件基址基礎上獲取rop鏈所需指令,用VirtualAlloc分配可執行內存過DEP。

    enter image description here

    enter image description here

    構造rop鏈(部分):

    enter image description here

    修改sound對象虛表指針,并調用修改后的虛表函數將執行流導向stack pivot。

    enter image description here

    sound對象虛表指針修改前后:

    enter image description here

    enter image description here

    修改后的虛表指針指向內容:

    enter image description here

    調用虛函數觸發利用。

    enter image description here

    0×02 分析總結


    完整的利用至少由兩部分組成(html + swf),其中swf并不能獨立執行,需要html傳入的參數(shellcode),只拿到swf并不能獲知攻擊者的意圖。

    0×03 參考文章


    1. CVE-2014-0569漏洞分析

    2. Cracking the CVE-2014-0569 nutshell

    97av