PeaZip Zip Processing Command Injection - Metasploit


This page contains detailed information about how to use the exploit/multi/fileformat/peazip_command_injection metasploit module. For list of all metasploit modules, visit the Metasploit Module Library.

Module Overview


Name: PeaZip Zip Processing Command Injection
Module: exploit/multi/fileformat/peazip_command_injection
Source code: modules/exploits/multi/fileformat/peazip_command_injection.rb
Disclosure date: 2009-06-05
Last modification time: 2020-10-02 17:38:06 +0000
Supported architecture(s): cmd
Supported platform(s): Linux, Unix, Windows
Target service / protocol: -
Target network port(s): -
List of CVEs: CVE-2009-2261

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.

Module Ranking and Traits


Module Ranking:

  • excellent: The exploit will never crash the service. This is the case for SQL Injection, CMD execution, RFI, LFI, etc. No typical memory corruption exploits should be given this ranking unless there are extraordinary circumstances. More information about ranking can be found here.

Basic Usage


msf > use exploit/multi/fileformat/peazip_command_injection
msf exploit(peazip_command_injection) > show targets
    ... a list of targets ...
msf exploit(peazip_command_injection) > set TARGET target-id
msf exploit(peazip_command_injection) > show options
    ... show and set options ...
msf exploit(peazip_command_injection) > exploit

Go back to menu.

Msfconsole Usage


Here is how the multi/fileformat/peazip_command_injection exploit module looks in the msfconsole:

msf6 > use exploit/multi/fileformat/peazip_command_injection

msf6 exploit(multi/fileformat/peazip_command_injection) > show info

       Name: PeaZip Zip Processing Command Injection
     Module: exploit/multi/fileformat/peazip_command_injection
   Platform: Linux, Unix, Windows
       Arch: cmd
 Privileged: No
    License: Metasploit Framework License (BSD)
       Rank: Excellent
  Disclosed: 2009-06-05

Provided by:
  pyrokinesis
  jduck <[email protected]>

Available targets:
  Id  Name
  --  ----
  0   Automatic

Check supported:
  No

Basic options:
  Name      Current Setting  Required  Description
  ----      ---------------  --------  -----------
  FILENAME  msf.zip          yes       The file name.

Payload information:
  Space: 1024
  Avoid: 0 characters

Description:
  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.

References:
  https://nvd.nist.gov/vuln/detail/CVE-2009-2261
  OSVDB (54966)
  http://peazip.sourceforge.net/
  https://www.exploit-db.com/exploits/8881

Module Options


This is a complete list of options available in the multi/fileformat/peazip_command_injection exploit:

msf6 exploit(multi/fileformat/peazip_command_injection) > show options

Module options (exploit/multi/fileformat/peazip_command_injection):

   Name      Current Setting  Required  Description
   ----      ---------------  --------  -----------
   FILENAME  msf.zip          yes       The file name.

Exploit target:

   Id  Name
   --  ----
   0   Automatic

Advanced Options


Here is a complete list of advanced options supported by the multi/fileformat/peazip_command_injection exploit:

msf6 exploit(multi/fileformat/peazip_command_injection) > show advanced

Module advanced options (exploit/multi/fileformat/peazip_command_injection):

   Name                    Current Setting  Required  Description
   ----                    ---------------  --------  -----------
   ContextInformationFile                   no        The information file that contains context information
   DisablePayloadHandler   true             no        Disable the handler code for the selected payload
   EnableContextEncoding   false            no        Use transient context when encoding payloads
   VERBOSE                 false            no        Enable detailed status messages
   WORKSPACE                                no        Specify the workspace for this module
   WfsDelay                2                no        Additional delay in seconds to wait for a session

Exploit Targets


Here is a list of targets (platforms and systems) which the multi/fileformat/peazip_command_injection module can exploit:

msf6 exploit(multi/fileformat/peazip_command_injection) > show targets

Exploit targets:

   Id  Name
   --  ----
   0   Automatic

Compatible Payloads


This is a list of possible payloads which can be delivered and executed on the target system using the multi/fileformat/peazip_command_injection exploit:

msf6 exploit(multi/fileformat/peazip_command_injection) > show payloads

Compatible Payloads
===================

   #   Name                                        Disclosure Date  Rank    Check  Description
   -   ----                                        ---------------  ----    -----  -----------
   0   payload/cmd/unix/bind_perl                                   normal  No     Unix Command Shell, Bind TCP (via Perl)
   1   payload/cmd/unix/bind_perl_ipv6                              normal  No     Unix Command Shell, Bind TCP (via perl) IPv6
   2   payload/cmd/unix/generic                                     normal  No     Unix Command, Generic Command Execution
   3   payload/cmd/unix/reverse                                     normal  No     Unix Command Shell, Double Reverse TCP (telnet)
   4   payload/cmd/unix/reverse_bash_telnet_ssl                     normal  No     Unix Command Shell, Reverse TCP SSL (telnet)
   5   payload/cmd/unix/reverse_perl                                normal  No     Unix Command Shell, Reverse TCP (via Perl)
   6   payload/cmd/unix/reverse_perl_ssl                            normal  No     Unix Command Shell, Reverse TCP SSL (via perl)
   7   payload/cmd/unix/reverse_ssl_double_telnet                   normal  No     Unix Command Shell, Double Reverse TCP SSL (telnet)
   8   payload/cmd/windows/adduser                                  normal  No     Windows Execute net user /ADD CMD
   9   payload/cmd/windows/bind_perl                                normal  No     Windows Command Shell, Bind TCP (via Perl)
   10  payload/cmd/windows/bind_perl_ipv6                           normal  No     Windows Command Shell, Bind TCP (via perl) IPv6
   11  payload/cmd/windows/generic                                  normal  No     Windows Command, Generic Command Execution
   12  payload/cmd/windows/reverse_perl                             normal  No     Windows Command, Double Reverse TCP Connection (via Perl)

Evasion Options


Here is the full list of possible evasion options supported by the multi/fileformat/peazip_command_injection exploit in order to evade defenses (e.g. Antivirus, EDR, Firewall, NIDS etc.):

msf6 exploit(multi/fileformat/peazip_command_injection) > show evasion

Module evasion options:

   Name  Current Setting  Required  Description
   ----  ---------------  --------  -----------

Go back to menu.


References


See Also


Check also the following modules related to this module:

Authors


  • pyrokinesis
  • jduck

Version


This page has been produced using Metasploit Framework version 6.2.4-dev. For more modules, visit the Metasploit Module Library.

Go back to menu.