WEBVTT

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


00:00:10.170 --> 00:00:15.300 align:middle line:84%
Exploiting the Windows
MS17-010 SMB Vulnerability.

00:00:15.300 --> 00:00:16.950 align:middle line:84%
In this video, we
will be exploring

00:00:16.950 --> 00:00:20.580 align:middle line:84%
the process of exploiting
Windows systems that

00:00:20.580 --> 00:00:26.160 align:middle line:84%
are vulnerable to the MS17-010
SMB vulnerability that allows

00:00:26.160 --> 00:00:28.470 align:middle line:84%
attackers or that
can allow attackers

00:00:28.470 --> 00:00:33.660 align:middle line:84%
to essentially execute remote
code on vulnerable Windows

00:00:33.660 --> 00:00:34.620 align:middle line:90%
systems.

00:00:34.620 --> 00:00:38.580 align:middle line:84%
Now, this is probably
one of the largest,

00:00:38.580 --> 00:00:42.150 align:middle line:84%
most popular vulnerabilities
that has been again,

00:00:42.150 --> 00:00:46.110 align:middle line:84%
made public in the recent
years, and for good reason.

00:00:46.110 --> 00:00:49.260 align:middle line:84%
So first and foremost, let's
get an idea or an understanding

00:00:49.260 --> 00:00:51.750 align:middle line:84%
as to how this
vulnerability came to be,

00:00:51.750 --> 00:00:56.400 align:middle line:84%
what service it exploits, as
well as how it can be exploited

00:00:56.400 --> 00:00:58.960 align:middle line:90%
with the Metasploit framework.

00:00:58.960 --> 00:01:01.720 align:middle line:84%
All right, so
EternalBlue is the name

00:01:01.720 --> 00:01:06.580 align:middle line:84%
given to the exploit that
takes advantage of the MS17-010

00:01:06.580 --> 00:01:07.510 align:middle line:90%
vulnerability.

00:01:07.510 --> 00:01:08.110 align:middle line:90%
All right?

00:01:08.110 --> 00:01:11.950 align:middle line:84%
Now, this vulnerability is
also known through its CVE

00:01:11.950 --> 00:01:14.980 align:middle line:90%
code, which is 2017-0144.

00:01:14.980 --> 00:01:17.530 align:middle line:84%
So if you ever want to
identify it or learn more

00:01:17.530 --> 00:01:18.940 align:middle line:84%
about this
vulnerability, you can

00:01:18.940 --> 00:01:22.150 align:middle line:84%
utilize the Microsoft
security or vulnerability

00:01:22.150 --> 00:01:26.320 align:middle line:84%
ID, which is MS17-010 and
the Common Vulnerabilities

00:01:26.320 --> 00:01:30.160 align:middle line:84%
and Exposure code,
which is 2017-0144.

00:01:30.160 --> 00:01:31.840 align:middle line:84%
And of course,
both of these codes

00:01:31.840 --> 00:01:34.900 align:middle line:84%
give you an idea as to when this
particular vulnerability was

00:01:34.900 --> 00:01:38.440 align:middle line:84%
made public and consequently,
the exploit was made public.

00:01:38.440 --> 00:01:41.890 align:middle line:84%
So EternalBlue is the name
given to a collection of Windows

00:01:41.890 --> 00:01:44.320 align:middle line:84%
vulnerabilities and exploits
that allow attackers

00:01:44.320 --> 00:01:47.290 align:middle line:84%
to remotely execute
arbitrary code and gain

00:01:47.290 --> 00:01:50.410 align:middle line:84%
access to a Windows system,
and consequently, the network

00:01:50.410 --> 00:01:52.760 align:middle line:84%
that the target
system is a part of.

00:01:52.760 --> 00:01:54.850 align:middle line:84%
Now, the EternalBlue
exploit was developed

00:01:54.850 --> 00:01:56.920 align:middle line:84%
by the National
Security Agency, that's

00:01:56.920 --> 00:02:01.960 align:middle line:84%
the NSA, to take advantage
of the MS17-010 vulnerability

00:02:01.960 --> 00:02:04.660 align:middle line:84%
and was leaked to the public
by a hacker group called

00:02:04.660 --> 00:02:07.090 align:middle line:90%
the Shadow Brokers in 2017.

00:02:07.090 --> 00:02:10.180 align:middle line:84%
So the NSA had essentially
developed exploit code

00:02:10.180 --> 00:02:11.980 align:middle line:84%
to take advantage of
this vulnerability

00:02:11.980 --> 00:02:16.270 align:middle line:84%
before Microsoft was even
aware that this vulnerability

00:02:16.270 --> 00:02:21.190 align:middle line:84%
actually existed within pretty
much all versions of Windows

00:02:21.190 --> 00:02:22.990 align:middle line:90%
after Windows Vista.

00:02:22.990 --> 00:02:28.030 align:middle line:84%
So again, due to the fact that
this vulnerability was released

00:02:28.030 --> 00:02:31.810 align:middle line:84%
to the public in 2017
by the hacker group,

00:02:31.810 --> 00:02:34.030 align:middle line:84%
the NSA actually
reached out to Microsoft

00:02:34.030 --> 00:02:36.760 align:middle line:84%
and informed them of
this vulnerability, which

00:02:36.760 --> 00:02:38.200 align:middle line:84%
allowed Microsoft
to again, start

00:02:38.200 --> 00:02:41.230 align:middle line:84%
developing patches for
the vulnerable systems,

00:02:41.230 --> 00:02:43.210 align:middle line:84%
which is pretty much
every Windows system

00:02:43.210 --> 00:02:45.370 align:middle line:90%
on the planet at the time.

00:02:45.370 --> 00:02:48.850 align:middle line:84%
Now, the EternalBlue exploit,
in regards to how it works,

00:02:48.850 --> 00:02:52.210 align:middle line:84%
essentially takes advantage of
a vulnerability in the Windows

00:02:52.210 --> 00:02:54.310 align:middle line:90%
SMB version 1 protocol.

00:02:54.310 --> 00:02:56.640 align:middle line:84%
As we've already
explored SMB, SMB

00:02:56.640 --> 00:02:59.470 align:middle line:84%
is used for network
file sharing.

00:02:59.470 --> 00:03:04.420 align:middle line:84%
And as a result, through
this vulnerability,

00:03:04.420 --> 00:03:07.210 align:middle line:84%
it essentially allows
attackers to send specially

00:03:07.210 --> 00:03:09.940 align:middle line:84%
crafted packets
to SMB or a target

00:03:09.940 --> 00:03:12.130 align:middle line:84%
running SMB, which
is pretty much

00:03:12.130 --> 00:03:14.320 align:middle line:90%
every Windows system out there.

00:03:14.320 --> 00:03:17.470 align:middle line:84%
That again, would consequently
facilitate the execution

00:03:17.470 --> 00:03:18.520 align:middle line:90%
of arbitrary commands.

00:03:18.520 --> 00:03:21.910 align:middle line:84%
Or in the case of
Metasploit, the execution

00:03:21.910 --> 00:03:24.980 align:middle line:84%
of payloads like a
Meterpreter payload.

00:03:24.980 --> 00:03:27.130 align:middle line:90%
Now, the EternalBlue exploit--

00:03:27.130 --> 00:03:29.740 align:middle line:84%
and this is where it sort
of gained its popularity--

00:03:29.740 --> 00:03:32.650 align:middle line:84%
was utilized in the
WannaCry ransomware attack

00:03:32.650 --> 00:03:35.590 align:middle line:90%
on June the 27th of 2017.

00:03:35.590 --> 00:03:39.340 align:middle line:84%
And this particular exploit
was used to again, exploit

00:03:39.340 --> 00:03:40.700 align:middle line:90%
Windows systems.

00:03:40.700 --> 00:03:43.660 align:middle line:84%
So it was used during
the ransomware campaign

00:03:43.660 --> 00:03:46.660 align:middle line:84%
to essentially gain access
to vulnerable Windows systems

00:03:46.660 --> 00:03:50.440 align:middle line:84%
and then utilize the
EternalBlue exploit to again,

00:03:50.440 --> 00:03:54.610 align:middle line:84%
access or exploit other Windows
systems on the local network

00:03:54.610 --> 00:03:57.250 align:middle line:84%
or with the objective of
spreading the ransomware to as

00:03:57.250 --> 00:03:58.640 align:middle line:90%
many systems as possible.

00:03:58.640 --> 00:04:01.360 align:middle line:84%
So it was a really
big deal in 2017.

00:04:01.360 --> 00:04:04.630 align:middle line:84%
And a lot of companies,
hospitals, and institutions

00:04:04.630 --> 00:04:06.970 align:middle line:84%
were affected by this
particular vulnerability.

00:04:06.970 --> 00:04:09.370 align:middle line:84%
And consequently,
the exploit code,

00:04:09.370 --> 00:04:12.700 align:middle line:84%
which is EternalBlue, as well
as the various ransomware

00:04:12.700 --> 00:04:15.910 align:middle line:84%
campaigns that utilized
the EternalBlue exploit.

00:04:15.910 --> 00:04:19.149 align:middle line:84%
Now, the thing that makes
this vulnerability so serious

00:04:19.149 --> 00:04:23.830 align:middle line:84%
or so dangerous-- especially
when it comes down to Windows

00:04:23.830 --> 00:04:24.580 align:middle line:90%
systems--

00:04:24.580 --> 00:04:27.430 align:middle line:84%
is that it affects multiple
versions of Windows ranging

00:04:27.430 --> 00:04:30.100 align:middle line:84%
from Windows Vista
to Windows 7, Windows

00:04:30.100 --> 00:04:34.450 align:middle line:84%
Server 2008, Windows 8.1,
Windows Server 2012, Windows

00:04:34.450 --> 00:04:37.510 align:middle line:90%
10, and Windows Server 2016.

00:04:37.510 --> 00:04:39.760 align:middle line:84%
Now, as I mentioned
earlier, Microsoft

00:04:39.760 --> 00:04:42.820 align:middle line:84%
released a patch for the
vulnerability in March 2017.

00:04:42.820 --> 00:04:46.240 align:middle line:84%
However, given the fact that
it affects multiple versions

00:04:46.240 --> 00:04:48.730 align:middle line:84%
of Windows, many
users and companies

00:04:48.730 --> 00:04:50.480 align:middle line:84%
have still not yet
patched their systems,

00:04:50.480 --> 00:04:53.620 align:middle line:84%
which means this is still a
viable vulnerability that one

00:04:53.620 --> 00:04:56.740 align:middle line:84%
can exploit, especially in
some of the older enterprise

00:04:56.740 --> 00:04:59.470 align:middle line:84%
environments that have still
not yet patched their systems.

00:04:59.470 --> 00:05:02.530 align:middle line:84%
Now, the EternalBlue exploit
has a Metasploit Framework

00:05:02.530 --> 00:05:04.210 align:middle line:84%
auxiliary module
that can be used

00:05:04.210 --> 00:05:07.810 align:middle line:84%
to check if a target system
is vulnerable to the exploit.

00:05:07.810 --> 00:05:10.030 align:middle line:84%
And also, has an
exploit module that

00:05:10.030 --> 00:05:12.130 align:middle line:84%
can be used to exploit
the vulnerability

00:05:12.130 --> 00:05:14.660 align:middle line:84%
on the unpatched
Windows systems.

00:05:14.660 --> 00:05:16.750 align:middle line:84%
So the EternalBlue
exploit module

00:05:16.750 --> 00:05:19.270 align:middle line:84%
can be used to exploit
vulnerable Windows systems

00:05:19.270 --> 00:05:22.030 align:middle line:84%
and can be used to
consequently provide us

00:05:22.030 --> 00:05:25.360 align:middle line:84%
with a privileged Meterpreter
session on the target system.

00:05:25.360 --> 00:05:27.070 align:middle line:84%
The key thing to
note here is that

00:05:27.070 --> 00:05:29.140 align:middle line:84%
this particular vulnerability,
and consequently

00:05:29.140 --> 00:05:31.510 align:middle line:84%
the EternalBlue
exploit, will provide us

00:05:31.510 --> 00:05:33.280 align:middle line:90%
with a privileged session.

00:05:33.280 --> 00:05:36.790 align:middle line:84%
So instead of just getting
a standard, non-privileged

00:05:36.790 --> 00:05:38.980 align:middle line:84%
Meterpreter session,
we're now getting

00:05:38.980 --> 00:05:42.550 align:middle line:84%
full anti-authority permissions
on our Meterpreter session,

00:05:42.550 --> 00:05:45.100 align:middle line:84%
which pretty much means
we have total control

00:05:45.100 --> 00:05:46.900 align:middle line:84%
over that particular
target system.

00:05:46.900 --> 00:05:49.390 align:middle line:84%
And consequently,
other devices or other

00:05:49.390 --> 00:05:51.260 align:middle line:90%
Windows systems on the network.

00:05:51.260 --> 00:05:53.110 align:middle line:84%
So again, we'll be
taking a look at how

00:05:53.110 --> 00:05:56.410 align:middle line:84%
to utilize the Metasploit
Framework EternalBlue auxiliary

00:05:56.410 --> 00:05:59.720 align:middle line:84%
and exploit modules in
the practical section.

00:05:59.720 --> 00:06:02.370 align:middle line:84%
So in this practical
section, I'm

00:06:02.370 --> 00:06:04.800 align:middle line:84%
going to be again,
performing these techniques

00:06:04.800 --> 00:06:06.690 align:middle line:90%
in my own virtual environment.

00:06:06.690 --> 00:06:08.490 align:middle line:84%
And of course, the
reason I'm doing this

00:06:08.490 --> 00:06:11.910 align:middle line:84%
is because, as I said, it's not
wise to have this vulnerability

00:06:11.910 --> 00:06:14.100 align:middle line:84%
in an online lab environment
because again, it

00:06:14.100 --> 00:06:16.050 align:middle line:90%
can be exploited by attackers.

00:06:16.050 --> 00:06:17.320 align:middle line:90%
And that's how powerful it is.

00:06:17.320 --> 00:06:19.590 align:middle line:84%
So in order to demonstrate
this technique,

00:06:19.590 --> 00:06:22.200 align:middle line:84%
I'm going to be utilizing
my Kali Linux VM.

00:06:22.200 --> 00:06:26.040 align:middle line:84%
And the target system is
going to be a Windows 7

00:06:26.040 --> 00:06:29.520 align:middle line:84%
VM that is I think Service Pack
1-- that's running Windows 7

00:06:29.520 --> 00:06:30.900 align:middle line:90%
Service Pack 1.

00:06:30.900 --> 00:06:33.270 align:middle line:84%
And again, in your case,
all you need to know

00:06:33.270 --> 00:06:35.580 align:middle line:84%
or all you need to be
aware of is the techniques

00:06:35.580 --> 00:06:37.890 align:middle line:84%
and the modules that we
are going to be utilizing.

00:06:37.890 --> 00:06:40.920 align:middle line:84%
And again, if the target
system that you're working on

00:06:40.920 --> 00:06:44.310 align:middle line:84%
is vulnerable to the
MS17-010 vulnerability,

00:06:44.310 --> 00:06:46.410 align:middle line:84%
then again, this
video will explain

00:06:46.410 --> 00:06:49.290 align:middle line:84%
how you can utilize the
Metasploit Framework to exploit

00:06:49.290 --> 00:06:50.200 align:middle line:90%
that vulnerability.

00:06:50.200 --> 00:06:54.050 align:middle line:90%
So let's get started.

00:06:54.050 --> 00:06:56.500 align:middle line:84%
All right, I'm back
on my Kali Linux VM.

00:06:56.500 --> 00:06:59.320 align:middle line:84%
And I'm just going to
open up my terminal here.

00:06:59.320 --> 00:07:02.050 align:middle line:84%
And we'll start up the
Metasploit Framework console.

00:07:02.050 --> 00:07:03.520 align:middle line:84%
And again, go
through the process

00:07:03.520 --> 00:07:06.700 align:middle line:84%
of performing a port
scan on the target system

00:07:06.700 --> 00:07:09.220 align:middle line:84%
in order to identify
where the SMB is running.

00:07:09.220 --> 00:07:11.980 align:middle line:84%
So again, we're just going
to wait for MSFConsole

00:07:11.980 --> 00:07:13.420 align:middle line:90%
to start up.

00:07:13.420 --> 00:07:15.350 align:middle line:84%
I'm just going to increase
the font size here

00:07:15.350 --> 00:07:18.458 align:middle line:90%
so you can see what's going on.

00:07:18.458 --> 00:07:19.000 align:middle line:90%
There we are.

00:07:19.000 --> 00:07:20.750 align:middle line:84%
Starting the Metasploit
Framework console.

00:07:20.750 --> 00:07:23.330 align:middle line:90%


00:07:23.330 --> 00:07:26.240 align:middle line:84%
And I'm going to create
a workspace called--

00:07:26.240 --> 00:07:31.030 align:middle line:84%
we're just going to call
it EternalBlue, all right?

00:07:31.030 --> 00:07:31.720 align:middle line:90%
There we are.

00:07:31.720 --> 00:07:33.790 align:middle line:84%
And now that that's done,
we're going to again,

00:07:33.790 --> 00:07:37.570 align:middle line:84%
utilize the db_nmap command
to perform an Nmap scan

00:07:37.570 --> 00:07:41.140 align:middle line:84%
and directly import the results
into the Metasploit Framework

00:07:41.140 --> 00:07:42.190 align:middle line:90%
database.

00:07:42.190 --> 00:07:44.710 align:middle line:84%
And more specifically,
into our current workspace.

00:07:44.710 --> 00:07:48.970 align:middle line:84%
So we're going to perform a
SYN scan, as well as a surface

00:07:48.970 --> 00:07:52.810 align:middle line:84%
detection scan, as well as
an operating system detection

00:07:52.810 --> 00:07:53.360 align:middle line:90%
scan.

00:07:53.360 --> 00:07:56.110 align:middle line:84%
So we'll use the operating
system detection flag there.

00:07:56.110 --> 00:07:59.500 align:middle line:84%
And then the target IP
address or the IP address

00:07:59.500 --> 00:08:00.470 align:middle line:90%
of the target system.

00:08:00.470 --> 00:08:02.680 align:middle line:90%
In my case is 10.10.10.7.

00:08:02.680 --> 00:08:04.120 align:middle line:90%
And I'm going to hit Enter.

00:08:04.120 --> 00:08:07.930 align:middle line:84%
It's going to tell us that
this particular scan requires

00:08:07.930 --> 00:08:08.780 align:middle line:90%
root privileges.

00:08:08.780 --> 00:08:11.270 align:middle line:84%
So I'm just going to
type in my password here.

00:08:11.270 --> 00:08:15.280 align:middle line:84%
And we're going to wait
for the scan to complete.

00:08:15.280 --> 00:08:17.170 align:middle line:84%
All right, the Nmap
scan is complete.

00:08:17.170 --> 00:08:20.850 align:middle line:84%
And as you can see, the target
is running SMB, obviously.

00:08:20.850 --> 00:08:24.580 align:middle line:84%
And it is a Microsoft
Windows 7 system.

00:08:24.580 --> 00:08:27.690 align:middle line:84%
And we don't get the exact
version or the exact service

00:08:27.690 --> 00:08:30.810 align:middle line:84%
pack, but under the
operating system detection

00:08:30.810 --> 00:08:32.820 align:middle line:84%
output here provided
by Nmap, we can

00:08:32.820 --> 00:08:35.700 align:middle line:84%
see that we get some
good guesses as to what

00:08:35.700 --> 00:08:37.049 align:middle line:90%
the operating system is.

00:08:37.049 --> 00:08:39.179 align:middle line:84%
And in this case, it
correctly identifies it

00:08:39.179 --> 00:08:45.090 align:middle line:84%
as either a Windows 7 Service
Pack 1 or Windows Server 2008.

00:08:45.090 --> 00:08:46.950 align:middle line:90%
So let's clear out our terminal.

00:08:46.950 --> 00:08:49.050 align:middle line:84%
And of course, we can
always list out the services

00:08:49.050 --> 00:08:51.570 align:middle line:84%
by typing out these
services command here.

00:08:51.570 --> 00:08:53.850 align:middle line:84%
The first thing we
want to do is perform

00:08:53.850 --> 00:08:57.330 align:middle line:84%
a check using the
EternalBlue auxiliary module.

00:08:57.330 --> 00:08:59.550 align:middle line:84%
And this module, as I
mentioned previously,

00:08:59.550 --> 00:09:01.560 align:middle line:84%
will be utilized
to scan and check

00:09:01.560 --> 00:09:06.390 align:middle line:84%
whether the target is vulnerable
to the EternalBlue exploit.

00:09:06.390 --> 00:09:08.310 align:middle line:84%
In order to do this,
we're going to say Search

00:09:08.310 --> 00:09:11.550 align:middle line:84%
and then the type is
going to be Auxiliary

00:09:11.550 --> 00:09:14.650 align:middle line:84%
because we are looking for an
auxiliary module specifically.

00:09:14.650 --> 00:09:20.130 align:middle line:84%
And then we can type in
EternalBlue and hit Enter.

00:09:20.130 --> 00:09:23.310 align:middle line:84%
As you can see, we have
the auxiliary module here.

00:09:23.310 --> 00:09:25.360 align:middle line:84%
That will essentially--
this is the module here,

00:09:25.360 --> 00:09:29.850 align:middle line:84%
this module will essentially
perform the MS17-010 SMB

00:09:29.850 --> 00:09:32.020 align:middle line:90%
remote code execution detection.

00:09:32.020 --> 00:09:35.430 align:middle line:84%
So we can utilize that module
by just copying the name.

00:09:35.430 --> 00:09:37.860 align:middle line:84%
And we can then
paste it in here.

00:09:37.860 --> 00:09:42.250 align:middle line:84%
If we show the
options, you can see

00:09:42.250 --> 00:09:44.710 align:middle line:84%
that we have various
options that we can check.

00:09:44.710 --> 00:09:47.320 align:middle line:84%
One of them is the Check
Architecture option.

00:09:47.320 --> 00:09:49.330 align:middle line:84%
That is, by default,
set to True.

00:09:49.330 --> 00:09:51.460 align:middle line:84%
And this will check for
the target architecture

00:09:51.460 --> 00:09:52.900 align:middle line:90%
on the vulnerable host.

00:09:52.900 --> 00:09:54.620 align:middle line:90%
That is very important.

00:09:54.620 --> 00:09:58.300 align:middle line:84%
It is also going to check the
actual DOUBLEPULSAR exploit,

00:09:58.300 --> 00:10:01.150 align:middle line:90%
and that is also set to True.

00:10:01.150 --> 00:10:04.188 align:middle line:84%
It is also going to again,
check the pipe, the SMB pipe.

00:10:04.188 --> 00:10:04.730 align:middle line:90%
There we are.

00:10:04.730 --> 00:10:07.760 align:middle line:84%
That's going to check for the
named pipe on vulnerable hosts.

00:10:07.760 --> 00:10:10.287 align:middle line:84%
And then we can specify
the target IP here,

00:10:10.287 --> 00:10:11.620 align:middle line:90%
which we'll do in a few seconds.

00:10:11.620 --> 00:10:14.620 align:middle line:84%
And the RPORT is set
by default to 445.

00:10:14.620 --> 00:10:18.620 align:middle line:84%
So we're going to set
the RHOST option here

00:10:18.620 --> 00:10:19.700 align:middle line:90%
through the target IP.

00:10:19.700 --> 00:10:22.520 align:middle line:84%
And of course, you can
also scan an entire subnet.

00:10:22.520 --> 00:10:24.830 align:middle line:84%
If you are performing
a penetration test

00:10:24.830 --> 00:10:27.080 align:middle line:84%
on an entire network,
I would recommend

00:10:27.080 --> 00:10:29.930 align:middle line:84%
performing the vulnerability
scanning with this module

00:10:29.930 --> 00:10:33.200 align:middle line:84%
to essentially check whether
any of the systems on a network,

00:10:33.200 --> 00:10:34.940 align:middle line:84%
any of the Windows
systems on a network,

00:10:34.940 --> 00:10:37.460 align:middle line:84%
are vulnerable to this
particular exploit.

00:10:37.460 --> 00:10:40.890 align:middle line:84%
Once we're ready,
we just type in Run.

00:10:40.890 --> 00:10:42.650 align:middle line:84%
And as you can
see, it immediately

00:10:42.650 --> 00:10:46.610 align:middle line:84%
tells us that the host is
likely vulnerable to MS17-010.

00:10:46.610 --> 00:10:49.370 align:middle line:84%
And it then gives us the actual
operating system version.

00:10:49.370 --> 00:10:54.020 align:middle line:84%
So it's a Windows 7
Ultimate 7601 Service Pack 1

00:10:54.020 --> 00:10:56.600 align:middle line:84%
and it's a 64-bit
operating system.

00:10:56.600 --> 00:10:59.420 align:middle line:84%
All right, so we can now
search for the exploit module,

00:10:59.420 --> 00:11:01.460 align:middle line:84%
the EternalBlue
exploit module, which

00:11:01.460 --> 00:11:04.460 align:middle line:84%
can be done by saying
Search, limiting

00:11:04.460 --> 00:11:06.590 align:middle line:90%
the output to the exploit--

00:11:06.590 --> 00:11:08.090 align:middle line:90%
or rather to exploit modules.

00:11:08.090 --> 00:11:11.960 align:middle line:84%
And then searching or
specifying the EternalBlue

00:11:11.960 --> 00:11:13.140 align:middle line:90%
exploit name here.

00:11:13.140 --> 00:11:15.560 align:middle line:84%
So we're going to say
EternalBlue, hit Enter.

00:11:15.560 --> 00:11:17.780 align:middle line:84%
And the exploit that
we are looking for

00:11:17.780 --> 00:11:20.010 align:middle line:84%
is going to be this
one right over here.

00:11:20.010 --> 00:11:22.556 align:middle line:84%
So that's
exploit/windows/smb/ms17 010

00:11:22.556 --> 00:11:24.380 align:middle line:90%
eternalblue.

00:11:24.380 --> 00:11:26.480 align:middle line:90%
It is released in 2017.

00:11:26.480 --> 00:11:31.330 align:middle line:84%
And again, we can
copy that here.

00:11:31.330 --> 00:11:31.990 align:middle line:90%
There we are.

00:11:31.990 --> 00:11:36.040 align:middle line:84%
And we just say Use,
paste in the module name.

00:11:36.040 --> 00:11:39.910 align:middle line:84%
And by default, it's going to
set the payload to Windows x64

00:11:39.910 --> 00:11:41.740 align:middle line:90%
Meterpreter Reverse TCP.

00:11:41.740 --> 00:11:44.500 align:middle line:84%
And in our case, that works
out fine because the target

00:11:44.500 --> 00:11:47.350 align:middle line:84%
operating system, as we
have been able to enumerate,

00:11:47.350 --> 00:11:48.580 align:middle line:90%
is running Windows.

00:11:48.580 --> 00:11:51.910 align:middle line:84%
And it's also a 64-bit
version of Windows 7.

00:11:51.910 --> 00:11:54.440 align:middle line:84%
So if we show the
options for this module,

00:11:54.440 --> 00:11:56.980 align:middle line:84%
we have the ability to
specify the payload options

00:11:56.980 --> 00:11:59.020 align:middle line:84%
like the LHOST IP
address, which is

00:11:59.020 --> 00:12:01.120 align:middle line:90%
going to be your Kali Linux IP.

00:12:01.120 --> 00:12:03.513 align:middle line:84%
And then the LPORT
option, which is, again,

00:12:03.513 --> 00:12:04.930 align:middle line:84%
going to be the
port that you want

00:12:04.930 --> 00:12:09.040 align:middle line:84%
to listen on for the connection
or the reverse connection back.

00:12:09.040 --> 00:12:13.310 align:middle line:84%
And then of course, we need to
specify the RHOST option here,

00:12:13.310 --> 00:12:14.390 align:middle line:90%
which we'll do right now.

00:12:14.390 --> 00:12:18.070 align:middle line:90%
So set RHOSTS to the target IP.

00:12:18.070 --> 00:12:19.880 align:middle line:90%
That we are.

00:12:19.880 --> 00:12:22.690 align:middle line:90%
And then we can hit Run.

00:12:22.690 --> 00:12:25.480 align:middle line:84%
And it's going to begin
performing or executing

00:12:25.480 --> 00:12:29.830 align:middle line:84%
the actual exploit, as well
as exploiting or executing

00:12:29.830 --> 00:12:33.310 align:middle line:84%
the payload that we have paired
with this particular exploit

00:12:33.310 --> 00:12:33.970 align:middle line:90%
module.

00:12:33.970 --> 00:12:37.630 align:middle line:84%
As you can see, because
this is a staged payload,

00:12:37.630 --> 00:12:39.910 align:middle line:84%
it'll send the stage
or set up the stage

00:12:39.910 --> 00:12:43.060 align:middle line:84%
and then send the stage and
we get a Meterpreter session

00:12:43.060 --> 00:12:44.560 align:middle line:90%
on the target system.

00:12:44.560 --> 00:12:46.810 align:middle line:84%
We can verify that
this is the Windows 7

00:12:46.810 --> 00:12:48.880 align:middle line:90%
system by typing in sysinfo.

00:12:48.880 --> 00:12:52.000 align:middle line:84%
And we get, as you can see,
the target architecture

00:12:52.000 --> 00:12:55.430 align:middle line:84%
or operating system
architecture is 64-bit.

00:12:55.430 --> 00:12:58.690 align:middle line:84%
And we also get a 64-bit
Meterpreter session.

00:12:58.690 --> 00:13:02.260 align:middle line:84%
We can check our privileges
by typing in the Get User ID

00:13:02.260 --> 00:13:03.020 align:middle line:90%
command.

00:13:03.020 --> 00:13:06.160 align:middle line:84%
And as you can see,
we get or we currently

00:13:06.160 --> 00:13:10.300 align:middle line:84%
have access on the target system
as anti-authority system, which

00:13:10.300 --> 00:13:11.980 align:middle line:84%
means we have the
highest privileges

00:13:11.980 --> 00:13:13.780 align:middle line:90%
possible on the Windows system.

00:13:13.780 --> 00:13:15.910 align:middle line:84%
Which again, consequently
means that we

00:13:15.910 --> 00:13:18.910 align:middle line:84%
have total and complete
control over this system

00:13:18.910 --> 00:13:21.490 align:middle line:90%
and can execute any commands.

00:13:21.490 --> 00:13:24.310 align:middle line:84%
That being said, in
this particular case--

00:13:24.310 --> 00:13:27.220 align:middle line:84%
or once we have utilized
this particular exploit--

00:13:27.220 --> 00:13:29.920 align:middle line:84%
we do not need to perform
any privilege escalation

00:13:29.920 --> 00:13:33.170 align:middle line:84%
as we've already obtained an
elevated Meterpreter session.

00:13:33.170 --> 00:13:37.120 align:middle line:84%
So that is how to scan
for the EternalBlue,

00:13:37.120 --> 00:13:41.080 align:middle line:84%
or rather the MS17-010
vulnerability on a target

00:13:41.080 --> 00:13:43.780 align:middle line:84%
system, as well as how to
exploit the vulnerability

00:13:43.780 --> 00:13:47.510 align:middle line:84%
using the EternalBlue Metasploit
Framework exploit module.

00:13:47.510 --> 00:13:50.470 align:middle line:84%
So that is going to conclude
the practical section

00:13:50.470 --> 00:13:53.430 align:middle line:90%
of this video.

00:13:53.430 --> 00:13:56.000 align:middle line:84%
In the next video, we
are going to be exploring

00:13:56.000 --> 00:14:00.110 align:middle line:84%
the process of exploiting the
WinRM protocol or the Windows

00:14:00.110 --> 00:14:03.660 align:middle line:84%
Remote Management protocol
on Windows systems.

00:14:03.660 --> 00:14:06.250 align:middle line:90%
So I'll see you there.

00:14:06.250 --> 00:14:07.000 align:middle line:90%