Skip to content

Commit 829166d

Browse files
committed
Fix a regression in smb_login
1 parent 3f1698f commit 829166d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

modules/auxiliary/scanner/smb/smb_login.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ def run_host(ip)
115115
fail_with(Msf::Exploit::Failure::BadConfig, 'The SMBDomain option is required when using Kerberos authentication.') if datastore['SMBDomain'].blank?
116116
fail_with(Msf::Exploit::Failure::BadConfig, 'The DomainControllerRhost is required when using Kerberos authentication.') if datastore['DomainControllerRhost'].blank?
117117

118-
if !datastore['PASSWORD']
118+
if datastore['SMBPass'].blank?
119119
# In case no password has been provided, we assume the user wants to use Kerberos tickets stored in cache
120120
# Write mode is still enable in case new TGS tickets are retrieved.
121121
ticket_storage = kerberos_ticket_storage({ read: true, write: true })
@@ -178,7 +178,7 @@ def run_host(ip)
178178
realm: domain,
179179
username: datastore['SMBUser'],
180180
password: datastore['SMBPass'],
181-
nil_passwords: datastore['SMB::Auth'] == Msf::Exploit::Remote::AuthOption::KERBEROS && !datastore['PASSWORD']
181+
nil_passwords: datastore['SMB::Auth'] == Msf::Exploit::Remote::AuthOption::KERBEROS && datastore['SMBPass'].blank?
182182
)
183183
cred_collection = prepend_db_hashes(cred_collection)
184184

0 commit comments

Comments
 (0)