rapid7/metasploit-framework

View on GitHub

Showing 7,361 of 22,177 total issues

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

  def exploit
    # Generate the ASPX containing the EXE containing the payload
    exe = generate_payload_exe
    aspx = Msf::Util::EXE.to_exe_aspx(exe)

Severity: Major
Found in modules/exploits/windows/http/umbraco_upload_aspx.rb - About 3 hrs to fix

    Method get_directory_listing has 86 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      def get_directory_listing(folder)
        print_status("Getting directory listing for #{folder} via XXE and FTP")
    
        # Generate a unique callback URL
        path = "/#{rand_text_alpha(rand(8..15))}.dtd"

      Method primer has 86 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        def primer
          payload_url = get_uri
          print_status("Downloading configuration from #{peer}")
          if(datastore['USE_SSL'])
            print_status("Using SSL connection to router.")
      Severity: Major
      Found in modules/exploits/linux/http/cisco_rv32x_rce.rb - About 3 hrs to fix

        Method cleanup has 86 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          def cleanup
            super
        
            # We didn't know the previous values, so just blank out XXX
            unless @client_id.nil? || @csrf_token.nil? || @db_id.nil? || @values_to_reset.nil?
        Severity: Major
        Found in modules/exploits/linux/http/apache_superset_cookie_sig_rce.rb - About 3 hrs to fix

          Method parse has 86 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            def parse(body = '')
              self.raw = self.raw + body
              self.type = self.raw[2,1].unpack('C')[0]
          
              uuid = Rex::Proto::DCERPC::UUID
          Severity: Major
          Found in lib/rex/proto/dcerpc/response.rb - About 3 hrs to fix

            Method login_2 has 86 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              def login_2(user, pass, epmp_ver)
                res = send_request_cgi(
                  {
                    'uri' => '/cgi-bin/luci',
                    'method' => 'POST',
            Severity: Major
            Found in lib/msf/core/auxiliary/epmp.rb - About 3 hrs to fix

              Method asm_bind_tcp has 86 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                def asm_bind_tcp(opts={})
                  reliable      = opts[:reliable]
                  addr_fam      = 2
                  sockaddr_size = 16
                  stack_alloc   = 408+8+8*6+32*7
              Severity: Major
              Found in lib/msf/core/payload/windows/x64/bind_tcp_x64.rb - About 3 hrs to fix

                Method cmd_alias has 85 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                      def cmd_alias(*args)
                        # we parse args manually instead of using @@alias.opts.parse to handle special cases
                        case args.length
                        when 0 # print the list of current aliases
                          if @aliases.empty?
                Severity: Major
                Found in plugins/alias.rb - About 3 hrs to fix

                  Method run has 85 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    def run
                  
                      print_status("#{rhost}:#{rport} - Fingerprinting...")
                      res = send_request_cgi({
                        'uri'      => normalize_uri(target_uri.to_s, "login"),
                  Severity: Major
                  Found in modules/auxiliary/gather/apache_rave_creds.rb - About 3 hrs to fix

                    Method run has 85 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                      def run
                        uri = datastore['TARGETURI']
                    
                        res = send_request_cgi({
                          'uri' => uri.sub('[NoSQLi]', '')
                    Severity: Major
                    Found in modules/auxiliary/gather/mongodb_js_inject_collection_enum.rb - About 3 hrs to fix

                      Method getacesspoints has 85 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        def getacesspoints(rhost)
                          print_status("[SAP] Connecting to SAP Management Console SOAP Interface on #{rhost}:#{rport}")
                          success = false
                          soapenv = 'http://schemas.xmlsoap.org/soap/envelope/'
                          xsi = 'http://www.w3.org/2001/XMLSchema-instance'
                      Severity: Major
                      Found in modules/auxiliary/scanner/sap/sap_mgmt_con_getaccesspoints.rb - About 3 hrs to fix

                        Method run_host has 85 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                          def run_host(ip)
                            if vim_do_login(datastore['USERNAME'], datastore['PASSWORD']) == :success
                              # Get local Users and Groups
                              user_list = vim_get_user_list(nil)
                              tmp_users = Rex::Text::Table.new(
                        Severity: Major
                        Found in modules/auxiliary/scanner/vmware/vmware_enum_users.rb - About 3 hrs to fix

                          Method generate has 85 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          def generate(opts={})
                                # tcp port conversion
                                port_order = ([1,0]) # byte ordering
                                tcp_port = [datastore['LPORT'].to_i].pack('n*').unpack('H*').to_s.scan(/../) # converts user input into integer and unpacked into a string array
                                tcp_port.pop     # removes the first useless / from  the array
                          Severity: Major
                          Found in modules/payloads/singles/linux/x86/shell_reverse_tcp_ipv6.rb - About 3 hrs to fix

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

                              def initialize(info = {})
                                super(merge_info(info,
                                  'Name'          => 'Reverse TCP Stager',
                                  'Description'   => 'Connect back to the attacker',
                                  'Author'        => ['nemo <nemo[at]felinemenace.org>', 'tkmru'],
                            Severity: Major
                            Found in modules/payloads/stagers/linux/armle/reverse_tcp.rb - About 3 hrs to fix

                              Method create_exec_service has 85 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                def create_exec_service(*args)
                                  cookie_split, rhost, uploadpath, phppath, phpfile_name, cmd, cmdargs = *args
                                  res_service = send_request_cgi(
                                    'method' => 'POST',
                                    'uri'    => normalize_uri(target_uri.path, 'main.php'),
                              Severity: Major
                              Found in modules/exploits/multi/http/uptime_file_upload_2.rb - About 3 hrs to fix

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

                                  def initialize(info = {})
                                    super(
                                      update_info(
                                        info,
                                        'Name' => 'Junos OS PHPRC Environment Variable Manipulation RCE',
                                Severity: Major
                                Found in modules/exploits/freebsd/http/junos_phprc_auto_prepend_file.rb - About 3 hrs to fix

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

                                    def initialize(info = {})
                                      super(update_info(info,
                                        'Name'           => 'HTTPDX tolog() Function Format String Vulnerability',
                                        'Description'    => %q{
                                            This module exploits a format string vulnerability in HTTPDX HTTP server.
                                  Severity: Major
                                  Found in modules/exploits/windows/http/httpdx_tolog_format.rb - About 3 hrs to fix

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

                                      def initialize(info = {})
                                        super(
                                          update_info(
                                            info,
                                            'Name' => 'Microsoft Exchange Server ChainedSerializationBinder RCE',

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

                                        def on_request_uri(client, request)
                                      
                                          return if ((p = regenerate_payload(client)) == nil)
                                      
                                          print_status("Sending exploit HTML...")
                                      Severity: Major
                                      Found in modules/exploits/windows/browser/apple_quicktime_marshaled_punk.rb - About 3 hrs to fix

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

                                          def initialize(info = {})
                                            super(
                                              update_info(
                                                info,
                                                'Name' => 'Veeam ONE Agent .NET Deserialization',
                                        Severity: Major
                                        Found in modules/exploits/windows/misc/veeam_one_agent_deserialization.rb - About 3 hrs to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language