Building your own post-exploitation module
Now we have covered enough background about building modules. Here, we will see an example of how we can build our own module and add it into the framework. Building modules can be very handy as they will give us the power of extending the framework depending on our need.
How to do it...
Let us build a small post exploitation module that will enumerate all the installed applications on the target machine. As it is a post exploitation module, we will require a compromised target in order to execute the module.
To start with building the module, we will first import the framework libraries and include the required dependencies:
require 'msf/core' require 'rex' require 'msf/core/post/windows/registry' class ...
Get Metasploit Penetration Testing Cookbook now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.