Module: Msf::Exploit::CmdStagerPrintf

Includes:
CmdStager
Defined in:
lib/msf/core/exploit/cmdstager_printf.rb

Overview

Allows for staging cmd to arbitrary payloads through the CmdStagerPrintf.

This stager uses a POSIX-conformant printf, that supports the interpretation of octal escapes, to drop an ELF with the payload embedded to disk.

Instance Method Summary collapse

Methods included from CmdStager

#execute_cmdstager, #execute_cmdstager_begin, #execute_cmdstager_end, #generate_cmdstager, #initialize, #progress

Methods included from EXE

#generate_payload_dll, #generate_payload_exe, #generate_payload_exe_service, #generate_payload_msi, #get_custom_exe, #get_eicar_exe, #initialize

Instance Method Details

#create_stager(exe) ⇒ Rex::Exploitation::CmdStagerPrintf

Initializes a CmdStagerPrintf instance for the supplied payload

Parameters:

  • exe (String)

    The payload embedded into an ELF

Returns:


22
23
24
# File 'lib/msf/core/exploit/cmdstager_printf.rb', line 22

def create_stager(exe)
  Rex::Exploitation::CmdStagerPrintf.new(exe)
end