@@ -56,7 +56,8 @@ def initialize
56
56
[
57
57
Opt ::Proxies ,
58
58
OptBool . new ( 'PRESERVE_DOMAINS' , [ false , "Respect a username that contains a domain name." , true ] ) ,
59
- OptBool . new ( 'RECORD_GUEST' , [ false , "Record guest-privileged random logins to the database" , false ] )
59
+ OptBool . new ( 'RECORD_GUEST' , [ false , "Record guest-privileged random logins to the database" , false ] ) ,
60
+ OptBool . new ( 'DETECT_ANY_AUTH' , [ false , 'Enable detection of systems accepting any authentication' , true ] )
60
61
] , self . class )
61
62
62
63
end
@@ -87,13 +88,17 @@ def run_host(ip)
87
88
send_spn : datastore [ 'NTLM::SendSPN' ] ,
88
89
)
89
90
90
- bogus_result = @scanner . attempt_bogus_login ( domain )
91
- if bogus_result . success?
92
- if bogus_result . access_level == Metasploit ::Framework ::LoginScanner ::SMB ::AccessLevels ::GUEST
93
- print_status ( "This system allows guest sessions with any credentials" )
91
+ if datastore [ 'DETECT_ANY_AUTH' ]
92
+ bogus_result = @scanner . attempt_bogus_login ( domain )
93
+ if bogus_result . success?
94
+ if bogus_result . access_level == Metasploit ::Framework ::LoginScanner ::SMB ::AccessLevels ::GUEST
95
+ print_status ( "This system allows guest sessions with any credentials" )
96
+ else
97
+ print_error ( "This system accepts authentication with any credentials, brute force is ineffective." )
98
+ return
99
+ end
94
100
else
95
- print_error ( "This system accepts authentication with any credentials, brute force is ineffective." )
96
- return
101
+ vprint_status ( 'This system does not accept authentication with any credentials, proceeding with brute force' )
97
102
end
98
103
end
99
104
0 commit comments