add report_auth_info to some modules that authenticate. thanks, tebo

git-svn-id: file:///home/svn/framework3/trunk@6118 4d416f70-5f16-0410-b530-b9f4589650da
unstable
James Lee 2009-01-11 05:52:07 +00:00
parent cad513b703
commit 288075f7a0
4 changed files with 30 additions and 2 deletions

View File

@ -93,6 +93,7 @@ module Auxiliary::Report
opts[:data] =
"AUTH #{ opts[:targ_host] || 'unknown' }:#{ opts[:targ_port] || 'unknown' } " +
"#{opts[:user] || "<NULL>"} #{opts[:pass] || "<NULL>" } #{opts[:extra]}"
print_status("Recording successful #{data} credentials for #{addr}")
report_note(opts)
end

View File

@ -13,6 +13,7 @@ class Metasploit3 < Msf::Auxiliary
include Msf::Exploit::Remote::Ftp
include Msf::Auxiliary::Scanner
include Msf::Auxiliary::Report
def initialize
super(
@ -52,6 +53,14 @@ class Metasploit3 < Msf::Auxiliary
else
print_status("#{target_host}:#{rport} Anonymous READ (#{banner})")
end
report_auth_info(
:host => target_host,
:proto => 'FTP',
:user => datastore['FTPUSER'],
:pass => datastore['FTPPASS'],
:targ_host => target_host,
:targ_port => rport
)
end
disconnect

View File

@ -17,6 +17,7 @@ class Metasploit3 < Msf::Auxiliary
include Msf::Exploit::Remote::MSSQL
include Msf::Auxiliary::Scanner
include Msf::Auxiliary::Report
def initialize
super(
@ -47,7 +48,15 @@ class Metasploit3 < Msf::Auxiliary
if (info == true)
print_status("#{ip}:#{rport} successful logged in as '#{user}' with password '#{pass}'")
else
report_auth_info(
:host => ip,
:proto => 'MSSQL',
:user => user,
:pass => pass,
:targ_host => ip,
:targ_port => rport
)
else
print_status("#{ip}:#{rport} failed to login as '#{user}'")
end
rescue ::Interrupt

View File

@ -29,6 +29,7 @@ class Metasploit3 < Msf::Exploit::Remote
include Msf::Exploit::Remote::DCERPC
include Msf::Exploit::Remote::SMB
include Msf::Auxiliary::Report
def initialize(info = {})
super(update_info(info,
@ -88,7 +89,6 @@ class Metasploit3 < Msf::Exploit::Remote
print_status("Authenticating as user '#{datastore['SMBUser']}'...")
smb_login()
if (not simple.client.auth_user)
print_line(" ")
print_error(
@ -102,6 +102,15 @@ class Metasploit3 < Msf::Exploit::Remote
return
end
report_auth_info(
:host => datastore['RHOST'],
:proto => 'SMB',
:user => datastore['SMBUser'],
:pass => datastore['SMBPass'],
:targ_host => datastore['RHOST'],
:targ_port => datastore['RPORT']
)
# Upload the shellcode to a file
print_status("Uploading payload...")
filename = rand_text_alpha(8) + ".exe"