rapid7/metasploit-framework

View on GitHub

Showing 7,361 of 22,177 total issues

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

  def initialize(info={})
    super(update_info(info,
      'Name'                => 'Adobe Flash opaqueBackground Use After Free',
      'Description'         => %q{
        This module exploits an use after free on Adobe Flash Player. The vulnerability,
Severity: Major
Found in modules/exploits/multi/browser/adobe_flash_opaque_background_uaf.rb - About 3 hrs to fix

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

      def initialize(info={})
        super(update_info(info,
          'Name'                => 'Adobe Flash Player NetConnection Type Confusion',
          'Description'         => %q{
            This module exploits a type confusion vulnerability in the NetConnection class on

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

        def initialize(info = {})
          super(update_info(info,
            'Name'           => 'Sun Solaris sadmind adm_build_path() Buffer Overflow',
            'Description'    => %q{
                This module exploits a buffer overflow vulnerability in adm_build_path()
      Severity: Major
      Found in modules/exploits/solaris/sunrpc/sadmind_adm_build_path.rb - About 3 hrs to fix

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

          def initialize(info = {})
            super(
              update_info(
                info,
                'Name' => 'Cisco AnyConnect Privilege Escalations (CVE-2020-3153 and CVE-2020-3433)',
        Severity: Major
        Found in modules/exploits/windows/local/anyconnect_lpe.rb - About 3 hrs to fix

          Method exploit has 80 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)
              aspx_b64 = Rex::Text.encode_base64(aspx)
          Severity: Major
          Found in modules/exploits/windows/http/avaya_ccr_imageupload_exec.rb - About 3 hrs to fix

            Method prtg_create_notification has 80 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              def prtg_create_notification(cmd)
                uri = datastore['URI']
            
                begin
                  res = send_request_cgi({
            Severity: Major
            Found in modules/exploits/windows/http/prtg_authenticated_rce.rb - About 3 hrs to fix

              Method parse_listing has 80 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                def parse_listing(response, directory)
                  result = { 'name' => '', 'date' => '', 'size' => '', 'type' => '' }
                  i = 0
              
                  begin
              Severity: Major
              Found in modules/exploits/windows/nimsoft/nimcontroller_bof.rb - About 3 hrs to fix

                Method decrypt_trigger_decrypt has 80 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  def decrypt_trigger_decrypt(org_file, new_file, temp_file)
                    [org_file, new_file, temp_file].each do |f|
                      f.insert(0, @paths['ff'])
                    end
                
                
                Severity: Major
                Found in modules/post/multi/gather/firefox_creds.rb - About 3 hrs to fix

                  Method build_account_map has 80 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    def build_account_map
                      profiles = user_profiles
                      account_map = {}
                  
                      profiles.each do |user_profile|
                  Severity: Major
                  Found in modules/post/multi/gather/lastpass_creds.rb - About 3 hrs to fix

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

                      def run
                        # Log file variables
                        host = session.session_host
                        port = session.session_port
                        filenameinfo = '_' + ::Time.now.strftime('%Y%m%d.%M%S')    # Create Filename info to be appended to downloaded files
                    Severity: Major
                    Found in modules/post/windows/capture/lockout_keylogger.rb - About 3 hrs to fix

                      Method interval_collect has 80 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        def interval_collect(opts)
                          request = Packet.create_request(COMMAND_ID_ANDROID_INTERVAL_COLLECT)
                          request.add_tlv(TLV_TYPE_COLLECT_ACTION, COLLECT_ACTIONS[opts[:action]])
                          request.add_tlv(TLV_TYPE_COLLECT_TYPE, COLLECT_TYPES[opts[:type]])
                          request.add_tlv(TLV_TYPE_COLLECT_TIMEOUT, opts[:timeout])
                      Severity: Major
                      Found in lib/rex/post/meterpreter/extensions/android/android.rb - About 3 hrs to fix

                        Method get_sysinfo has 80 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                                def get_sysinfo
                                  system_data = {}
                                  etc_files = cmd_exec('ls /etc').split
                        
                                  kernel_version = cmd_exec('uname -a')
                        Severity: Major
                        Found in lib/msf/core/post/linux/system.rb - About 3 hrs to fix

                          Identical blocks of code found in 2 locations. Consider refactoring.
                          Open

                            def generate(opts={})
                              ds = opts[:datastore] || datastore
                              conf = {
                                ssl:  opts[:ssl] || false,
                                host: ds['LHOST'] || '127.127.127.127',
                          Severity: Major
                          Found in lib/msf/core/payload/windows/x64/reverse_win_http_x64.rb and 1 other location - About 3 hrs to fix
                          lib/msf/core/payload/windows/reverse_win_http.rb on lines 28..54

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 113.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Identical blocks of code found in 2 locations. Consider refactoring.
                          Open

                            def generate(opts={})
                              ds = opts[:datastore] || datastore
                              conf = {
                                ssl:  opts[:ssl] || false,
                                host: ds['LHOST'] || '127.127.127.127',
                          Severity: Major
                          Found in lib/msf/core/payload/windows/reverse_win_http.rb and 1 other location - About 3 hrs to fix
                          lib/msf/core/payload/windows/x64/reverse_win_http_x64.rb on lines 29..55

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 113.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

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

                            def run_host(ip)
                              begin
                                snmp = connect_snmp
                                print_good("#{ip}, Connected.\n")
                          
                          
                          Severity: Major
                          Found in modules/auxiliary/scanner/snmp/cnpilot_r_snmp_loot.rb - About 3 hrs to fix

                            Method enum_version has 79 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                              def enum_version(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_version.rb - About 3 hrs to fix

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

                                def initialize(info = {})
                                  super(merge_info(info,
                                    'Name'          => 'Linux Command Shell, Reverse TCP Inline',
                                    'Version'       => '',
                                    'Description'   => 'Connect to target and spawn a command shell',
                              Severity: Major
                              Found in modules/payloads/singles/linux/armle/shell_bind_tcp.rb - About 3 hrs to fix

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

                                  def initialize(info = {})
                                    super(update_info(info,
                                      'Name'        => 'Xymon useradm Command Execution',
                                      'Description' => %q{
                                        This module exploits a command injection vulnerability in Xymon
                                Severity: Major
                                Found in modules/exploits/unix/webapp/xymon_useradm_cmd_exec.rb - About 3 hrs to fix

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

                                    def initialize(info = {})
                                      super(update_info(info,
                                        'Name' => 'MediaWiki Thumb.php Remote Command Execution',
                                        'Description' => %q{
                                          MediaWiki 1.22.x before 1.22.2, 1.21.x before 1.21.5 and 1.19.x before 1.19.11,
                                  Severity: Major
                                  Found in modules/exploits/multi/http/mediawiki_thumb.rb - About 3 hrs to fix

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

                                      def initialize(info={})
                                        super(update_info(info,
                                          'Name'                => 'Adobe Flash Player ShaderJob Buffer Overflow',
                                          'Description'         => %q{
                                            This module exploits a buffer overflow vulnerability related to the ShaderJob workings on
                                    Severity: Major
                                    Found in modules/exploits/multi/browser/adobe_flash_shader_job_overflow.rb - About 3 hrs to fix
                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language