hackedteam/vector-exploit

View on GitHub

Showing 389 of 389 total issues

Function stage4 has 93 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function stage4(memobj, rce, libc, libwebcore, addr) {
    ENABLE_DEBUG && INFO("> [ Stage 4 ]");

    var system = libc.requiresymbol("system");
    var fopen  = libc.requiresymbol("fopen");
Severity: Major
Found in src/ht-webkit-Android4-src/precompiled/debug/stage4.js - About 3 hrs to fix

    Function stage4 has 93 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function stage4(memobj, rce, libc, libwebcore, addr) {
        ENABLE_DEBUG && INFO("> [ Stage 4 ]");
    
        var system = libc.requiresymbol("system");
        var fopen  = libc.requiresymbol("fopen");
    Severity: Major
    Found in src/ht-webkit-Android4-src/src/stage4.js - About 3 hrs to fix

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

                              if len(gadgets_retrieved) != 9:
                                  firstStageSuccessful = False
                                  ExploitHTTPHandler.send_empty_reply()
                                  
                                  logging.debug('Not enough gadgets {} '.format( len(gadgets_retrieved) ) )
      Severity: Major
      Found in src/ht-webkit-Android23/webkit_rc3_plus_tea.py and 1 other location - About 3 hrs to fix
      src/ht-webkit-Android23/webkit_rc3_plus_tea.py on lines 1274..1280

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

      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

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

                              if len(gadgets_retrieved) != 6:
                                  firstStageSuccessful = False
                                  ExploitHTTPHandler.send_empty_reply()
      
                                  logging.debug('Not enough gadgets {}'.format( len(gadgets_retrieved) ) )
      Severity: Major
      Found in src/ht-webkit-Android23/webkit_rc3_plus_tea.py and 1 other location - About 3 hrs to fix
      src/ht-webkit-Android23/webkit_rc3_plus_tea.py on lines 1321..1328

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

      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

      Function __init__ has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
      Open

          def __init__(self, file):
              numcoders = self._read64Bit(file)
              self.coders = []
              self.digestdefined = False
              totalin = 0
      Severity: Minor
      Found in ht-2013-003-Powerpoint/pylzma.egg/py7zlib.py - About 3 hrs to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

      Function __init__ has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
      Open

          def __init__(self, file):
              numcoders = self._read64Bit(file)
              self.coders = []
              self.digestdefined = False
              totalin = 0
      Severity: Minor
      Found in ht-2013-002-Word/pylzma.egg/py7zlib.py - About 3 hrs to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

      Function __init__ has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
      Open

          def __init__(self, file):
              numcoders = self._read64Bit(file)
              self.coders = []
              self.digestdefined = False
              totalin = 0
      Severity: Minor
      Found in ht-2013-004-IE/pylzma.egg/py7zlib.py - About 3 hrs to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

      Function initsymtab has 76 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      ELFObject.prototype.initsymtab = function () {
          
          var phdr = this.addr + this.memobj.read32(this.addr + 28);
          
          var phnum = this.memobj.read16(this.addr + 44);
      Severity: Major
      Found in src/ht-webkit-Android4-src/precompiled/debug/script.js - About 3 hrs to fix

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

        def random_id(length):
            number = '0123456789'
            alpha = 'abcdefghijklmnopqrstuvwxyz'
            id = ''
            for i in range(0,length,2):
        Severity: Major
        Found in ht-2013-002-Word/exploit.py and 3 other locations - About 3 hrs to fix
        ht-2013-003-Powerpoint/exploit.py on lines 15..22
        src/exploit_vps/html/admin/2013-002-Word/exploit.py on lines 15..22
        src/exploit_vps/html/admin/2013-003-PowerPoint/exploit.py on lines 15..22

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

        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 4 locations. Consider refactoring.
        Open

        def random_id(length):
            number = '0123456789'
            alpha = 'abcdefghijklmnopqrstuvwxyz'
            id = ''
            for i in range(0,length,2):
        Severity: Major
        Found in src/exploit_vps/html/admin/2013-003-PowerPoint/exploit.py and 3 other locations - About 3 hrs to fix
        ht-2013-002-Word/exploit.py on lines 15..22
        ht-2013-003-Powerpoint/exploit.py on lines 15..22
        src/exploit_vps/html/admin/2013-002-Word/exploit.py on lines 15..22

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

        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 4 locations. Consider refactoring.
        Open

        def random_id(length):
            number = '0123456789'
            alpha = 'abcdefghijklmnopqrstuvwxyz'
            id = ''
            for i in range(0,length,2):
        Severity: Major
        Found in src/exploit_vps/html/admin/2013-002-Word/exploit.py and 3 other locations - About 3 hrs to fix
        ht-2013-002-Word/exploit.py on lines 15..22
        ht-2013-003-Powerpoint/exploit.py on lines 15..22
        src/exploit_vps/html/admin/2013-003-PowerPoint/exploit.py on lines 15..22

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

        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 4 locations. Consider refactoring.
        Open

        def random_id(length):
            number = '0123456789'
            alpha = 'abcdefghijklmnopqrstuvwxyz'
            id = ''
            for i in range(0,length,2):
        Severity: Major
        Found in ht-2013-003-Powerpoint/exploit.py and 3 other locations - About 3 hrs to fix
        ht-2013-002-Word/exploit.py on lines 15..22
        src/exploit_vps/html/admin/2013-002-Word/exploit.py on lines 15..22
        src/exploit_vps/html/admin/2013-003-PowerPoint/exploit.py on lines 15..22

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

        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

        Function createstage1layout has 74 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function createstage1layout(base, documentarea) {
            // Note that the NULLs can actually be removed, they are in place
            // just as a reminder NOT to change them and to make layout_check
            // complain if they are redefined
        
        
        Severity: Major
        Found in src/ht-webkit-Android4-src/precompiled/debug/script.js - About 2 hrs to fix

          Function gadget1_slowsearch has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
          Open

          function gadget1_slowsearch(libwebcore, memobj, node) {
              node.obj.nodeValue = "gadget1_slowsearch";
              var m_data = memobj.read32(node.addr + node.dataoffset);
              var oldaddr = memobj.read32(m_data + 8);
              var oldlen = memobj.read32(m_data + 4);
          Severity: Minor
          Found in src/ht-webkit-Android4-src/precompiled/debug/script.js - About 2 hrs to fix

          Cognitive Complexity

          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

          A method's cognitive complexity is based on a few simple rules:

          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
          • Code is considered more complex for each "break in the linear flow of the code"
          • Code is considered more complex when "flow breaking structures are nested"

          Further reading

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

                      elif path == '/js_lib.js':
                          data = open('tea_compressed.js', 'r').read()
                          logging.debug('Sending tea_compressed.js')
                          self.send_response(200)
                          self.send_header('Content-type', 'application/javascript')
          Severity: Major
          Found in src/ht-webkit-Android23/webkit_rc3_plus_tea.py and 1 other location - About 2 hrs to fix
          src/ht-webkit-Android23/webkit_rc3_plus_tea.py on lines 1695..1701

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

          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

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

                      elif path == '/fp.png':
                          data = open('fp.png', 'r').read()
                          logging.debug('Sending fp.png')
                          self.send_response(200)
                          self.send_header('Content-type', 'image/png')
          Severity: Major
          Found in src/ht-webkit-Android23/webkit_rc3_plus_tea.py and 1 other location - About 2 hrs to fix
          src/ht-webkit-Android23/webkit_rc3_plus_tea.py on lines 1703..1709

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

          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

          @app.route(PREFIX + '/log/error', methods=['POST'])
          def log_error():
              info = request.form["logdata"].rstrip()
              do_log("EXPLOIT ERROR: {}".format(info))
              return "", 200
          Severity: Major
          Found in src/ht-webkit-Android4-src/precompiled/debug/debugserver.py and 1 other location - About 2 hrs to fix
          src/ht-webkit-Android4-src/src/debugserver.py on lines 152..156

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

          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 nocache(s):
              """
              Builds a response that tells the client never to cache the page with
              the specified string output.
              """
          Severity: Major
          Found in src/ht-webkit-Android4-src/precompiled/debug/debugserver.py and 1 other location - About 2 hrs to fix
          src/ht-webkit-Android4-src/src/debugserver.py on lines 26..37

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

          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 nocache(s):
              """
              Builds a response that tells the client never to cache the page with
              the specified string output.
              """
          Severity: Major
          Found in src/ht-webkit-Android4-src/src/debugserver.py and 1 other location - About 2 hrs to fix
          src/ht-webkit-Android4-src/precompiled/debug/debugserver.py on lines 66..77

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

          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

          @app.route(PREFIX + '/stage4.js')
          def stage4_js_serve():
              magic = request.args.get('trk')
              resp = nocache(stage4_js(magic))
          
          
          Severity: Major
          Found in src/ht-webkit-Android4-src/src/debugserver.py and 1 other location - About 2 hrs to fix
          src/ht-webkit-Android4-src/precompiled/debug/debugserver.py on lines 172..178

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

          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

          Severity
          Category
          Status
          Source
          Language