How to do it...

  1. The basic template to build a fuzzer will be similar to the one we discussed for the development of an auxiliary module, which should look as follows:
class MetasploitModule < Msf::Auxiliary  include Msf::Exploit::Remote::Tcp  include Msf::Auxiliary::Fuzzer  def initialize(info = {})    super(update_info(info,      'Name' => 'HTTP Fuzzer',      'Description' => %q{Simple HTTP GET Request Fuzzer},      'Author' => [ 'Daniel Teixeira' ],      'License' => MSF_LICENSE    ))    register_options([      Opt::RPORT(80),      OptInt.new("MAXLENGTH", [true, "Maximum string length", 20000] )    ])  end
  1. Now that we have imported the MSF libraries, created a class, and defined the options, the next step will be to define the function that will establish the sock connection:

Get Metasploit Penetration Testing Cookbook - Third Edition 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.