O'Reilly logo

Metasploit Penetration Testing Cookbook - Second Edition by Abhinav Singh, Monika Agarwal

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Building your own post-exploitation module

Now, we have covered enough background about building modules. In this recipe, 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.

Getting ready

Let us build a small post-exploitation module that will enumerate all of 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:

  1. To begin 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' ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required