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 + '/data.xml')
def data_xml():
    base = request.args.get('id')
    nextaddr = request.args.get('contentId')

Severity: Major
Found in src/ht-webkit-Android4-src/precompiled/debug/debugserver.py and 1 other location - About 1 day to fix
src/ht-webkit-Android4-src/src/debugserver.py on lines 94..118

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

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 + '/data.xml')
def data_xml():
    base = request.args.get('id')
    nextaddr = request.args.get('contentId')

Severity: Major
Found in src/ht-webkit-Android4-src/src/debugserver.py and 1 other location - About 1 day to fix
src/ht-webkit-Android4-src/precompiled/debug/debugserver.py on lines 146..170

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

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

BufferMemoryObject.prototype.find16 = function(startaddr, endaddr, arr) {
    if (startaddr === undefined) {
    ERR("find16: a start address is required");
    }

Severity: Major
Found in src/ht-webkit-Android4-src/precompiled/debug/script.js and 1 other location - About 1 day to fix
src/ht-webkit-Android4-src/precompiled/debug/script.js on lines 2459..2492

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

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

BufferMemoryObject.prototype.find32 = function(startaddr, endaddr, arr) {
    if (startaddr === undefined) {
    ERR("find32: a start address is required");
    }

Severity: Major
Found in src/ht-webkit-Android4-src/precompiled/debug/script.js and 1 other location - About 1 day to fix
src/ht-webkit-Android4-src/precompiled/debug/script.js on lines 2498..2531

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

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

    def do_POST(self):
        
        path = urlparse.urlparse(self.path).path
        
        # POST requests must start with ^/news/0123456789/
Severity: Minor
Found in src/ht-webkit-Android23/webkit_rc3_plus_tea.py - About 1 day 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

Severity: Major
Found in src/ht-webkit-Android4-src/src/debug-tornado.py and 1 other location - About 1 day to fix
src/ht-webkit-Android4-src/precompiled/debug/debug-tornado.py on lines 0..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 127.

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

src/ht-webkit-Android4-src/src/debug-tornado.py on lines 0..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 127.

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

            for i in gadgets:

                if i != 3 and i != 5 : # skip mprotect and wbc_s_a
                    gadgets[i] = hex((int(gadgets[i], 16) + 1))[2:]

Severity: Major
Found in src/ht-webkit-Android23/webkit_rc3_plus_tea.py and 1 other location - About 1 day to fix
src/ht-webkit-Android23/webkit_rc3_plus_tea.py on lines 936..941

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

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

            for i in gadgets:
            
                if i != 6 and i != 8: # skip mprotect and wbc_s_a
                    gadgets[i] = hex((int(gadgets[i], 16) + 1))[2:] # thumb +1

Severity: Major
Found in src/ht-webkit-Android23/webkit_rc3_plus_tea.py and 1 other location - About 1 day to fix
src/ht-webkit-Android23/webkit_rc3_plus_tea.py on lines 774..779

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

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 stage2 has 196 lines of code (exceeds 25 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: Major
Found in src/ht-webkit-Android4-src/precompiled/debug/script.js - About 7 hrs to fix

    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/precompiled/release/slowaes.py - About 7 hrs to fix

      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/edn2/2014-004-AndroidBrowser/slowaes.py - About 7 hrs to fix

        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/precompiled/debug/slowaes.py - About 7 hrs to fix

          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

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

            for i in range(len(ole_link_bytearray)):
                if i == ole_link_offt or i == ole_link2_offt or i == ole_link3_offt:
                    y = 0
                    for x in range(len(swf_url_bytearray)):
                        ole_link_bytearray[i+y] = swf_url_bytearray[x]
            Severity: Major
            Found in src/exploit_vps/html/admin/2013-002-Word/exploit.py and 1 other location - About 7 hrs to fix
            ht-2013-002-Word/exploit.py on lines 295..301

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

            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

            for i in range(len(ole_link_bytearray)):
                if i == ole_link_offt or i == ole_link2_offt or i == ole_link3_offt:
                    y = 0
                    for x in range(len(swf_url_bytearray)):
                        ole_link_bytearray[i+y] = swf_url_bytearray[x]
            Severity: Major
            Found in ht-2013-002-Word/exploit.py and 1 other location - About 7 hrs to fix
            src/exploit_vps/html/admin/2013-002-Word/exploit.py on lines 240..246

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

            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

                    for (var cur = addr + 0x2100; cur < addr + 0x3000; cur += 0x50) {
                    for (var ca = cur - 4; ca < cur + 0x50; ca +=16) {
                        INFO(hex(ca, 8) + ": " + hex(memobj.read32(ca), 8) + " " +
                         hex(memobj.read32(ca+4), 8) + " " +
                         hex(memobj.read32(ca+8), 8) + " " +
            Severity: Major
            Found in src/ht-webkit-Android4-src/precompiled/debug/script.js and 1 other location - About 7 hrs to fix
            src/ht-webkit-Android4-src/precompiled/debug/script.js on lines 1420..1429

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

            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

                    for (var cur = addr + 0x1000; cur < addr + 0x2000; cur += 0x40) {
                    for (var ca = cur - 4; ca < cur + 0x40; ca +=16) {
                        INFO(hex(ca, 8) + ": " + hex(memobj.read32(ca), 8) + " " +
                         hex(memobj.read32(ca+4), 8) + " " +
                         hex(memobj.read32(ca+8), 8) + " " +
            Severity: Major
            Found in src/ht-webkit-Android4-src/precompiled/debug/script.js and 1 other location - About 7 hrs to fix
            src/ht-webkit-Android4-src/precompiled/debug/script.js on lines 1432..1441

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

            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

            if sys.argv[2][-1] == "/":
                EXE_URL = sys.argv[2] + EXE_RANDOM_NAME
                SWF_URL = sys.argv[2] + SWF_RANDOM_NAME
            else:
                EXE_URL = sys.argv[2] + '/' + EXE_RANDOM_NAME
            Severity: Major
            Found in ht-2013-002-Word/exploit.py and 3 other locations - About 7 hrs to fix
            ht-2013-003-Powerpoint/exploit.py on lines 45..50
            src/exploit_vps/html/admin/2013-002-Word/exploit.py on lines 41..46
            src/exploit_vps/html/admin/2013-003-PowerPoint/exploit.py on lines 41..46

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

            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

            if sys.argv[2][-1] == "/":
                EXE_URL = sys.argv[2] + EXE_RANDOM_NAME
                SWF_URL = sys.argv[2] + SWF_RANDOM_NAME
            else:
                EXE_URL = sys.argv[2] + '/' + EXE_RANDOM_NAME
            Severity: Major
            Found in src/exploit_vps/html/admin/2013-002-Word/exploit.py and 3 other locations - About 7 hrs to fix
            ht-2013-002-Word/exploit.py on lines 45..50
            ht-2013-003-Powerpoint/exploit.py on lines 45..50
            src/exploit_vps/html/admin/2013-003-PowerPoint/exploit.py on lines 41..46

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

            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