rapid7/metasploit-framework

View on GitHub

Showing 15,831 of 21,886 total issues

Method trigger has 28 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  def trigger
    data = {
      type: 'kafka',
      spec: {
        type: 'kafka',
Severity: Minor
Found in modules/exploits/multi/http/apache_druid_cve_2023_25194.rb - About 1 hr to fix

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

      def exploit
        p = Rex::Text.encode_base64(payload.encoded)
        header = rand_text_alpha_upper(3)
        header_append = rand_text_alpha_upper(4)
    
    
    Severity: Minor
    Found in modules/exploits/multi/http/pmwiki_pagelist.rb - About 1 hr to fix

      Method check_password_manager_pro has 28 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        def check_password_manager_pro
          res = send_request_cgi({
                                     'uri' => normalize_uri("PassTrixMain.cc"),
                                     'method' => 'GET'
                                 })
      Severity: Minor
      Found in modules/exploits/multi/http/manage_engine_dc_pmp_sqli.rb - About 1 hr to fix

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

          def initialize(info = {})
            super(update_info(info,
              'Name'           => 'Werkzeug Debug Shell Command Execution',
              'Description'    => %q{
                This module will exploit the Werkzeug debug console to put down a
        Severity: Minor
        Found in modules/exploits/multi/http/werkzeug_debug_rce.rb - About 1 hr to fix

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

            def exploit
              uri = target_uri.path
          
              peer = "#{rhost}:#{rport}"
              payload_name = Rex::Text.rand_text_alpha(rand(10) + 5) + '.php'
          Severity: Minor
          Found in modules/exploits/multi/http/apprain_upload_exec.rb - About 1 hr to fix

            Method check has 28 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              def check
                self.cookie = splunk_login(datastore['USERNAME'], datastore['PASSWORD'])
                fail_with(Failure::NoAccess, 'Authentication Failed') unless cookie
            
                res = send_request_cgi({

              Method change_response_writer has 28 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                def change_response_writer(core, verb: 'update')
                  # the new config in JSON format
                  enable_params_resource_loader = {
                    "#{verb}-queryresponsewriter": {
                      startup: 'lazy',
              Severity: Minor
              Found in modules/exploits/multi/http/solr_velocity_rce.rb - About 1 hr to fix

                Method send_query_api has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  def send_query_api(command:, cookie: nil, vars: {}, multipart: false, timeout: 20)
                    opts = {
                      'uri' => normalize_uri(target_uri.path, 'WebInterface/function/'),
                      'method' => 'POST'
                    }
                Severity: Minor
                Found in modules/exploits/multi/http/crushftp_rce_cve_2023_43177.rb - About 1 hr to fix

                  Method get_password_hash has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    def get_password_hash
                      # attempt a sqli.
                      vprint_status('Attempting to use SQL injection to grab the password hash for the superadmin user...')
                  
                      # SQL injection question to fetch the admin password

                    Method send_payload has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                      def send_payload
                        @bd = rand_text_alpha(8+rand(8))
                        fn  = rand_text_alpha(8+rand(8))
                        un  = rand_text_alpha(8+rand(8))
                        pn  = rand_text_alpha(8+rand(8))
                    Severity: Minor
                    Found in modules/exploits/multi/http/rails_dynamic_render_code_exec.rb - About 1 hr to fix

                      Method include_theme has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        def include_theme(shell_name, cookie)
                          uri = normalize_uri(datastore['TARGETURI'], 'wp-admin', 'post-new.php')
                          res = send_request_cgi(
                            'method'   => 'POST',
                            'uri'      => uri,
                      Severity: Minor
                      Found in modules/exploits/multi/http/wp_crop_rce.rb - About 1 hr to fix

                        Method upload_shell has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                          def upload_shell(cookie)
                            post_data = Rex::MIME::Message.new
                            post_data.add_part(create_zip_file, 'archive/zip', nil, "form-data; name=\"modulefile\"; filename=\"#{@plugin_name}.zip\"")
                            post_data.add_part("#{Rex::Text.rand_text_alpha_upper(4)}", nil, nil, "form-data; name=\"install_upload\"")
                            data = post_data.to_s
                        Severity: Minor
                        Found in modules/exploits/multi/http/atutor_sqli.rb - About 1 hr to fix

                          Method check has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              def check
                                  vprint_status("#{rhost}:#{rport} Checking for vulnerable JBoss Seam 2")
                                  uri = target_uri.path
                                  res = send_request_cgi(
                                  {
                          Severity: Minor
                          Found in modules/exploits/multi/http/jboss_seam_upload_exec.rb - About 1 hr to fix

                            Method sign_in has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                def sign_in(username, password)
                                  @http_client.cookie_jar.clear
                            
                                  sign_in_path = '/users/sign_in'
                                  csrf_token = extract_csrf_token(
                            Severity: Minor
                            Found in modules/exploits/multi/http/gitlab_file_read_rce.rb - About 1 hr to fix

                              Method ndmp_connect has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                def ndmp_connect
                                  print_status('Connecting to BE Agent service')
                                  ndmp_msg = nil
                                  begin
                                    ndmp_sock = NDMP::Socket.new(connect)
                              Severity: Minor
                              Found in modules/exploits/multi/veritas/beagent_sha_auth_rce.rb - About 1 hr to fix

                                Method sha_authentication has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                  def sha_authentication(ndmp_sock)
                                    print_status('Passing SHA authentication')
                                    ndmp_msg = ndmp_sock.do_request_response(
                                      NDMP::Message.new_request(
                                        NDMP_CONFIG_GET_AUTH_ATTR,
                                Severity: Minor
                                Found in modules/exploits/multi/veritas/beagent_sha_auth_rce.rb - About 1 hr to fix

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

                                    def initialize(info={})
                                      super(update_info(info,
                                        'Name'           => "NodeJS Debugger Command Injection",
                                        'Description'    => %q{
                                          This module uses the "evaluate" request type of the NodeJS V8
                                  Severity: Minor
                                  Found in modules/exploits/multi/misc/nodejs_v8_debugger.rb - About 1 hr to fix

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

                                      def initialize(info = {})
                                        super(update_info(info,
                                          'Name'           => 'Eclipse Equinox OSGi Console Command Execution',
                                          'Description'    => %q{
                                            Exploit Eclipse Equinox OSGi (Open Service Gateway initiative) console
                                    Severity: Minor
                                    Found in modules/exploits/multi/misc/osgi_console_exec.rb - About 1 hr to fix

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

                                        def exploit
                                          connect_login
                                      
                                          # NOTE:
                                          # This exploit jumps to edi, which happens to point at a partial version of
                                      Severity: Minor
                                      Found in modules/exploits/windows/ftp/easyftp_list_fixret.rb - About 1 hr to fix

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

                                          def initialize(info = {})
                                            super(update_info(info,
                                              'Name'           => 'Energizer DUO USB Battery Charger Arucer.dll Trojan Code Execution',
                                              'Description'    => %q{
                                                  This module will execute an arbitrary payload against
                                        Severity: Minor
                                        Found in modules/exploits/windows/backdoor/energizer_duo_payload.rb - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language