From ea128c6404a418ee309c5b9722d3602924278b2b Mon Sep 17 00:00:00 2001 From: Tod Beardsley Date: Mon, 27 Sep 2010 17:11:40 +0000 Subject: [PATCH] Mention the port when bruteforcing SMB services. Handy for noticing when you're being direct or indirect. git-svn-id: file:///home/svn/framework3/trunk@10498 4d416f70-5f16-0410-b530-b9f4589650da --- modules/auxiliary/scanner/smb/smb_login.rb | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/modules/auxiliary/scanner/smb/smb_login.rb b/modules/auxiliary/scanner/smb/smb_login.rb index 0ba4b3e996..69ad0a3878 100644 --- a/modules/auxiliary/scanner/smb/smb_login.rb +++ b/modules/auxiliary/scanner/smb/smb_login.rb @@ -28,6 +28,10 @@ class Metasploit3 < Msf::Auxiliary 'smb' end + def smbhost + "#{rhost}:#{rport}" + end + def initialize super( 'Name' => 'SMB Login Check Scanner', @@ -107,7 +111,7 @@ class Metasploit3 < Msf::Auxiliary case e.error_reason when 'STATUS_LOGON_FAILURE', 'STATUS_ACCESS_DENIED' # Nothing interesting - vprint_status("#{rhost} - FAILED LOGIN (#{smb_peer_os}) #{user} : #{pass} (#{e.error_reason})") + vprint_status("#{smbhost} - FAILED LOGIN (#{smb_peer_os}) #{user} : #{pass} (#{e.error_reason})") disconnect() return @@ -141,14 +145,14 @@ class Metasploit3 < Msf::Auxiliary :update => :unique_data ) end - print_error("#{rhost} - FAILED LOGIN (#{smb_peer_os}) #{user} : #{pass} (#{e.error_reason})") + print_error("#{smbhost} - FAILED LOGIN (#{smb_peer_os}) #{user} : #{pass} (#{e.error_reason})") disconnect() return :skip_user # These reasons are sufficient to stop trying. end if(simple.client.auth_user) - print_good("#{rhost} - SUCCESSFUL LOGIN (#{smb_peer_os}) '#{user}' : '#{pass}'") + print_good("#{smbhost} - SUCCESSFUL LOGIN (#{smb_peer_os}) '#{user}' : '#{pass}'") report_hash = { :host => rhost, :port => datastore['RPORT'],