add reporting, see #385

git-svn-id: file:///home/svn/framework3/trunk@8375 4d416f70-5f16-0410-b530-b9f4589650da
unstable
James Lee 2010-02-05 21:13:07 +00:00
parent 43bbfefa8f
commit 0e1af9ed6a
1 changed files with 16 additions and 1 deletions

View File

@ -12,6 +12,7 @@ require 'msf/core'
class Metasploit3 < Msf::Auxiliary class Metasploit3 < Msf::Auxiliary
include Msf::Exploit::Remote::Tcp include Msf::Exploit::Remote::Tcp
include Msf::Auxiliary::Report
include Msf::Auxiliary::Scanner include Msf::Auxiliary::Scanner
def initialize def initialize
@ -35,7 +36,6 @@ class Metasploit3 < Msf::Auxiliary
end end
def run_host(target_host) def run_host(target_host)
connect connect
begin begin
@ -48,6 +48,13 @@ class Metasploit3 < Msf::Auxiliary
ver,msg = (banner.split(/\n/)) ver,msg = (banner.split(/\n/))
print_status("#{target_host}:#{rport}, VNC server protocol version : #{ver}") print_status("#{target_host}:#{rport}, VNC server protocol version : #{ver}")
report_service(
:host => rhost,
:port => rport,
:proto => 'tcp',
:name => 'vnc',
:info => "VNC protocol version #{ver}"
)
if msg if msg
if (msg =~ /Too many security failures/) if (msg =~ /Too many security failures/)
@ -84,6 +91,13 @@ class Metasploit3 < Msf::Auxiliary
print_status("#{target_host}:#{rport}, VNC server security types supported : #{sec_type.join(",")}") print_status("#{target_host}:#{rport}, VNC server security types supported : #{sec_type.join(",")}")
if (types.include? 1) if (types.include? 1)
print_status("#{target_host}:#{rport}, VNC server security types includes None, free access!") print_status("#{target_host}:#{rport}, VNC server security types includes None, free access!")
report_vuln({
:host => rhost,
:port => rport,
:proto => 'tcp',
:name => 'VNC-NONE-AUTH-ALLOWED',
:data => sec_type.join(",")
})
end end
else else
print_error("#{target_host}:#{rport}, failed to parse security types") print_error("#{target_host}:#{rport}, failed to parse security types")
@ -100,3 +114,4 @@ class Metasploit3 < Msf::Auxiliary
end end
end end
end end