CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
rapid7

CoCalc provides the best real-time collaborative environment for Jupyter Notebooks, LaTeX documents, and SageMath, scalable from individual users to large groups and classes!

GitHub Repository: rapid7/metasploit-framework
Path: blob/master/lib/metasploit/framework/login_scanner/ntlm.rb
Views: 1904
1
require 'metasploit/framework/login_scanner'
2
3
module Metasploit
4
module Framework
5
module LoginScanner
6
7
# This Concern provides the basic accessors and validations
8
# for protocols that require the use of NTLM for Authentication.
9
module NTLM
10
extend ActiveSupport::Concern
11
include ActiveModel::Validations
12
13
included do
14
# @!attribute send_lm
15
# @return [Boolean] Whether to always send the LANMAN response(except if using NTLM2 Session)
16
attr_accessor :send_lm
17
18
# @!attribute send_ntlm
19
# @return [Boolean] Whether to use NTLM responses
20
attr_accessor :send_ntlm
21
22
# @!attribute send_spn
23
# @return [Boolean] Whether to support SPN for newer Windows OSes
24
attr_accessor :send_spn
25
26
# @!attribute use_lmkey
27
# @return [Boolean] Whether to negotiate with a LANMAN key
28
attr_accessor :use_lmkey
29
30
# @!attribute send_lm
31
# @return [Boolean] Whether to force the use of NTLM2 session
32
attr_accessor :use_ntlm2_session
33
34
# @!attribute send_lm
35
# @return [Boolean] Whether to force the use of NTLMv2 instead of NTLM2 Session
36
attr_accessor :use_ntlmv2
37
38
validates :send_lm,
39
inclusion: { in: [true, false] }
40
41
validates :send_ntlm,
42
inclusion: { in: [true, false] }
43
44
validates :send_spn,
45
inclusion: { in: [true, false] }
46
47
validates :use_lmkey,
48
inclusion: { in: [true, false] }
49
50
validates :use_ntlm2_session,
51
inclusion: { in: [true, false] }
52
53
validates :use_ntlmv2,
54
inclusion: { in: [true, false] }
55
end
56
57
end
58
59
end
60
end
61
end
62
63