當前位置:
首頁 > 最新 > CVE-2018-5002 第二波Flash零日漏洞在野攻擊分析預警

CVE-2018-5002 第二波Flash零日漏洞在野攻擊分析預警

背景


2018年6月1日,360核心安全高級威脅應對團隊在全球範圍內率先捕獲了新的一起使用Flash 零日漏洞的在野攻擊,黑客精心構造了一個從遠程載入Flash漏洞的Office文檔,打開文檔後所有的漏洞利用代碼和惡意荷載均通過遠程的伺服器下發,此次攻擊主要針對中東地區。

相關漏洞文件分析

該樣本具有比較誘惑性的文件名basic_salary.xlsx(基本工資),其內容也與標題符合,為各個時間階段的工資,語言採用阿拉伯語。

basic_salary.xlsx(MD5: c8aaaa517277fb0dbb4bbf724245e663)文檔內容完整,其部分內容截圖如下:

圖1

黑客通過activex控制項和數據嵌入了一個遠程的flash文件鏈接,相關的漏洞攻擊代碼由遠程的伺服器腳本控制下發。

圖2

漏洞攻擊流程分析

圖3

漏洞攻擊的多個階段流程如下:

圖4

漏洞原理分析

漏洞的flash攻擊代碼經過了高度混淆,經過調試分析我們在攻擊樣本中定位到了零日漏洞攻擊代碼。

圖5

經過還原後的關鍵代碼如下:

package

{

public class class_6

{

{

try{

}

catch(e:Error)

{

return;

}

li8(123456);

}

public function class_6(){

super();

}

}

}

代碼中Static-init methods Flash會使用解釋器去處理,解釋器在處理try catch語句時沒有正確的處理好異常的作用域,導致代碼中li8(123456)指令觸發異常後會被catch塊捕獲。

而處理try catch語句時由於Flash認為沒有代碼能執行到catch語句塊,所以也沒有對catch語句塊中的位元組碼做檢查,攻擊者通過在catch語句塊中使用getlocal,setlocal指令來實現對棧上容易地址讀寫。最終,攻擊者通過交換棧上的2個對象指針來將漏洞轉為類型混淆問題完成攻擊。

Flash will use the interpreter to handle Static-init methods. The interpreter handles the try catch statement does not correctly handle the exception, and this will make li8 (123456) instruction caught by the catch block when it triggers the exception.

Because Flash assumes that it is impossible to execute to the catch block when processing the try catch statement, it does not check the bytecode in the catch block. The attacker uses the getlocal, setlocal instruction in the catch block to read and write arbitrary addresses on the stack.

In this wild used 0 day, the attacker switches the vulnerability to a type confusion by exchanging two object pointers on the stack and finally completes the attack.

進一步調試攻擊代碼,可以觀察到漏洞利用的位元組碼,發現函數的localcount 值為2,而在catch塊中getlocal,setlocal已經操作448和498位置的數據。

The vulnerability exploited bytecode discovery function has a localcount value of 2, whereas in the catch block getlocal, setlocal has manipulated the data at locations 448 and 498.

圖7

調試觀察利用中setlocal操作棧數據,圖中可以看到ecx的值是class5對象的指針,068fc1a0正是class7的指針。

Let』s observe setlocal operation stack data. The value of ecx is the pointer of the class5 object, and 068fc1a0 is the pointer of class7.

圖 8

圖9

交換完2個對象的指針後攻擊者通過比較對象成員的值來判斷利用是否成功。

After exchanging the pointers of two objects, the attacker judges whether the exploited is successful by comparing the values of the object members.

圖10

攻擊關聯信息分析

直接訪問people.dohabayt.com ,訪問會被強制重定向到https://people.bayt.com/sushasolomon/ 一名卡達航空的職員介紹主頁。

圖11

圖12

總結

通過分析我們可以發現此次攻擊不計成本使用了零日漏洞,攻擊者在雲端開發了精巧的攻擊方案,並花了至少三個月以上籌備攻擊,針對攻擊目標定製了詳細的釣魚攻擊內容,是一起典型的APT攻擊。請相關單位和普通用戶都需提高安全防範意識,及時更新Flash版本,並使用360安全衛士防禦可能出現的漏洞威脅。

本文轉自黑白之道 版權歸原作者所有

安全圈綜合整理 如有侵權請聯繫刪除


喜歡這篇文章嗎?立刻分享出去讓更多人知道吧!

本站內容充實豐富,博大精深,小編精選每日熱門資訊,隨時更新,點擊「搶先收到最新資訊」瀏覽吧!


請您繼續閱讀更多來自 安全圈123 的精彩文章:

還在隨意分享這些鏈接嗎?後果可能很嚴重……
黑客YouTube打廣告賣外掛 實則暗地傳播木馬病毒

TAG:安全圈123 |