Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Metasploit for Beginners

You're reading from  Metasploit for Beginners

Product type Book
Published in Jul 2017
Publisher Packt
ISBN-13 9781788295970
Pages 190 pages
Edition 1st Edition
Languages
Author (1):
Sagar Rahalkar Sagar Rahalkar
Profile icon Sagar Rahalkar

Table of Contents (11) Chapters

Preface 1. Introduction to Metasploit and Supporting Tools 2. Setting up Your Environment 3. Metasploit Components and Environment Configuration 4. Information Gathering with Metasploit 5. Vulnerability Hunting with Metasploit 6. Client-side Attacks with Metasploit 7. Web Application Scanning with Metasploit 8. Antivirus Evasion and Anti-Forensics 9. Cyber Attack Management with Armitage 10. Extending Metasploit and Exploit Development

Web Application Scanning with Metasploit

In the previous chapter, we had an overview of how Metasploit can be used to launch deceptive client-side attacks. In this chapter, you will learn various features of the Metasploit Framework that can be used to discover vulnerabilities within web applications. In this chapter, we will cover the following topics:

  • Setting up a vulnerable web application
  • Web application vulnerability scanning with WMAP
  • Metasploit auxiliary modules for web application enumeration and scanning

Setting up a vulnerable application

Before we start exploring various web application scanning features offered by the Metasploit Framework, we need to set up a test application environment in which we can fire our tests. As discussed in the initial chapters, Metasploitable 2 is a Linux distribution that is deliberately made vulnerable. It also contains web applications that are intentionally made vulnerable, and we can leverage this to practice using Metasploit's web scanning modules.

In order to get the vulnerable test application up and running, simply boot into metasploitable 2 ;Linux and access it remotely from any of the web browsers, as shown in the following screenshot:

There are two different vulnerable applications that run by default on the metasploitable 2 distribution, Mutillidae and Damn Vulnerable Web Application (DVWA). The vulnerable application can be opened...

Web application scanning using WMAP

WMAP is a powerful web application vulnerability scanner available in Kali Linux. It is integrated into the Metasploit Framework in the form of a plugin. In order to use WMAP, we first need to load and initiate the plugin within the Metasploit framework, as shown in the following screenshot:

Once the wmap plugin is loaded into the Metasploit Framework, the next step is to create a new site or workspace for our scan. Once the site has been created, we need to add the target URL to be scanned, as shown in the following screenshot:

Now that we have created a new site and defined our target, we need to check which WMAP modules would be applicable against our target. For example, if our target is not SSL-enabled, then there's no point in running SSL-related tests against this. This can be done using the wmap_run -t command, as shown in the...

Metasploit Auxiliaries for Web Application enumeration and scanning

We have already seen some of the auxiliary modules within the Metasploit Framework for enumerating HTTP services in Chapter 4, ;Information Gathering with Metasploit. Next, we'll explore some additional auxiliary modules that can be effectively used for enumeration and scanning web applications:

  • cert: ;This module can be used to enumerate whether the certificate on the target web application is active or expired. ;Its auxiliary module name is auxiliary/scanner/http/cert, the use of which is shown in the following screenshot:

The parameters to be configured are as follows:

  • RHOSTS: ;IP address or IP range of the target to be scanned
It is also possible to run the module simultaneously on multiple targets by specifying a file containing a list of target IP addresses, for example, set RHOSTS /root/targets...

Summary

In this chapter, we explored various features of the Metasploit Framework that can be used for web application security scanning. Moving ahead to the next chapter, you will learn various techniques that can be used to hide our payloads from antivirus programs and clear our tracks after compromising the system.

Exercises

Find and exploit vulnerabilities in the following vulnerable applications:

  • DVWA
  • Mutillidae
  • OWASP Webgoat
lock icon The rest of the chapter is locked
You have been reading a chapter from
Metasploit for Beginners
Published in: Jul 2017 Publisher: Packt ISBN-13: 9781788295970
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 €14.99/month. Cancel anytime}