Skip to content

Commit 877fb01

Browse files
David MaloneyDavid Maloney
authored andcommitted
remove negotiate requirements
winrm can support basic, and now these modules can too, for free
1 parent af6b061 commit 877fb01

File tree

4 files changed

+0
-17
lines changed

4 files changed

+0
-17
lines changed

lib/msf/core/exploit/winrm.rb

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -219,10 +219,6 @@ def generate_uuid
219219
::Rex::Proto::DCERPC::UUID.uuid_unpack(Rex::Text.rand_text(16))
220220
end
221221

222-
def accepts_ntlm_auth
223-
parse_auth_methods(winrm_poke).include? "Negotiate"
224-
end
225-
226222
def target_url
227223
proto = "http"
228224
if rport == 5986 or datastore['SSL']

modules/auxiliary/scanner/winrm/winrm_cmd.rb

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,6 @@ def initialize
4040

4141

4242
def run_host(ip)
43-
unless accepts_ntlm_auth
44-
print_error "The Remote WinRM server (#{ip} does not appear to allow Negotiate(NTLM) auth"
45-
return
46-
end
4743
streams = winrm_run_cmd(datastore['CMD'])
4844
return unless streams.class == Hash
4945
print_error streams['stderr'] unless streams['stderr'] == ''

modules/auxiliary/scanner/winrm/winrm_login.rb

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,6 @@ module without SSL, the 'AllowUnencrypted' winrm option must be set.
3939

4040

4141
def run_host(ip)
42-
unless accepts_ntlm_auth
43-
print_error "The Remote WinRM server (#{ip} does not appear to allow Negotiate(NTLM) auth"
44-
return
45-
end
4642
each_user_pass do |user, pass|
4743
resp = send_winrm_request(test_request)
4844
if resp.nil?

modules/auxiliary/scanner/winrm/winrm_wql.rb

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,6 @@ def initialize
4242

4343

4444
def run_host(ip)
45-
unless accepts_ntlm_auth
46-
print_error "The Remote WinRM server (#{ip} does not appear to allow Negotiate(NTLM) auth"
47-
return
48-
end
49-
5045
resp = send_winrm_request(winrm_wql_msg(datastore['WQL']))
5146
if resp.nil?
5247
print_error "Got no reply from the server"

0 commit comments

Comments
 (0)