rapid7/metasploit-framework

View on GitHub
modules/auxiliary/server/capture/http_ntlm.rb

Summary

Maintainability
F
1 wk
Test Coverage

Method html_get_hash has a Cognitive Complexity of 138 (exceeds 5 allowed). Consider refactoring.
Open

  def html_get_hash(arg = {})
    ntlm_ver = arg[:ntlm_ver]
    if ntlm_ver == NTLM_CONST::NTLM_V1_RESPONSE or ntlm_ver == NTLM_CONST::NTLM_2_SESSION_RESPONSE
      lm_hash = arg[:lm_hash]
      nt_hash = arg[:nt_hash]
Severity: Minor
Found in modules/auxiliary/server/capture/http_ntlm.rb - About 2 days to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Method html_get_hash has 159 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  def html_get_hash(arg = {})
    ntlm_ver = arg[:ntlm_ver]
    if ntlm_ver == NTLM_CONST::NTLM_V1_RESPONSE or ntlm_ver == NTLM_CONST::NTLM_2_SESSION_RESPONSE
      lm_hash = arg[:lm_hash]
      nt_hash = arg[:nt_hash]
Severity: Major
Found in modules/auxiliary/server/capture/http_ntlm.rb - About 6 hrs to fix

    File http_ntlm.rb has 397 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    NTLM_CONST = Rex::Proto::NTLM::Constants
    NTLM_CRYPT = Rex::Proto::NTLM::Crypt
    MESSAGE = Rex::Proto::NTLM::Message
    
    class MetasploitModule < Msf::Auxiliary
    Severity: Minor
    Found in modules/auxiliary/server/capture/http_ntlm.rb - About 5 hrs to fix

      Method report_creds has a Cognitive Complexity of 35 (exceeds 5 allowed). Consider refactoring.
      Open

        def report_creds(opts)
          ip = opts[:ip] || rhost
          user = opts[:user] || nil
          domain = opts[:domain] || nil
          ntlm_ver = opts[:ntlm_ver] || nil
      Severity: Minor
      Found in modules/auxiliary/server/capture/http_ntlm.rb - About 5 hrs to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

      Method handle_auth has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
      Open

        def handle_auth(cli,hash)
          # authorization string is base64 encoded message
          message = Rex::Text.decode_base64(hash)
      
          if(message[8,1] == "\x01")
      Severity: Minor
      Found in modules/auxiliary/server/capture/http_ntlm.rb - About 2 hrs to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

      Method handle_auth has 57 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        def handle_auth(cli,hash)
          # authorization string is base64 encoded message
          message = Rex::Text.decode_base64(hash)
      
          if(message[8,1] == "\x01")
      Severity: Major
      Found in modules/auxiliary/server/capture/http_ntlm.rb - About 2 hrs to fix

        Method report_creds has 42 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          def report_creds(opts)
            ip = opts[:ip] || rhost
            user = opts[:user] || nil
            domain = opts[:domain] || nil
            ntlm_ver = opts[:ntlm_ver] || nil
        Severity: Minor
        Found in modules/auxiliary/server/capture/http_ntlm.rb - About 1 hr to fix

          Method initialize has 31 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            def initialize(info = {})
              super(update_info(info,
                'Name'        => 'HTTP Client MS Credential Catcher',
                'Description' => %q{
                    This module attempts to quietly catch NTLM/LM Challenge hashes.
          Severity: Minor
          Found in modules/auxiliary/server/capture/http_ntlm.rb - About 1 hr to fix

            Method on_request_uri has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
            Open

              def on_request_uri(cli, request)
                vprint_status("Request '#{request.uri}'")
            
                case request.method
                when 'OPTIONS'
            Severity: Minor
            Found in modules/auxiliary/server/capture/http_ntlm.rb - About 35 mins to fix

            Cognitive Complexity

            Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

            A method's cognitive complexity is based on a few simple rules:

            • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
            • Code is considered more complex for each "break in the linear flow of the code"
            • Code is considered more complex when "flow breaking structures are nested"

            Further reading

            Identical blocks of code found in 2 locations. Consider refactoring.
            Open

                  case ntlm_ver
                  when NTLM_CONST::NTLM_V1_RESPONSE
                    if NTLM_CRYPT::is_hash_from_empty_pwd?({:hash => [nt_hash].pack("H*"),:srv_challenge => @challenge,
                            :ntlm_ver => NTLM_CONST::NTLM_V1_RESPONSE, :type => 'ntlm' })
                      print_status("NLMv1 Hash correspond to an empty password, ignoring ... ")
            Severity: Major
            Found in modules/auxiliary/server/capture/http_ntlm.rb and 1 other location - About 5 hrs to fix
            modules/auxiliary/server/capture/mssql.rb on lines 177..224

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 196.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Identical blocks of code found in 2 locations. Consider refactoring.
            Open

                  if(datastore['JOHNPWFILE'] and user)
                    case ntlm_ver
                    when NTLM_CONST::NTLM_V1_RESPONSE, NTLM_CONST::NTLM_2_SESSION_RESPONSE
            
                      fd = File.open(datastore['JOHNPWFILE'] + '_netntlm', "ab")
            Severity: Major
            Found in modules/auxiliary/server/capture/http_ntlm.rb and 1 other location - About 4 hrs to fix
            modules/auxiliary/server/capture/mssql.rb on lines 305..345

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 144.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Identical blocks of code found in 2 locations. Consider refactoring.
            Open

                  if nt_len == 48 #lmv1/ntlmv1 or ntlm2_session
                    arg = { :ntlm_ver => NTLM_CONST::NTLM_V1_RESPONSE,
                      :lm_hash => lm_hash,
                      :nt_hash => ntlm_hash
                    }
            Severity: Major
            Found in modules/auxiliary/server/capture/http_ntlm.rb and 1 other location - About 1 hr to fix
            modules/auxiliary/server/http_ntlmrelay.rb on lines 617..639

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 75.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Identical blocks of code found in 2 locations. Consider refactoring.
            Open

                  if(datastore['CAINPWFILE'] and user)
                    if ntlm_ver == NTLM_CONST::NTLM_V1_RESPONSE or ntlm_ver == NTLM_CONST::NTLM_2_SESSION_RESPONSE
                      fd = File.open(datastore['CAINPWFILE'], "ab")
                      fd.puts(
                        [
            Severity: Major
            Found in modules/auxiliary/server/capture/http_ntlm.rb and 1 other location - About 1 hr to fix
            modules/auxiliary/server/capture/mssql.rb on lines 289..303

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 56.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Identical blocks of code found in 2 locations. Consider refactoring.
            Open

                    capturelogmessage =
                      "#{capturedtime}\nNTLMv2 Response Captured from #{host} \n" +
                      "DOMAIN: #{domain} USER: #{user} \n" +
                      "LMHASH:#{lm_hash_message ? lm_hash_message : "<NULL>"} " +
                      "LM_CLIENT_CHALLENGE:#{lm_chall_message ? lm_chall_message : "<NULL>"}\n" +
            Severity: Major
            Found in modules/auxiliary/server/capture/http_ntlm.rb and 1 other location - About 1 hr to fix
            modules/auxiliary/server/capture/mssql.rb on lines 241..247

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 48.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Similar blocks of code found in 10 locations. Consider refactoring.
            Open

              def process_options(cli, request)
                print_status("OPTIONS #{request.uri}")
                headers = {
                  'MS-Author-Via' => 'DAV',
                  'DASL'          => '<DAV:sql>',
            Severity: Major
            Found in modules/auxiliary/server/capture/http_ntlm.rb and 9 other locations - About 50 mins to fix
            modules/auxiliary/gather/ie_sandbox_findfiles.rb on lines 175..190
            modules/auxiliary/server/http_ntlmrelay.rb on lines 124..138
            modules/exploits/windows/browser/ubisoft_uplay_cmd_exec.rb on lines 171..185
            modules/exploits/windows/browser/webdav_dll_hijacker.rb on lines 125..139
            modules/exploits/windows/fileformat/mcafee_showreport_exec.rb on lines 101..116
            modules/exploits/windows/http/sap_host_control_cmd_exec.rb on lines 117..131
            modules/exploits/windows/misc/vmhgfs_webdav_dll_sideload.rb on lines 113..127
            modules/exploits/windows/misc/wireshark_lua.rb on lines 106..121
            modules/exploits/windows/scada/ge_proficy_cimplicity_gefebt.rb on lines 96..110

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 43.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Similar blocks of code found in 2 locations. Consider refactoring.
            Open

                register_advanced_options([
                  OptString.new('DOMAIN',  [ false, "The default domain to use for NTLM authentication", "DOMAIN"]),
                  OptString.new('SERVER',  [ false, "The default server to use for NTLM authentication", "SERVER"]),
                  OptString.new('DNSNAME',  [ false, "The default DNS server name to use for NTLM authentication", "SERVER"]),
                  OptString.new('DNSDOMAIN',  [ false, "The default DNS domain name to use for NTLM authentication", "example.com"]),
            Severity: Minor
            Found in modules/auxiliary/server/capture/http_ntlm.rb and 1 other location - About 40 mins to fix
            modules/exploits/multi/http/git_client_command_exec.rb on lines 98..105

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 37.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Identical blocks of code found in 2 locations. Consider refactoring.
            Open

                if ntlm_ver == NTLM_CONST::NTLM_V1_RESPONSE or ntlm_ver == NTLM_CONST::NTLM_2_SESSION_RESPONSE
                  lm_hash = arg[:lm_hash]
                  nt_hash = arg[:nt_hash]
                else
                  lm_hash = arg[:lm_hash]
            Severity: Minor
            Found in modules/auxiliary/server/capture/http_ntlm.rb and 1 other location - About 35 mins to fix
            modules/auxiliary/server/capture/mssql.rb on lines 159..167

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 36.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Identical blocks of code found in 2 locations. Consider refactoring.
            Open

                    capturelogmessage =
                      "#{capturedtime}\nNTLM2_SESSION Response Captured from #{host} \n" +
                      "DOMAIN: #{domain} USER: #{user} \n" +
                      "NTHASH:#{nt_hash ? nt_hash : "<NULL>"}\n" +
                      "NT_CLIENT_CHALLENGE:#{lm_hash_message ? lm_hash_message[0,16] : "<NULL>"} \n"
            Severity: Minor
            Found in modules/auxiliary/server/capture/http_ntlm.rb and 1 other location - About 35 mins to fix
            modules/auxiliary/server/capture/mssql.rb on lines 252..256

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 35.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Similar blocks of code found in 2 locations. Consider refactoring.
            Open

                if((reqflags & NTLM_CONST::NEGOTIATE_DOMAIN) == NTLM_CONST::NEGOTIATE_DOMAIN)
                  dom_len = message[16,2].unpack('v')[0].to_i
                  dom_off = message[20,2].unpack('v')[0].to_i
                  domain = message[dom_off,dom_len].to_s
            Severity: Minor
            Found in modules/auxiliary/server/capture/http_ntlm.rb and 1 other location - About 35 mins to fix
            modules/auxiliary/server/capture/http_ntlm.rb on lines 201..204

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 35.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Similar blocks of code found in 2 locations. Consider refactoring.
            Open

                if((reqflags & NTLM_CONST::NEGOTIATE_WORKSTATION) == NTLM_CONST::NEGOTIATE_WORKSTATION)
                  wor_len = message[24,2].unpack('v')[0].to_i
                  wor_off = message[28,2].unpack('v')[0].to_i
                  workstation = message[wor_off,wor_len].to_s
            Severity: Minor
            Found in modules/auxiliary/server/capture/http_ntlm.rb and 1 other location - About 35 mins to fix
            modules/auxiliary/server/capture/http_ntlm.rb on lines 196..199

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 35.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Identical blocks of code found in 2 locations. Consider refactoring.
            Open

                    capturelogmessage =
                      "#{capturedtime}\nNTLMv1 Response Captured from #{host} \n" +
                      "DOMAIN: #{domain} USER: #{user} \n" +
                      "LMHASH:#{lm_hash_message ? lm_hash_message : "<NULL>"} \nNTHASH:#{nt_hash ? nt_hash : "<NULL>"}\n"
            Severity: Minor
            Found in modules/auxiliary/server/capture/http_ntlm.rb and 1 other location - About 25 mins to fix
            modules/auxiliary/server/capture/mssql.rb on lines 235..238

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 30.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Similar blocks of code found in 2 locations. Consider refactoring.
            Open

                  hash = [
                    user, '',
                    domain ? domain : 'NULL',
                    @challenge.unpack('H*')[0],
                    lm_hash ? lm_hash : '0' * 32,
            Severity: Minor
            Found in modules/auxiliary/server/capture/http_ntlm.rb and 1 other location - About 25 mins to fix
            modules/auxiliary/server/capture/http_ntlm.rb on lines 429..435

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 30.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Similar blocks of code found in 2 locations. Consider refactoring.
            Open

                  hash = [
                    user, '',
                    domain ? domain : 'NULL',
                    @challenge.unpack('H*')[0],
                    nt_hash ? nt_hash : '0' * 32,
            Severity: Minor
            Found in modules/auxiliary/server/capture/http_ntlm.rb and 1 other location - About 25 mins to fix
            modules/auxiliary/server/capture/http_ntlm.rb on lines 420..426

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 30.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Similar blocks of code found in 4 locations. Consider refactoring.
            Open

                super(update_info(info,
                  'Name'        => 'HTTP Client MS Credential Catcher',
                  'Description' => %q{
                      This module attempts to quietly catch NTLM/LM Challenge hashes.
                    },
            Severity: Minor
            Found in modules/auxiliary/server/capture/http_ntlm.rb and 3 other locations - About 15 mins to fix
            modules/auxiliary/server/capture/http_basic.rb on lines 11..34
            modules/auxiliary/server/http_ntlmrelay.rb on lines 24..51
            modules/auxiliary/server/local_hwbridge.rb on lines 17..34

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 25.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            There are no issues that match your filters.

            Category
            Status