rapid7/metasploit-framework

View on GitHub

Showing 7,361 of 22,177 total issues

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

      loop do
        output_bit = blind_request("#{if_function}length((#{query})::bytea)&#{1 << i}<>0#{sleep_part}")
        output_length |= (1 << i) if output_bit
        i += 1
        stop = blind_request("#{if_function}length((#{query})::bytea)/#{1 << i}=0#{sleep_part}")
Severity: Major
Found in lib/msf/core/exploit/sqli/postgresqli/common.rb and 1 other location - About 1 hr to fix
lib/msf/core/exploit/sqli/mssqli/common.rb on lines 270..275

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

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

    while(nprocs.length == procs.length && cnt < 2) {
        cnt++;
        WScript.Sleep(500);
        nprocs = process_list();
    }
Severity: Major
Found in external/source/DLLHijackAuditKit/audit.js and 1 other location - About 1 hr to fix
external/source/DLLHijackAuditKit/analyze.js on lines 159..163

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

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

            while(nprocs.length == procs.length && cnt < 2) {
                cnt++;
                WScript.Sleep(500);
                nprocs = process_list();
            }
Severity: Major
Found in external/source/DLLHijackAuditKit/analyze.js and 1 other location - About 1 hr to fix
external/source/DLLHijackAuditKit/audit.js on lines 121..125

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

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

  def on_request_exploit(cli, request, target_info)
    print_status("Request: #{request.uri}")

    if request.uri =~ /\.swf$/
      print_status("Sending SWF...")
Severity: Major
Found in modules/exploits/windows/browser/adobe_flash_pcre.rb and 3 other locations - About 1 hr to fix
modules/exploits/windows/browser/adobe_flash_avm2.rb on lines 90..103
modules/exploits/windows/browser/adobe_flash_filters_type_confusion.rb on lines 85..98
modules/exploits/windows/browser/adobe_flash_regex_value.rb on lines 80..93

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

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

  def on_request_exploit(cli, request, target_info)
    print_status("Request: #{request.uri}")

    if request.uri =~ /\.swf$/
      print_status("Sending SWF...")
modules/exploits/windows/browser/adobe_flash_avm2.rb on lines 90..103
modules/exploits/windows/browser/adobe_flash_filters_type_confusion.rb on lines 85..98
modules/exploits/windows/browser/adobe_flash_pcre.rb on lines 75..88

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

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

  def on_request_exploit(cli, request, target_info)
    print_status("Request: #{request.uri}")

    if request.uri =~ /\.swf$/
      print_status("Sending SWF...")
modules/exploits/windows/browser/adobe_flash_avm2.rb on lines 90..103
modules/exploits/windows/browser/adobe_flash_pcre.rb on lines 75..88
modules/exploits/windows/browser/adobe_flash_regex_value.rb on lines 80..93

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

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

  def on_request_exploit(cli, request, target_info)
    print_status("Request: #{request.uri}")

    if request.uri =~ /\.swf$/
      print_status("Sending SWF...")
Severity: Major
Found in modules/exploits/windows/browser/adobe_flash_avm2.rb and 3 other locations - About 1 hr to fix
modules/exploits/windows/browser/adobe_flash_filters_type_confusion.rb on lines 85..98
modules/exploits/windows/browser/adobe_flash_pcre.rb on lines 75..88
modules/exploits/windows/browser/adobe_flash_regex_value.rb on lines 80..93

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

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

    dll.add_function('AccessCheckAndAuditAlarmA', 'BOOL',[
      ["PCHAR","SubsystemName","in"],
      ["PBLOB","HandleId","in"],
      ["PCHAR","ObjectTypeName","in"],
      ["PCHAR","ObjectName","in"],
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_advapi32.rb on lines 383..395
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_advapi32.rb on lines 928..940
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_advapi32.rb on lines 942..954
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_advapi32.rb on lines 994..1006
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_advapi32.rb on lines 1193..1205
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_advapi32.rb on lines 1322..1334
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_advapi32.rb on lines 1336..1348
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_advapi32.rb on lines 1350..1362
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_advapi32.rb on lines 1813..1825
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_ntdll.rb on lines 28..40

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

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

    dll.add_function('AccessCheckAndAuditAlarmW', 'BOOL',[
      ["PWCHAR","SubsystemName","in"],
      ["PBLOB","HandleId","in"],
      ["PWCHAR","ObjectTypeName","in"],
      ["PWCHAR","ObjectName","in"],
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_advapi32.rb on lines 383..395
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_advapi32.rb on lines 914..926
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_advapi32.rb on lines 942..954
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_advapi32.rb on lines 994..1006
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_advapi32.rb on lines 1193..1205
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_advapi32.rb on lines 1322..1334
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_advapi32.rb on lines 1336..1348
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_advapi32.rb on lines 1350..1362
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_advapi32.rb on lines 1813..1825
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_ntdll.rb on lines 28..40

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

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

    dll.add_function('AccessCheckByTypeResultList', 'BOOL',[
      ["PBLOB","pSecurityDescriptor","in"],
      ["LPVOID","PrincipalSelfSid","in"],
      ["DWORD","ClientToken","in"],
      ["DWORD","DesiredAccess","in"],
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_advapi32.rb on lines 383..395
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_advapi32.rb on lines 914..926
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_advapi32.rb on lines 928..940
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_advapi32.rb on lines 942..954
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_advapi32.rb on lines 1193..1205
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_advapi32.rb on lines 1322..1334
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_advapi32.rb on lines 1336..1348
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_advapi32.rb on lines 1350..1362
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_advapi32.rb on lines 1813..1825
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_ntdll.rb on lines 28..40

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

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

    dll.add_function('CreateProcessAsUserA', 'BOOL',[
      ["DWORD","hToken","in"],
      ["PCHAR","lpApplicationName","in"],
      ["PCHAR","lpCommandLine","inout"],
      ["PBLOB","lpProcessAttributes","in"],
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_advapi32.rb on lines 383..395
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_advapi32.rb on lines 914..926
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_advapi32.rb on lines 928..940
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_advapi32.rb on lines 942..954
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_advapi32.rb on lines 994..1006
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_advapi32.rb on lines 1193..1205
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_advapi32.rb on lines 1336..1348
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_advapi32.rb on lines 1350..1362
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_advapi32.rb on lines 1813..1825
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_ntdll.rb on lines 28..40

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

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

    dll.add_function('CreateProcessAsUserW', 'BOOL',[
      ["DWORD","hToken","in"],
      ["PWCHAR","lpApplicationName","in"],
      ["PWCHAR","lpCommandLine","inout"],
      ["PBLOB","lpProcessAttributes","in"],
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_advapi32.rb on lines 383..395
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_advapi32.rb on lines 914..926
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_advapi32.rb on lines 928..940
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_advapi32.rb on lines 942..954
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_advapi32.rb on lines 994..1006
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_advapi32.rb on lines 1193..1205
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_advapi32.rb on lines 1322..1334
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_advapi32.rb on lines 1350..1362
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_advapi32.rb on lines 1813..1825
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_ntdll.rb on lines 28..40

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

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

    dll.add_function('MakeAbsoluteSD', 'BOOL',[
      ["PBLOB","pSelfRelativeSecurityDescriptor","in"],
      ["PBLOB","pAbsoluteSecurityDescriptor","out"],
      ["PDWORD","lpdwAbsoluteSecurityDescriptorSize","inout"],
      ["PBLOB","pDacl","out"],
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_advapi32.rb on lines 383..395
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_advapi32.rb on lines 914..926
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_advapi32.rb on lines 928..940
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_advapi32.rb on lines 942..954
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_advapi32.rb on lines 994..1006
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_advapi32.rb on lines 1193..1205
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_advapi32.rb on lines 1322..1334
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_advapi32.rb on lines 1336..1348
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_advapi32.rb on lines 1350..1362
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_ntdll.rb on lines 28..40

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

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

    dll.add_function('ChangeServiceConfigA','BOOL',[
      [ "DWORD", "hService", "in" ],
      [ "DWORD", "dwServiceType", "in" ],
      [ "DWORD", "dwStartType", "in" ],
      [ "DWORD", "dwErrorControl", "in" ],
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_advapi32.rb on lines 914..926
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_advapi32.rb on lines 928..940
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_advapi32.rb on lines 942..954
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_advapi32.rb on lines 994..1006
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_advapi32.rb on lines 1193..1205
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_advapi32.rb on lines 1322..1334
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_advapi32.rb on lines 1336..1348
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_advapi32.rb on lines 1350..1362
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_advapi32.rb on lines 1813..1825
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_ntdll.rb on lines 28..40

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

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

    dll.add_function('AllocateAndInitializeSid', 'BOOL',[
      ["PBLOB","pIdentifierAuthority","in"],
      ["BYTE","nSubAuthorityCount","in"],
      ["DWORD","nSubAuthority0","in"],
      ["DWORD","nSubAuthority1","in"],
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_advapi32.rb on lines 383..395
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_advapi32.rb on lines 914..926
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_advapi32.rb on lines 928..940
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_advapi32.rb on lines 942..954
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_advapi32.rb on lines 994..1006
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_advapi32.rb on lines 1322..1334
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_advapi32.rb on lines 1336..1348
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_advapi32.rb on lines 1350..1362
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_advapi32.rb on lines 1813..1825
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_ntdll.rb on lines 28..40

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

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

                  dll.add_function('NtCreateFile', 'DWORD', [
                    ['PHANDLE', 'FileHandle', 'inout'],
                    ['DWORD', 'DesiredAccess', 'in'],
                    ['PBLOB', 'ObjectAttributes', 'in'],
                    ['PBLOB', 'IoStatusBlock', 'inout'],
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_advapi32.rb on lines 383..395
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_advapi32.rb on lines 914..926
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_advapi32.rb on lines 928..940
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_advapi32.rb on lines 942..954
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_advapi32.rb on lines 994..1006
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_advapi32.rb on lines 1193..1205
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_advapi32.rb on lines 1322..1334
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_advapi32.rb on lines 1336..1348
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_advapi32.rb on lines 1350..1362
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_advapi32.rb on lines 1813..1825

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

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

    dll.add_function('AccessCheckByType', 'BOOL',[
      ["PBLOB","pSecurityDescriptor","in"],
      ["LPVOID","PrincipalSelfSid","in"],
      ["DWORD","ClientToken","in"],
      ["DWORD","DesiredAccess","in"],
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_advapi32.rb on lines 383..395
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_advapi32.rb on lines 914..926
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_advapi32.rb on lines 928..940
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_advapi32.rb on lines 994..1006
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_advapi32.rb on lines 1193..1205
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_advapi32.rb on lines 1322..1334
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_advapi32.rb on lines 1336..1348
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_advapi32.rb on lines 1350..1362
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_advapi32.rb on lines 1813..1825
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_ntdll.rb on lines 28..40

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

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

    dll.add_function('CreateProcessWithLogonW', 'BOOL',[
      ["PWCHAR","lpUsername","in"],
      ["PWCHAR","lpDomain","in"],
      ["PWCHAR","lpPassword","in"],
      ["DWORD","dwLogonFlags","in"],
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_advapi32.rb on lines 383..395
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_advapi32.rb on lines 914..926
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_advapi32.rb on lines 928..940
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_advapi32.rb on lines 942..954
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_advapi32.rb on lines 994..1006
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_advapi32.rb on lines 1193..1205
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_advapi32.rb on lines 1322..1334
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_advapi32.rb on lines 1336..1348
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_advapi32.rb on lines 1813..1825
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_ntdll.rb on lines 28..40

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

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

  def initialize(info = {})
    super(merge_info(info,
     'Name'          => 'Unix Command Shell, Bind TCP (via Zsh)',
     'Description'   => %q{
        Listen for a connection and spawn a command shell via Zsh. Note: Although Zsh is
Severity: Major
Found in modules/payloads/singles/cmd/unix/bind_zsh.rb and 4 other locations - About 1 hr to fix
modules/payloads/singles/cmd/unix/bind_perl.rb on lines 14..35
modules/payloads/singles/cmd/unix/bind_perl_ipv6.rb on lines 14..35
modules/payloads/singles/cmd/unix/reverse_zsh.rb on lines 14..38
modules/payloads/singles/cmd/windows/reverse_perl.rb on lines 14..35

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

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

  def initialize(info = {})
    super(merge_info(info,
     'Name'          => 'Unix Command Shell, Bind TCP (via Perl)',
     'Description'   => 'Listen for a connection and spawn a command shell via perl',
     'Author'        => ['Samy <samy[at]samy.pl>', 'cazz'],
Severity: Major
Found in modules/payloads/singles/cmd/unix/bind_perl.rb and 4 other locations - About 1 hr to fix
modules/payloads/singles/cmd/unix/bind_perl_ipv6.rb on lines 14..35
modules/payloads/singles/cmd/unix/bind_zsh.rb on lines 14..42
modules/payloads/singles/cmd/unix/reverse_zsh.rb on lines 14..38
modules/payloads/singles/cmd/windows/reverse_perl.rb on lines 14..35

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

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