WEBVTT

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


00:00:09.730 --> 00:00:15.160 align:middle line:84%
Exploiting the Windows
CVE-2019-0708 RDP

00:00:15.160 --> 00:00:18.130 align:middle line:84%
vulnerability, also
known as BlueKeep.

00:00:18.130 --> 00:00:20.500 align:middle line:84%
So now that we have got
an understanding of how

00:00:20.500 --> 00:00:23.620 align:middle line:84%
we can exploit RDP via
a brute force attack

00:00:23.620 --> 00:00:26.440 align:middle line:84%
in order to identify legitimate
credentials that we can use

00:00:26.440 --> 00:00:29.980 align:middle line:84%
to authenticate with the
target system via RDP, let's

00:00:29.980 --> 00:00:33.970 align:middle line:84%
take a look at an inherent
vulnerability within RDP

00:00:33.970 --> 00:00:36.220 align:middle line:84%
that can allow us to
obtain a Meterpreter

00:00:36.220 --> 00:00:39.770 align:middle line:90%
session or a reverse shell.

00:00:39.770 --> 00:00:42.400 align:middle line:84%
Before we get started with
the actual exploitation,

00:00:42.400 --> 00:00:44.710 align:middle line:84%
let's get an understanding
of this vulnerability

00:00:44.710 --> 00:00:48.100 align:middle line:84%
because it is quite a
severe vulnerability,

00:00:48.100 --> 00:00:52.660 align:middle line:84%
and the actual exploitation
process can be quite confusing

00:00:52.660 --> 00:00:54.310 align:middle line:90%
or can be quite tedious.

00:00:54.310 --> 00:00:59.290 align:middle line:84%
So BlueKeep, also
known as CVE-2019-0708

00:00:59.290 --> 00:01:03.070 align:middle line:84%
is the name given to an RDP
vulnerability in Windows that

00:01:03.070 --> 00:01:05.650 align:middle line:84%
could potentially allow
attackers to remotely execute

00:01:05.650 --> 00:01:08.710 align:middle line:84%
arbitrary code and gain
access to a Windows system

00:01:08.710 --> 00:01:11.530 align:middle line:84%
and consequently the network
that the target system is

00:01:11.530 --> 00:01:12.800 align:middle line:90%
a part of.

00:01:12.800 --> 00:01:14.320 align:middle line:84%
Now, a BlueKeep
vulnerability was

00:01:14.320 --> 00:01:18.440 align:middle line:84%
made public by Microsoft in
May 2019, so keep that in mind.

00:01:18.440 --> 00:01:21.760 align:middle line:84%
It was not discovered by
a hacker group or anything

00:01:21.760 --> 00:01:22.570 align:middle line:90%
like that.

00:01:22.570 --> 00:01:26.740 align:middle line:84%
The Microsoft security research
labs or rather one of them

00:01:26.740 --> 00:01:29.680 align:middle line:84%
was able to identify this
particular vulnerability,

00:01:29.680 --> 00:01:32.860 align:middle line:84%
and Microsoft made it
public alongside a patch

00:01:32.860 --> 00:01:36.340 align:middle line:84%
that companies can essentially
utilize to patch these systems.

00:01:36.340 --> 00:01:37.990 align:middle line:84%
And, of course, there
are various types

00:01:37.990 --> 00:01:40.700 align:middle line:84%
of mitigations that
can be used as well,

00:01:40.700 --> 00:01:42.370 align:middle line:84%
and we'll get to
that in a second.

00:01:42.370 --> 00:01:44.590 align:middle line:84%
So the BlueKeep
exploit takes advantage

00:01:44.590 --> 00:01:47.260 align:middle line:84%
of a vulnerability in
the Windows RDP protocol

00:01:47.260 --> 00:01:49.240 align:middle line:84%
that allows attackers
to gain access

00:01:49.240 --> 00:01:52.120 align:middle line:84%
to a chunk of kernel memory,
consequently allowing them

00:01:52.120 --> 00:01:55.390 align:middle line:84%
to remotely execute arbitrary
code at the system level

00:01:55.390 --> 00:01:56.860 align:middle line:90%
without authentication.

00:01:56.860 --> 00:02:00.340 align:middle line:84%
So the key area that you
need to focus on there

00:02:00.340 --> 00:02:03.260 align:middle line:84%
is the kernel memory
side of things.

00:02:03.260 --> 00:02:06.910 align:middle line:84%
So, again, this particular
vulnerability essentially

00:02:06.910 --> 00:02:09.400 align:middle line:84%
utilizes or allows
attackers to gain access

00:02:09.400 --> 00:02:12.280 align:middle line:84%
to a chunk of kernel memory
through the vulnerability

00:02:12.280 --> 00:02:15.800 align:middle line:84%
within RDP, and, of course, this
is part of the vulnerability.

00:02:15.800 --> 00:02:18.610 align:middle line:84%
So the chunk, that particular
chunk of kernel memory,

00:02:18.610 --> 00:02:21.640 align:middle line:84%
is where the malicious
code or arbitrary code

00:02:21.640 --> 00:02:23.530 align:middle line:90%
is executed by the attackers.

00:02:23.530 --> 00:02:25.900 align:middle line:84%
And, of course, as
we already know,

00:02:25.900 --> 00:02:27.760 align:middle line:84%
the kernel is
privileged, which means

00:02:27.760 --> 00:02:31.270 align:middle line:84%
anything that's executed
in the kernel space

00:02:31.270 --> 00:02:32.330 align:middle line:90%
will be privileged.

00:02:32.330 --> 00:02:36.280 align:middle line:84%
So if we execute a payload--
a Meterpreter payload,

00:02:36.280 --> 00:02:37.670 align:middle line:90%
for example--

00:02:37.670 --> 00:02:39.760 align:middle line:84%
we will obtain a
Meterpreter session

00:02:39.760 --> 00:02:41.410 align:middle line:90%
with elevated privileges.

00:02:41.410 --> 00:02:44.290 align:middle line:84%
However, as we'll
see in a few seconds,

00:02:44.290 --> 00:02:48.430 align:middle line:84%
playing around or executing
code at the kernel level

00:02:48.430 --> 00:02:50.930 align:middle line:84%
will most likely
cause system crashes.

00:02:50.930 --> 00:02:54.290 align:middle line:84%
So you need to be very
cognizant of that.

00:02:54.290 --> 00:02:57.610 align:middle line:84%
All right, so in terms of the
vulnerability and the patching

00:02:57.610 --> 00:03:00.310 align:middle line:84%
and the affected
versions of Windows,

00:03:00.310 --> 00:03:03.670 align:middle line:84%
Microsoft released a patch for
this vulnerability on May 14,

00:03:03.670 --> 00:03:06.490 align:middle line:84%
2019 and has urged
companies to patch

00:03:06.490 --> 00:03:08.050 align:middle line:90%
these vulnerabilities as--

00:03:08.050 --> 00:03:10.760 align:middle line:84%
this particular vulnerability
as soon as possible.

00:03:10.760 --> 00:03:14.260 align:middle line:84%
At the time of discovery, about
1 million systems worldwide

00:03:14.260 --> 00:03:15.890 align:middle line:90%
were found to be vulnerable.

00:03:15.890 --> 00:03:19.810 align:middle line:84%
And, of course, that has
steadily decreased over time

00:03:19.810 --> 00:03:23.560 align:middle line:84%
because, as of recording this
video, we're currently in 2021,

00:03:23.560 --> 00:03:25.810 align:middle line:84%
and that number has
reduced drastically.

00:03:25.810 --> 00:03:29.260 align:middle line:84%
However, there are still
various systems out there

00:03:29.260 --> 00:03:31.330 align:middle line:84%
that have been proven
to be vulnerable,

00:03:31.330 --> 00:03:35.660 align:middle line:84%
and those are external
systems or systems

00:03:35.660 --> 00:03:38.185 align:middle line:84%
that are exposed
to the internet,

00:03:38.185 --> 00:03:41.950 align:middle line:84%
not taking into consideration
the thousands of systems

00:03:41.950 --> 00:03:45.400 align:middle line:84%
on internal networks that
have not been patched yet.

00:03:45.400 --> 00:03:47.590 align:middle line:84%
Now, in terms of the
versions of Windows affected

00:03:47.590 --> 00:03:50.020 align:middle line:84%
by this vulnerability, this
particular vulnerability

00:03:50.020 --> 00:03:53.320 align:middle line:84%
affects the following
versions; so Windows versions,

00:03:53.320 --> 00:03:57.010 align:middle line:84%
anywhere from XP to Windows
Server 2008 and Windows Server

00:03:57.010 --> 00:03:58.480 align:middle line:90%
2008 R2.

00:03:58.480 --> 00:04:00.670 align:middle line:84%
So these are the
versions of Windows

00:04:00.670 --> 00:04:03.820 align:middle line:84%
where this particular exploit
has been tested successfully,

00:04:03.820 --> 00:04:05.470 align:middle line:84%
and it has actually
been verified

00:04:05.470 --> 00:04:07.840 align:middle line:84%
that you can execute
arbitrary code

00:04:07.840 --> 00:04:12.640 align:middle line:84%
or obtain a shell on these
particular versions of Windows.

00:04:12.640 --> 00:04:15.250 align:middle line:84%
And, of course, a
prerequisite for this exploit

00:04:15.250 --> 00:04:19.600 align:middle line:84%
is that RDP needs to be
enabled on the Windows target.

00:04:19.600 --> 00:04:23.440 align:middle line:84%
And furthermore, if network
level authentication

00:04:23.440 --> 00:04:26.260 align:middle line:84%
is enabled, then this
particular vulnerability

00:04:26.260 --> 00:04:27.500 align:middle line:90%
will most likely fail.

00:04:27.500 --> 00:04:29.710 align:middle line:84%
So that's one of the
mitigation techniques

00:04:29.710 --> 00:04:32.600 align:middle line:84%
that Microsoft has actually
recommended over time.

00:04:32.600 --> 00:04:35.840 align:middle line:90%
So do keep that in mind.

00:04:35.840 --> 00:04:38.380 align:middle line:84%
As for the exploit, the
BlueKeep vulnerability

00:04:38.380 --> 00:04:40.660 align:middle line:84%
has various illegitimate
proof of concepts

00:04:40.660 --> 00:04:44.080 align:middle line:84%
and exploit code that could
be malicious in nature.

00:04:44.080 --> 00:04:46.960 align:middle line:84%
Right now the reason
for that is primarily

00:04:46.960 --> 00:04:49.880 align:middle line:84%
because of how this
vulnerability was disclosed.

00:04:49.880 --> 00:04:51.830 align:middle line:84%
So it was disclosed
by Microsoft,

00:04:51.830 --> 00:04:56.500 align:middle line:84%
which means they did not provide
any proof of concept code

00:04:56.500 --> 00:04:59.470 align:middle line:84%
or exploit code that the
public could use to exploit

00:04:59.470 --> 00:05:02.470 align:middle line:84%
this particular vulnerability
because if they did that, that

00:05:02.470 --> 00:05:05.940 align:middle line:84%
would exacerbate the issue
and make companies even more

00:05:05.940 --> 00:05:06.850 align:middle line:90%
vulnerable.

00:05:06.850 --> 00:05:08.753 align:middle line:84%
However, many
security researchers

00:05:08.753 --> 00:05:10.920 align:middle line:84%
have actually come up with
various proof of concepts

00:05:10.920 --> 00:05:12.600 align:middle line:84%
without exploit
payloads attached

00:05:12.600 --> 00:05:19.080 align:middle line:84%
to them, which means that
instead of actually obtaining

00:05:19.080 --> 00:05:21.840 align:middle line:84%
a reverse shell,
the proof of concept

00:05:21.840 --> 00:05:25.740 align:middle line:84%
exploit code or scripts
essentially demonstrate

00:05:25.740 --> 00:05:29.460 align:middle line:84%
that a target is vulnerable by
executing a specific command

00:05:29.460 --> 00:05:35.550 align:middle line:84%
or by actually creating a file
on the target system's file

00:05:35.550 --> 00:05:39.090 align:middle line:84%
system, therefore proving
that an attacker could use

00:05:39.090 --> 00:05:41.460 align:middle line:90%
this to execute malicious code.

00:05:41.460 --> 00:05:43.980 align:middle line:84%
And the very important
thing to note

00:05:43.980 --> 00:05:45.660 align:middle line:84%
about this particular
vulnerability

00:05:45.660 --> 00:05:48.300 align:middle line:84%
or this particular
exploit in comparison

00:05:48.300 --> 00:05:52.320 align:middle line:84%
with EternalBlue is this
particular vulnerability

00:05:52.320 --> 00:05:55.380 align:middle line:84%
or exploit has seen a lot of
illegitimate proof of concepts

00:05:55.380 --> 00:05:58.740 align:middle line:84%
being uploaded to GitHub
or any other mirrors.

00:05:58.740 --> 00:06:01.060 align:middle line:84%
And when I say illegitimate,
what do I mean about this?

00:06:01.060 --> 00:06:04.350 align:middle line:84%
Well, what I mean is that
they don't work as intended

00:06:04.350 --> 00:06:06.700 align:middle line:84%
or as they state
they should work.

00:06:06.700 --> 00:06:09.630 align:middle line:84%
So we've seen a lot of proof
of concepts that don't actually

00:06:09.630 --> 00:06:12.645 align:middle line:84%
work and instead
may be malicious

00:06:12.645 --> 00:06:15.690 align:middle line:84%
when executed on a target
system and could perform

00:06:15.690 --> 00:06:20.010 align:middle line:84%
a plethora of other tasks or
functionality not associated

00:06:20.010 --> 00:06:23.280 align:middle line:84%
with this particular exploit or
this particular vulnerability.

00:06:23.280 --> 00:06:25.590 align:middle line:84%
It is therefore
recommended to only utilize

00:06:25.590 --> 00:06:28.740 align:middle line:84%
verified exploit code and
modules for exploitation.

00:06:28.740 --> 00:06:31.320 align:middle line:84%
And, in this case, we will
be utilizing the Metasploit

00:06:31.320 --> 00:06:33.780 align:middle line:84%
framework auxiliary
and exploit modules

00:06:33.780 --> 00:06:36.940 align:middle line:84%
to demonstrate how this
vulnerability can be exploited.

00:06:36.940 --> 00:06:40.710 align:middle line:84%
So the BlueKeep exploit
has an MSF auxiliary module

00:06:40.710 --> 00:06:42.840 align:middle line:84%
that can be used to check
if a target system is

00:06:42.840 --> 00:06:45.450 align:middle line:84%
vulnerable to the
exploit and also has

00:06:45.450 --> 00:06:46.890 align:middle line:84%
an exploit module
that can be used

00:06:46.890 --> 00:06:50.430 align:middle line:84%
to exploit the vulnerability
on unpatched systems.

00:06:50.430 --> 00:06:52.780 align:middle line:84%
So the BlueKeep exploit
module is fantastic.

00:06:52.780 --> 00:06:54.780 align:middle line:84%
However, it does need
tweaking in regards

00:06:54.780 --> 00:06:58.470 align:middle line:84%
to the target operating
system or the version

00:06:58.470 --> 00:07:00.100 align:middle line:84%
of Windows that
you are targeting,

00:07:00.100 --> 00:07:03.810 align:middle line:84%
as well as the actual groom
or the memory chunk size

00:07:03.810 --> 00:07:06.480 align:middle line:84%
that this particular
exploit requires in order

00:07:06.480 --> 00:07:08.490 align:middle line:84%
to execute malicious
code, and, of course,

00:07:08.490 --> 00:07:09.700 align:middle line:90%
we'll take a look at that.

00:07:09.700 --> 00:07:11.400 align:middle line:84%
So the exploit
module can be used

00:07:11.400 --> 00:07:14.550 align:middle line:84%
to obtain a standard command
shell as well as a Meterpreter

00:07:14.550 --> 00:07:16.350 align:middle line:90%
session on the target system.

00:07:16.350 --> 00:07:19.560 align:middle line:84%
Now, as I mentioned in the
previous slide, targeting

00:07:19.560 --> 00:07:21.390 align:middle line:84%
kernel space memory
and applications

00:07:21.390 --> 00:07:23.850 align:middle line:84%
can cause or will
cause system crashes,

00:07:23.850 --> 00:07:25.890 align:middle line:84%
and you'll actually
see that as I'll

00:07:25.890 --> 00:07:28.500 align:middle line:84%
demonstrate this
particular exploitation

00:07:28.500 --> 00:07:30.570 align:middle line:90%
process on a Windows 7 system.

00:07:30.570 --> 00:07:32.760 align:middle line:84%
You'll actually see
what I'm talking about.

00:07:32.760 --> 00:07:35.550 align:middle line:84%
So, in this case,
this particular video

00:07:35.550 --> 00:07:38.880 align:middle line:84%
does not have a lab attached
to it, for obvious reasons.

00:07:38.880 --> 00:07:41.340 align:middle line:84%
And I'm going to be performing
all of the techniques

00:07:41.340 --> 00:07:44.100 align:middle line:84%
or I'm going to be highlighting
the exploitation methodology

00:07:44.100 --> 00:07:46.290 align:middle line:84%
and techniques on
my own home lab.

00:07:46.290 --> 00:07:49.290 align:middle line:84%
So my penetration testing
distribution of choice

00:07:49.290 --> 00:07:53.520 align:middle line:84%
is Kali Linux, and the target
that I'm going to be exploiting

00:07:53.520 --> 00:07:57.840 align:middle line:84%
is a virtual machine
running Windows 7 build--

00:07:57.840 --> 00:08:00.150 align:middle line:90%
or rather Service Pack 1.

00:08:00.150 --> 00:08:02.310 align:middle line:84%
And again, if you want
to replicate this, then

00:08:02.310 --> 00:08:05.190 align:middle line:84%
you can download that
exact virtual machine

00:08:05.190 --> 00:08:07.640 align:middle line:84%
or that version of Windows
and try it out for yourself.

00:08:07.640 --> 00:08:09.850 align:middle line:84%
So I'm going to jump
into Kali Linux,

00:08:09.850 --> 00:08:13.710 align:middle line:84%
and we can get started with the
actual exploitation process.

00:08:13.710 --> 00:08:16.380 align:middle line:84%
All right, so I'm
back in my Kali VM.

00:08:16.380 --> 00:08:18.300 align:middle line:84%
And the first step,
of course, will

00:08:18.300 --> 00:08:21.300 align:middle line:84%
involve performing a port
scan on the target system

00:08:21.300 --> 00:08:24.740 align:middle line:84%
in order to verify that RDP is
indeed running on the target.

00:08:24.740 --> 00:08:26.580 align:middle line:90%
So we'll say sudo nmap.

00:08:26.580 --> 00:08:29.130 align:middle line:84%
And we don't need to perform
service version detection.

00:08:29.130 --> 00:08:33.450 align:middle line:84%
We can just limit the actual
port scan to port 3389.

00:08:33.450 --> 00:08:36.659 align:middle line:84%
And the target IP in
this case is 10.10.10.7.

00:08:36.659 --> 00:08:39.220 align:middle line:84%
And, of course, in your case,
it's going to be different.

00:08:39.220 --> 00:08:41.010 align:middle line:90%
So I'll just hit Enter.

00:08:41.010 --> 00:08:44.460 align:middle line:84%
And you can see port
3389 is indeed open,

00:08:44.460 --> 00:08:45.990 align:middle line:90%
and that is running RDP.

00:08:45.990 --> 00:08:50.160 align:middle line:84%
So we can now utilize the
Metasploit auxiliary module

00:08:50.160 --> 00:08:52.650 align:middle line:84%
to actually verify whether
this particular target is

00:08:52.650 --> 00:08:53.370 align:middle line:90%
vulnerable.

00:08:53.370 --> 00:08:55.560 align:middle line:90%
So I'll start up MSF console.

00:08:55.560 --> 00:08:58.080 align:middle line:84%
And, of course, I'll give
that a couple of seconds.

00:08:58.080 --> 00:09:00.720 align:middle line:84%
MSF console usually takes
a couple of seconds.

00:09:00.720 --> 00:09:04.170 align:middle line:84%
So there we are starting the
Metasploit framework console,

00:09:04.170 --> 00:09:07.210 align:middle line:84%
and we can then search
for the actual module.

00:09:07.210 --> 00:09:09.030 align:middle line:84%
So we can say
search for BlueKeep.

00:09:09.030 --> 00:09:10.930 align:middle line:84%
That will bring up
the two modules.

00:09:10.930 --> 00:09:12.450 align:middle line:84%
One of them is an
auxiliary module,

00:09:12.450 --> 00:09:14.400 align:middle line:84%
and the other one is
the exploit module.

00:09:14.400 --> 00:09:17.970 align:middle line:84%
And the exploit module will
also run the auxiliary module

00:09:17.970 --> 00:09:19.920 align:middle line:84%
during the exploitation
process, but I just

00:09:19.920 --> 00:09:21.400 align:middle line:90%
want to show you how this works.

00:09:21.400 --> 00:09:24.030 align:middle line:84%
So I can say use
module 0, and I'm

00:09:24.030 --> 00:09:27.670 align:middle line:84%
using the actual identifier
or the module ID here.

00:09:27.670 --> 00:09:29.610 align:middle line:90%
So I'll say show options.

00:09:29.610 --> 00:09:31.140 align:middle line:84%
And, in this case,
the only option

00:09:31.140 --> 00:09:33.450 align:middle line:84%
we need to configure
really is the target IP,

00:09:33.450 --> 00:09:35.790 align:middle line:84%
and that can be done by
setting the RHOSTS option

00:09:35.790 --> 00:09:38.130 align:middle line:84%
or by configuring
the RHOSTS option.

00:09:38.130 --> 00:09:40.680 align:middle line:84%
You also have the ability
to change the RPORT option

00:09:40.680 --> 00:09:43.260 align:middle line:84%
if RDP is running
on another port,

00:09:43.260 --> 00:09:45.970 align:middle line:84%
if it's not been configured
to run on the default port.

00:09:45.970 --> 00:09:50.670 align:middle line:84%
So, in this case, I'll just
say set RHOSTS to 10.10.10.7,

00:09:50.670 --> 00:09:53.138 align:middle line:90%
and I can then hit Run.

00:09:53.138 --> 00:09:53.680 align:middle line:90%
There we are.

00:09:53.680 --> 00:09:55.990 align:middle line:84%
You can see it tells us
that target is vulnerable,

00:09:55.990 --> 00:09:58.510 align:middle line:84%
and that means we
can actually move on

00:09:58.510 --> 00:10:00.770 align:middle line:84%
with the actual
exploitation process.

00:10:00.770 --> 00:10:02.860 align:middle line:90%
So I'll say search for BlueKeep.

00:10:02.860 --> 00:10:07.510 align:middle line:84%
And what I'll do is I'll say
use module 1 because this

00:10:07.510 --> 00:10:08.890 align:middle line:90%
is the exploit module.

00:10:08.890 --> 00:10:12.290 align:middle line:84%
It's going to default to
the Windows x64 Meterpreter

00:10:12.290 --> 00:10:12.790 align:middle line:90%
payload.

00:10:12.790 --> 00:10:14.770 align:middle line:84%
And, of course, this
is a staged payload.

00:10:14.770 --> 00:10:17.440 align:middle line:84%
So, again, this particular
module-- and it's something

00:10:17.440 --> 00:10:18.910 align:middle line:84%
that I didn't
mention previously--

00:10:18.910 --> 00:10:20.890 align:middle line:84%
this particular
module will only work

00:10:20.890 --> 00:10:24.010 align:middle line:90%
on 64-bit versions of Windows.

00:10:24.010 --> 00:10:27.610 align:middle line:84%
So again, if I clear the screen
and show the options here,

00:10:27.610 --> 00:10:30.280 align:middle line:84%
you can see that you have
your module options, which

00:10:30.280 --> 00:10:33.820 align:middle line:84%
essentially will involve you
configuring the target IP

00:10:33.820 --> 00:10:36.635 align:middle line:84%
and the target port
that has RDP running.

00:10:36.635 --> 00:10:38.260 align:middle line:84%
And then you have
your payload options,

00:10:38.260 --> 00:10:40.480 align:middle line:84%
which you will actually
need to configure.

00:10:40.480 --> 00:10:42.590 align:middle line:84%
In this case, it's
already done for me.

00:10:42.590 --> 00:10:46.630 align:middle line:84%
So it'll set my LHOST option
to my Kali Linux VMIP,

00:10:46.630 --> 00:10:51.040 align:middle line:84%
and then the LPORT option is set
to the default, which is 4444,

00:10:51.040 --> 00:10:54.250 align:middle line:84%
and I'm going to leave it
on that particular port.

00:10:54.250 --> 00:11:00.010 align:middle line:84%
So we'll say set RHOSTS, and
we're going to say 10.10.10.7.

00:11:00.010 --> 00:11:02.800 align:middle line:84%
And, of course, at this point,
we can simply type in exploit.

00:11:02.800 --> 00:11:04.900 align:middle line:84%
Well, not really, but
let's see what happens.

00:11:04.900 --> 00:11:07.570 align:middle line:84%
So I'll say exploit,
all right, and you'll

00:11:07.570 --> 00:11:09.780 align:middle line:84%
see that it'll run the
auxiliary module to check

00:11:09.780 --> 00:11:10.780 align:middle line:90%
whether it's vulnerable.

00:11:10.780 --> 00:11:12.520 align:middle line:84%
Indeed, it is
vulnerable, and it's

00:11:12.520 --> 00:11:14.770 align:middle line:84%
going to say, "Exploit
aborted due to failure,

00:11:14.770 --> 00:11:18.290 align:middle line:84%
bad configuration, set the most
appropriate target manually."

00:11:18.290 --> 00:11:19.870 align:middle line:84%
So the great thing
with this module

00:11:19.870 --> 00:11:22.120 align:middle line:84%
is you have the ability
to actually specify

00:11:22.120 --> 00:11:23.500 align:middle line:90%
the target configuration.

00:11:23.500 --> 00:11:25.810 align:middle line:84%
What this means is that
you will need to manually

00:11:25.810 --> 00:11:29.060 align:middle line:84%
configure or set the version of
Windows that you're targeting.

00:11:29.060 --> 00:11:33.040 align:middle line:84%
So if I say show targets, these
are the versions of Windows

00:11:33.040 --> 00:11:34.040 align:middle line:90%
that I can target.

00:11:34.040 --> 00:11:37.780 align:middle line:84%
In this case, we are targeting
Windows 7 Service Pack 1.

00:11:37.780 --> 00:11:40.990 align:middle line:84%
And this is a 64-bit version of
Windows 7, and this, of course,

00:11:40.990 --> 00:11:43.180 align:middle line:84%
is running on
Virtualbox 6, which

00:11:43.180 --> 00:11:45.070 align:middle line:84%
is the latest
version of Virtualbox

00:11:45.070 --> 00:11:46.820 align:middle line:90%
as of recording this video.

00:11:46.820 --> 00:11:51.310 align:middle line:84%
So to set a target, we
can say set target to 2,

00:11:51.310 --> 00:11:53.020 align:middle line:84%
and we can pretty
much hit Exploit.

00:11:53.020 --> 00:11:54.430 align:middle line:90%
And let's see what happens here.

00:11:54.430 --> 00:11:56.710 align:middle line:84%
We might get lucky
during our first attempt,

00:11:56.710 --> 00:11:58.520 align:middle line:90%
but I heavily doubt that.

00:11:58.520 --> 00:12:01.390 align:middle line:84%
So the exploitation
process will start off

00:12:01.390 --> 00:12:03.940 align:middle line:84%
by saying using the
CHUNK grooming strategy.

00:12:03.940 --> 00:12:07.480 align:middle line:84%
And the default memory
or allocated group size

00:12:07.480 --> 00:12:09.970 align:middle line:90%
is set to 250 megabytes.

00:12:09.970 --> 00:12:12.040 align:middle line:84%
And again, this is
something that we

00:12:12.040 --> 00:12:14.950 align:middle line:84%
may need to modify based on
the amount of RAM that's been

00:12:14.950 --> 00:12:16.870 align:middle line:90%
allocated to the target system.

00:12:16.870 --> 00:12:19.120 align:middle line:84%
And if this is
allocated too high,

00:12:19.120 --> 00:12:21.620 align:middle line:84%
this might cause the
target system to crash.

00:12:21.620 --> 00:12:25.300 align:middle line:84%
So, again, if I will just
give this a couple of seconds.

00:12:25.300 --> 00:12:28.300 align:middle line:84%
And, in this case, it looks
like this will indeed fail

00:12:28.300 --> 00:12:31.040 align:middle line:84%
or this will cause the target
Windows system to crash.

00:12:31.040 --> 00:12:33.730 align:middle line:84%
So as you can see, entering
the danger zone here,

00:12:33.730 --> 00:12:37.940 align:middle line:84%
it's going to start surfing the
channels and lobbing the eggs.

00:12:37.940 --> 00:12:40.390 align:middle line:84%
So let's see whether
this is successful.

00:12:40.390 --> 00:12:43.810 align:middle line:84%
If it fails, then we'll need
to modify the actual groom

00:12:43.810 --> 00:12:45.303 align:middle line:90%
size, which is perfectly fine.

00:12:45.303 --> 00:12:46.720 align:middle line:84%
And that's something
that you need

00:12:46.720 --> 00:12:49.570 align:middle line:84%
to be cognizant of beforehand
because, again, as I said,

00:12:49.570 --> 00:12:52.240 align:middle line:84%
I'm doing this within
my own local lab,

00:12:52.240 --> 00:12:55.360 align:middle line:84%
so I can afford to
actually crash systems.

00:12:55.360 --> 00:12:58.360 align:middle line:84%
When you're working within an
actual company or enterprise

00:12:58.360 --> 00:13:02.320 align:middle line:84%
environment, you want to be
extremely careful with kernel

00:13:02.320 --> 00:13:05.690 align:middle line:84%
exploits because they can crash
a system and cause data loss.

00:13:05.690 --> 00:13:09.440 align:middle line:84%
So this is not an exploit that
I really recommend running.

00:13:09.440 --> 00:13:12.740 align:middle line:84%
As I said, I'm doing this for
the purposes of demonstration.

00:13:12.740 --> 00:13:15.713 align:middle line:84%
So, again, let's see
whether this works.

00:13:15.713 --> 00:13:16.630 align:middle line:90%
There we are it looks.

00:13:16.630 --> 00:13:19.670 align:middle line:84%
Like it worked during its
first attempt, which is great.

00:13:19.670 --> 00:13:21.910 align:middle line:84%
So it sends the
stage to the target,

00:13:21.910 --> 00:13:23.540 align:middle line:84%
and we get a
Meterpreter session.

00:13:23.540 --> 00:13:26.380 align:middle line:84%
So if I say sysinfo,
there we are.

00:13:26.380 --> 00:13:29.360 align:middle line:84%
You can see it is
Windows 7, and this

00:13:29.360 --> 00:13:32.920 align:middle line:84%
is Service Pack 1
build 7601, get user

00:13:32.920 --> 00:13:35.090 align:middle line:90%
ID, NT AUTHORITY SYSTEM.

00:13:35.090 --> 00:13:38.620 align:middle line:84%
So we've been able to gain
access to the target system

00:13:38.620 --> 00:13:40.910 align:middle line:90%
by exploiting the RDP protocol.

00:13:40.910 --> 00:13:44.440 align:middle line:84%
However, we've not targeted or
performed a brute force attack

00:13:44.440 --> 00:13:46.810 align:middle line:84%
in order to obtain
legitimate credentials.

00:13:46.810 --> 00:13:49.330 align:middle line:84%
We have just exploited
an inherent vulnerability

00:13:49.330 --> 00:13:50.650 align:middle line:90%
within Windows.

00:13:50.650 --> 00:13:53.230 align:middle line:84%
And again, this particular
exploit is great

00:13:53.230 --> 00:13:55.720 align:middle line:84%
and it's very similar
to EternalBlue in

00:13:55.720 --> 00:14:00.310 align:middle line:84%
that it provides us with an
elevated Meterpreter session

00:14:00.310 --> 00:14:02.950 align:middle line:84%
so that we don't need to
elevate our privileges,

00:14:02.950 --> 00:14:06.070 align:middle line:84%
which, again, in a
typical penetration test,

00:14:06.070 --> 00:14:07.580 align:middle line:84%
this is pretty
much the gold mine.

00:14:07.580 --> 00:14:09.730 align:middle line:84%
This is something that you
want right off the bat--

00:14:09.730 --> 00:14:12.910 align:middle line:84%
to have administrative
privileges on the target system

00:14:12.910 --> 00:14:14.020 align:middle line:90%
that you're exploiting.

00:14:14.020 --> 00:14:17.830 align:middle line:84%
However, we'll also be exploring
various privilege escalation

00:14:17.830 --> 00:14:20.080 align:middle line:84%
techniques you can perform
on Windows to elevate

00:14:20.080 --> 00:14:23.770 align:middle line:84%
your privileges if you've
been able to gain access

00:14:23.770 --> 00:14:28.180 align:middle line:84%
through another attack vector
that did not provide you

00:14:28.180 --> 00:14:29.950 align:middle line:90%
with a privilege session.

00:14:29.950 --> 00:14:31.750 align:middle line:84%
All right, so that
is going to conclude

00:14:31.750 --> 00:14:35.970 align:middle line:84%
the practical demonstration
side of this video.

00:14:35.970 --> 00:14:38.210 align:middle line:84%
In the next video,
we will be exploring

00:14:38.210 --> 00:14:43.130 align:middle line:84%
the process of exploiting the
WinRM protocol on Windows.

00:14:43.130 --> 00:14:46.280 align:middle line:84%
WinRM stands for the Windows
remote management protocol.

00:14:46.280 --> 00:14:48.650 align:middle line:84%
And it's an extremely
useful protocol

00:14:48.650 --> 00:14:50.435 align:middle line:84%
for system
administrators, and we're

00:14:50.435 --> 00:14:52.560 align:middle line:84%
going to be taking a look
at how we can exploit it.

00:14:52.560 --> 00:14:56.200 align:middle line:84%
So I'll see you
in the next video.

00:14:56.200 --> 00:14:57.000 align:middle line:90%