rapid7/metasploit-framework

View on GitHub

Showing 7,361 of 22,177 total issues

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

    dll.add_function('DrawStateW', 'BOOL',[
      ["DWORD","hdc","in"],
      ["DWORD","hbrFore","in"],
      ["PBLOB","qfnCallBack","in"],
      ["DWORD","lData","in"],
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_advapi32.rb on lines 1692..1703
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_advapi32.rb on lines 1705..1716
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_kernel32.rb on lines 469..480
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_kernel32.rb on lines 482..493
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_ntdll.rb on lines 42..53
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_user32.rb on lines 455..466
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_user32.rb on lines 468..479
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_user32.rb on lines 772..783

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

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

    dll.add_function( 'CreateProcessA', 'BOOL',[
      ["PCHAR","lpApplicationName","in"],
      ["PCHAR","lpCommandLine","inout"],
      ["PBLOB","lpProcessAttributes","in"],
      ["PBLOB","lpThreadAttributes","in"],
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_advapi32.rb on lines 1692..1703
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_advapi32.rb on lines 1705..1716
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_kernel32.rb on lines 482..493
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_ntdll.rb on lines 42..53
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_user32.rb on lines 455..466
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_user32.rb on lines 468..479
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_user32.rb on lines 772..783
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_user32.rb on lines 785..796

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

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

    dll.add_function( 'CreateProcessW', 'BOOL',[
      ["PWCHAR","lpApplicationName","in"],
      ["PWCHAR","lpCommandLine","inout"],
      ["PBLOB","lpProcessAttributes","in"],
      ["PBLOB","lpThreadAttributes","in"],
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_advapi32.rb on lines 1692..1703
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_advapi32.rb on lines 1705..1716
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_kernel32.rb on lines 469..480
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_ntdll.rb on lines 42..53
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_user32.rb on lines 455..466
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_user32.rb on lines 468..479
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_user32.rb on lines 772..783
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_user32.rb on lines 785..796

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

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

    dll.add_function('DrawStateA', 'BOOL',[
      ["DWORD","hdc","in"],
      ["DWORD","hbrFore","in"],
      ["PBLOB","qfnCallBack","in"],
      ["DWORD","lData","in"],
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_advapi32.rb on lines 1692..1703
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_advapi32.rb on lines 1705..1716
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_kernel32.rb on lines 469..480
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_kernel32.rb on lines 482..493
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_ntdll.rb on lines 42..53
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_user32.rb on lines 455..466
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_user32.rb on lines 468..479
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_user32.rb on lines 785..796

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

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

  def on_request_uri(cli, request)
    agent = request.headers['User-Agent']
    uri   = request.uri
    print_status("Requesting: #{uri}")

modules/exploits/windows/browser/crystal_reports_printcontrol.rb on lines 295..311
modules/exploits/windows/browser/hp_alm_xgo_setshapenodetype_exec.rb on lines 252..268
modules/exploits/windows/browser/hp_loadrunner_writefilebinary.rb on lines 238..254
modules/exploits/windows/browser/ibm_spss_c1sizer.rb on lines 364..380
modules/exploits/windows/browser/ie_cbutton_uaf.rb on lines 233..249
modules/exploits/windows/browser/ie_cgenericelement_uaf.rb on lines 215..230
modules/exploits/windows/browser/indusoft_issymbol_internationalseparator.rb on lines 266..282
modules/exploits/windows/browser/inotes_dwa85w_bof.rb on lines 271..287
modules/exploits/windows/browser/ms11_081_option.rb on lines 220..236
modules/exploits/windows/browser/ms13_009_ie_slayoutrun_uaf.rb on lines 181..197
modules/exploits/windows/browser/quickr_qp2_bof.rb on lines 248..264

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

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

  def on_request_uri(cli, request)
    agent = request.headers['User-Agent']
    uri   = request.uri
    print_status("Requesting: #{uri}")

modules/exploits/windows/browser/crystal_reports_printcontrol.rb on lines 295..311
modules/exploits/windows/browser/hp_loadrunner_writefilebinary.rb on lines 238..254
modules/exploits/windows/browser/ibm_spss_c1sizer.rb on lines 364..380
modules/exploits/windows/browser/ie_cbutton_uaf.rb on lines 233..249
modules/exploits/windows/browser/ie_cgenericelement_uaf.rb on lines 215..230
modules/exploits/windows/browser/indusoft_issymbol_internationalseparator.rb on lines 266..282
modules/exploits/windows/browser/inotes_dwa85w_bof.rb on lines 271..287
modules/exploits/windows/browser/ms11_081_option.rb on lines 220..236
modules/exploits/windows/browser/ms13_009_ie_slayoutrun_uaf.rb on lines 181..197
modules/exploits/windows/browser/novell_groupwise_gwcls1_actvx.rb on lines 259..275
modules/exploits/windows/browser/quickr_qp2_bof.rb on lines 248..264

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

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

  def on_request_uri(cli, request)
    agent = request.headers['User-Agent']
    uri   = request.uri
    print_status("Requesting: #{uri}")

Severity: Major
Found in modules/exploits/windows/browser/quickr_qp2_bof.rb and 11 other locations - About 55 mins to fix
modules/exploits/windows/browser/crystal_reports_printcontrol.rb on lines 295..311
modules/exploits/windows/browser/hp_alm_xgo_setshapenodetype_exec.rb on lines 252..268
modules/exploits/windows/browser/hp_loadrunner_writefilebinary.rb on lines 238..254
modules/exploits/windows/browser/ibm_spss_c1sizer.rb on lines 364..380
modules/exploits/windows/browser/ie_cbutton_uaf.rb on lines 233..249
modules/exploits/windows/browser/ie_cgenericelement_uaf.rb on lines 215..230
modules/exploits/windows/browser/indusoft_issymbol_internationalseparator.rb on lines 266..282
modules/exploits/windows/browser/inotes_dwa85w_bof.rb on lines 271..287
modules/exploits/windows/browser/ms11_081_option.rb on lines 220..236
modules/exploits/windows/browser/ms13_009_ie_slayoutrun_uaf.rb on lines 181..197
modules/exploits/windows/browser/novell_groupwise_gwcls1_actvx.rb on lines 259..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 45.

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

                  dll.add_function('NtDeviceIoControlFile', 'DWORD', [
                    ['DWORD', 'FileHandle', 'in'],
                    ['DWORD', 'Event', 'in'],
                    ['LPVOID', 'ApcRoutine', 'in'],
                    ['LPVOID', 'ApcContext', 'in'],
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_advapi32.rb on lines 1692..1703
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_advapi32.rb on lines 1705..1716
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_kernel32.rb on lines 469..480
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_kernel32.rb on lines 482..493
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_user32.rb on lines 455..466
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_user32.rb on lines 468..479
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_user32.rb on lines 772..783
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_user32.rb on lines 785..796

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

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

    dll.add_function('LogonUserExW', 'BOOL',[
      ["PWCHAR","lpszUsername","in"],
      ["PWCHAR","lpszDomain","in"],
      ["PWCHAR","lpszPassword","in"],
      ["DWORD","dwLogonType","in"],
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_advapi32.rb on lines 1692..1703
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_kernel32.rb on lines 469..480
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_kernel32.rb on lines 482..493
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_ntdll.rb on lines 42..53
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_user32.rb on lines 455..466
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_user32.rb on lines 468..479
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_user32.rb on lines 772..783
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_user32.rb on lines 785..796

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

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

  def on_request_uri(cli, request)
    agent = request.headers['User-Agent']
    uri   = request.uri
    print_status("Requesting: #{uri}")

Severity: Major
Found in modules/exploits/windows/browser/inotes_dwa85w_bof.rb and 11 other locations - About 55 mins to fix
modules/exploits/windows/browser/crystal_reports_printcontrol.rb on lines 295..311
modules/exploits/windows/browser/hp_alm_xgo_setshapenodetype_exec.rb on lines 252..268
modules/exploits/windows/browser/hp_loadrunner_writefilebinary.rb on lines 238..254
modules/exploits/windows/browser/ibm_spss_c1sizer.rb on lines 364..380
modules/exploits/windows/browser/ie_cbutton_uaf.rb on lines 233..249
modules/exploits/windows/browser/ie_cgenericelement_uaf.rb on lines 215..230
modules/exploits/windows/browser/indusoft_issymbol_internationalseparator.rb on lines 266..282
modules/exploits/windows/browser/ms11_081_option.rb on lines 220..236
modules/exploits/windows/browser/ms13_009_ie_slayoutrun_uaf.rb on lines 181..197
modules/exploits/windows/browser/novell_groupwise_gwcls1_actvx.rb on lines 259..275
modules/exploits/windows/browser/quickr_qp2_bof.rb on lines 248..264

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

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

    dll.add_function('LogonUserExA', 'BOOL',[
      ["PCHAR","lpszUsername","in"],
      ["PCHAR","lpszDomain","in"],
      ["PCHAR","lpszPassword","in"],
      ["DWORD","dwLogonType","in"],
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_advapi32.rb on lines 1705..1716
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_kernel32.rb on lines 469..480
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_kernel32.rb on lines 482..493
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_ntdll.rb on lines 42..53
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_user32.rb on lines 455..466
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_user32.rb on lines 468..479
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_user32.rb on lines 772..783
lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_user32.rb on lines 785..796

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

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

  def on_request_uri(cli, request)
    agent = request.headers['User-Agent']
    uri   = request.uri
    print_status("Requesting: #{uri}")

Severity: Major
Found in modules/exploits/windows/browser/ie_cgenericelement_uaf.rb and 11 other locations - About 55 mins to fix
modules/exploits/windows/browser/crystal_reports_printcontrol.rb on lines 295..311
modules/exploits/windows/browser/hp_alm_xgo_setshapenodetype_exec.rb on lines 252..268
modules/exploits/windows/browser/hp_loadrunner_writefilebinary.rb on lines 238..254
modules/exploits/windows/browser/ibm_spss_c1sizer.rb on lines 364..380
modules/exploits/windows/browser/ie_cbutton_uaf.rb on lines 233..249
modules/exploits/windows/browser/indusoft_issymbol_internationalseparator.rb on lines 266..282
modules/exploits/windows/browser/inotes_dwa85w_bof.rb on lines 271..287
modules/exploits/windows/browser/ms11_081_option.rb on lines 220..236
modules/exploits/windows/browser/ms13_009_ie_slayoutrun_uaf.rb on lines 181..197
modules/exploits/windows/browser/novell_groupwise_gwcls1_actvx.rb on lines 259..275
modules/exploits/windows/browser/quickr_qp2_bof.rb on lines 248..264

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

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

    if @my_target['Platform'] == 'linux'
      var_proc1 = Rex::Text.rand_text_alpha(rand(8) + 3)
      chmod = %Q|
      Process #{var_proc1} = Runtime.getRuntime().exec("chmod 777 " + #{var_path});
      Thread.sleep(200);
Severity: Major
Found in modules/exploits/multi/http/manage_engine_dc_pmp_sqli.rb and 5 other locations - About 55 mins to fix
modules/exploits/multi/http/eventlog_file_upload.rb on lines 212..226
modules/exploits/multi/http/manageengine_search_sqli.rb on lines 114..128
modules/exploits/multi/http/novell_servicedesk_rce.rb on lines 191..205
modules/exploits/multi/http/sysaid_auth_file_upload.rb on lines 180..194
modules/exploits/multi/http/webnms_file_upload.rb on lines 149..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 44.

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

    if @my_target['Platform'] == 'linux'
      var_proc1 = Rex::Text.rand_text_alpha(rand(8) + 3)
      chmod = %Q|
      Process #{var_proc1} = Runtime.getRuntime().exec("chmod 777 " + #{var_path});
      Thread.sleep(200);
Severity: Major
Found in modules/exploits/multi/http/eventlog_file_upload.rb and 5 other locations - About 55 mins to fix
modules/exploits/multi/http/manage_engine_dc_pmp_sqli.rb on lines 353..367
modules/exploits/multi/http/manageengine_search_sqli.rb on lines 114..128
modules/exploits/multi/http/novell_servicedesk_rce.rb on lines 191..205
modules/exploits/multi/http/sysaid_auth_file_upload.rb on lines 180..194
modules/exploits/multi/http/webnms_file_upload.rb on lines 149..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 44.

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

    if @my_target['Platform'] == 'linux'
      var_proc1 = Rex::Text.rand_text_alpha(rand(8) + 3)
      chmod = %Q|
      Process #{var_proc1} = Runtime.getRuntime().exec("chmod 777 " + #{var_path});
      Thread.sleep(200);
Severity: Major
Found in modules/exploits/multi/http/novell_servicedesk_rce.rb and 5 other locations - About 55 mins to fix
modules/exploits/multi/http/eventlog_file_upload.rb on lines 212..226
modules/exploits/multi/http/manage_engine_dc_pmp_sqli.rb on lines 353..367
modules/exploits/multi/http/manageengine_search_sqli.rb on lines 114..128
modules/exploits/multi/http/sysaid_auth_file_upload.rb on lines 180..194
modules/exploits/multi/http/webnms_file_upload.rb on lines 149..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 44.

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

    if @my_target['Platform'] == 'linux'
      var_proc1 = Rex::Text.rand_text_alpha(rand(8) + 3)
      chmod = %|
      Process #{var_proc1} = Runtime.getRuntime().exec("chmod 777 " + #{var_path});
      Thread.sleep(200);
Severity: Major
Found in modules/exploits/multi/http/webnms_file_upload.rb and 5 other locations - About 55 mins to fix
modules/exploits/multi/http/eventlog_file_upload.rb on lines 212..226
modules/exploits/multi/http/manage_engine_dc_pmp_sqli.rb on lines 353..367
modules/exploits/multi/http/manageengine_search_sqli.rb on lines 114..128
modules/exploits/multi/http/novell_servicedesk_rce.rb on lines 191..205
modules/exploits/multi/http/sysaid_auth_file_upload.rb on lines 180..194

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

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

    if @my_target['Platform'] == 'linux'
      var_proc1 = Rex::Text.rand_text_alpha(rand(8) + 3)
      chmod = %Q|
      Process #{var_proc1} = Runtime.getRuntime().exec("chmod 777 " + #{var_path});
      Thread.sleep(200);
Severity: Major
Found in modules/exploits/multi/http/manageengine_search_sqli.rb and 5 other locations - About 55 mins to fix
modules/exploits/multi/http/eventlog_file_upload.rb on lines 212..226
modules/exploits/multi/http/manage_engine_dc_pmp_sqli.rb on lines 353..367
modules/exploits/multi/http/novell_servicedesk_rce.rb on lines 191..205
modules/exploits/multi/http/sysaid_auth_file_upload.rb on lines 180..194
modules/exploits/multi/http/webnms_file_upload.rb on lines 149..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 44.

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

    if @my_target['Platform'] == 'linux'
      var_proc1 = Rex::Text.rand_text_alpha(rand(8) + 3)
      chmod = %Q|
      Process #{var_proc1} = Runtime.getRuntime().exec("chmod 777 " + #{var_path});
      Thread.sleep(200);
Severity: Major
Found in modules/exploits/multi/http/sysaid_auth_file_upload.rb and 5 other locations - About 55 mins to fix
modules/exploits/multi/http/eventlog_file_upload.rb on lines 212..226
modules/exploits/multi/http/manage_engine_dc_pmp_sqli.rb on lines 353..367
modules/exploits/multi/http/manageengine_search_sqli.rb on lines 114..128
modules/exploits/multi/http/novell_servicedesk_rce.rb on lines 191..205
modules/exploits/multi/http/webnms_file_upload.rb on lines 149..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 44.

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

  def exploit_template(cli, target_info)
    swf_random = "#{rand_text_alpha(4 + rand(3))}.swf"
    target_payload = get_payload(cli, target_info)
    b64_payload = Rex::Text.encode_base64(target_payload)
    os_name = target_info[:os_name]
modules/exploits/multi/browser/adobe_flash_nellymoser_bof.rb on lines 126..151
modules/exploits/multi/browser/adobe_flash_pixel_bender_bof.rb on lines 113..138
modules/exploits/multi/browser/adobe_flash_shader_job_overflow.rb on lines 115..140
modules/exploits/multi/browser/adobe_flash_uncompress_zlib_uaf.rb on lines 111..136

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

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

  def exploit_template(cli, target_info)
    swf_random = "#{rand_text_alpha(4 + rand(3))}.swf"
    target_payload = get_payload(cli, target_info)
    b64_payload = Rex::Text.encode_base64(target_payload)
    os_name = target_info[:os_name]
Severity: Major
Found in modules/exploits/multi/browser/adobe_flash_nellymoser_bof.rb and 4 other locations - About 55 mins to fix
modules/exploits/multi/browser/adobe_flash_pixel_bender_bof.rb on lines 113..138
modules/exploits/multi/browser/adobe_flash_shader_drawing_fill.rb on lines 111..136
modules/exploits/multi/browser/adobe_flash_shader_job_overflow.rb on lines 115..140
modules/exploits/multi/browser/adobe_flash_uncompress_zlib_uaf.rb on lines 111..136

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

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