Plugins & Mixins

Plugins

ls /usr/share/metasploit-framework/plugins
msf6 > load nessus
msf6 > nessus_help
sudo cp <plugin.rb> /usr/share/metasploit-framework/plugins/new_plugin.rb
msfconsole -q
msf6 > load pentest

Mixins

The Metasploit Framework is written in Ruby, an object-oriented programming language. This plays a big part in what makes msfconsole excellent to use. Mixins are one of those features that, when implemented, offer a large amount of flexibility to both the creator of the script and the user.

Mixins are classes that act as methods for use by other classes without having to be the parent class of those other classes. Thus, it would be deemed inappropriate to call it inheritance but rather inclusion. They are mainly used when we:

  1. Want to provide a lot of optional features for a class.

  2. Want to use one particular feature for a multitude of classes.

Most of the Ruby programming language revolves around Mixins as Modules. The concept of Mixins is implemented using the word include, to which we pass the name of the module as a parameter. We can read more about mixins here.

Last updated