作者:
綠盟科技
·
2014/11/26 10:09
0×00 簡述
來自CVE的漏洞描述:

測試環境: Win7 SP1 + Flash ActiveX 15.0.0.167
0×01 漏洞利用分析
介紹有關漏洞關鍵程式碼前,先看一下heap spray後的記憶體佈局:

簡單描述為:

漏洞致使Uint Vector的length欄位被改寫。
漏洞關鍵程式碼:

紅線標註的部分其操作流程:
取預定大小0×1000的ByteArray物件_loc3,賦值給domainMemory,以便casi32函式操作此記憶體
預置大小0×1000的ByteArray物件:

透過函式atomicCompareAndSwapLength將_loc3長度置0
casi32函式內由於整數溢位造成執行流改變,致使向_loc3偏移0×1000處成功寫入0×40000001
上述過程細節:




這樣就可以以超長的Uint Vector為起點,讀取預置的物件資料。
利用關鍵點:
搜尋預置的sound物件進而計算出flash控制元件基址
預置的sound物件包含於噴射的少量Vector Object裡,這裡稱之為vec_3。
具體的噴射程式碼:

透過特徵比對遍歷以獲取vec_3中元素:

搜尋到的其中一項:
計算flash控制元件基址:

在flash控制元件基址基礎上獲取rop鏈所需指令,用VirtualAlloc分配可執行記憶體過DEP。


構造rop鏈(部分):

修改sound物件虛表指標,並呼叫修改後的虛表函式將執行流導向stack pivot。

sound物件虛表指標修改前後:


修改後的虛表指標指向內容:

呼叫虛擬函式觸發利用。

0×02 分析總結
完整的利用至少由兩部分組成(html + swf),其中swf並不能獨立執行,需要html傳入的引數(shellcode),只拿到swf並不能獲知攻擊者的意圖。
0×03 參考文章
CVE-2014-0569漏洞分析
Cracking the CVE-2014-0569 nutshell
本文章來源於烏雲知識庫,此映象為了方便大家學習研究,文章版權歸烏雲知識庫!