WEBVTT

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


00:00:05.478 --> 00:00:08.964 align:middle line:90%
[MUSIC PLAYING]

00:00:08.964 --> 00:00:09.960 align:middle line:90%


00:00:09.960 --> 00:00:13.620 align:middle line:84%
The Metasploit Framework, so
welcome to the exploitation

00:00:13.620 --> 00:00:16.170 align:middle line:84%
frameworks section
of this course.

00:00:16.170 --> 00:00:19.290 align:middle line:84%
In this section, we're going
to be taking a look at two

00:00:19.290 --> 00:00:22.980 align:middle line:84%
of the most popular, widely
used exploitation frameworks

00:00:22.980 --> 00:00:25.920 align:middle line:84%
out there, one of which is
the Metasploit framework.

00:00:25.920 --> 00:00:27.750 align:middle line:84%
In the next video,
we'll be taking a look

00:00:27.750 --> 00:00:29.610 align:middle line:84%
at how to set up
and use PowerShell

00:00:29.610 --> 00:00:31.420 align:middle line:90%
Empire for exploitation.

00:00:31.420 --> 00:00:34.110 align:middle line:84%
So this video is
going to be focused

00:00:34.110 --> 00:00:37.930 align:middle line:84%
on how to utilize the Metasploit
Framework for exploitation.

00:00:37.930 --> 00:00:39.960 align:middle line:84%
However, before that,
I'm going to give you

00:00:39.960 --> 00:00:42.270 align:middle line:84%
an introduction to the
Metasploit Framework,

00:00:42.270 --> 00:00:44.640 align:middle line:84%
and I'm going to
contextualize its use

00:00:44.640 --> 00:00:46.950 align:middle line:84%
in the case of a
penetration test,

00:00:46.950 --> 00:00:49.050 align:middle line:84%
more specifically,
the exploitation

00:00:49.050 --> 00:00:51.000 align:middle line:90%
phase of a penetration test.

00:00:51.000 --> 00:00:56.040 align:middle line:84%
Now, I actually want to preface
this video by telling you

00:00:56.040 --> 00:00:59.490 align:middle line:84%
that I've already covered the
Metasploit Framework in depth

00:00:59.490 --> 00:01:00.970 align:middle line:90%
within its own course.

00:01:00.970 --> 00:01:03.840 align:middle line:84%
So if you'd like to learn more
about the Metasploit Framework,

00:01:03.840 --> 00:01:06.300 align:middle line:84%
or if you're unsure
of what I am doing

00:01:06.300 --> 00:01:08.640 align:middle line:84%
within the practical
section in this video,

00:01:08.640 --> 00:01:09.937 align:middle line:90%
then do refer to that course.

00:01:09.937 --> 00:01:12.270 align:middle line:84%
And I would actually recommend
going through that course

00:01:12.270 --> 00:01:14.320 align:middle line:84%
before you go
through this course.

00:01:14.320 --> 00:01:16.320 align:middle line:84%
With that being said,
let's get started

00:01:16.320 --> 00:01:18.720 align:middle line:84%
by getting an understanding
of what the Metasploit

00:01:18.720 --> 00:01:19.860 align:middle line:90%
Framework is.

00:01:19.860 --> 00:01:22.800 align:middle line:84%
Now, the Metasploit
framework, also known as MSF,

00:01:22.800 --> 00:01:25.950 align:middle line:84%
is an open source, robust
penetration testing

00:01:25.950 --> 00:01:28.260 align:middle line:84%
and exploitation
framework that is

00:01:28.260 --> 00:01:32.220 align:middle line:84%
used by penetration testers and
security researchers worldwide.

00:01:32.220 --> 00:01:35.820 align:middle line:84%
It provides penetration testers
with a robust infrastructure

00:01:35.820 --> 00:01:39.120 align:middle line:84%
required to automate every
stage of the penetration testing

00:01:39.120 --> 00:01:42.030 align:middle line:84%
lifecycle, or the
exploitation lifecycle.

00:01:42.030 --> 00:01:45.990 align:middle line:84%
So why am I covering
exploitation frameworks?

00:01:45.990 --> 00:01:48.780 align:middle line:84%
Well, number one, you're going
to be coming across them quite

00:01:48.780 --> 00:01:51.360 align:middle line:84%
a bit, and more so with
the Metasploit Framework.

00:01:51.360 --> 00:01:53.250 align:middle line:84%
As you progress
with your journey

00:01:53.250 --> 00:01:54.960 align:middle line:84%
as a penetration
tester, you'll also

00:01:54.960 --> 00:01:58.290 align:middle line:84%
be introduced to
exploitation frameworks

00:01:58.290 --> 00:01:59.610 align:middle line:90%
like PowerShell Empire.

00:01:59.610 --> 00:02:02.520 align:middle line:84%
PowerShell Empire really
cannot be classified as just

00:02:02.520 --> 00:02:04.050 align:middle line:90%
an exploitation framework.

00:02:04.050 --> 00:02:07.980 align:middle line:84%
It is also used as a very
able command and control

00:02:07.980 --> 00:02:09.960 align:middle line:90%
server, or AC2 server.

00:02:09.960 --> 00:02:13.110 align:middle line:84%
So why are we focusing on
exploitation frameworks?

00:02:13.110 --> 00:02:16.740 align:middle line:84%
Well, as this
description just stated,

00:02:16.740 --> 00:02:20.430 align:middle line:84%
exploitation frameworks are used
to automate the exploitation

00:02:20.430 --> 00:02:23.020 align:middle line:84%
phase of a penetration
test and to streamline it.

00:02:23.020 --> 00:02:26.760 align:middle line:84%
So we've taken a look at
how to find exploits online,

00:02:26.760 --> 00:02:28.960 align:middle line:84%
how to fix them,
how to compile them,

00:02:28.960 --> 00:02:30.870 align:middle line:84%
and then how to
run them manually.

00:02:30.870 --> 00:02:35.070 align:middle line:84%
And from that process, you
can see why we would actually

00:02:35.070 --> 00:02:37.530 align:middle line:84%
need an exploitation
framework that

00:02:37.530 --> 00:02:39.240 align:middle line:90%
automates that entire process.

00:02:39.240 --> 00:02:41.050 align:middle line:84%
And there are various
reasons for that.

00:02:41.050 --> 00:02:44.010 align:middle line:84%
Number one, the process
is entirely streamlined,

00:02:44.010 --> 00:02:48.560 align:middle line:84%
and if the exploit module is
well developed, then, again,

00:02:48.560 --> 00:02:51.060 align:middle line:84%
you'll pretty much be able to
tell whether the exploit works

00:02:51.060 --> 00:02:53.640 align:middle line:84%
or doesn't work by just
running it against the target.

00:02:53.640 --> 00:02:55.140 align:middle line:84%
Now as I said, this
is not something

00:02:55.140 --> 00:02:57.150 align:middle line:84%
that I recommend
doing unless you've

00:02:57.150 --> 00:02:59.010 align:middle line:84%
performed the
necessary information

00:02:59.010 --> 00:03:03.000 align:middle line:84%
gathering, enumeration, and
vulnerability detection.

00:03:03.000 --> 00:03:07.680 align:middle line:84%
And secondly, exploitation
frameworks like Metasploit

00:03:07.680 --> 00:03:11.640 align:middle line:84%
will essentially handle
the actual reverse shell

00:03:11.640 --> 00:03:14.820 align:middle line:84%
part of the exploitation
process really well,

00:03:14.820 --> 00:03:18.090 align:middle line:84%
in that they provide you with
modules like the Meterpreter

00:03:18.090 --> 00:03:20.640 align:middle line:90%
payload.

00:03:20.640 --> 00:03:22.830 align:middle line:84%
By this point, you
should actually

00:03:22.830 --> 00:03:25.290 align:middle line:84%
be familiar with Meterpreter
and how to use it.

00:03:25.290 --> 00:03:27.780 align:middle line:84%
It's really just an
advanced reverse shell

00:03:27.780 --> 00:03:31.380 align:middle line:84%
over your typical reverse
shell, either through CMD.EXE

00:03:31.380 --> 00:03:34.410 align:middle line:84%
or PowerShell.EXE, or
in the case of Linux,

00:03:34.410 --> 00:03:38.160 align:middle line:84%
your standard bash
session or bash shell.

00:03:38.160 --> 00:03:40.230 align:middle line:84%
All right, so
again, that's really

00:03:40.230 --> 00:03:42.570 align:middle line:84%
the two main reasons why
exploitation frameworks

00:03:42.570 --> 00:03:43.600 align:middle line:90%
are important.

00:03:43.600 --> 00:03:45.960 align:middle line:84%
Now, by no means are
they a replacement

00:03:45.960 --> 00:03:48.163 align:middle line:84%
for manual exploitation
and testing.

00:03:48.163 --> 00:03:49.830 align:middle line:84%
That is something
that I still recommend

00:03:49.830 --> 00:03:51.750 align:middle line:84%
that you do before
you switch over

00:03:51.750 --> 00:03:54.390 align:middle line:90%
to an exploitation framework.

00:03:54.390 --> 00:03:58.230 align:middle line:84%
Now, in addition to being
an exploitation framework,

00:03:58.230 --> 00:03:59.820 align:middle line:84%
the Metasploit
Framework is much more

00:03:59.820 --> 00:04:01.680 align:middle line:84%
than that, in that
it can perform,

00:04:01.680 --> 00:04:04.410 align:middle line:84%
or it can be used to
automate and streamline,

00:04:04.410 --> 00:04:06.930 align:middle line:84%
the entire penetration
testing methodology, so

00:04:06.930 --> 00:04:09.840 align:middle line:84%
from information
gathering to enumeration,

00:04:09.840 --> 00:04:12.360 align:middle line:84%
vulnerability
scanning, exploitation,

00:04:12.360 --> 00:04:15.450 align:middle line:84%
post-exploitation, as well
as privilege escalation.

00:04:15.450 --> 00:04:17.550 align:middle line:84%
However, for this
video, we're primarily

00:04:17.550 --> 00:04:20.130 align:middle line:84%
focused on the
exploitation phase.

00:04:20.130 --> 00:04:22.530 align:middle line:84%
And of course, as you
already know by this point,

00:04:22.530 --> 00:04:26.220 align:middle line:84%
the Metasploit Framework is
also used to test and develop

00:04:26.220 --> 00:04:29.790 align:middle line:84%
exploits and has one of the
largest database of public

00:04:29.790 --> 00:04:32.610 align:middle line:84%
tested exploits in
regards to the exploits

00:04:32.610 --> 00:04:36.870 align:middle line:84%
being tested and being
in a modular style

00:04:36.870 --> 00:04:40.440 align:middle line:84%
or fashion, in that
every exploit is handled

00:04:40.440 --> 00:04:41.790 align:middle line:90%
in the form of a module.

00:04:41.790 --> 00:04:46.210 align:middle line:84%
And again, from the final
description within the slide,

00:04:46.210 --> 00:04:48.120 align:middle line:84%
you can see that the
Metasploit Framework

00:04:48.120 --> 00:04:49.980 align:middle line:90%
is designed to be modular.

00:04:49.980 --> 00:04:51.420 align:middle line:84%
All right, and
that modularity is

00:04:51.420 --> 00:04:53.170 align:middle line:84%
something that's very
important because it

00:04:53.170 --> 00:04:56.740 align:middle line:84%
allows for new functionality
to be implemented with ease.

00:04:56.740 --> 00:05:00.240 align:middle line:84%
So again, if we just go back
to our previous scenarios

00:05:00.240 --> 00:05:02.490 align:middle line:84%
that we explored in
the previous sections,

00:05:02.490 --> 00:05:05.750 align:middle line:84%
whenever we're using
public exploit code,

00:05:05.750 --> 00:05:08.540 align:middle line:84%
it's essentially an exploit
file that contains all the code.

00:05:08.540 --> 00:05:10.410 align:middle line:84%
And in some cases, you
need to compile it.

00:05:10.410 --> 00:05:14.090 align:middle line:84%
In other cases, like Python
scripts or Python exploits,

00:05:14.090 --> 00:05:16.530 align:middle line:84%
you can just run them
against the target.

00:05:16.530 --> 00:05:19.070 align:middle line:84%
What the Metasploit
framework does

00:05:19.070 --> 00:05:23.240 align:middle line:84%
is it essentially turns that
exploit code into a module.

00:05:23.240 --> 00:05:26.420 align:middle line:84%
And in order to develop a
Metasploit exploit module,

00:05:26.420 --> 00:05:30.230 align:middle line:84%
you need to do that using the
Ruby programming language.

00:05:30.230 --> 00:05:31.730 align:middle line:84%
Now as I said, this
is not something

00:05:31.730 --> 00:05:34.680 align:middle line:84%
that we'll be focusing
on within this course,

00:05:34.680 --> 00:05:37.640 align:middle line:84%
but that's basically what
the Metasploit Framework is

00:05:37.640 --> 00:05:38.940 align:middle line:90%
used to do.

00:05:38.940 --> 00:05:41.600 align:middle line:84%
And in order to understand
how to use the Metasploit

00:05:41.600 --> 00:05:44.600 align:middle line:84%
Framework, you actually
need to get an understanding

00:05:44.600 --> 00:05:46.880 align:middle line:84%
of the essential
terminology that

00:05:46.880 --> 00:05:49.050 align:middle line:84%
is pertinent to the
Metasploit Framework.

00:05:49.050 --> 00:05:51.660 align:middle line:84%
So firstly, we
have the interface.

00:05:51.660 --> 00:05:52.760 align:middle line:90%
So what is an interface?

00:05:52.760 --> 00:05:54.260 align:middle line:84%
Well, an interface
is essentially

00:05:54.260 --> 00:05:57.530 align:middle line:84%
the method of interacting
with the Metasploit Framework.

00:05:57.530 --> 00:05:59.840 align:middle line:84%
And the most popular
interface available,

00:05:59.840 --> 00:06:05.420 align:middle line:84%
and the most functional in terms
of the functionality that is

00:06:05.420 --> 00:06:07.935 align:middle line:90%
offered to you, is MSF Console.

00:06:07.935 --> 00:06:09.560 align:middle line:84%
So you might have
heard of that before.

00:06:09.560 --> 00:06:12.230 align:middle line:84%
If you've come here from the
Metasploit Framework course,

00:06:12.230 --> 00:06:14.130 align:middle line:84%
then you should be
familiar with this.

00:06:14.130 --> 00:06:15.428 align:middle line:90%
We then have a module.

00:06:15.428 --> 00:06:16.970 align:middle line:84%
All right, so a
module is essentially

00:06:16.970 --> 00:06:19.740 align:middle line:84%
a piece of code that
performs a particular task.

00:06:19.740 --> 00:06:21.770 align:middle line:84%
An example of a
module is an exploit,

00:06:21.770 --> 00:06:23.630 align:middle line:84%
as I stated in the
previous slide.

00:06:23.630 --> 00:06:25.070 align:middle line:90%
What is a vulnerability?

00:06:25.070 --> 00:06:27.470 align:middle line:84%
A vulnerability is
a weakness or flaw

00:06:27.470 --> 00:06:29.930 align:middle line:84%
in a computer system
or network that

00:06:29.930 --> 00:06:33.740 align:middle line:84%
can be exploited by an exploit
or in the case of Metasploit,

00:06:33.740 --> 00:06:35.360 align:middle line:90%
an exploit module.

00:06:35.360 --> 00:06:37.010 align:middle line:90%
What is an exploit?

00:06:37.010 --> 00:06:39.693 align:middle line:84%
An exploit is a piece
of code, or module

00:06:39.693 --> 00:06:41.360 align:middle line:84%
in the case of the
Metasploit Framework,

00:06:41.360 --> 00:06:44.480 align:middle line:84%
that is used to take
advantage of a vulnerability

00:06:44.480 --> 00:06:47.452 align:middle line:84%
within a system,
service, or application.

00:06:47.452 --> 00:06:49.160 align:middle line:84%
So if you remember
when we were searching

00:06:49.160 --> 00:06:53.360 align:middle line:84%
for exploits with Searchploit
and with ExploitDB,

00:06:53.360 --> 00:06:56.300 align:middle line:84%
we were able to identify
that some of those exploits

00:06:56.300 --> 00:06:58.400 align:middle line:84%
have a Metasploit
module available.

00:06:58.400 --> 00:07:00.950 align:middle line:84%
And that's really what
this is in reference to.

00:07:00.950 --> 00:07:05.120 align:middle line:84%
So you can either load
that Ruby file manually,

00:07:05.120 --> 00:07:08.060 align:middle line:84%
or it is already part of
the Metasploit Framework,

00:07:08.060 --> 00:07:12.270 align:middle line:84%
and you can just load it
within MSF Console and use it.

00:07:12.270 --> 00:07:13.550 align:middle line:90%
We then have payloads.

00:07:13.550 --> 00:07:14.630 align:middle line:90%
So what is the payload?

00:07:14.630 --> 00:07:17.360 align:middle line:84%
Well, a payload is a piece of
code delivered to the target

00:07:17.360 --> 00:07:20.780 align:middle line:84%
system by an exploit with
the objective of executing

00:07:20.780 --> 00:07:24.630 align:middle line:84%
arbitrary commands or providing
remote access to an attacker.

00:07:24.630 --> 00:07:27.020 align:middle line:84%
So this is where things
start getting interesting,

00:07:27.020 --> 00:07:29.180 align:middle line:84%
and this ties into the
previous section, when

00:07:29.180 --> 00:07:32.630 align:middle line:84%
we were talking about shells,
bind shells, reverse shells, et

00:07:32.630 --> 00:07:33.140 align:middle line:90%
cetera.

00:07:33.140 --> 00:07:35.510 align:middle line:84%
A payload is typically
what will provide you

00:07:35.510 --> 00:07:36.630 align:middle line:90%
with a reverse shell.

00:07:36.630 --> 00:07:38.930 align:middle line:84%
And again, the reason
why most of the payloads

00:07:38.930 --> 00:07:41.510 align:middle line:84%
are reverse shells, or provide
you with a reverse shell,

00:07:41.510 --> 00:07:44.750 align:middle line:84%
is primarily because once
the exploit takes advantage

00:07:44.750 --> 00:07:48.810 align:middle line:84%
of a vulnerability, the payload
is then executed on the target.

00:07:48.810 --> 00:07:51.500 align:middle line:84%
And that payload essentially
contains the attacker's IP

00:07:51.500 --> 00:07:54.860 align:middle line:84%
address, and a connection
is made to the listener.

00:07:54.860 --> 00:07:56.580 align:middle line:84%
Now with the
Metasploit Framework,

00:07:56.580 --> 00:07:59.120 align:middle line:84%
and when you'll be utilizing
Meterpreter payloads,

00:07:59.120 --> 00:08:02.480 align:middle line:84%
for example, you don't use
a standard Netcat listener

00:08:02.480 --> 00:08:03.770 align:middle line:90%
to receive the connection.

00:08:03.770 --> 00:08:06.800 align:middle line:84%
You actually need to
set up a multi-handler.

00:08:06.800 --> 00:08:12.020 align:middle line:84%
A multi-handler is a
specific Metasploit module

00:08:12.020 --> 00:08:15.110 align:middle line:84%
that allows you to set up
a listener for Metasploit

00:08:15.110 --> 00:08:19.230 align:middle line:84%
Framework exploits or
Metasploit Framework payloads.

00:08:19.230 --> 00:08:22.700 align:middle line:84%
It can also be used to receive
Netcat connections or just

00:08:22.700 --> 00:08:25.280 align:middle line:84%
a connection from a
standard reverse shell

00:08:25.280 --> 00:08:28.640 align:middle line:84%
from the attacker system, or
rather from the target system.

00:08:28.640 --> 00:08:31.940 align:middle line:84%
But it's really for
the purpose of payloads

00:08:31.940 --> 00:08:35.390 align:middle line:84%
that essentially exist, or that
are used, with the Metasploit

00:08:35.390 --> 00:08:36.110 align:middle line:90%
Framework.

00:08:36.110 --> 00:08:37.490 align:middle line:90%
We then have a listener.

00:08:37.490 --> 00:08:39.080 align:middle line:84%
A listener is
essentially a utility

00:08:39.080 --> 00:08:42.049 align:middle line:84%
that listens for an incoming
connection from a target.

00:08:42.049 --> 00:08:44.570 align:middle line:84%
And that ties into
your multi-handler.

00:08:44.570 --> 00:08:47.480 align:middle line:84%
So again, those two are
pretty much the same,

00:08:47.480 --> 00:08:50.270 align:middle line:84%
but you will actually
see how this all

00:08:50.270 --> 00:08:53.510 align:middle line:84%
works when we'll take a look
at the practical section.

00:08:53.510 --> 00:08:56.870 align:middle line:84%
All right, so this is the
Metasploit Framework console.

00:08:56.870 --> 00:08:58.852 align:middle line:84%
If you've already gone
through the course

00:08:58.852 --> 00:09:01.310 align:middle line:84%
and you've taken a look at the
Metasploit Framework course,

00:09:01.310 --> 00:09:03.140 align:middle line:90%
you should be familiar with it.

00:09:03.140 --> 00:09:06.380 align:middle line:84%
The Metasploit Framework console
is also known as MSF console.

00:09:06.380 --> 00:09:08.600 align:middle line:84%
It is an easy-to-use,
all-in-one interface

00:09:08.600 --> 00:09:11.420 align:middle line:84%
that provides you with access
to all the functionality

00:09:11.420 --> 00:09:14.610 align:middle line:90%
of the Metasploit Framework.

00:09:14.610 --> 00:09:17.028 align:middle line:84%
So in terms of penetration
testing with the Metasploit

00:09:17.028 --> 00:09:19.070 align:middle line:84%
Framework, as I've said,
the Metasploit Framework

00:09:19.070 --> 00:09:20.720 align:middle line:84%
can be used to
perform and automate

00:09:20.720 --> 00:09:23.720 align:middle line:84%
various tasks that fall
under the penetration testing

00:09:23.720 --> 00:09:24.650 align:middle line:90%
lifecycle.

00:09:24.650 --> 00:09:27.320 align:middle line:84%
In order to understand how we
can leverage the Metasploit

00:09:27.320 --> 00:09:28.880 align:middle line:84%
Framework for
penetration testing,

00:09:28.880 --> 00:09:31.490 align:middle line:84%
we need to explore the various
phases of a penetration

00:09:31.490 --> 00:09:35.090 align:middle line:84%
test and the respective
techniques and objectives.

00:09:35.090 --> 00:09:37.850 align:middle line:84%
In order to do that, we can
adopt the penetration testing

00:09:37.850 --> 00:09:40.220 align:middle line:84%
execution standard, which
I've mentioned before,

00:09:40.220 --> 00:09:43.310 align:middle line:84%
as a roadmap to understanding
the various phases that make up

00:09:43.310 --> 00:09:45.290 align:middle line:84%
a penetration test
and how Metasploit can

00:09:45.290 --> 00:09:47.300 align:middle line:90%
be integrated into each phase.

00:09:47.300 --> 00:09:49.160 align:middle line:84%
And the following
table highlights

00:09:49.160 --> 00:09:50.480 align:middle line:90%
each of those phases.

00:09:50.480 --> 00:09:53.360 align:middle line:84%
And on the right, you can see
we have the Metasploit Framework

00:09:53.360 --> 00:09:54.890 align:middle line:90%
implementation column.

00:09:54.890 --> 00:09:58.040 align:middle line:84%
That highlights what types of
Metasploit Framework modules

00:09:58.040 --> 00:10:00.440 align:middle line:84%
can be used to
achieve, or to perform,

00:10:00.440 --> 00:10:05.340 align:middle line:84%
a specific functionality within
each penetration testing phase.

00:10:05.340 --> 00:10:08.060 align:middle line:84%
So for information gathering
and vulnerability scanning,

00:10:08.060 --> 00:10:11.000 align:middle line:84%
you can use Metasploit
Framework auxiliary modules,

00:10:11.000 --> 00:10:14.270 align:middle line:84%
and this is the section we
are interested in this video,

00:10:14.270 --> 00:10:16.520 align:middle line:84%
and in this course,
which is exploitation.

00:10:16.520 --> 00:10:18.290 align:middle line:84%
And in the case of
exploitation, we

00:10:18.290 --> 00:10:20.030 align:middle line:84%
will be utilizing
Metasploit Framework

00:10:20.030 --> 00:10:22.400 align:middle line:90%
exploit modules and payloads.

00:10:22.400 --> 00:10:25.040 align:middle line:84%
You then have post-exploitation,
privilege escalation,

00:10:25.040 --> 00:10:27.350 align:middle line:84%
and of course,
persistence modules.

00:10:27.350 --> 00:10:29.240 align:middle line:84%
So for post-exploitation,
you can

00:10:29.240 --> 00:10:32.570 align:middle line:84%
utilize Meterpreter or the
various post-exploitation

00:10:32.570 --> 00:10:33.840 align:middle line:90%
modules available.

00:10:33.840 --> 00:10:36.080 align:middle line:84%
And the same goes for
privilege escalation.

00:10:36.080 --> 00:10:37.940 align:middle line:84%
You can utilize
the Metrepreter or

00:10:37.940 --> 00:10:40.220 align:middle line:84%
the various
post-exploitation modules

00:10:40.220 --> 00:10:42.260 align:middle line:84%
pertinent to
privilege escalation.

00:10:42.260 --> 00:10:44.660 align:middle line:84%
And with maintaining
persistent access,

00:10:44.660 --> 00:10:47.580 align:middle line:84%
there are various persistence
modules that you can use.

00:10:47.580 --> 00:10:50.130 align:middle line:84%
So in this video and in the
practical demonstration,

00:10:50.130 --> 00:10:52.820 align:middle line:84%
we are primarily going to be
focused on exploit modules

00:10:52.820 --> 00:10:55.077 align:middle line:90%
and payloads right over here.

00:10:55.077 --> 00:10:57.410 align:middle line:84%
All right, so now that we
have an understanding of that,

00:10:57.410 --> 00:11:00.150 align:middle line:84%
we can get started with the
practical demonstration.

00:11:00.150 --> 00:11:03.027 align:middle line:84%
So this video has a lab
environment attached to it,

00:11:03.027 --> 00:11:04.610 align:middle line:84%
and we're going to
go through it as we

00:11:04.610 --> 00:11:09.100 align:middle line:84%
would if we were performing a
typical black box penetration

00:11:09.100 --> 00:11:09.600 align:middle line:90%
test.

00:11:09.600 --> 00:11:12.230 align:middle line:84%
So this is just like a
mini penetration test,

00:11:12.230 --> 00:11:15.050 align:middle line:84%
but it will highlight how
to utilize the Metasploit

00:11:15.050 --> 00:11:16.520 align:middle line:90%
Framework for exploitation.

00:11:16.520 --> 00:11:18.020 align:middle line:84%
So just fire up the
lab environment,

00:11:18.020 --> 00:11:20.930 align:middle line:84%
and I'll see you within
the lab environment.

00:11:20.930 --> 00:11:23.950 align:middle line:90%


00:11:23.950 --> 00:11:26.740 align:middle line:84%
All right, so I'm back
within the lab environment,

00:11:26.740 --> 00:11:29.270 align:middle line:84%
and you'll be provided
with the target IP address.

00:11:29.270 --> 00:11:30.500 align:middle line:90%
So that's very important.

00:11:30.500 --> 00:11:32.380 align:middle line:84%
So that's the only
piece of information

00:11:32.380 --> 00:11:34.700 align:middle line:84%
that we have regarding
the target system.

00:11:34.700 --> 00:11:35.680 align:middle line:90%
So we'll copy that.

00:11:35.680 --> 00:11:37.720 align:middle line:84%
And of course, the
first logical step

00:11:37.720 --> 00:11:40.990 align:middle line:84%
would be to perform an
nmap scan to identify

00:11:40.990 --> 00:11:43.510 align:middle line:84%
open ports and the
respective services,

00:11:43.510 --> 00:11:46.030 align:middle line:84%
as well as the service
version of those services

00:11:46.030 --> 00:11:47.950 align:middle line:84%
that are running on
these open ports.

00:11:47.950 --> 00:11:52.113 align:middle line:84%
So we really don't know
what operating system

00:11:52.113 --> 00:11:53.530 align:middle line:84%
is running on the
target so that's

00:11:53.530 --> 00:11:55.070 align:middle line:90%
what we're trying to find out.

00:11:55.070 --> 00:11:57.100 align:middle line:84%
So what we can do,
first and foremost,

00:11:57.100 --> 00:12:01.540 align:middle line:84%
is perform a simple nmap scan
on the default port range.

00:12:01.540 --> 00:12:06.970 align:middle line:84%
So that is 1,000 of the most
commonly scanned or used ports.

00:12:06.970 --> 00:12:09.940 align:middle line:84%
And we can then say we want to
perform some service version

00:12:09.940 --> 00:12:12.970 align:middle line:84%
detection based
in the target IP.

00:12:12.970 --> 00:12:14.320 align:middle line:90%
So I'll just hit enter.

00:12:14.320 --> 00:12:16.623 align:middle line:84%
Now, this is going to
take a couple of seconds

00:12:16.623 --> 00:12:18.040 align:middle line:84%
to a couple of
minutes so I'm just

00:12:18.040 --> 00:12:21.240 align:middle line:90%
going to let this complete.

00:12:21.240 --> 00:12:23.470 align:middle line:84%
All right, so the
nmap scan is complete.

00:12:23.470 --> 00:12:26.310 align:middle line:84%
And as you can see from the
open ports and services,

00:12:26.310 --> 00:12:29.280 align:middle line:84%
we can pretty much tell
that it's running Windows.

00:12:29.280 --> 00:12:33.000 align:middle line:84%
And again, we aren't sure about
the exact addition of Windows,

00:12:33.000 --> 00:12:36.720 align:middle line:84%
but we do know that it's running
Windows Server and any version

00:12:36.720 --> 00:12:41.100 align:middle line:84%
from Windows Server 2008
R2 to Windows Server 2012.

00:12:41.100 --> 00:12:43.680 align:middle line:84%
All right, so we can also
perform an operating system

00:12:43.680 --> 00:12:46.570 align:middle line:84%
detection scan,
but again, for now,

00:12:46.570 --> 00:12:49.710 align:middle line:84%
let's just focus on the current
services that are running.

00:12:49.710 --> 00:12:51.570 align:middle line:84%
So we can see that
on port 80, we

00:12:51.570 --> 00:12:56.310 align:middle line:84%
have a web server, the Apache
HTTPD 2.2.23 web server.

00:12:56.310 --> 00:12:59.730 align:middle line:84%
And it looks like it's hosting
a web application that's

00:12:59.730 --> 00:13:03.070 align:middle line:84%
developed in PHP so we'll take
a look at that in a second.

00:13:03.070 --> 00:13:06.570 align:middle line:84%
We also have a MySQL port
here, which is currently open.

00:13:06.570 --> 00:13:10.530 align:middle line:84%
But it's saying unauthorized,
which means that we pretty much

00:13:10.530 --> 00:13:15.330 align:middle line:84%
cannot access or authenticate
with the MySQL server remotely.

00:13:15.330 --> 00:13:18.900 align:middle line:84%
We then have an RDP
port here, so 3389.

00:13:18.900 --> 00:13:21.810 align:middle line:84%
So that means we can access
the target system via RDP.

00:13:21.810 --> 00:13:23.550 align:middle line:84%
However, given the
fact that we don't

00:13:23.550 --> 00:13:27.760 align:middle line:84%
have any legitimate credentials,
that really isn't feasible.

00:13:27.760 --> 00:13:29.790 align:middle line:84%
So let's take a look
at the only service

00:13:29.790 --> 00:13:34.050 align:middle line:84%
here that actually looks
like it can be exploited,

00:13:34.050 --> 00:13:35.490 align:middle line:90%
or that we can actually test.

00:13:35.490 --> 00:13:37.920 align:middle line:84%
And that is the web
application that's

00:13:37.920 --> 00:13:40.030 align:middle line:90%
running on the web server.

00:13:40.030 --> 00:13:42.510 align:middle line:84%
Now, as a beginner
penetration tester,

00:13:42.510 --> 00:13:47.100 align:middle line:84%
you may be tempted to perform
vulnerability detection scan

00:13:47.100 --> 00:13:49.740 align:middle line:84%
on the actual web
server technology.

00:13:49.740 --> 00:13:52.830 align:middle line:84%
In this case, that
is Apache HTTPD.

00:13:52.830 --> 00:13:56.010 align:middle line:84%
However, before you
do that, I actually

00:13:56.010 --> 00:13:59.280 align:middle line:84%
want you to explore the
web server and the web

00:13:59.280 --> 00:14:02.010 align:middle line:84%
application that's being
hosted on that web server.

00:14:02.010 --> 00:14:06.760 align:middle line:84%
So we can access the web server
by opening up Firefox here.

00:14:06.760 --> 00:14:09.788 align:middle line:90%
And I'll paste in the target IP.

00:14:09.788 --> 00:14:10.330 align:middle line:90%
There we are.

00:14:10.330 --> 00:14:12.010 align:middle line:84%
So it looks like we
have a re-director.

00:14:12.010 --> 00:14:13.810 align:middle line:84%
And let's see what
web application is

00:14:13.810 --> 00:14:15.145 align:middle line:90%
running on the target system.

00:14:15.145 --> 00:14:23.210 align:middle line:90%


00:14:23.210 --> 00:14:25.760 align:middle line:84%
All right, so it looks like
the web application has loaded,

00:14:25.760 --> 00:14:27.320 align:middle line:90%
and it looks--

00:14:27.320 --> 00:14:30.540 align:middle line:84%
again, we can see that we
have a login page here.

00:14:30.540 --> 00:14:33.620 align:middle line:84%
And the name of the web
application is ProcessMaker.

00:14:33.620 --> 00:14:35.390 align:middle line:84%
It looks like it's
registered, and that

00:14:35.390 --> 00:14:39.320 align:middle line:84%
means that it probably is a
professional product developed

00:14:39.320 --> 00:14:40.458 align:middle line:90%
by a company.

00:14:40.458 --> 00:14:42.500 align:middle line:84%
If we take a look at the
copyright at the bottom,

00:14:42.500 --> 00:14:44.870 align:middle line:84%
we can see that it's
developed by a company

00:14:44.870 --> 00:14:48.620 align:middle line:84%
called Colosa, Inc. All of this
information is very important.

00:14:48.620 --> 00:14:51.440 align:middle line:84%
Now, in order to gain access
to this particular web

00:14:51.440 --> 00:14:53.930 align:middle line:84%
application, we
either need to log in,

00:14:53.930 --> 00:14:56.480 align:middle line:84%
or we can view the page
source to learn more about it.

00:14:56.480 --> 00:14:59.960 align:middle line:84%
And in specific, the information
that we're looking for in order

00:14:59.960 --> 00:15:02.060 align:middle line:84%
to identify
vulnerabilities that affect

00:15:02.060 --> 00:15:04.880 align:middle line:84%
this specific version
of ProcessMaker

00:15:04.880 --> 00:15:07.590 align:middle line:84%
is the exact version
that is installed.

00:15:07.590 --> 00:15:10.070 align:middle line:84%
So it looks like this
tab crashed, and I'm just

00:15:10.070 --> 00:15:11.478 align:middle line:90%
going to zoom in here.

00:15:11.478 --> 00:15:12.020 align:middle line:90%
There we are.

00:15:12.020 --> 00:15:14.000 align:middle line:90%
So let's restore that again.

00:15:14.000 --> 00:15:15.650 align:middle line:84%
And if we take a
look at the source,

00:15:15.650 --> 00:15:19.760 align:middle line:84%
we can see that it's your
basic HTML with a bit of CSS

00:15:19.760 --> 00:15:21.720 align:middle line:90%
and JavaScript, as well.

00:15:21.720 --> 00:15:26.870 align:middle line:84%
And we really aren't able
to identify any version

00:15:26.870 --> 00:15:27.630 align:middle line:90%
information.

00:15:27.630 --> 00:15:30.710 align:middle line:84%
So we can't really tell
what version of ProcessMaker

00:15:30.710 --> 00:15:33.330 align:middle line:90%
is running on the target system.

00:15:33.330 --> 00:15:37.040 align:middle line:84%
So what's the next logical
step that we can perform?

00:15:37.040 --> 00:15:39.230 align:middle line:84%
Well, we can see that we
have the ability to log in,

00:15:39.230 --> 00:15:40.980 align:middle line:84%
but we don't have
any credentials.

00:15:40.980 --> 00:15:42.980 align:middle line:84%
So as a penetration
tester, the next step

00:15:42.980 --> 00:15:45.410 align:middle line:84%
would be to essentially
search online

00:15:45.410 --> 00:15:49.040 align:middle line:84%
for resources pertinent
to default credentials

00:15:49.040 --> 00:15:50.180 align:middle line:90%
for ProcessMaker.

00:15:50.180 --> 00:15:54.380 align:middle line:84%
So in some cases, systems
may be configured,

00:15:54.380 --> 00:15:57.680 align:middle line:84%
and administrators don't
change the default credentials

00:15:57.680 --> 00:16:00.560 align:middle line:84%
for a third party solution
like ProcessMaker.

00:16:00.560 --> 00:16:03.120 align:middle line:84%
Now, this lab doesn't
have internet access

00:16:03.120 --> 00:16:06.230 align:middle line:84%
so I'll just switch over to
my browser on my main system.

00:16:06.230 --> 00:16:09.530 align:middle line:84%
And let's see if we can identify
the default credentials.

00:16:09.530 --> 00:16:12.080 align:middle line:90%


00:16:12.080 --> 00:16:14.220 align:middle line:84%
All right, so I'm back
within my browser.

00:16:14.220 --> 00:16:17.090 align:middle line:84%
And as you can see, I've just
performed a quick Google search

00:16:17.090 --> 00:16:19.580 align:middle line:84%
for ProcessMaker
default credentials.

00:16:19.580 --> 00:16:22.280 align:middle line:84%
And on the official
process make a wiki,

00:16:22.280 --> 00:16:25.380 align:middle line:84%
we can see that we have a
bit of a description here.

00:16:25.380 --> 00:16:28.670 align:middle line:84%
So it says if ProcessMaker
was just installed and logging

00:16:28.670 --> 00:16:31.760 align:middle line:84%
in for the first time, enter
the following credentials

00:16:31.760 --> 00:16:33.450 align:middle line:90%
to log in as the administrator.

00:16:33.450 --> 00:16:35.240 align:middle line:84%
So it looks like the
default credentials

00:16:35.240 --> 00:16:37.070 align:middle line:90%
are admin and admin.

00:16:37.070 --> 00:16:38.972 align:middle line:90%
So let's actually test this out.

00:16:38.972 --> 00:16:40.430 align:middle line:84%
So I'm just going
to minimize that,

00:16:40.430 --> 00:16:43.260 align:middle line:84%
and we'll head back over into
the lab environment here.

00:16:43.260 --> 00:16:45.270 align:middle line:84%
And we can actually see
whether that will work.

00:16:45.270 --> 00:16:48.110 align:middle line:84%
So we'll say admin,
admin, and we're

00:16:48.110 --> 00:16:52.618 align:middle line:84%
going to log in with the default
workspace, which is workflow.

00:16:52.618 --> 00:16:53.160 align:middle line:90%
There we are.

00:16:53.160 --> 00:16:55.020 align:middle line:84%
So I'll not save that
password, and it looks

00:16:55.020 --> 00:16:56.530 align:middle line:90%
like the login was successful.

00:16:56.530 --> 00:17:00.210 align:middle line:84%
So you can now see how our
vulnerabilities can actually

00:17:00.210 --> 00:17:04.470 align:middle line:84%
be quite dynamic in
regards to what application

00:17:04.470 --> 00:17:07.170 align:middle line:84%
is running on a target system,
or what service is running.

00:17:07.170 --> 00:17:09.869 align:middle line:84%
So always be sure
to be extremely

00:17:09.869 --> 00:17:13.410 align:middle line:84%
comprehensive in understanding
what application this

00:17:13.410 --> 00:17:16.980 align:middle line:84%
is, whether it has default
credentials, how it works.

00:17:16.980 --> 00:17:19.859 align:middle line:84%
In the case of ProcessMaker,
this is essentially

00:17:19.859 --> 00:17:21.990 align:middle line:90%
a workflow designer.

00:17:21.990 --> 00:17:25.140 align:middle line:84%
And you can, again, deduce that
by taking a look at the tabs

00:17:25.140 --> 00:17:25.690 align:middle line:90%
here.

00:17:25.690 --> 00:17:28.800 align:middle line:84%
But remember, we still
haven't identified

00:17:28.800 --> 00:17:31.232 align:middle line:84%
the actual version
of ProcessMaker

00:17:31.232 --> 00:17:32.440 align:middle line:90%
that's running on the target.

00:17:32.440 --> 00:17:36.060 align:middle line:84%
So I'm just going to
restart Firefox there.

00:17:36.060 --> 00:17:38.680 align:middle line:84%
And hopefully, this time
it doesn't crash on me.

00:17:38.680 --> 00:17:40.560 align:middle line:84%
So we are back on
the admin tab here.

00:17:40.560 --> 00:17:44.220 align:middle line:84%
We go home, we can see
that we can access--

00:17:44.220 --> 00:17:46.560 align:middle line:84%
that looks like
various cases there.

00:17:46.560 --> 00:17:48.000 align:middle line:90%
We have the designer.

00:17:48.000 --> 00:17:49.380 align:middle line:90%
This is the workflow designer.

00:17:49.380 --> 00:17:52.380 align:middle line:84%
We also have
dashboards and admin.

00:17:52.380 --> 00:17:55.110 align:middle line:84%
All right, so if we
take a look at admin,

00:17:55.110 --> 00:17:58.360 align:middle line:84%
and we'll give this a couple
of seconds to load up.

00:17:58.360 --> 00:18:01.020 align:middle line:84%
So if we take a look at
the admin tab, on the left,

00:18:01.020 --> 00:18:04.110 align:middle line:84%
we have a sidebar that has
settings, plug-ins, users,

00:18:04.110 --> 00:18:05.010 align:middle line:90%
and logs.

00:18:05.010 --> 00:18:06.510 align:middle line:84%
If we take a look
at users, you can

00:18:06.510 --> 00:18:08.760 align:middle line:84%
see that this is the user
that we logged in with,

00:18:08.760 --> 00:18:11.020 align:middle line:84%
and the default credentials
have not been changed.

00:18:11.020 --> 00:18:14.520 align:middle line:84%
So the administrator was
really, really lazy here.

00:18:14.520 --> 00:18:16.710 align:middle line:84%
If we scroll to
the bottom, we can

00:18:16.710 --> 00:18:19.290 align:middle line:84%
see that we have
system information.

00:18:19.290 --> 00:18:22.050 align:middle line:84%
And indeed, if we take a
look at process information,

00:18:22.050 --> 00:18:23.700 align:middle line:84%
we can see we are
able to enumerate

00:18:23.700 --> 00:18:26.110 align:middle line:84%
the exact version of
ProcessMaker that's running,

00:18:26.110 --> 00:18:28.200 align:middle line:90%
which is 2.5.0.

00:18:28.200 --> 00:18:30.360 align:middle line:84%
And does it have any
upgrades or patches?

00:18:30.360 --> 00:18:32.770 align:middle line:84%
Never upgraded, so
on and so forth.

00:18:32.770 --> 00:18:35.700 align:middle line:84%
And it, of course, is
utilizing a database,

00:18:35.700 --> 00:18:36.900 align:middle line:90%
a relational database.

00:18:36.900 --> 00:18:39.270 align:middle line:84%
And in this case,
it's utilizing MySQL.

00:18:39.270 --> 00:18:41.700 align:middle line:84%
And that's why when we
perform the nmap scan,

00:18:41.700 --> 00:18:45.300 align:middle line:84%
we essentially were able to
find that a MySQL database

00:18:45.300 --> 00:18:46.510 align:middle line:90%
server is running.

00:18:46.510 --> 00:18:49.170 align:middle line:84%
So you're now starting to
get an understanding of how

00:18:49.170 --> 00:18:51.930 align:middle line:84%
various components that are
being hosted on a system

00:18:51.930 --> 00:18:53.110 align:middle line:90%
tie in together.

00:18:53.110 --> 00:18:54.870 align:middle line:84%
So that's why there
is a database.

00:18:54.870 --> 00:18:57.790 align:middle line:84%
It's for the purpose of
this web application.

00:18:57.790 --> 00:19:01.770 align:middle line:84%
So now that we've identified the
exact version of ProcessMaker,

00:19:01.770 --> 00:19:03.690 align:middle line:84%
we can start
searching for exploits

00:19:03.690 --> 00:19:05.590 align:middle line:84%
pertinent to this
specific version.

00:19:05.590 --> 00:19:07.740 align:middle line:84%
So I'll open up my
terminal again here,

00:19:07.740 --> 00:19:10.770 align:middle line:84%
and we can launch, or
perform, a searchsploit

00:19:10.770 --> 00:19:12.690 align:middle line:90%
scan for ProcessMaker.

00:19:12.690 --> 00:19:16.830 align:middle line:84%
And because I don't know how
the ProcessMaker exploits are

00:19:16.830 --> 00:19:19.320 align:middle line:84%
actually titled, I'll just
hit enter without providing

00:19:19.320 --> 00:19:20.790 align:middle line:90%
the service version.

00:19:20.790 --> 00:19:23.910 align:middle line:84%
And it looks like we have
a plug-in upload Metasploit

00:19:23.910 --> 00:19:25.120 align:middle line:90%
module.

00:19:25.120 --> 00:19:27.930 align:middle line:84%
We also have
ProcessMaker 3.0.17.

00:19:27.930 --> 00:19:29.430 align:middle line:84%
And that's not what
we're interested

00:19:29.430 --> 00:19:32.940 align:middle line:84%
in because the version that's
running on the target is 2.5.

00:19:32.940 --> 00:19:35.010 align:middle line:84%
And it looks like
we have ProcessMaker

00:19:35.010 --> 00:19:38.760 align:middle line:84%
open source, authenticated
PHP code execution.

00:19:38.760 --> 00:19:40.230 align:middle line:84%
Remember, this is
very important.

00:19:40.230 --> 00:19:42.000 align:middle line:84%
Authenticated
means that in order

00:19:42.000 --> 00:19:44.940 align:middle line:84%
for this exploit, or
Metasploit, module to work,

00:19:44.940 --> 00:19:47.220 align:middle line:84%
we actually need
legitimate credentials.

00:19:47.220 --> 00:19:49.650 align:middle line:84%
And in this case, we
do so this actually

00:19:49.650 --> 00:19:51.280 align:middle line:90%
looks like it could work.

00:19:51.280 --> 00:19:54.210 align:middle line:84%
Now as I said, this lab doesn't
have online internet access.

00:19:54.210 --> 00:19:57.330 align:middle line:84%
What one would
typically do is also

00:19:57.330 --> 00:20:01.080 align:middle line:84%
use the w option to
display the ExploitDB links

00:20:01.080 --> 00:20:03.960 align:middle line:84%
so that you can go through
the exploit code online.

00:20:03.960 --> 00:20:08.130 align:middle line:84%
Alternatively, if we
wanted to access, or just

00:20:08.130 --> 00:20:11.400 align:middle line:84%
get more information
regarding, a Metasploit module

00:20:11.400 --> 00:20:13.140 align:middle line:90%
what we could do is--

00:20:13.140 --> 00:20:15.120 align:middle line:84%
I'm just going to
terminate that there.

00:20:15.120 --> 00:20:19.290 align:middle line:84%
And we can perform the search
without providing the ExploitDB

00:20:19.290 --> 00:20:20.070 align:middle line:90%
links.

00:20:20.070 --> 00:20:25.470 align:middle line:84%
We can get the source, or we can
copy the Ruby Metasploit module

00:20:25.470 --> 00:20:29.760 align:middle line:84%
and analyze it, or we can
just open it up where it is.

00:20:29.760 --> 00:20:33.030 align:middle line:84%
But what I'll do is I'll head
over into my desktop here,

00:20:33.030 --> 00:20:34.530 align:middle line:90%
and I'll say searchsploit.

00:20:34.530 --> 00:20:37.110 align:middle line:84%
And we'll just make a copy
and analyze it locally.

00:20:37.110 --> 00:20:39.690 align:middle line:90%
So that is 29325.

00:20:39.690 --> 00:20:43.570 align:middle line:90%
So 29325, there we are.

00:20:43.570 --> 00:20:46.680 align:middle line:84%
And we can then open it up
with vim or the text editor,

00:20:46.680 --> 00:20:49.980 align:middle line:90%
so 29325.rb.

00:20:49.980 --> 00:20:52.740 align:middle line:84%
And let's get an
understanding of what

00:20:52.740 --> 00:20:54.000 align:middle line:90%
this Metasploit module does.

00:20:54.000 --> 00:20:56.280 align:middle line:84%
So we can see that
it's developed in Ruby.

00:20:56.280 --> 00:20:58.860 align:middle line:84%
What I'm interested in is
the description section

00:20:58.860 --> 00:21:00.000 align:middle line:90%
of the Metasploit module.

00:21:00.000 --> 00:21:03.660 align:middle line:84%
So it tells us that this module
exploits a PHP code execution

00:21:03.660 --> 00:21:07.680 align:middle line:84%
vulnerability in the neoclassic
skin for ProcessMaker

00:21:07.680 --> 00:21:10.740 align:middle line:84%
open source, which allows
any authenticated user

00:21:10.740 --> 00:21:12.630 align:middle line:90%
to execute PHP code.

00:21:12.630 --> 00:21:16.372 align:middle line:84%
The vulnerable skin is installed
by default in version 2.

00:21:16.372 --> 00:21:20.770 align:middle line:84%
whatever and cannot be
removed via the web interface.

00:21:20.770 --> 00:21:24.180 align:middle line:84%
So it looks like this module
might work against version 2.5.

00:21:24.180 --> 00:21:27.870 align:middle line:84%
The only way to test this is to
actually utilize the Metasploit

00:21:27.870 --> 00:21:31.260 align:middle line:84%
Framework and then utilize
this particular exploit module.

00:21:31.260 --> 00:21:33.420 align:middle line:84%
So I'm just going to
remove the actual exploit

00:21:33.420 --> 00:21:36.660 align:middle line:84%
that I copied over
because this module is

00:21:36.660 --> 00:21:39.310 align:middle line:84%
designed to be executed with
the Metasploit Framework.

00:21:39.310 --> 00:21:41.910 align:middle line:84%
So in order to start up
the Metasploit Framework,

00:21:41.910 --> 00:21:44.790 align:middle line:84%
we're going to say
service postgresql start.

00:21:44.790 --> 00:21:47.310 align:middle line:84%
That's going to start the
PostgreSQL database service

00:21:47.310 --> 00:21:49.770 align:middle line:84%
because the Metasploit
Framework typically

00:21:49.770 --> 00:21:52.230 align:middle line:84%
interacts with the
PostgreSQL database

00:21:52.230 --> 00:21:54.630 align:middle line:84%
on the back end for
storage of workspaces

00:21:54.630 --> 00:21:57.400 align:middle line:90%
and exploit-related data.

00:21:57.400 --> 00:22:03.240 align:middle line:84%
So I'll hit enter, and then
I'm going to say MSF console.

00:22:03.240 --> 00:22:08.100 align:middle line:84%
All right, so that will start
up the infamous MSF console

00:22:08.100 --> 00:22:08.820 align:middle line:90%
interface.

00:22:08.820 --> 00:22:10.740 align:middle line:84%
That will allow us
to essentially test

00:22:10.740 --> 00:22:12.690 align:middle line:90%
whether this exploit works.

00:22:12.690 --> 00:22:15.150 align:middle line:84%
All right, so that's loaded
up, and what I'm going to do

00:22:15.150 --> 00:22:18.180 align:middle line:84%
is I'm just going to
create a workspace

00:22:18.180 --> 00:22:19.860 align:middle line:84%
for this particular
exploitation.

00:22:19.860 --> 00:22:22.450 align:middle line:84%
And this is a practice that
I recommend that you do.

00:22:22.450 --> 00:22:25.270 align:middle line:84%
So we'll create a workspace
for this particular activity

00:22:25.270 --> 00:22:28.920 align:middle line:84%
so we can essentially segregate
our different projects

00:22:28.920 --> 00:22:30.070 align:middle line:90%
that we're working on.

00:22:30.070 --> 00:22:34.480 align:middle line:84%
So I'll create a workspace
and call it ProcessMaker.

00:22:34.480 --> 00:22:38.500 align:middle line:84%
And we're currently utilizing
the process make a workspace.

00:22:38.500 --> 00:22:42.190 align:middle line:84%
And as I said, this will ensure
that your various engagements,

00:22:42.190 --> 00:22:44.080 align:middle line:84%
or assessments, as
a penetration test

00:22:44.080 --> 00:22:46.780 align:middle line:84%
are sorted and kept
separate from the other ones

00:22:46.780 --> 00:22:47.690 align:middle line:90%
that you do.

00:22:47.690 --> 00:22:51.220 align:middle line:84%
So for every new engagement,
always create a new workspace.

00:22:51.220 --> 00:22:54.730 align:middle line:84%
So now, we can search
for the actual exploit.

00:22:54.730 --> 00:22:56.830 align:middle line:84%
So we're going to
say ProcessMaker.

00:22:56.830 --> 00:22:59.360 align:middle line:90%


00:22:59.360 --> 00:23:03.800 align:middle line:84%
And it looks like we have the
actual exploit right over here.

00:23:03.800 --> 00:23:06.200 align:middle line:90%
So this is a PHP exploit.

00:23:06.200 --> 00:23:09.140 align:middle line:84%
Remember, it's taking
advantage of the web server,

00:23:09.140 --> 00:23:12.120 align:middle line:84%
or the web application,
that's running on the target.

00:23:12.120 --> 00:23:15.590 align:middle line:84%
So exploit/
multi/HTTP/processmaker exec,

00:23:15.590 --> 00:23:17.210 align:middle line:90%
and the rank is excellent.

00:23:17.210 --> 00:23:19.140 align:middle line:90%
And we can load it up.

00:23:19.140 --> 00:23:20.780 align:middle line:90%
So I'm just going to say use.

00:23:20.780 --> 00:23:24.350 align:middle line:84%
And I can say use and specify
the ID of the exploit,

00:23:24.350 --> 00:23:26.090 align:middle line:90%
or just copy the name.

00:23:26.090 --> 00:23:27.390 align:middle line:90%
That's what I'll do here.

00:23:27.390 --> 00:23:29.660 align:middle line:90%
So I'll just copy that there.

00:23:29.660 --> 00:23:32.390 align:middle line:84%
So I'll say use, and we're
currently using that exploit.

00:23:32.390 --> 00:23:34.190 align:middle line:84%
So I can say show
options to learn more

00:23:34.190 --> 00:23:37.790 align:middle line:84%
about what options need to be
configured in order to utilize

00:23:37.790 --> 00:23:39.300 align:middle line:90%
this exploit module.

00:23:39.300 --> 00:23:41.690 align:middle line:84%
We can see that we need
to provide the password.

00:23:41.690 --> 00:23:44.210 align:middle line:84%
So we need to provide the
legitimate credentials

00:23:44.210 --> 00:23:48.590 align:middle line:84%
for access to the ProcessMaker
you know dashboard or admin

00:23:48.590 --> 00:23:49.980 align:middle line:90%
panel for that matter.

00:23:49.980 --> 00:23:51.650 align:middle line:84%
And in this case,
the module has been

00:23:51.650 --> 00:23:53.810 align:middle line:84%
configured to utilize
the default credentials,

00:23:53.810 --> 00:23:57.120 align:middle line:84%
so admin for the password
and admin for the username.

00:23:57.120 --> 00:23:58.860 align:middle line:90%
So we don't need to change that.

00:23:58.860 --> 00:24:00.650 align:middle line:84%
We then need to
set the target IP

00:24:00.650 --> 00:24:04.620 align:middle line:84%
address, which we can do by
configuring the RHOSTS option.

00:24:04.620 --> 00:24:08.050 align:middle line:84%
So I'm just going to
copy the target IP.

00:24:08.050 --> 00:24:09.070 align:middle line:90%
There we are.

00:24:09.070 --> 00:24:13.060 align:middle line:84%
And I'm going to say set RHOSTS
and paste in the target IP

00:24:13.060 --> 00:24:14.120 align:middle line:90%
there.

00:24:14.120 --> 00:24:17.440 align:middle line:84%
We can then change the target
port or the port on which

00:24:17.440 --> 00:24:19.000 align:middle line:90%
the web application is running.

00:24:19.000 --> 00:24:21.410 align:middle line:84%
In this case, we know
it's running on port 80.

00:24:21.410 --> 00:24:23.890 align:middle line:84%
So we leave that as
is, and it doesn't

00:24:23.890 --> 00:24:26.360 align:middle line:84%
look like we need to
configure any other options.

00:24:26.360 --> 00:24:29.110 align:middle line:84%
So we can hit exploit,
and this should provide us

00:24:29.110 --> 00:24:31.100 align:middle line:90%
with a Meterpreter session.

00:24:31.100 --> 00:24:32.620 align:middle line:90%
So I'll hit enter.

00:24:32.620 --> 00:24:35.650 align:middle line:84%
And as you can see, it
authenticates as the user admin

00:24:35.650 --> 00:24:36.760 align:middle line:90%
with the password admin.

00:24:36.760 --> 00:24:39.190 align:middle line:84%
It then sends the
PHP payload, and this

00:24:39.190 --> 00:24:40.623 align:middle line:90%
is a reverse shell payload.

00:24:40.623 --> 00:24:41.290 align:middle line:90%
So there we are.

00:24:41.290 --> 00:24:43.690 align:middle line:90%
Payload is sent successfully.

00:24:43.690 --> 00:24:46.060 align:middle line:84%
It retrieves the
file, sends the stage

00:24:46.060 --> 00:24:48.540 align:middle line:84%
because that's how stage
Meterpreter payloads work.

00:24:48.540 --> 00:24:51.040 align:middle line:84%
And of course, I've covered
this in the Metasploit Framework

00:24:51.040 --> 00:24:51.580 align:middle line:90%
course.

00:24:51.580 --> 00:24:54.070 align:middle line:84%
And we get a Meterpreter
session one opened.

00:24:54.070 --> 00:24:56.860 align:middle line:84%
So we now have essentially
obtained initial access

00:24:56.860 --> 00:24:58.340 align:middle line:90%
on the target system.

00:24:58.340 --> 00:25:01.570 align:middle line:84%
So again, we are currently
within the following directory.

00:25:01.570 --> 00:25:05.500 align:middle line:84%
So we are currently within C
Users administrator AppData

00:25:05.500 --> 00:25:07.220 align:middle line:90%
and the ProcessMaker directory.

00:25:07.220 --> 00:25:11.720 align:middle line:84%
So let's navigate to the root
of the Windows file system.

00:25:11.720 --> 00:25:13.750 align:middle line:84%
So we're currently
within the C drive,

00:25:13.750 --> 00:25:16.010 align:middle line:84%
and if we list out
the contents of this,

00:25:16.010 --> 00:25:18.100 align:middle line:84%
we can see that we have
a flag, which, again,

00:25:18.100 --> 00:25:20.450 align:middle line:84%
was the challenge for
this particular video,

00:25:20.450 --> 00:25:22.370 align:middle line:84%
or for this particular
lab environment.

00:25:22.370 --> 00:25:26.860 align:middle line:84%
So you can cut out the
content of flag.txt.

00:25:26.860 --> 00:25:32.060 align:middle line:84%
So I'll say cat flag.txt, and
that'll print out the flag.

00:25:32.060 --> 00:25:33.950 align:middle line:84%
So from this point
onwards, you can

00:25:33.950 --> 00:25:35.810 align:middle line:84%
start performing
local enumeration,

00:25:35.810 --> 00:25:40.220 align:middle line:84%
or the typical activities
pertinent to post-exploitation.

00:25:40.220 --> 00:25:42.260 align:middle line:84%
But again, I just
wanted to showcase

00:25:42.260 --> 00:25:44.090 align:middle line:84%
how you can utilize
the Metasploit

00:25:44.090 --> 00:25:45.770 align:middle line:90%
Framework for exploitation.

00:25:45.770 --> 00:25:47.390 align:middle line:84%
And I also wanted
to show you how

00:25:47.390 --> 00:25:49.610 align:middle line:84%
everything that we've
learned so far all

00:25:49.610 --> 00:25:52.850 align:middle line:84%
ties into exploitation,
irregardless of whether you're

00:25:52.850 --> 00:25:56.570 align:middle line:84%
performing manual exploitation
or automated exploitation

00:25:56.570 --> 00:25:58.153 align:middle line:90%
with the Metasploit Framework.

00:25:58.153 --> 00:25:59.570 align:middle line:84%
Now, there's one
more thing that I

00:25:59.570 --> 00:26:02.430 align:middle line:84%
wanted to highlight before
I end the practical session,

00:26:02.430 --> 00:26:04.880 align:middle line:84%
and that is the fact that
this particular version

00:26:04.880 --> 00:26:10.010 align:middle line:84%
of ProcessMaker did not have a
manual exploit code available.

00:26:10.010 --> 00:26:14.030 align:middle line:84%
And the only exploit code
available that essentially

00:26:14.030 --> 00:26:16.520 align:middle line:84%
worked against the version
that was running on the target

00:26:16.520 --> 00:26:18.780 align:middle line:84%
was a Metasploit
Framework module.

00:26:18.780 --> 00:26:21.350 align:middle line:84%
So in certain cases,
you may be forced

00:26:21.350 --> 00:26:23.660 align:middle line:84%
to use the Metasploit
Framework for exploitation.

00:26:23.660 --> 00:26:26.120 align:middle line:84%
But as you can see,
it's much better

00:26:26.120 --> 00:26:28.580 align:middle line:84%
than utilizing
public exploit code.

00:26:28.580 --> 00:26:31.640 align:middle line:84%
And the modules work
really well and you're

00:26:31.640 --> 00:26:34.850 align:middle line:84%
provided with a Meterpreter
session out of the box.

00:26:34.850 --> 00:26:37.760 align:middle line:84%
OK, so that is going to conclude
the practical demonstration

00:26:37.760 --> 00:26:40.538 align:middle line:90%
side of this video.

00:26:40.538 --> 00:26:42.330 align:middle line:84%
In the next video,
we're going to be taking

00:26:42.330 --> 00:26:44.400 align:middle line:90%
a look at PowerShell Empire.

00:26:44.400 --> 00:26:46.320 align:middle line:84%
More specifically,
we'll be taking a look

00:26:46.320 --> 00:26:48.820 align:middle line:84%
at how to get it
set up on Kali Linux

00:26:48.820 --> 00:26:51.150 align:middle line:84%
and how to utilize
it for exploitation.

00:26:51.150 --> 00:26:53.840 align:middle line:84%
And again, so it's going
to be really, really cool.

00:26:53.840 --> 00:26:56.340 align:middle line:84%
If you're not familiar with the
PowerShell Empire framework,

00:26:56.340 --> 00:26:58.870 align:middle line:84%
then definitely check
out the next video.

00:26:58.870 --> 00:27:00.880 align:middle line:90%
So I'll see you there.

00:27:00.880 --> 00:27:01.380 align:middle line:90%