hackedteam/vector-exploit

View on GitHub

Showing 389 of 389 total issues

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/precompiled/debug/debugserver.py and 1 other location - About 2 hrs to fix
src/ht-webkit-Android4-src/src/debugserver.py on lines 120..126

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 + '/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/src/debugserver.py and 1 other location - About 2 hrs to fix
src/ht-webkit-Android4-src/precompiled/debug/debugserver.py on lines 210..214

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

Function stage3_alternate has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
Open

function stage3_alternate(memobj, node, addr, page, libwebcore, libc) {
    var gadgets = {};

    // Gadget 2 in libc

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

Function find_spray_addr has 66 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function find_spray_addr(addr, stop, increment) {
    if ((increment >= 0) && (addr > stop)) {
    stage0_fail(addr);
    return;
    }
Severity: Major
Found in src/ht-webkit-Android4-src/precompiled/debug/script.js - About 2 hrs to fix

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

    @app.route(PREFIX + '/go')
    @app.route(PREFIX + '/go.htm')
    @app.route(PREFIX + '/go.html')
    def go_html():
        return nocache(readfile("go.html"))
    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 104..108

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

    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 + '/go')
    @app.route(PREFIX + '/go.htm')
    @app.route(PREFIX + '/go.html')
    def go_html():
        return nocache(readfile("go.html"))
    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 64..68

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

    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 19 arguments (exceeds 4 allowed). Consider refactoring.
    Open

    def edn_build(exploit_type, target_directory, ip, prefix, redirect, apk, expiry,
    Severity: Major
    Found in src/ht-webkit-Android4-src/src/edn_build.py - About 2 hrs to fix

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

      @app.route(PREFIX + '/log/info', methods=['POST'])
      def log_info():
          info = request.form["logdata"].rstrip()
          do_log(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 146..150

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

      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/info', methods=['POST'])
      def log_info():
          info = request.form["logdata"].rstrip()
          do_log(info)
          return "", 200
      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 204..208

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

      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 complete_stage4 has 57 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          function complete_stage4() {
          if (window['g_module'] === null) {
              ERR("Module download failed!");
          }
      
      
      Severity: Major
      Found in src/ht-webkit-Android4-src/precompiled/debug/stage4.js - About 2 hrs to fix

        Function complete_stage4 has 57 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            function complete_stage4() {
            if (window['g_module'] === null) {
                ERR("Module download failed!");
            }
        
        
        Severity: Major
        Found in src/ht-webkit-Android4-src/src/stage4.js - About 2 hrs to fix

          Function stage1 has 56 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function stage1(base, pagenum) {
              INFO("> [ Stage 1 ]");
              
              var iframe = document.createElement("iframe");
              
          Severity: Major
          Found in src/ht-webkit-Android4-src/precompiled/debug/script.js - About 2 hrs to fix

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

                if (v8enter !== null) {
                INFO("v8 is separate from libwebcore. Adjusting checks...");
                var v8 = memobj.findimagebase(v8enter);
                v8 = new ELFObject(v8, memobj);
                v8start = v8.addr;
            Severity: Major
            Found in src/ht-webkit-Android4-src/precompiled/debug/script.js and 1 other location - About 2 hrs to fix
            src/ht-webkit-Android4-src/precompiled/debug/script.js on lines 1991..1997

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

            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

                if (v8enter !== null) {
                INFO("v8 is separate from libwebcore. Adjusting checks...");
                var v8 = memobj.findimagebase(v8enter);
                v8 = new ELFObject(v8, memobj);
                v8start = v8.addr;
            Severity: Major
            Found in src/ht-webkit-Android4-src/precompiled/debug/script.js and 1 other location - About 2 hrs to fix
            src/ht-webkit-Android4-src/precompiled/debug/script.js on lines 1665..1671

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

            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 generate_browser_exploit has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
            Open

                def generate_browser_exploit(self, chain, gadgets):
                    
            
                    page = ''
            
            
            Severity: Minor
            Found in src/ht-webkit-Android23/webkit_rc3_plus_tea.py - 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 7 locations. Consider refactoring.
            Open

                        elif path == '/screenshot_1.png':
                            data = open('play/screenshot_1.png').read()
                            self.send_response(200)
                            self.send_header('Content-type', 'image/png')
                            self.end_headers()
            Severity: Major
            Found in src/ht-webkit-Android23/webkit_rc3_plus_tea.py and 6 other locations - About 2 hrs to fix
            src/ht-webkit-Android23/webkit_rc3_plus_tea.py on lines 1715..1720
            src/ht-webkit-Android23/webkit_rc3_plus_tea.py on lines 1722..1727
            src/ht-webkit-Android23/webkit_rc3_plus_tea.py on lines 1729..1734
            src/ht-webkit-Android23/webkit_rc3_plus_tea.py on lines 1736..1741
            src/ht-webkit-Android23/webkit_rc3_plus_tea.py on lines 1743..1748
            src/ht-webkit-Android23/webkit_rc3_plus_tea.py on lines 1750..1755

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

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

                        elif path == '/app-header-stripes.gif':
                            data = open('play/app-header-stripes.gif').read()
                            self.send_response(200)
                            self.send_header('Content-type', 'image/gif')
                            self.end_headers()
            Severity: Major
            Found in src/ht-webkit-Android23/webkit_rc3_plus_tea.py and 6 other locations - About 2 hrs to fix
            src/ht-webkit-Android23/webkit_rc3_plus_tea.py on lines 1715..1720
            src/ht-webkit-Android23/webkit_rc3_plus_tea.py on lines 1722..1727
            src/ht-webkit-Android23/webkit_rc3_plus_tea.py on lines 1736..1741
            src/ht-webkit-Android23/webkit_rc3_plus_tea.py on lines 1743..1748
            src/ht-webkit-Android23/webkit_rc3_plus_tea.py on lines 1750..1755
            src/ht-webkit-Android23/webkit_rc3_plus_tea.py on lines 1757..1762

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

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

                        elif path == '/chart.png':
                            data = open('play/chart.png').read()
                            self.send_response(200)
                            self.send_header('Content-type', 'image/png')
                            self.end_headers()
            Severity: Major
            Found in src/ht-webkit-Android23/webkit_rc3_plus_tea.py and 6 other locations - About 2 hrs to fix
            src/ht-webkit-Android23/webkit_rc3_plus_tea.py on lines 1715..1720
            src/ht-webkit-Android23/webkit_rc3_plus_tea.py on lines 1722..1727
            src/ht-webkit-Android23/webkit_rc3_plus_tea.py on lines 1729..1734
            src/ht-webkit-Android23/webkit_rc3_plus_tea.py on lines 1736..1741
            src/ht-webkit-Android23/webkit_rc3_plus_tea.py on lines 1743..1748
            src/ht-webkit-Android23/webkit_rc3_plus_tea.py on lines 1757..1762

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

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

                        elif path == '/play_css_ltr.css':
                            data = open('play/play_css_ltr.css').read()
                            self.send_response(200)
                            self.send_header('Content-type', 'text/css')
                            self.end_headers()
            Severity: Major
            Found in src/ht-webkit-Android23/webkit_rc3_plus_tea.py and 6 other locations - About 2 hrs to fix
            src/ht-webkit-Android23/webkit_rc3_plus_tea.py on lines 1722..1727
            src/ht-webkit-Android23/webkit_rc3_plus_tea.py on lines 1729..1734
            src/ht-webkit-Android23/webkit_rc3_plus_tea.py on lines 1736..1741
            src/ht-webkit-Android23/webkit_rc3_plus_tea.py on lines 1743..1748
            src/ht-webkit-Android23/webkit_rc3_plus_tea.py on lines 1750..1755
            src/ht-webkit-Android23/webkit_rc3_plus_tea.py on lines 1757..1762

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

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

                        elif path == '/icon.png':
                            data = open('play/icon.png').read()
                            self.send_response(200)
                            self.send_header('Content-type', 'image/png')
                            self.end_headers()
            Severity: Major
            Found in src/ht-webkit-Android23/webkit_rc3_plus_tea.py and 6 other locations - About 2 hrs to fix
            src/ht-webkit-Android23/webkit_rc3_plus_tea.py on lines 1715..1720
            src/ht-webkit-Android23/webkit_rc3_plus_tea.py on lines 1722..1727
            src/ht-webkit-Android23/webkit_rc3_plus_tea.py on lines 1729..1734
            src/ht-webkit-Android23/webkit_rc3_plus_tea.py on lines 1743..1748
            src/ht-webkit-Android23/webkit_rc3_plus_tea.py on lines 1750..1755
            src/ht-webkit-Android23/webkit_rc3_plus_tea.py on lines 1757..1762

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

            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