Fix up modules calling report_vuln() to use new syntax
parent
e8ad66b799
commit
c388cba421
|
@ -150,8 +150,9 @@ class Metasploit3 < Msf::Auxiliary
|
||||||
report_vuln({
|
report_vuln({
|
||||||
:host => rhost,
|
:host => rhost,
|
||||||
:port => rport,
|
:port => rport,
|
||||||
:name => self.fullname,
|
:name => self.name,
|
||||||
:refs => self.references
|
:refs => self.references,
|
||||||
|
:info => "Module #{self.fullname} successfully crashed the target system via RDP"
|
||||||
})
|
})
|
||||||
else
|
else
|
||||||
print_status("#{rhost}:#{rport} is still up")
|
print_status("#{rhost}:#{rport} is still up")
|
||||||
|
|
|
@ -73,8 +73,8 @@ class Metasploit3 < Msf::Auxiliary
|
||||||
:host => rhost,
|
:host => rhost,
|
||||||
:port => rport,
|
:port => rport,
|
||||||
:proto => 'tcp',
|
:proto => 'tcp',
|
||||||
:name => self.fullname,
|
:name => self.name,
|
||||||
:info => "http://#{rhost}:#{rport}/exec/show/version/CR",
|
:info => "Module #{self.fullname} successfully accessed http://#{rhost}:#{rport}/exec/show/version/CR",
|
||||||
:refs => self.references,
|
:refs => self.references,
|
||||||
:exploited_at => Time.now.utc
|
:exploited_at => Time.now.utc
|
||||||
}
|
}
|
||||||
|
|
|
@ -64,8 +64,9 @@ class Metasploit3 < Msf::Auxiliary
|
||||||
:host => rhost,
|
:host => rhost,
|
||||||
:port => rport,
|
:port => rport,
|
||||||
:proto => 'tcp',
|
:proto => 'tcp',
|
||||||
:name => self.fullname,
|
:name => self.name,
|
||||||
:info => "http://#{rhost}:#{rport}/level/#{level}/exec/show/version/CR",
|
:sname => ssl ? "https" : "http",
|
||||||
|
:info => "Module #{self.fullname} successfully accessed http://#{rhost}:#{rport}/level/#{level}/exec/show/version/CR",
|
||||||
:refs => self.references,
|
:refs => self.references,
|
||||||
:exploited_at => Time.now.utc
|
:exploited_at => Time.now.utc
|
||||||
}
|
}
|
||||||
|
@ -83,8 +84,10 @@ class Metasploit3 < Msf::Auxiliary
|
||||||
report_exploit(
|
report_exploit(
|
||||||
{
|
{
|
||||||
:host => rhost,
|
:host => rhost,
|
||||||
:service => rport,
|
:port => rport,
|
||||||
:name => self.fullname
|
:name => self.name,
|
||||||
|
:sname => ssl ? "https" : "http",
|
||||||
|
:info => "Module #{self.fullname} successfully captured the configuration file:\n#{config}"
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
else
|
else
|
||||||
|
|
|
@ -24,7 +24,7 @@ class Metasploit3 < Msf::Auxiliary
|
||||||
|
|
||||||
def initialize
|
def initialize
|
||||||
super(
|
super(
|
||||||
'Name' => 'FrontPage Server Extensions Login Utility',
|
'Name' => 'FrontPage Server Extensions Anonymous Login Scanner',
|
||||||
'Version' => '$Revision$',
|
'Version' => '$Revision$',
|
||||||
'Description' => 'This module queries the FrontPage Server Extensions and determines whether anonymous access is allowed.',
|
'Description' => 'This module queries the FrontPage Server Extensions and determines whether anonymous access is allowed.',
|
||||||
'References' =>
|
'References' =>
|
||||||
|
@ -133,8 +133,8 @@ class Metasploit3 < Msf::Auxiliary
|
||||||
:host => target_host,
|
:host => target_host,
|
||||||
:port => rport,
|
:port => rport,
|
||||||
:proto => 'tcp',
|
:proto => 'tcp',
|
||||||
:name => self.fullname,
|
:name => self.name,
|
||||||
:info => "#{info} FrontPage ACCESS ALLOWED [#{retcode}]",
|
:info => "Module #{self.fullname} confirmed access to #{info} [#{retcode}]",
|
||||||
:refs => self.references,
|
:refs => self.references,
|
||||||
:exploited_at => Time.now.utc
|
:exploited_at => Time.now.utc
|
||||||
}
|
}
|
||||||
|
|
|
@ -150,13 +150,14 @@ class Metasploit4 < Msf::Auxiliary
|
||||||
|
|
||||||
#Check file
|
#Check file
|
||||||
if not res.nil? and file_exists(path, data)
|
if not res.nil? and file_exists(path, data)
|
||||||
print_good("File uploaded: #{(ssl ? 'https' : 'http')}://#{ip}:#{rport}#{path}")
|
turl = "#{(ssl ? 'https' : 'http')}://#{ip}:#{rport}#{path}"
|
||||||
|
print_good("File uploaded: #{turl}")
|
||||||
report_vuln(
|
report_vuln(
|
||||||
:host => ip,
|
:host => ip,
|
||||||
:port => rport,
|
:port => rport,
|
||||||
:proto => 'tcp',
|
:proto => 'tcp',
|
||||||
:name => self.fullname,
|
:name => self.name,
|
||||||
:info => "PUT Enabled",
|
:info => "Module #{self.fullname} confirmed write access to #{turl} via PUT",
|
||||||
:refs => self.references,
|
:refs => self.references,
|
||||||
:exploited_at => Time.now.utc
|
:exploited_at => Time.now.utc
|
||||||
)
|
)
|
||||||
|
@ -182,14 +183,15 @@ class Metasploit4 < Msf::Auxiliary
|
||||||
if res.nil? or file_exists(path, data)
|
if res.nil? or file_exists(path, data)
|
||||||
print_error("DELETE failed. File is still there.")
|
print_error("DELETE failed. File is still there.")
|
||||||
else
|
else
|
||||||
print_good("File deleted: #{(ssl ? 'https' : 'http')}://#{ip}:#{rport}#{path}")
|
turl = "#{(ssl ? 'https' : 'http')}://#{ip}:#{rport}#{path}"
|
||||||
|
print_good("File deleted: #{turl}")
|
||||||
report_vuln(
|
report_vuln(
|
||||||
:host => ip,
|
:host => ip,
|
||||||
:port => rport,
|
:port => rport,
|
||||||
:proto => 'tcp',
|
:proto => 'tcp',
|
||||||
:sname => (ssl ? 'https' : 'http'),
|
:sname => (ssl ? 'https' : 'http'),
|
||||||
:name => self.fullname,
|
:name => self.name,
|
||||||
:info => "DELETE ENABLED",
|
:info => "Module #{self.fullname} confirmed write access to #{turl} via DELETE",
|
||||||
:refs => self.references,
|
:refs => self.references,
|
||||||
:exploited_at => Time.now.utc
|
:exploited_at => Time.now.utc
|
||||||
)
|
)
|
||||||
|
|
|
@ -22,13 +22,12 @@ class Metasploit3 < Msf::Auxiliary
|
||||||
|
|
||||||
def initialize(info = {})
|
def initialize(info = {})
|
||||||
super(update_info(info,
|
super(update_info(info,
|
||||||
'Name' => 'MS09-020 IIS6 WebDAV Unicode Auth Bypass',
|
'Name' => 'MS09-020 IIS6 WebDAV Unicode Authentication Bypass',
|
||||||
'Description' => %q{
|
'Description' => %q{
|
||||||
Simplified version of MS09-020 IIS6 WebDAV Unicode Auth Bypass scanner. It attempts
|
This module attempts to to bypass authentication using the WebDAV IIS6
|
||||||
to bypass authentication using the WebDAV IIS6 Unicode vulnerability
|
Unicode vulnerability discovered by Kingcope. The vulnerability appears
|
||||||
discovered by Kingcope. The vulnerability appears to be exploitable
|
to be exploitable where WebDAV is enabled on the IIS6 server, and any
|
||||||
where WebDAV is enabled on the IIS6 server, and any protected folder
|
protected folder requires either Basic, Digest or NTLM authentication.
|
||||||
requires either Basic, Digest or NTLM authentication.
|
|
||||||
},
|
},
|
||||||
'Author' => [ 'et', 'patrick' ],
|
'Author' => [ 'et', 'patrick' ],
|
||||||
'Version' => '$Revision$',
|
'Version' => '$Revision$',
|
||||||
|
@ -77,8 +76,8 @@ class Metasploit3 < Msf::Auxiliary
|
||||||
if(not res)
|
if(not res)
|
||||||
print_error("NO Response.")
|
print_error("NO Response.")
|
||||||
elsif (res.code.to_i == 401)
|
elsif (res.code.to_i == 401)
|
||||||
print_status("Confirmed protected folder #{wmap_base_url}#{tpath} #{res.code} (#{wmap_target_host})")
|
print_status("#{rhost}:#{rport} Confirmed protected folder #{wmap_base_url}#{tpath} #{res.code} (#{wmap_target_host})")
|
||||||
print_status("\tTesting for unicode bypass in IIS6 with WebDAV enabled using PROPFIND request.")
|
print_status("#{rhost}:#{rport} \tTesting for unicode bypass in IIS6 with WebDAV enabled using PROPFIND request.")
|
||||||
|
|
||||||
cset = %W{ & ^ % $ # @ ! }
|
cset = %W{ & ^ % $ # @ ! }
|
||||||
buff = ''
|
buff = ''
|
||||||
|
@ -100,7 +99,7 @@ class Metasploit3 < Msf::Auxiliary
|
||||||
}, 20)
|
}, 20)
|
||||||
|
|
||||||
if (res.code.to_i == 207)
|
if (res.code.to_i == 207)
|
||||||
print_status("\tFound vulnerable WebDAV Unicode bypass. #{wmap_base_url}#{tpath}#{bogus}/ #{res.code} (#{wmap_target_host})")
|
print_status("#{rhost}:#{rport} \tFound vulnerable WebDAV Unicode bypass. #{wmap_base_url}#{tpath}#{bogus}/ #{res.code} (#{wmap_target_host})")
|
||||||
|
|
||||||
|
|
||||||
report_vuln(
|
report_vuln(
|
||||||
|
@ -108,8 +107,9 @@ class Metasploit3 < Msf::Auxiliary
|
||||||
:host => ip,
|
:host => ip,
|
||||||
:port => rport,
|
:port => rport,
|
||||||
:proto => 'tcp',
|
:proto => 'tcp',
|
||||||
:name => self.fullname,
|
:sname => ssl ? 'https' : 'http',
|
||||||
:info => "#{tpath}#{bogus} / Code: #{res.code}",
|
:name => self.name,
|
||||||
|
:info => "Module #{self.fullname} bypassed authentication with #{tpath}#{bogus} (response code #{res.code})",
|
||||||
:refs => self.references,
|
:refs => self.references,
|
||||||
:exploited_at => Time.now.utc
|
:exploited_at => Time.now.utc
|
||||||
}
|
}
|
||||||
|
@ -117,7 +117,7 @@ class Metasploit3 < Msf::Auxiliary
|
||||||
|
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
print_error("Folder does not require authentication. [#{res.code}]")
|
print_error("#{rhost}:#{rport} Folder does not require authentication. [#{res.code}]")
|
||||||
end
|
end
|
||||||
rescue ::Rex::ConnectionRefused, ::Rex::HostUnreachable, ::Rex::ConnectionTimeout
|
rescue ::Rex::ConnectionRefused, ::Rex::HostUnreachable, ::Rex::ConnectionTimeout
|
||||||
rescue ::Timeout::Error, ::Errno::E877PIPE
|
rescue ::Timeout::Error, ::Errno::E877PIPE
|
||||||
|
|
|
@ -67,8 +67,8 @@ class Metasploit3 < Msf::Auxiliary
|
||||||
:port => rport,
|
:port => rport,
|
||||||
:proto => 'tcp',
|
:proto => 'tcp',
|
||||||
:sname => (ssl ? 'https' : 'http'),
|
:sname => (ssl ? 'https' : 'http'),
|
||||||
:name => self.fullname,
|
:name => "HTTP Trace Method Allowed",
|
||||||
:info => res.headers['Allow'],
|
:info => "Module #{self.fullname} detected TRACE access through the Allow header: #{res.headers['Allow']}",
|
||||||
:refs => self.references,
|
:refs => self.references,
|
||||||
:exploited_at => Time.now.utc
|
:exploited_at => Time.now.utc
|
||||||
)
|
)
|
||||||
|
|
|
@ -17,7 +17,7 @@ class Metasploit4 < Msf::Auxiliary
|
||||||
|
|
||||||
def initialize
|
def initialize
|
||||||
super(
|
super(
|
||||||
'Name' => 'Reverse Proxy Bypass Scanner',
|
'Name' => 'Apache Reverse Proxy Bypass Vulnerability Scanner',
|
||||||
'Version' => '$Revision$',
|
'Version' => '$Revision$',
|
||||||
'Description' => %q{
|
'Description' => %q{
|
||||||
Scan for poorly configured reverse proxy servers.
|
Scan for poorly configured reverse proxy servers.
|
||||||
|
@ -66,15 +66,15 @@ class Metasploit4 < Msf::Auxiliary
|
||||||
end
|
end
|
||||||
|
|
||||||
if response.nil?
|
if response.nil?
|
||||||
vprint_error "Request against #{host} timed out"
|
vprint_error "#{rhost}:#{rport} Request timed out"
|
||||||
return nil
|
return nil
|
||||||
end
|
end
|
||||||
|
|
||||||
seconds_transpired = (responded_at - requested_at).to_f
|
seconds_transpired = (responded_at - requested_at).to_f
|
||||||
vprint_status "#{host} took #{seconds_transpired} seconds to respond to URI #{uri}"
|
vprint_status "#{rhost}:#{rport} Server took #{seconds_transpired} seconds to respond to URI #{uri}"
|
||||||
|
|
||||||
status_code = response.code
|
status_code = response.code
|
||||||
vprint_status "#{host} responded with status code #{status_code} to URI #{uri}"
|
vprint_status "#{rhost}:#{rport} Server responded with status code #{status_code} to URI #{uri}"
|
||||||
|
|
||||||
return {
|
return {
|
||||||
:requested_at => requested_at,
|
:requested_at => requested_at,
|
||||||
|
@ -92,7 +92,7 @@ class Metasploit4 < Msf::Auxiliary
|
||||||
end
|
end
|
||||||
|
|
||||||
if baseline[:status_code] == test_status_code
|
if baseline[:status_code] == test_status_code
|
||||||
vprint_error "The baseline status code for #{host} matches our test's"
|
vprint_error "#{rhost}:#{rport} The baseline status code for #{host} matches our test's"
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -101,13 +101,14 @@ class Metasploit4 < Msf::Auxiliary
|
||||||
|
|
||||||
status_code = injection_info[:status_code]
|
status_code = injection_info[:status_code]
|
||||||
if status_code == test_status_code
|
if status_code == test_status_code
|
||||||
print_good "#{host}:#{rport} is vulnerable!"
|
print_good "#{rhost}:#{rport} Server appears to be vulnerable!"
|
||||||
report_vuln(
|
report_vuln(
|
||||||
:host => host,
|
:host => host,
|
||||||
:port => rport,
|
:port => rport,
|
||||||
:proto => 'tcp',
|
:proto => 'tcp',
|
||||||
:name => self.fullname,
|
:sname => ssl ? 'https' : 'http',
|
||||||
:info => "Returned #{status_code} when requested #{uri}",
|
:name => self.name,
|
||||||
|
:info => "Module #{self.fullname} obtained #{status_code} when requesting #{uri}",
|
||||||
:refs => self.references,
|
:refs => self.references,
|
||||||
:exploited_at => injection_info[:requested_at]
|
:exploited_at => injection_info[:requested_at]
|
||||||
)
|
)
|
||||||
|
|
|
@ -21,9 +21,9 @@ class Metasploit3 < Msf::Auxiliary
|
||||||
|
|
||||||
def initialize
|
def initialize
|
||||||
super(
|
super(
|
||||||
'Name' => 'VMware Server Directory Transversal Vulnerability',
|
'Name' => 'VMware Server Directory Traversal Vulnerability',
|
||||||
'Version' => '$Revision$',
|
'Version' => '$Revision$',
|
||||||
'Description' => 'This modules exploits the VMware Server Directory traversal
|
'Description' => 'This modules exploits the VMware Server Directory Traversal
|
||||||
vulnerability in VMware Server 1.x before 1.0.10 build 203137 and 2.x before
|
vulnerability in VMware Server 1.x before 1.0.10 build 203137 and 2.x before
|
||||||
2.0.2 build 203138 on Linux, VMware ESXi 3.5, and VMware ESX 3.0.3 and 3.5
|
2.0.2 build 203138 on Linux, VMware ESXi 3.5, and VMware ESX 3.0.3 and 3.5
|
||||||
allows remote attackers to read arbitrary files. Common VMware server ports
|
allows remote attackers to read arbitrary files. Common VMware server ports
|
||||||
|
@ -68,8 +68,8 @@ class Metasploit3 < Msf::Auxiliary
|
||||||
:host => target_host,
|
:host => target_host,
|
||||||
:port => rport,
|
:port => rport,
|
||||||
:proto => 'tcp',
|
:proto => 'tcp',
|
||||||
:name => self.fullname,
|
:name => self.name,
|
||||||
:info => res.code,
|
:info => "Module #{self.fullname} reports directory traversal of #{target_host}:#{rport} with response code #{res.code}",
|
||||||
:refs => self.references,
|
:refs => self.references,
|
||||||
:exploited_at => Time.now.utc
|
:exploited_at => Time.now.utc
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,7 +19,7 @@ class Metasploit3 < Msf::Auxiliary
|
||||||
|
|
||||||
def initialize
|
def initialize
|
||||||
super(
|
super(
|
||||||
'Name' => 'Java RMI Server Endpoint Scanner',
|
'Name' => 'Java RMI Server Insecure Endpoint Code Execution Scanner',
|
||||||
'Version' => '$Revision$',
|
'Version' => '$Revision$',
|
||||||
'Description' => 'Detect Java RMI endpoints',
|
'Description' => 'Detect Java RMI endpoints',
|
||||||
'Author' => ['mihi', 'hdm'],
|
'Author' => ['mihi', 'hdm'],
|
||||||
|
@ -95,14 +95,12 @@ class Metasploit3 < Msf::Auxiliary
|
||||||
report_service(:host => rhost, :port => rport, :name => "java-rmi", :info => "Class Loader: Disabled")
|
report_service(:host => rhost, :port => rport, :name => "java-rmi", :info => "Class Loader: Disabled")
|
||||||
elsif buf.length > 0
|
elsif buf.length > 0
|
||||||
print_good("#{rhost}:#{rport} Java RMI Endpoint Detected: Class Loader Enabled")
|
print_good("#{rhost}:#{rport} Java RMI Endpoint Detected: Class Loader Enabled")
|
||||||
report_service(:host => rhost, :port => rport, :name => "java-rmi", :info => "Class Loader: Enabled")
|
svc = report_service(:host => rhost, :port => rport, :name => "java-rmi", :info => "Class Loader: Enabled")
|
||||||
report_vuln(
|
report_vuln(
|
||||||
:host => rhost,
|
:host => rhost,
|
||||||
:port => rport,
|
:service => svc,
|
||||||
:proto => 'tcp',
|
:name => self.name,
|
||||||
:sname => (ssl ? 'https' : 'http'),
|
:info => "Module #{self.fullname} confirmed remote code execution via this RMI service",
|
||||||
:name => self.fullname,
|
|
||||||
:info => "Class Loader: Enabled",
|
|
||||||
:refs => self.references
|
:refs => self.references
|
||||||
)
|
)
|
||||||
else
|
else
|
||||||
|
|
|
@ -50,7 +50,7 @@ class Metasploit3 < Msf::Auxiliary
|
||||||
|
|
||||||
# This makes db_services look a lot nicer.
|
# This makes db_services look a lot nicer.
|
||||||
banner_sanitized = Rex::Text.to_hex_ascii(banner.to_s)
|
banner_sanitized = Rex::Text.to_hex_ascii(banner.to_s)
|
||||||
report_service(:host => rhost, :port => rport, :name => "telnet", :info => banner_sanitized)
|
svc = report_service(:host => rhost, :port => rport, :name => "telnet", :info => banner_sanitized)
|
||||||
|
|
||||||
# Check for encryption option ( IS(0) DES_CFB64(1) )
|
# Check for encryption option ( IS(0) DES_CFB64(1) )
|
||||||
sock.put("\xff\xfa\x26\x00\x01\x01\x12\x13\x14\x15\x16\x17\x18\x19\xff\xf0")
|
sock.put("\xff\xfa\x26\x00\x01\x01\x12\x13\x14\x15\x16\x17\x18\x19\xff\xf0")
|
||||||
|
@ -124,12 +124,11 @@ class Metasploit3 < Msf::Auxiliary
|
||||||
print_good("#{ip}:#{rport} VULNERABLE: #{banner_sanitized}")
|
print_good("#{ip}:#{rport} VULNERABLE: #{banner_sanitized}")
|
||||||
report_vuln(
|
report_vuln(
|
||||||
{
|
{
|
||||||
:host => ip,
|
:host => ip,
|
||||||
:port => rport,
|
:service => svc,
|
||||||
:proto => 'tcp',
|
:name => self.name,
|
||||||
:name => self.fullname,
|
:info => "Module #{self.fullname} confirmed acceptance of a long key ID: #{banner_sanitized}",
|
||||||
:info => banner_sanitized,
|
:refs => self.references
|
||||||
:refs => self.references
|
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -53,7 +53,7 @@ class Metasploit3 < Msf::Auxiliary
|
||||||
|
|
||||||
ver = "#{vnc.majver}.#{vnc.minver}"
|
ver = "#{vnc.majver}.#{vnc.minver}"
|
||||||
print_status("#{target_host}:#{rport}, VNC server protocol version : #{ver}")
|
print_status("#{target_host}:#{rport}, VNC server protocol version : #{ver}")
|
||||||
report_service(
|
svc = report_service(
|
||||||
:host => rhost,
|
:host => rhost,
|
||||||
:port => rport,
|
:port => rport,
|
||||||
:proto => 'tcp',
|
:proto => 'tcp',
|
||||||
|
@ -77,12 +77,11 @@ class Metasploit3 < Msf::Auxiliary
|
||||||
print_good("#{target_host}:#{rport}, VNC server security types includes None, free access!")
|
print_good("#{target_host}:#{rport}, VNC server security types includes None, free access!")
|
||||||
report_vuln(
|
report_vuln(
|
||||||
{
|
{
|
||||||
:host => rhost,
|
:host => rhost,
|
||||||
:port => rport,
|
:service => svc,
|
||||||
:proto => 'tcp',
|
:name => self.name,
|
||||||
:name => self.fullname,
|
:info => "Module #{self.fullname} identified the VNC 'none' security type: #{sec_type.join(", ")}",
|
||||||
:info => sec_type.join(","),
|
:refs => self.references,
|
||||||
:refs => self.references,
|
|
||||||
:exploited_at => Time.now.utc
|
:exploited_at => Time.now.utc
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
|
@ -55,11 +55,11 @@ class Metasploit3 < Msf::Post
|
||||||
match += 1
|
match += 1
|
||||||
report_vuln(
|
report_vuln(
|
||||||
:host => session.session_host,
|
:host => session.session_host,
|
||||||
:name => self.fullname,
|
:name => self.name,
|
||||||
:info => "#{path}\\#{query} possible CVE-2011-3402 exploitation [Duqu] artifact.",
|
:info => "Module #{self.fullname} detected #{path}\\#{query} - possible CVE-2011-3402 exploitation [Duqu] artifact.",
|
||||||
:refs => self.references,
|
:refs => self.references,
|
||||||
:exploited_at => Time.now.utc
|
:exploited_at => Time.now.utc,
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
rescue # Probably should do something here...
|
rescue # Probably should do something here...
|
||||||
|
|
Loading…
Reference in New Issue