Class: Plugin::EvasionDB

Inherits:
Msf::Plugin
  • Object
show all
Defined in:
lib/msf-plugins/evasiondb.rb

Defined Under Namespace

Classes: ConsoleCommandDispatcher

Instance Method Summary collapse

Constructor Details

#initialize(framework, opts) ⇒ EvasionDB

Returns a new instance of EvasionDB.



232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
# File 'lib/msf-plugins/evasiondb.rb', line 232

def initialize(framework, opts)
  super
  require 'fidius-evasiondb'
  msf_home = File.expand_path("../..",__FILE__)
  dbconfig_path = File.join(msf_home,"data","database.yml")
  raise "no database.yml in #{dbconfig_path}" if !File.exists?(dbconfig_path)

  $console = opts['ConsoleDriver']
  $auto_logging = true
  FIDIUS::EvasionDB.config(dbconfig_path)
  FIDIUS::EvasionDB.use_recoder "Msf-Recorder"
  FIDIUS::EvasionDB.use_fetcher "PreludeDB"
  FIDIUS::EvasionDB.use_rule_fetcher "Snortrule-Fetcher"
  FIDIUS::EvasionDB::SnortRuleFetcher.ssh_options = {:auth_methods=>["password"],:msfmodule=>FIDIUS::MsfModuleStub}

  add_console_dispatcher(ConsoleCommandDispatcher)
  framework.events.add_general_subscriber(FIDIUS::ModuleRunCallback.new)

  FIDIUS::PacketLogger.init_with_framework(framework)
  FIDIUS::PacketLogger.on_log do |caused_by, data, socket|
    FIDIUS::EvasionDB.current_recorder.log_packet(caused_by,data,socket)
  end
  FIDIUS::EvasionDB.current_fetcher.begin_record
  print_status("EvasionDB plugin loaded.")
end

Instance Method Details

#cleanupObject



258
259
260
# File 'lib/msf-plugins/evasiondb.rb', line 258

def cleanup
  remove_console_dispatcher(ConsoleCommandDispatcher)
end

#descObject



266
267
268
# File 'lib/msf-plugins/evasiondb.rb', line 266

def desc
  ""
end

#nameObject



262
263
264
# File 'lib/msf-plugins/evasiondb.rb', line 262

def name
  "FIDIUS-EvasionDB"
end