rapid7/metasploit-framework

View on GitHub

Showing 15,730 of 21,757 total issues

Method exploit has 27 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  def exploit

    print_status("Checking injection...")

    if check == Exploit::CheckCode::Vulnerable
Severity: Minor
Found in modules/exploits/multi/http/apache_roller_ognl_injection.rb - About 1 hr to fix

    Method upload_php? has 27 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      def upload_php?(login_token, shell_filename)
        vprint_status("Uploading PHP file #{shell_filename}")
        vars_form_data =
          [
            {
    Severity: Minor
    Found in modules/exploits/multi/http/cve_2023_38836_boidcms.rb - About 1 hr to fix

      Method exploit has 27 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        def exploit
          @proto = (ssl ? 'https' : 'http')
      
          if (!check.eql? Exploit::CheckCode::Vulnerable) && !datastore['ForceExploit']
            fail_with(Failure::NotVulnerable, 'The target is not exploitable.')
      Severity: Minor
      Found in modules/exploits/multi/http/apache_normalize_path_rce.rb - About 1 hr to fix

        Method exploit has 27 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          def exploit
            uri = normalize_uri(target_uri.path)
            payload_name = "#{rand_text_alpha(5)}.php"
        
            print_status("Trying to upload #{payload_name} to mma.php Backdoor")
        Severity: Minor
        Found in modules/exploits/multi/http/mma_backdoor_upload.rb - About 1 hr to fix

          Method ognl_append_file has 27 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            def ognl_append_file(payload_file, payload_chunk)
              data_header = datastore['HEADER'] + 'd'
              file_header = datastore['HEADER'] + 'f'
              headers = {
                "#{data_header}": payload_chunk,
          Severity: Minor
          Found in modules/exploits/multi/http/struts2_namespace_ognl.rb - About 1 hr to fix

            Method exploit has 27 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              def exploit
                session_id = login_bypass
                fail_with(Failure::NoAccess, 'Login bypass failed') unless session_id
            
                print_good('Login bypass successful')
            Severity: Minor
            Found in modules/exploits/multi/http/navigate_cms_rce.rb - About 1 hr to fix

              Method on_request_uri has 27 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                def on_request_uri(cli, request)
                  print_status("handling request for #{request.uri}")
              
                  case request.uri
                  when /\.jar$/i

                Method on_request_uri has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  def on_request_uri(cli, request)
                    print_status("handling request for #{request.uri}")
                
                    case request.uri
                    when /\.jar$/i
                Severity: Minor
                Found in modules/exploits/multi/browser/java_jre17_method_handle.rb - About 1 hr to fix

                  Method exploit has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    def exploit
                      print_status("Checking if the wp-config.php file already exists...")
                      tpath_wp_config = normalize_uri(datastore['TARGETURI'] + '/../wp-config.php')
                      response = send_request_cgi({ 'uri' => tpath_wp_config }, timeout = datastore['TIMEOUT'])
                  
                  
                  Severity: Minor
                  Found in modules/exploits/multi/php/wp_duplicator_code_inject.rb - About 1 hr to fix

                    Method create_function? has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                      def create_function?(language, func_name)
                        load_func = ''
                    
                        case language
                        when 'perl'
                    Severity: Minor
                    Found in modules/exploits/multi/postgres/postgres_createlang.rb - About 1 hr to fix

                      Method on_request_uri has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        def on_request_uri(cli, request)
                          print_status("handling request for #{request.uri}")
                      
                          case request.uri
                          when /\.jar$/i
                      Severity: Minor
                      Found in modules/exploits/multi/browser/java_jre17_jmxbean.rb - About 1 hr to fix

                        Method execute_command has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                          def execute_command(cmd, opts = {})
                            target = select_target
                            case target['Platform']
                            when 'linux'
                              cmd = Rex::Text.to_hex(cmd, '')

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

                            def initialize(info = {})
                              super(update_info(info,
                                'Name'           => 'Watchguard XCS FixCorruptMail Local Privilege Escalation',
                                'Description'    => %q{
                                  This module exploits a vulnerability in the Watchguard XCS 'FixCorruptMail' script called
                          Severity: Minor
                          Found in modules/exploits/freebsd/local/watchguard_fix_corrupt_mail.rb - About 1 hr to fix

                            Method exploit has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                              def exploit
                            
                                # New installations use a randomly generated suffix like "lyris629dAe536F"
                                pass = nil
                            
                            
                            Severity: Minor
                            Found in modules/exploits/windows/mssql/lyris_listmanager_weak_pass.rb - About 1 hr to fix

                              Method authenticate has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                def authenticate(username, password)
                                  res = send_request_cgi(
                                    'uri'       => '/admin_loginok.html',
                                    'method'    => 'POST',
                                    'vars_post' => {
                              Severity: Minor
                              Found in modules/exploits/windows/ftp/wing_ftp_admin_exec.rb - About 1 hr to fix

                                Method exploit has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                  def exploit
                                    if is_system?
                                      fail_with(Failure::None, 'Session is already elevated')
                                    end
                                
                                
                                Severity: Minor
                                Found in modules/exploits/windows/local/cve_2017_8464_lnk_lpe.rb - About 1 hr to fix

                                  Method get_directories has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                    def get_directories(payload_filepath, targetedDirectories)
                                      directoryNames = []
                                      findFileDataSize = 592
                                      maxPath = client.railgun.const('MAX_PATH')
                                      fileNamePadding = 44
                                  Severity: Minor
                                  Found in modules/exploits/windows/local/bypassuac_injection_winsxs.rb - About 1 hr to fix

                                    Method exploit has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                      def exploit
                                    
                                        page  = rand_text_alpha_upper(rand(10) + 1) + ".jsp"
                                    
                                        dbl = Rex::MIME::Message.new
                                    Severity: Minor
                                    Found in modules/exploits/windows/http/coldfusion_fckeditor.rb - About 1 hr to fix

                                      Method trigger_urlclassloader has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                        def trigger_urlclassloader
                                          # Here we construct a XSLT transform to load a Java payload via URLClassLoader.
                                          url = get_uri
                                      
                                          vars = Rex::RandomIdentifier::Generator.new({ language: :java })

                                        Method fingerprint has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                          def fingerprint
                                        
                                            res = download_log(rand_text_alphanumeric(12) + '.txt')
                                            return if not res
                                        
                                        
                                        Severity: Minor
                                        Found in modules/exploits/windows/http/trackercam_phparg_overflow.rb - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language