rapid7/metasploit-framework

View on GitHub
modules/evasion/windows/syscall_inject.rb

Summary

Maintainability
D
2 days
Test Coverage

File syscall_inject.rb has 511 lines of code (exceeds 250 allowed). Consider refactoring.
Open

require 'metasploit/framework/compiler/mingw'
require 'metasploit/framework/compiler/windows'
class MetasploitModule < Msf::Evasion
  RC4 = File.join(Msf::Config.data_directory, 'headers', 'windows', 'rc4.h')
  BASE64 = File.join(Msf::Config.data_directory, 'headers', 'windows', 'base64.h')
Severity: Major
Found in modules/evasion/windows/syscall_inject.rb - About 1 day to fix

    Method defines has 104 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      def defines
        %^
            #define _SEED 0x#{@hash.to_s(16)}
            #define _ROR8(v) (v >> 8 | v << 24)
            #define MAX_SYSCALLS 500
    Severity: Major
    Found in modules/evasion/windows/syscall_inject.rb - About 4 hrs to fix

      Method syscall_parser has 93 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        def syscall_parser
          %@
          SYSCALL_LIST _SyscallList;
      
          DWORD HashSyscall(PCSTR FunctionName)
      Severity: Major
      Found in modules/evasion/windows/syscall_inject.rb - About 3 hrs to fix

        Method inject has 42 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          def inject
            s = "int i; for(i=0;i<10;i++){Sleep(#{datastore['SLEEP']} / 10);}"
            @inject = %@
        
                void inject()
        Severity: Minor
        Found in modules/evasion/windows/syscall_inject.rb - About 1 hr to fix

          Method initialize has 33 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            def initialize(info = {})
              super(
                merge_info(
                  info,
                  'Name' => 'Direct windows syscall evasion technique',
          Severity: Minor
          Found in modules/evasion/windows/syscall_inject.rb - About 1 hr to fix

            There are no issues that match your filters.

            Category
            Status