rapid7/metasploit-framework

View on GitHub

Showing 16,065 of 22,177 total issues

Consider simplifying this complex logical expression.
Open

            next unless !(using_p && eprofile.include?(xref[0].split('/').last)) || (using_m && xref[0].to_s.match(mname)) || (!using_m && !using_p)
Severity: Major
Found in plugins/wmap.rb - About 40 mins to fix

    Consider simplifying this complex logical expression.
    Open

                next unless (using_p && eprofile.include?(xref[0].split('/').last)) || (using_m && xref[0].to_s.match(mname)) || (!using_m && !using_p)
    Severity: Major
    Found in plugins/wmap.rb - About 40 mins to fix

      Consider simplifying this complex logical expression.
      Open

              if !(target.to_s =~ get_link_filter)
                form = {}.merge!(form_template)
                form[:method] = (f['method'] || 'GET').upcase
                form[:query]  = target.query.to_s if form[:method] != "GET"
                form[:path]   = target.path
      Severity: Major
      Found in modules/auxiliary/scanner/http/crawler.rb - About 40 mins to fix

        Consider simplifying this complex logical expression.
        Open

            if (res && res.code == 200 && res.headers['Server'] && (res.headers['Server'].include?('Team-R Web') || res.body.include?('binom_ico') || res.body.include?('team-r')))
        
              print_good("#{rhost}:#{rport} - Binom3 confirmed...")
        
              return true
        Severity: Major
        Found in modules/auxiliary/scanner/http/binom3_login_config_pass_dump.rb - About 40 mins to fix

          Consider simplifying this complex logical expression.
          Open

              if res.code == 200 &&
                  res.body.length > 0 &&
                  res.headers['Content-Disposition'] &&
                  res.headers['Content-Disposition'].include?('attachment; filename') &&
                  res.headers['Content-Length'] &&
          Severity: Major
          Found in modules/auxiliary/scanner/http/wp_simple_backup_file_read.rb - About 40 mins to fix

            Consider simplifying this complex logical expression.
            Open

                if res && res.code == 200 &&
                    res.body.to_s =~ /ManageEngine Password Manager Pro/ &&
                    (
                      res.body.to_s =~ /login\.css\?([0-9]+)/ ||                            # PMP v6
                      res.body.to_s =~ /login\.css\?version=([0-9]+)/ ||                    # PMP v6
            Severity: Major
            Found in modules/exploits/multi/http/manage_engine_dc_pmp_sqli.rb - About 40 mins to fix

              Consider simplifying this complex logical expression.
              Open

                  return CheckCode::Safe("Detected Splunk version #{version} which is not vulnerable") unless
                    (Rex::Version.new('9.0.0') <= version && version < Rex::Version.new('9.0.5')) ||
                    (Rex::Version.new('8.2.0') <= version && version < Rex::Version.new('8.2.11')) ||
                    (Rex::Version.new('8.1.0') <= version && version < Rex::Version.new('8.1.14'))

                Consider simplifying this complex logical expression.
                Open

                    if (version[2] > 9030 && version[3] == 'sd') ||
                        (version[2] > 99999 && version[3] == 'ae') ||
                        (version[2] > 99999 && version[3] == 'sc')
                      return Exploit::CheckCode::Safe
                    else
                Severity: Major
                Found in modules/exploits/multi/http/manageengine_auth_upload.rb - About 40 mins to fix

                  Consider simplifying this complex logical expression.
                  Open

                      unless res && ((res.code == 200 && res.body.include?('<title>Error</title>')) || ((res.code == 404 || res.code == 500) && res.body.include?('<title>Error Occurred While Processing Request</title>')))
                        fail_with(Failure::UnexpectedReply, 'Failed to plant the payload in the ColdFusion output log file')
                      end
                  Severity: Major
                  Found in modules/exploits/multi/http/adobe_coldfusion_rce_cve_2023_26360.rb - About 40 mins to fix

                    Consider simplifying this complex logical expression.
                    Open

                        unless res && ((res.code == 200 && res.body.include?('<title>Error</title>')) || ((res.code == 404 || res.code == 500) && res.body.include?('<title>Error Occurred While Processing Request</title>')))
                          fail_with(Failure::UnexpectedReply, 'Failed to execute the payload in the ColdFusion output log file')
                        end
                    Severity: Major
                    Found in modules/exploits/multi/http/adobe_coldfusion_rce_cve_2023_26360.rb - About 40 mins to fix

                      Consider simplifying this complex logical expression.
                      Open

                          if (version[0] <= 7 && version[2] < 7016 && version[3] == 'sd') ||
                          (version[0] == 4 && version[3] == 'ae') ||
                          (version[3] == 'sc')
                            # These are all "old style" versions (sc is always old style)
                            return targets[1]
                      Severity: Major
                      Found in modules/exploits/multi/http/manageengine_auth_upload.rb - About 40 mins to fix

                        Consider simplifying this complex logical expression.
                        Open

                            if res and res.code == 200 and res.body =~ /Weblogic Bridge Message/
                              # BEA WebLogic 8.1 SP6 - mod_wl_20.so
                              case res.body
                              when (/Build date\/time:<\/B> <I>Jun 16 2006 15:14:11/ and /Change Number:<\/B> <I>779586/)
                                return "Version found: BEA WebLogic 8.1 SP6 - mod_wl_20.so"
                        Severity: Major
                        Found in modules/exploits/windows/http/bea_weblogic_post_bof.rb - About 40 mins to fix

                          Consider simplifying this complex logical expression.
                          Open

                              if (package.to_s.start_with?('8') && package < Rex::Version.new('8.0.32-1ubuntu1.2')) ||
                                 (package.to_s.start_with?('7') && package < Rex::Version.new('7.0.52-1ubuntu0.7')) ||
                                 (package.to_s.start_with?('6') && package < Rex::Version.new('6.0.35-1ubuntu3.8'))
                                return CheckCode::Appears("Vulnerable app version detected: #{package}")
                              end
                          Severity: Major
                          Found in modules/exploits/linux/local/tomcat_ubuntu_log_init_priv_esc.rb - About 40 mins to fix

                            Consider simplifying this complex logical expression.
                            Open

                                if kernel_version < Rex::Version.new('5.8') ||
                                   kernel_version >= Rex::Version.new('5.16.11') ||
                                   (kernel_version >= Rex::Version.new('5.15.25') && kernel_version < Rex::Version.new('5.16')) ||
                                   (kernel_version >= Rex::Version.new('5.10.102') && kernel_version < Rex::Version.new('5.11'))
                                  return CheckCode::Safe("Linux kernel version #{kernel_version} is not vulnerable")
                            Severity: Major
                            Found in modules/exploits/linux/local/cve_2022_0847_dirtypipe.rb - About 40 mins to fix

                              Consider simplifying this complex logical expression.
                              Open

                                  if version >= Rex::Version.new('9.0.0') && version < Rex::Version.new('9.0.10') ||
                                     version >= Rex::Version.new('9.1.0') && version < Rex::Version.new('9.1.4') ||
                                     version >= Rex::Version.new('10.0.0') && version < Rex::Version.new('10.0.1')
                                    return Exploit::CheckCode::Appears
                                  end
                              Severity: Major
                              Found in modules/exploits/linux/http/panos_op_cmd_exec.rb - About 40 mins to fix

                                Consider simplifying this complex logical expression.
                                Open

                                        if (version == 3.0 and build < 1330) or
                                          (version == 2.6 and build < 2106) or
                                          (version == 2.5 and build < 2200)
                                            return Exploit::CheckCode::Vulnerable
                                        else
                                Severity: Major
                                Found in modules/exploits/linux/http/trendmicro_sps_exec.rb - About 40 mins to fix

                                  Consider simplifying this complex logical expression.
                                  Open

                                      if !ikev2_reply.empty? && (ikev2_reply.length >= 40) &&
                                         # Ensure the response 'Initiator SPI' field is the same as the original one sent.
                                         (ikev2_reply[0, 8] == ikev2_header[0, 8]) &&
                                         # Ensure the 'Next Payload' field is Notification (11)
                                         (ikev2_reply[16, 1].unpack('C').first == 11 &&
                                  Severity: Major
                                  Found in modules/exploits/linux/misc/zyxel_ike_decoder_rce_cve_2023_28771.rb - About 40 mins to fix

                                    Consider simplifying this complex logical expression.
                                    Open

                                              if (leaked_arch == ARCH_X86 and error[0,4] == error[4,4] and error[8..-1] == "er not yet given") or
                                                 (leaked_arch == ARCH_X64 and error.length == 6 and error[5].count("\x7E-\x7F").nonzero?)
                                                leaked_addr = [leaked_addr.last] # use this one, and not another
                                                throw(:another_heap_shift, true) # done
                                              end
                                    Severity: Major
                                    Found in modules/exploits/linux/smtp/exim_gethostbyname_bof.rb - About 40 mins to fix

                                      Consider simplifying this complex logical expression.
                                      Open

                                          if url.start_with?('http')
                                            proxy_host = ''
                                            if opts[:proxy_host] && opts[:proxy_port]
                                              prefix = 'http://'
                                              prefix = 'socks=' if opts[:proxy_type].to_s.downcase == 'socks'
                                      Severity: Major
                                      Found in lib/rex/payloads/meterpreter/config.rb - About 40 mins to fix

                                        Consider simplifying this complex logical expression.
                                        Open

                                            if key && key[:key] && key[:type] && encrypt_flags == key[:type] && (encrypt_flags == ENC_FLAG_AES128 || encrypt_flags == ENC_FLAG_AES256)
                                              iv = data[0, AES_IV_SIZE]
                                              aes_decrypt(key[:key], iv, data[iv.length..-1])
                                            else
                                              data
                                        Severity: Major
                                        Found in lib/rex/post/meterpreter/packet.rb - About 40 mins to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language