WEBVTT

00:00:00.000 --> 00:00:03.409 align:middle line:90%


00:00:03.409 --> 00:00:05.357 align:middle line:90%
[ELECTRONIC NOISES]

00:00:05.357 --> 00:00:10.230 align:middle line:90%


00:00:10.230 --> 00:00:13.530 align:middle line:84%
Penetration testing with
the Metasploit framework--

00:00:13.530 --> 00:00:15.660 align:middle line:84%
now that we have a good
understanding of what

00:00:15.660 --> 00:00:20.040 align:middle line:84%
the Metasploit framework is, how
it's set up and its structure,

00:00:20.040 --> 00:00:25.020 align:middle line:84%
as well as how it's stored and
the organization and structure

00:00:25.020 --> 00:00:28.260 align:middle line:84%
of the file system,
we can begin exploring

00:00:28.260 --> 00:00:31.230 align:middle line:84%
how we can integrate
the Metasploit framework

00:00:31.230 --> 00:00:32.860 align:middle line:90%
into penetration tests.

00:00:32.860 --> 00:00:36.690 align:middle line:84%
So let's get started
firstly by understanding

00:00:36.690 --> 00:00:39.690 align:middle line:84%
how we can utilize the
Metasploit framework

00:00:39.690 --> 00:00:41.400 align:middle line:90%
for penetration testing.

00:00:41.400 --> 00:00:44.220 align:middle line:84%
As I mentioned previously,
the Metasploit framework

00:00:44.220 --> 00:00:45.930 align:middle line:84%
can be used to
perform and automate

00:00:45.930 --> 00:00:48.660 align:middle line:84%
various tasks that fall
under the penetration testing

00:00:48.660 --> 00:00:49.860 align:middle line:90%
lifecycle.

00:00:49.860 --> 00:00:52.740 align:middle line:84%
In order to understand how we
can leverage the Metasploit

00:00:52.740 --> 00:00:54.780 align:middle line:84%
framework for
penetration testing,

00:00:54.780 --> 00:00:57.780 align:middle line:84%
we need to explore the various
phases of a penetration

00:00:57.780 --> 00:01:00.900 align:middle line:84%
test and the respective
techniques and objectives

00:01:00.900 --> 00:01:03.540 align:middle line:90%
within each of those phases.

00:01:03.540 --> 00:01:07.200 align:middle line:84%
As a standard, we can adopt the
Penetration Testing Execution

00:01:07.200 --> 00:01:09.330 align:middle line:84%
Standard as a roadmap
to understanding

00:01:09.330 --> 00:01:12.180 align:middle line:84%
the various phases that
make up a penetration test

00:01:12.180 --> 00:01:14.070 align:middle line:84%
and how the Metasploit
framework can

00:01:14.070 --> 00:01:16.270 align:middle line:90%
be integrated into each phase.

00:01:16.270 --> 00:01:19.890 align:middle line:84%
So let's take a look at the
Penetration Testing Execution

00:01:19.890 --> 00:01:20.610 align:middle line:90%
Standard.

00:01:20.610 --> 00:01:23.670 align:middle line:84%
The Penetration Testing
Execution Standard, also known

00:01:23.670 --> 00:01:27.420 align:middle line:84%
as PTES, is a penetration
testing methodology

00:01:27.420 --> 00:01:30.750 align:middle line:84%
that was developed by a
team of information security

00:01:30.750 --> 00:01:33.030 align:middle line:84%
practitioners and
penetration testers

00:01:33.030 --> 00:01:35.310 align:middle line:84%
with the aim of
addressing the need

00:01:35.310 --> 00:01:37.620 align:middle line:84%
for a comprehensive
and up-to-date standard

00:01:37.620 --> 00:01:39.210 align:middle line:90%
for penetration testing.

00:01:39.210 --> 00:01:42.090 align:middle line:84%
Now, given all the
complexity involved

00:01:42.090 --> 00:01:46.410 align:middle line:84%
within or during a penetration
test, it comes as no surprise

00:01:46.410 --> 00:01:50.610 align:middle line:84%
that most penetration testers
abide by an execution standard

00:01:50.610 --> 00:01:52.920 align:middle line:84%
that provides them
with a methodology

00:01:52.920 --> 00:01:55.500 align:middle line:84%
or a step-by-step
process as to how

00:01:55.500 --> 00:01:58.380 align:middle line:84%
they should go about
conducting a penetration test.

00:01:58.380 --> 00:02:02.010 align:middle line:84%
We can utilize the Penetration
Testing Execution Standard

00:02:02.010 --> 00:02:04.950 align:middle line:84%
as our own methodology
and take a look

00:02:04.950 --> 00:02:07.770 align:middle line:84%
at how we can, again, integrate
the Metasploit framework

00:02:07.770 --> 00:02:09.539 align:middle line:90%
into each of these phases.

00:02:09.539 --> 00:02:12.390 align:middle line:84%
You can check out the
Penetration Testing Execution

00:02:12.390 --> 00:02:13.620 align:middle line:90%
Standard for yourselves.

00:02:13.620 --> 00:02:17.010 align:middle line:84%
The GitHub repository
is available online.

00:02:17.010 --> 00:02:20.070 align:middle line:84%
And, again, it'll give you
an idea of each of the phases

00:02:20.070 --> 00:02:23.100 align:middle line:84%
involved and what
they all entail.

00:02:23.100 --> 00:02:27.180 align:middle line:84%
Now I've already generated a
diagram that highlights pretty

00:02:27.180 --> 00:02:30.660 align:middle line:84%
much the most important
phases of a penetration test

00:02:30.660 --> 00:02:33.430 align:middle line:84%
and some of the subphases
involved with them.

00:02:33.430 --> 00:02:36.120 align:middle line:84%
So let's start off
at the top right.

00:02:36.120 --> 00:02:38.010 align:middle line:84%
At the beginning
or in the beginning

00:02:38.010 --> 00:02:39.690 align:middle line:84%
of a penetration test,
we're essentially

00:02:39.690 --> 00:02:42.420 align:middle line:84%
conducting
information gathering.

00:02:42.420 --> 00:02:45.030 align:middle line:84%
The goal of the
information gathering phase

00:02:45.030 --> 00:02:48.030 align:middle line:84%
is to enumerate as
much or to extract

00:02:48.030 --> 00:02:51.750 align:middle line:84%
as much information as possible
from the target system.

00:02:51.750 --> 00:02:54.810 align:middle line:84%
And this, of course, ties in
very closely to enumerate,

00:02:54.810 --> 00:02:58.290 align:middle line:84%
which again is an active
phase of information gathering

00:02:58.290 --> 00:03:01.680 align:middle line:84%
that involves directly
interacting with the target

00:03:01.680 --> 00:03:05.550 align:middle line:84%
infrastructure and enumerating
information like the target

00:03:05.550 --> 00:03:09.540 align:middle line:84%
operating system, the
target configuration,

00:03:09.540 --> 00:03:11.100 align:middle line:84%
the various service
versions that

00:03:11.100 --> 00:03:13.620 align:middle line:84%
are running on the target,
et cetera, et cetera.

00:03:13.620 --> 00:03:17.200 align:middle line:84%
The next phase that falls
under that is exploitation.

00:03:17.200 --> 00:03:19.980 align:middle line:84%
And this, of course, involves
gaining initial access

00:03:19.980 --> 00:03:22.990 align:middle line:84%
to a target system or
to a target network.

00:03:22.990 --> 00:03:25.170 align:middle line:84%
And once you've
obtained initial access,

00:03:25.170 --> 00:03:27.990 align:middle line:84%
you then begin the
post-exploitation phases

00:03:27.990 --> 00:03:30.630 align:middle line:84%
that, again, entail
privilege escalation,

00:03:30.630 --> 00:03:33.960 align:middle line:84%
so elevating your privileges
to the highest level.

00:03:33.960 --> 00:03:37.710 align:middle line:84%
Secondly, you can also
set up persistent access

00:03:37.710 --> 00:03:41.520 align:middle line:84%
so that you have a system or
a form of persistent access

00:03:41.520 --> 00:03:44.100 align:middle line:84%
to the target system
or to the target

00:03:44.100 --> 00:03:45.990 align:middle line:90%
network after exploitation.

00:03:45.990 --> 00:03:49.320 align:middle line:84%
This will help you maintain
a persistent session

00:03:49.320 --> 00:03:52.830 align:middle line:84%
on the target network or on the
target, which will essentially

00:03:52.830 --> 00:03:55.590 align:middle line:84%
prevent you from losing
access in the event

00:03:55.590 --> 00:03:59.940 align:middle line:84%
the network goes down or one
of these systems is shut down.

00:03:59.940 --> 00:04:02.610 align:middle line:84%
One of the final phases
under post-exploitation

00:04:02.610 --> 00:04:05.790 align:middle line:84%
is clearing your tracks, and
this involves the clearing

00:04:05.790 --> 00:04:10.710 align:middle line:84%
of your tracks in the form of
clearing Windows Event logs

00:04:10.710 --> 00:04:13.980 align:middle line:84%
or on Linux clearing the
bash history file as well

00:04:13.980 --> 00:04:17.140 align:middle line:84%
as various other techniques
that we will be exploring.

00:04:17.140 --> 00:04:21.360 align:middle line:84%
So this methodology gives us
a good idea of all the phases

00:04:21.360 --> 00:04:22.860 align:middle line:90%
involved in a penetration test.

00:04:22.860 --> 00:04:25.590 align:middle line:84%
And we will be exploring
all of these phases.

00:04:25.590 --> 00:04:27.540 align:middle line:84%
And now that we have
an understanding

00:04:27.540 --> 00:04:29.310 align:middle line:84%
of the various
phases involved, we

00:04:29.310 --> 00:04:32.310 align:middle line:84%
can actually take a look at how
the Metasploit framework can

00:04:32.310 --> 00:04:35.020 align:middle line:84%
be integrated into
each of these phases.

00:04:35.020 --> 00:04:37.380 align:middle line:84%
So this table
essentially provides you

00:04:37.380 --> 00:04:41.970 align:middle line:84%
with a good idea of the various
penetration testing phases

00:04:41.970 --> 00:04:45.420 align:middle line:84%
and, furthermore, the Metasploit
framework implementation

00:04:45.420 --> 00:04:47.440 align:middle line:90%
into each of these phases.

00:04:47.440 --> 00:04:50.070 align:middle line:84%
So firstly, in terms of
information gathering

00:04:50.070 --> 00:04:53.160 align:middle line:84%
and enumeration, as you
can see we will primarily

00:04:53.160 --> 00:04:57.330 align:middle line:84%
be utilizing auxiliary modules
as well as other external tools

00:04:57.330 --> 00:04:59.550 align:middle line:84%
like Nmap and then
taking a look at how

00:04:59.550 --> 00:05:04.020 align:middle line:84%
to import Nmap results into the
Metasploit framework database.

00:05:04.020 --> 00:05:06.450 align:middle line:84%
We will then move on to
vulnerability scanning, where

00:05:06.450 --> 00:05:10.890 align:middle line:84%
we will be utilizing auxiliary
modules to identify or to test

00:05:10.890 --> 00:05:13.390 align:middle line:84%
targets for certain
vulnerabilities.

00:05:13.390 --> 00:05:16.560 align:middle line:84%
And then we'll be
utilizing a vulnerability

00:05:16.560 --> 00:05:20.130 align:middle line:84%
scanning utility like Nessus
and taking a look at how

00:05:20.130 --> 00:05:23.670 align:middle line:84%
to import the results from
Nessus into the Metasploit

00:05:23.670 --> 00:05:25.260 align:middle line:90%
framework.

00:05:25.260 --> 00:05:27.900 align:middle line:84%
Once we've taken a look
at vulnerability scanning,

00:05:27.900 --> 00:05:30.030 align:middle line:84%
we'll then move on
to exploitation,

00:05:30.030 --> 00:05:32.730 align:middle line:84%
where we will be using the
information from the first two

00:05:32.730 --> 00:05:34.890 align:middle line:90%
phases to stage our attack.

00:05:34.890 --> 00:05:38.370 align:middle line:84%
So we'll take a look at how
to utilize exploit modules

00:05:38.370 --> 00:05:40.710 align:middle line:84%
and payloads and how
we can gain access

00:05:40.710 --> 00:05:44.130 align:middle line:84%
to target systems via
exploiting various services

00:05:44.130 --> 00:05:46.170 align:middle line:84%
on both Windows
and Linux systems

00:05:46.170 --> 00:05:48.690 align:middle line:84%
as well as exploiting
inherent vulnerabilities

00:05:48.690 --> 00:05:50.610 align:middle line:90%
in these operating systems.

00:05:50.610 --> 00:05:52.830 align:middle line:84%
In the post-exploitation
phase, we

00:05:52.830 --> 00:05:55.500 align:middle line:84%
will be taking a look at
how to use the interpreter

00:05:55.500 --> 00:05:59.430 align:middle line:84%
payload or a Meterpreter
session on the target system

00:05:59.430 --> 00:06:02.550 align:middle line:84%
in order to perform various
post-exploitation techniques,

00:06:02.550 --> 00:06:05.280 align:middle line:84%
one of them being
privilege escalation.

00:06:05.280 --> 00:06:07.080 align:middle line:84%
Under the privilege
escalation phase,

00:06:07.080 --> 00:06:09.810 align:middle line:84%
we will also be using
Meterpreter as well as

00:06:09.810 --> 00:06:12.570 align:middle line:84%
a few other
post-exploitation modules

00:06:12.570 --> 00:06:15.420 align:middle line:84%
available with the
Metasploit framework.

00:06:15.420 --> 00:06:18.090 align:middle line:84%
After we have been able
to elevate our privileges,

00:06:18.090 --> 00:06:20.970 align:middle line:84%
we'll move on to maintaining
persistent access.

00:06:20.970 --> 00:06:22.500 align:middle line:90%
And we will explore--

00:06:22.500 --> 00:06:27.930 align:middle line:84%
or we will actually perform this
with the Meterpreter payload

00:06:27.930 --> 00:06:31.170 align:middle line:84%
as well as various
post-exploitation modules

00:06:31.170 --> 00:06:33.210 align:middle line:90%
and persistence modules.

00:06:33.210 --> 00:06:36.330 align:middle line:84%
Now that we have a good
idea of the integration

00:06:36.330 --> 00:06:39.780 align:middle line:84%
of the Metasploit framework
and how it will essentially

00:06:39.780 --> 00:06:43.560 align:middle line:84%
integrate and interpolate
with the penetration testing

00:06:43.560 --> 00:06:45.900 align:middle line:84%
methodology, we can
actually move on

00:06:45.900 --> 00:06:48.030 align:middle line:84%
to our first
practical video, where

00:06:48.030 --> 00:06:51.000 align:middle line:84%
we will be taking a look at
how to install the Metasploit

00:06:51.000 --> 00:06:52.850 align:middle line:90%
framework.

00:06:52.850 --> 00:06:54.000 align:middle line:90%