Let's start with some of the basics of module building:
- In the first line, the require method specifies which libraries this module needs to load:
require 'msf/core/post/windows/powershell'
- The following line defines the class which inherits the properties of the post family. The post module can import several functionalities, such as accessing the filesystem, using the registry, WMI, LDAP, and so on:
class MetasploitModule < Msf::Post
- The include statement can be used to include a particular functionality of the framework into our own module. For example, if we are building a post module, we can include it as:
include Msf::Post::
- The following line will include PowerShell functionalities in the module:
include Msf::Post::Windows::Powershell ...