Class: Msf::Plugin::Capture

Inherits:
Msf::Plugin show all
Defined in:
plugins/capture.rb

Overview

Combines several Metasploit modules related to spoofing names and capturing credentials into one plugin

Defined Under Namespace

Classes: ConsoleCommandDispatcher

Instance Attribute Summary

Attributes inherited from Msf::Plugin

#opts

Attributes included from Framework::Offspring

#framework

Instance Method Summary collapse

Methods inherited from Msf::Plugin

#add_console_dispatcher, create, #flush, #input, #output, #print, #print_error, #print_good, #print_line, #print_status, #print_warning, #remove_console_dispatcher

Constructor Details

#initialize(framework, opts) ⇒ Capture

Returns a new instance of Capture.


622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
# File 'plugins/capture.rb', line 622

def initialize(framework, opts)
  super
  add_console_dispatcher(ConsoleCommandDispatcher)
  filename = 'capture_config.yaml'
  user_config_file = File.join(Msf::Config.get_config_root, filename)
  unless File.exist?(user_config_file)
    # Initialise user config file with the installed one
    base_config_file = File.join(Msf::Config.data_directory, filename)
    unless File.exist?(base_config_file)
      print_error('Plugin config file not found!')
      return
    end
    FileUtils.cp(base_config_file, user_config_file)
  end
end

Instance Method Details

#cleanupObject


638
639
640
# File 'plugins/capture.rb', line 638

def cleanup
  remove_console_dispatcher('HashCapture')
end

#descObject


646
647
648
# File 'plugins/capture.rb', line 646

def desc
  'Start all credential capture and spoofing services'
end

#nameObject


642
643
644
# File 'plugins/capture.rb', line 642

def name
  'Credential Capture'
end