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] = opts[:data] =
"AUTH #{ opts[:targ_host] || 'unknown' }:#{ opts[:targ_port] || 'unknown' } " + "AUTH #{ opts[:targ_host] || 'unknown' }:#{ opts[:targ_port] || 'unknown' } " +
"#{opts[:user] || "<NULL>"} #{opts[:pass] || "<NULL>" } #{opts[:extra]}" "#{opts[:user] || "<NULL>"} #{opts[:pass] || "<NULL>" } #{opts[:extra]}"
print_status("Recording successful #{data} credentials for #{addr}")
report_note(opts) report_note(opts)
end end

View File

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

View File

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

View File

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