From 234e129523199f56fec398417fe328ed0d0368c8 Mon Sep 17 00:00:00 2001 From: David Maloney Date: Wed, 7 May 2014 14:28:10 -0500 Subject: [PATCH] add NTLM concern for loginscanners add a new concern for LoginScanners that provides the basic accessors and validations for anything requiring NTLM --- .../framework/login_scanner/mssql.rb | 0 .../framework/login_scanner/ntlm.rb | 54 +++++++++++++++++++ 2 files changed, 54 insertions(+) create mode 100644 lib/metasploit/framework/login_scanner/mssql.rb create mode 100644 lib/metasploit/framework/login_scanner/ntlm.rb diff --git a/lib/metasploit/framework/login_scanner/mssql.rb b/lib/metasploit/framework/login_scanner/mssql.rb new file mode 100644 index 0000000000..e69de29bb2 diff --git a/lib/metasploit/framework/login_scanner/ntlm.rb b/lib/metasploit/framework/login_scanner/ntlm.rb new file mode 100644 index 0000000000..a970f24842 --- /dev/null +++ b/lib/metasploit/framework/login_scanner/ntlm.rb @@ -0,0 +1,54 @@ +require 'metasploit/framework/login_scanner' + +module Metasploit + module Framework + module LoginScanner + + # This Concern provides the basic accessors and validations + # for protocols that require the use of NTLM for Authentication. + module NTLM + extend ActiveSupport::Concern + include ActiveModel::Validations + + included do + # @!attribute send_lm + # @return [Boolean] Whether or not to always send the LANMAN response(except if using NTLM2 Session) + attr_accessor :send_lm + + # @!attribute send_ntlm + # @return [Boolean] Whether or not to use NTLM responses + attr_accessor :send_ntlm + + # @!attribute send_spn + # @return [Boolean] Whether or not to support SPN for newer Windows OSes + attr_accessor :send_spn + + # @!attribute send_lm + # @return [Boolean] Whether or not to force the use of NTLM2 session + attr_accessor :use_ntlm2_session + + # @!attribute send_lm + # @return [Boolean] Whether or not to force the use of NTLMv2 instead of NTLM2 Session + attr_accessor :use_ntlmv2 + + validates :send_lm, + inclusion: { in: [true, false] } + + validates :send_ntlm, + inclusion: { in: [true, false] } + + validates :send_spn, + inclusion: { in: [true, false] } + + validates :use_ntlm2_session, + inclusion: { in: [true, false] } + + validates :use_ntlmv2, + inclusion: { in: [true, false] } + end + + end + + end + end +end