rapid7/metasploit-framework

View on GitHub

Showing 15,831 of 21,886 total issues

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 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

                    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 exploit has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        def exploit
                      
                          page = Rex::Text.rand_text_alpha_upper(8) + ".jsp"
                      
                          fname = '../../../../../../../Progra~1/Novell/Tomcat/webapps/ROOT/'
                      Severity: Minor
                      Found in modules/exploits/windows/http/novell_imanager_upload.rb - About 1 hr to fix

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

                          def check
                            my_target = auto_target
                            token = auth(my_target)
                            # If we dont have a cookie that means authentication bypass issue has been patched on target system.
                            if token.nil?
                        Severity: Minor
                        Found in modules/exploits/windows/http/trendmicro_officescan_widget_exec.rb - About 1 hr to fix

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

                            def generate_shares(path)
                              share_name = @share_name
                              %Q|
                          <D:response xmlns:lp1="DAV:" xmlns:lp2="http://apache.org/dav/props/">
                          <D:href>#{path}#{share_name}/</D:href>
                          Severity: Minor
                          Found in modules/exploits/windows/http/cogent_datahub_command.rb - About 1 hr to fix

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

                              def retrieve_original_settings
                                res = send_request_cgi(
                                  {
                                    'uri' => normalize_uri(target_uri.path, 'api', 'json', 'admin', 'getServerSettings'),
                                    'method' => 'POST',

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

                                def check
                                  res = send_request_cgi({
                                    'uri' => normalize_uri(target_uri.path, 'Telerik.Web.UI.WebResource.axd'),
                                    'vars_get' => { 'type' => 'rau' }
                                  })
                              Severity: Minor
                              Found in modules/exploits/windows/http/telerik_rau_deserialization.rb - About 1 hr to fix

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

                                  def exploit
                                    # Get the sessionID and siLockLongTermInstID
                                    print_status('[01/11] Get the sessionID and siLockLongTermInstID')
                                    populate_token_instid
                                    # Allow Remote Access and Create new sysAd
                                Severity: Minor
                                Found in modules/exploits/windows/http/moveit_cve_2023_34362.rb - About 1 hr to fix

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

                                    def generate_shares(path)
                                      share_name = @share_name
                                      %Q|
                                  <D:response xmlns:lp1="DAV:" xmlns:lp2="http://apache.org/dav/props/">
                                  <D:href>#{path}#{share_name}/</D:href>
                                  Severity: Minor
                                  Found in modules/exploits/windows/http/sap_host_control_cmd_exec.rb - About 1 hr to fix

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

                                      def process_get(cli, request)
                                    
                                        myhost = (datastore['SRVHOST'] == '0.0.0.0') ? Rex::Socket.source_address(cli.peerhost) : datastore['SRVHOST']
                                        webdav = "\\\\#{myhost}\\"
                                    
                                    
                                    Severity: Minor
                                    Found in modules/exploits/windows/browser/webdav_dll_hijacker.rb - About 1 hr to fix

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

                                        def generate_shares(path)
                                          share_name = datastore['SHARENAME']
                                      %Q|
                                      <D:response xmlns:lp1="DAV:" xmlns:lp2="http://apache.org/dav/props/">
                                      <D:href>#{path}#{share_name}/</D:href>
                                      Severity: Minor
                                      Found in modules/exploits/windows/browser/webdav_dll_hijacker.rb - About 1 hr to fix

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

                                          def build_properties_class
                                            # Create the object
                                            object = Rex::Java::Serialization::Model::NewObject.new
                                            object.class_desc = Rex::Java::Serialization::Model::ClassDesc.new
                                        
                                        
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language