Rapid7 Vulnerability & Exploit Database

PEAR Archive_Tar 1.4.10 Arbitrary File Write

Back to Search

PEAR Archive_Tar 1.4.10 Arbitrary File Write

Disclosed
11/17/2020
Created
01/25/2021

Description

This module takes advantages of Archive_Tar <= 1.4.10's lack of validation of file stream wrappers contained within filenames to write an arbitrary file containing user controlled content to an arbitrary file on disk. Note that the file will be written to disk with the permissions of the user that PHP is running as, so it may not be possible to overwrite some files if the PHP user is not appropriately privileged.

Author(s)

  • gwillcox-r7
  • xorathustra

Platform

PHP

Architectures

php

Development

Module Options

To display the available options, load the module within the Metasploit console and run the commands 'show options' or 'show advanced':

msf > use exploit/multi/fileformat/archive_tar_arb_file_write
msf exploit(archive_tar_arb_file_write) > show targets
    ...targets...
msf exploit(archive_tar_arb_file_write) > set TARGET < target-id >
msf exploit(archive_tar_arb_file_write) > show options
    ...show and set options...
msf exploit(archive_tar_arb_file_write) > exploit

Time is precious, so I don’t want to do something manually that I can automate. Leveraging the Metasploit Framework when automating any task keeps us from having to re-create the wheel as we can use the existing libraries and focus our efforts where it matters.

– Jim O’Gorman | President, Offensive Security

;