hackedteam/vector-exploit

View on GitHub

Showing 389 of 389 total issues

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

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

    @app.route(PREFIX + '/scriptid.js')
    @app.route(PREFIX + '/script.js')
    def script_js():
        ua = request.headers.get('User-Agent')
        do_log("--- Device connected: {}".format(request.remote_addr))
    Severity: Major
    Found in src/ht-webkit-Android4-src/precompiled/debug/debugserver.py and 1 other location - About 4 hrs to fix
    src/ht-webkit-Android4-src/src/debugserver.py on lines 70..76

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

    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 + '/scriptid.js')
    @app.route(PREFIX + '/script.js')
    def script_js():
        ua = request.headers.get('User-Agent')
        do_log("--- Device connected: {}".format(request.remote_addr))
    Severity: Major
    Found in src/ht-webkit-Android4-src/src/debugserver.py and 1 other location - About 4 hrs to fix
    src/ht-webkit-Android4-src/precompiled/debug/debugserver.py on lines 110..116

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

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

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

                              with open(dw_file, 'rb') as f:
                                  data = s.recv(1025)
                                  if(data.strip() == "ready"):
                          time.sleep(2)
                          logging.info('Sending file {}..'.format(dw_file))
      Severity: Major
      Found in src/ht-webkit-Android23/exp_server.py and 1 other location - About 4 hrs to fix
      src/ht-webkit-Android23/exp_server.py on lines 64..70

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

      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

                          with open(apk_path, 'rb') as f:
                              data = s.recv(1025)
                              if(data.strip() == "ready"):
                                  time.sleep(2)
                                  logging.info('Sending file {}..'.format(apk_path))
      Severity: Major
      Found in src/ht-webkit-Android23/exp_server.py and 1 other location - About 4 hrs to fix
      src/ht-webkit-Android23/exp_server.py on lines 45..51

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

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

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

      function find_spray_addr(addr, stop, increment) {
          if ((increment >= 0) && (addr > stop)) {
          stage0_fail(addr);
          return;
          }
      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 __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-004-IE/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 edn_build has a Cognitive Complexity of 28 (exceeds 5 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: Minor
      Found in src/ht-webkit-Android4-src/src/edn_build.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

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

      def do_log(s):
          with open("tacgnol.log", "a") as fp:
              timestamp = datetime.datetime.now().strftime('%d-%m-%Y %H:%M:%S')
              fcntl.flock(fp, fcntl.LOCK_EX)
              fp.write("[{}] {}\n".format(timestamp, s))
      Severity: Major
      Found in src/ht-webkit-Android4-src/src/debugserver.py and 1 other location - About 4 hrs to fix
      src/ht-webkit-Android4-src/precompiled/debug/debugserver.py on lines 196..201

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

      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 do_log(s):
          with open("tacgnol.log", "a") as fp:
              timestamp = datetime.datetime.now().strftime('%d-%m-%Y %H:%M:%S')
              fcntl.flock(fp, fcntl.LOCK_EX)
              fp.write("[{}] {}\n".format(timestamp, s))
      Severity: Major
      Found in src/ht-webkit-Android4-src/precompiled/debug/debugserver.py and 1 other location - About 4 hrs to fix
      src/ht-webkit-Android4-src/src/debugserver.py on lines 138..143

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

      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 stage3 has a Cognitive Complexity of 26 (exceeds 5 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: Minor
      Found in src/ht-webkit-Android4-src/precompiled/debug/script.js - 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

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

      function bisect_clear(a, b) {
          for (var j = a; j <= b; j++) {
          for (var i = 0; i < 16 * 4; i++) {
              var index = (i * 0x10000 + (i%16) * 0x1000 + 0x30 - 0x8) / 4;
              bigmem[j][index] = 0;
      Severity: Major
      Found in src/ht-webkit-Android4-src/precompiled/debug/script.js and 1 other location - About 3 hrs to fix
      src/ht-webkit-Android4-src/precompiled/debug/script.js on lines 479..486

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

      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

      function bisect_putback(a, b) {
          for (var j = a; j <= b; j++) {
          for (var i = 0; i < 16 * 4; i++) {
              var index = (i * 0x10000 + (i%16) * 0x1000 + 0x30 - 0x8) / 4;
              bigmem[j][index] = 0x70747468;
      Severity: Major
      Found in src/ht-webkit-Android4-src/precompiled/debug/script.js and 1 other location - About 3 hrs to fix
      src/ht-webkit-Android4-src/precompiled/debug/script.js on lines 470..477

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

      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