rapid7/metasploit-framework

View on GitHub
modules/exploits/apple_ios/browser/webkit_trident.rb

Summary

Maintainability
D
2 days
Test Coverage

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

  def on_request_uri(cli, request)
    print_status("Request from #{request['User-Agent']}")
    if request.uri =~ %r{/loader32$}
      print_good("armle target is vulnerable.")
      local_file = File.join( Msf::Config.data_directory, "exploits", "CVE-2016-4655", "exploit32" )
Severity: Major
Found in modules/exploits/apple_ios/browser/webkit_trident.rb - About 1 day to fix

    File webkit_trident.rb has 331 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    class MetasploitModule < Msf::Exploit::Remote
      Rank = ManualRanking
    
      include Msf::Exploit::Remote::HttpServer::HTML
    
    
    Severity: Minor
    Found in modules/exploits/apple_ios/browser/webkit_trident.rb - About 3 hrs to fix

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

        def initialize(info = {})
          super(update_info(info,
            'Name'           => 'WebKit not_number defineProperties UAF',
            'Description'    => %q{
                This module exploits a UAF vulnerability in WebKit's JavaScriptCore library.
      Severity: Minor
      Found in modules/exploits/apple_ios/browser/webkit_trident.rb - About 1 hr to fix

        Similar blocks of code found in 5 locations. Consider refactoring.
        Open

                  ['CVE', '2016-4655'],
                  ['CVE', '2016-4656'],
                  ['CVE', '2016-4657'],
                  ['BID', '92651'],
                  ['BID', '92652'],
        Severity: Major
        Found in modules/exploits/apple_ios/browser/webkit_trident.rb and 4 other locations - About 50 mins to fix
        modules/exploits/linux/local/glibc_ld_audit_dso_load_priv_esc.rb on lines 61..74
        modules/exploits/multi/http/tomcat_mgr_deploy.rb on lines 36..59
        modules/exploits/multi/http/tomcat_mgr_upload.rb on lines 41..64
        modules/exploits/windows/fileformat/office_word_hta.rb on lines 37..50

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

        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

        There are no issues that match your filters.

        Category
        Status