[ELECTRONIC NOISES]
Penetration testing with the Metasploit framework--
now that we have a good understanding of what
the Metasploit framework is, how it's set up and its structure,
as well as how it's stored and the organization and structure
of the file system, we can begin exploring
how we can integrate the Metasploit framework
into penetration tests.
So let's get started firstly by understanding
how we can utilize the Metasploit framework
for penetration testing.
As I mentioned previously, the Metasploit framework
can be used to perform and automate
various tasks that fall under the penetration testing
lifecycle.
In order to understand how we can leverage the Metasploit
framework for penetration testing,
we need to explore the various phases of a penetration
test and the respective techniques and objectives
within each of those phases.
As a standard, we can adopt the Penetration Testing Execution
Standard as a roadmap to understanding
the various phases that make up a penetration test
and how the Metasploit framework can
be integrated into each phase.
So let's take a look at the Penetration Testing Execution
Standard.
The Penetration Testing Execution Standard, also known
as PTES, is a penetration testing methodology
that was developed by a team of information security
practitioners and penetration testers
with the aim of addressing the need
for a comprehensive and up-to-date standard
for penetration testing.
Now, given all the complexity involved
within or during a penetration test, it comes as no surprise
that most penetration testers abide by an execution standard
that provides them with a methodology
or a step-by-step process as to how
they should go about conducting a penetration test.
We can utilize the Penetration Testing Execution Standard
as our own methodology and take a look
at how we can, again, integrate the Metasploit framework
into each of these phases.
You can check out the Penetration Testing Execution
Standard for yourselves.
The GitHub repository is available online.
And, again, it'll give you an idea of each of the phases
involved and what they all entail.
Now I've already generated a diagram that highlights pretty
much the most important phases of a penetration test
and some of the subphases involved with them.
So let's start off at the top right.
At the beginning or in the beginning
of a penetration test, we're essentially
conducting information gathering.
The goal of the information gathering phase
is to enumerate as much or to extract
as much information as possible from the target system.
And this, of course, ties in very closely to enumerate,
which again is an active phase of information gathering
that involves directly interacting with the target
infrastructure and enumerating information like the target
operating system, the target configuration,
the various service versions that
are running on the target, et cetera, et cetera.
The next phase that falls under that is exploitation.
And this, of course, involves gaining initial access
to a target system or to a target network.
And once you've obtained initial access,
you then begin the post-exploitation phases
that, again, entail privilege escalation,
so elevating your privileges to the highest level.
Secondly, you can also set up persistent access
so that you have a system or a form of persistent access
to the target system or to the target
network after exploitation.
This will help you maintain a persistent session
on the target network or on the target, which will essentially
prevent you from losing access in the event
the network goes down or one of these systems is shut down.
One of the final phases under post-exploitation
is clearing your tracks, and this involves the clearing
of your tracks in the form of clearing Windows Event logs
or on Linux clearing the bash history file as well
as various other techniques that we will be exploring.
So this methodology gives us a good idea of all the phases
involved in a penetration test.
And we will be exploring all of these phases.
And now that we have an understanding
of the various phases involved, we
can actually take a look at how the Metasploit framework can
be integrated into each of these phases.
So this table essentially provides you
with a good idea of the various penetration testing phases
and, furthermore, the Metasploit framework implementation
into each of these phases.
So firstly, in terms of information gathering
and enumeration, as you can see we will primarily
be utilizing auxiliary modules as well as other external tools
like Nmap and then taking a look at how
to import Nmap results into the Metasploit framework database.
We will then move on to vulnerability scanning, where
we will be utilizing auxiliary modules to identify or to test
targets for certain vulnerabilities.
And then we'll be utilizing a vulnerability
scanning utility like Nessus and taking a look at how
to import the results from Nessus into the Metasploit
framework.
Once we've taken a look at vulnerability scanning,
we'll then move on to exploitation,
where we will be using the information from the first two
phases to stage our attack.
So we'll take a look at how to utilize exploit modules
and payloads and how we can gain access
to target systems via exploiting various services
on both Windows and Linux systems
as well as exploiting inherent vulnerabilities
in these operating systems.
In the post-exploitation phase, we
will be taking a look at how to use the interpreter
payload or a Meterpreter session on the target system
in order to perform various post-exploitation techniques,
one of them being privilege escalation.
Under the privilege escalation phase,
we will also be using Meterpreter as well as
a few other post-exploitation modules
available with the Metasploit framework.
After we have been able to elevate our privileges,
we'll move on to maintaining persistent access.
And we will explore--
or we will actually perform this with the Meterpreter payload
as well as various post-exploitation modules
and persistence modules.
Now that we have a good idea of the integration
of the Metasploit framework and how it will essentially
integrate and interpolate with the penetration testing
methodology, we can actually move on
to our first practical video, where
we will be taking a look at how to install the Metasploit
framework.