Module: Msf::Exploit::CmdStagerVBS

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

Overview

This mixin provides an interface for staging cmd to arbitrary payloads

Defined Under Namespace

Modules: ADODB

Instance Method Summary collapse

Methods included from CmdStager

#execute_cmdstager_begin, #execute_cmdstager_end, #progress

Methods included from EXE

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

Instance Method Details

#create_stager(exe) ⇒ Object


26
27
28
# File 'lib/msf/core/exploit/cmdstager_vbs.rb', line 26

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

#execute_cmdstager(opts = {}) ⇒ Object


30
31
32
33
# File 'lib/msf/core/exploit/cmdstager_vbs.rb', line 30

def execute_cmdstager(opts = {})
  opts.merge!({ :decoder => datastore['DECODERSTUB'] })
  super
end

#generate_cmdstager(opts = {}, pl = nil) ⇒ Object


35
36
37
38
# File 'lib/msf/core/exploit/cmdstager_vbs.rb', line 35

def generate_cmdstager(opts = {}, pl = nil)
  opts.merge!({ :decoder => datastore['DECODERSTUB'] })
  super
end

#initialize(info = {}) ⇒ Object


16
17
18
19
20
21
22
23
24
# File 'lib/msf/core/exploit/cmdstager_vbs.rb', line 16

def initialize(info = {})
  super

  register_advanced_options(
    [
      OptString.new( 'DECODERSTUB',  [ true, 'The VBS base64 file decoder stub to use.',
        File.join(Msf::Config.data_directory, "exploits", "cmdstager", "vbs_b64")]),
    ], self.class)
end