The fundamentals of Metasploit
Now that we have recalled the essential phases of a penetration test and installed Metasploit, let's talk about the big picture; that is, Metasploit. Metasploit is a security project that provides exploits and tons of reconnaissance features to aid any penetration tester. Metasploit was created by H.D. Moore back in 2003, and since then, its rapid development has led it to be recognized as one of the most popular penetration testing tools available. Metasploit was a natively Ruby-driven project, but with its latest releases, it has started to support Python and Go modules as well. Metasploit offers various exploits, post exploits, and auxiliary, scanner, evasion, and exploit development tools.
With the release of Metasploit 5, a number of new capabilities have been added to Metasploit, some of which are as follows:
- A choice between a database and the new HTTP-based data service
- Evasion modules
- The Automation API
- Exploitation at scale (RHOST has now changed to RHOSTS, which allows an exploit module to be run over multiple targets)
- Shell sessions now have a background command
- Support for Go and Python, along with Ruby
Important Note
For more on these new features, refer to Metasploit's YouTube Channel at https://www.youtube.com/channel/UCx4d2aRIfxfEUdS_5YIYKPg.
The latest Metasploit version (5.0) comes in two editions, as follows:
- Metasploit Pro: This version is a commercial one and offers tons of great features, such as web application scanning, exploitation, and automated exploitation, and is quite suitable for professional penetration testers and IT security teams. The Pro edition is primarily used for professional, advanced, and extensive penetration tests and enterprise security programs.
- Metasploit Framework: This is a command-line heavy edition with all the manual tasks provided, such as manual exploitation, third-party import, and so on. This version is suitable for developers and security researchers as it's free and open source.
Throughout this book, we will be using the Metasploit Framework edition. Metasploit also offers various types of user interfaces, as follows:
- The GUI: The GUI has all the options you'll ever need available at the click of a button. This is a user-friendly interface that helps to provide cleaner vulnerability management. The UI is offered as a part of Metasploit Pro only.
- The console interface: This is the preferred interface and the most popular one as well. This interface provides an all-in-one approach to all the options offered by Metasploit. This interface is also considered one of the most stable interfaces. Throughout this book, we will be using the console interface the most.
- The command-line interface: The command-line interface is the most powerful interface. It supports launching exploits for activities such as payload generation. However, remembering every command while using the command-line interface is a difficult job.
Important Note:
For more information on Metasploit Pro, refer to https://www.rapid7.com/products/metasploit/download/editions/.