Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Arrow up icon
GO TO TOP
Metasploit Bootcamp

You're reading from   Metasploit Bootcamp The fastest way to learn Metasploit

Arrow left icon
Product type Paperback
Published in May 2017
Publisher
ISBN-13 9781788297134
Length 230 pages
Edition 1st Edition
Arrow right icon
Author (1):
Arrow left icon
Nipun Jaswal Nipun Jaswal
Author Profile Icon Nipun Jaswal
Nipun Jaswal
Arrow right icon
View More author details
Toc

Table of Contents (15) Chapters Close

Title Page
Credits
About the Author
About the Reviewer
www.PacktPub.com
Customer Feedback
Dedication
Preface
1. Getting Started with Metasploit FREE CHAPTER 2. Identifying and Scanning Targets 3. Exploitation and Gaining Access 4. Post-Exploitation with Metasploit 5. Testing Services with Metasploit 6. Fast-Paced Exploitation with Metasploit 7. Exploiting Real-World Challenges with Metasploit

Module building essentials


The best way to start learning about module development is to delve deeper into the existing Metasploit modules and see how they work. Let's look at some modules to find out what happens when we run these modules.

The format of a Metasploit module

The skeleton for Metasploit modules is relatively simple. We can see the universal header section in the following code:

require 'msf/core' 
class MetasploitModule < Msf::Auxiliary 
  def initialize(info = {}) 
    super(update_info(info, 
      'Name'           => 'Module name', 
      'Description'    => %q{ 
       Say something that the user might want to know. 
      }, 
      'Author'         => [ 'Name' ], 
      'License'        => MSF_LICENSE 
    )) 
  end 
def run 
    # Main function 
  end 
end 

A module starts by including the necessary libraries with the required keyword, which in the preceding code is followed by the msf/core libraries. Thus, it includes the core libraries from the msf directory...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at £13.99/month. Cancel anytime
Visually different images