hackedteam/vector-exploit

View on GitHub

Showing 219 of 389 total issues

File slowaes.py has 475 lines of code (exceeds 250 allowed). Consider refactoring.
Open

#!/usr/bin/python
#
# aes.py: implements AES - Advanced Encryption Standard
# from the SlowAES project, http://code.google.com/p/slowaes/
#
Severity: Minor
Found in src/ht-webkit-Android4-src/ext/slowaes.py - About 7 hrs to fix

    Function stage2 has a Cognitive Complexity of 46 (exceeds 5 allowed). Consider refactoring.
    Open

    function stage2(page, base, iframe, xml, documentarea) {
        // Area available:
        // 0x3fff00 bytes starting at page.base (~4MB). Can't overwrite from pagebase+0x0 to pagebase+0x7.
        // page is aligned to 0x1000
    
    
    Severity: Minor
    Found in src/ht-webkit-Android4-src/precompiled/debug/script.js - About 7 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 stage2_overwrite has 173 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function stage2_overwrite(xsltobj, page, webcoretext) {
        
        var addr = page.base + 0x3000;
        var nobj = 0;
        var i;
    Severity: Major
    Found in src/ht-webkit-Android4-src/precompiled/debug/script.js - About 6 hrs to fix

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

          def __init__(self, file):
              self.numfiles = self._read64Bit(file)
              self.files = [{'emptystream': False} for x in xrange(self.numfiles)]
              numemptystreams = 0
              while True:
      Severity: Minor
      Found in ht-2013-003-Powerpoint/pylzma.egg/py7zlib.py - About 6 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 45 (exceeds 5 allowed). Consider refactoring.
      Open

          def __init__(self, file):
              self.numfiles = self._read64Bit(file)
              self.files = [{'emptystream': False} for x in xrange(self.numfiles)]
              numemptystreams = 0
              while True:
      Severity: Minor
      Found in ht-2013-002-Word/pylzma.egg/py7zlib.py - About 6 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 45 (exceeds 5 allowed). Consider refactoring.
      Open

          def __init__(self, file):
              self.numfiles = self._read64Bit(file)
              self.files = [{'emptystream': False} for x in xrange(self.numfiles)]
              numemptystreams = 0
              while True:
      Severity: Minor
      Found in ht-2013-004-IE/pylzma.egg/py7zlib.py - About 6 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 stage3 has 165 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function stage3 (memobj, webcoretext, node, addr, page) {
          INFO("> [ Stage 3 ]");
      
          // Find libwebcore.so ELF header
          var webcore_base = memobj.findimagebase(webcoretext);
      Severity: Major
      Found in src/ht-webkit-Android4-src/precompiled/debug/script.js - About 6 hrs to fix

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

            def __init__(self, file, password=None):
                self._file = file
                self.password = password
                self.header = file.read(len(MAGIC_7Z))
                if self.header != MAGIC_7Z:
        Severity: Minor
        Found in ht-2013-003-Powerpoint/pylzma.egg/py7zlib.py - About 5 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 39 (exceeds 5 allowed). Consider refactoring.
        Open

            def __init__(self, file, password=None):
                self._file = file
                self.password = password
                self.header = file.read(len(MAGIC_7Z))
                if self.header != MAGIC_7Z:
        Severity: Minor
        Found in ht-2013-002-Word/pylzma.egg/py7zlib.py - About 5 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 39 (exceeds 5 allowed). Consider refactoring.
        Open

            def __init__(self, file, password=None):
                self._file = file
                self.password = password
                self.header = file.read(len(MAGIC_7Z))
                if self.header != MAGIC_7Z:
        Severity: Minor
        Found in ht-2013-004-IE/pylzma.egg/py7zlib.py - About 5 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 onload has 142 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            iframe2.onload = function () {
            // Execute the rest of stage2()
            INFO("Document loaded.");
            var xml2 = iframe2.contentWindow.document;
            if (xml2 === undefined) {
        Severity: Major
        Found in src/ht-webkit-Android4-src/precompiled/debug/script.js - About 5 hrs to fix

          Function stage3_alternate has 134 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function stage3_alternate(memobj, node, addr, page, libwebcore, libc) {
              var gadgets = {};
          
              // Gadget 2 in libc
          
          
          Severity: Major
          Found in src/ht-webkit-Android4-src/precompiled/debug/script.js - About 5 hrs to fix

            File edn_build.py has 375 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            #!/usr/bin/env python
            
            import os
            import sys
            import copy
            Severity: Minor
            Found in src/ht-webkit-Android4-src/src/edn_build.py - About 5 hrs to fix

              Function initsymtab has a Cognitive Complexity of 33 (exceeds 5 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: Minor
              Found in src/ht-webkit-Android4-src/precompiled/debug/script.js - About 4 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 stage4 has a Cognitive Complexity of 32 (exceeds 5 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: Minor
              Found in src/ht-webkit-Android4-src/src/stage4.js - About 4 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 stage4 has a Cognitive Complexity of 32 (exceeds 5 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: Minor
              Found in src/ht-webkit-Android4-src/precompiled/debug/stage4.js - About 4 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 edn_build has 113 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              def edn_build(exploit_type, target_directory, ip, prefix, redirect, apk, expiry,
                            port=None, landing=None, script_name=None, stage4_name=None,
                            exploit_name=None, apk_name=None, key=None, fake_key=None,
                            module_name=None, debug_mode=False, outputfile=None,
                            serveraddr=None):
              Severity: Major
              Found in src/ht-webkit-Android4-src/src/edn_build.py - About 4 hrs to fix

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

                    def __init__(self, file, numfolders, folders):
                        self.digests = []
                        self.digestsdefined = []
                        id = file.read(1)
                        if id == PROPERTY_NUM_UNPACK_STREAM:
                Severity: Minor
                Found in ht-2013-003-Powerpoint/pylzma.egg/py7zlib.py - About 4 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 start_exp_server has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
                Open

                def start_exp_server(s):
                
                    logging.info('Starting exploit server')
                       
                        # Files whitelist (exploits)
                Severity: Minor
                Found in src/ht-webkit-Android23/exp_server.py - About 4 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 28 (exceeds 5 allowed). Consider refactoring.
                Open

                    def __init__(self, file, numfolders, folders):
                        self.digests = []
                        self.digestsdefined = []
                        id = file.read(1)
                        if id == PROPERTY_NUM_UNPACK_STREAM:
                Severity: Minor
                Found in ht-2013-002-Word/pylzma.egg/py7zlib.py - About 4 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

                Severity
                Category
                Status
                Source
                Language