WEBVTT

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


00:00:10.170 --> 00:00:11.760 align:middle line:90%
Enabling RDP.

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

00:00:13.650 --> 00:00:17.430 align:middle line:84%
the process of how to enable
RDP on a Windows target

00:00:17.430 --> 00:00:19.470 align:middle line:84%
after we've gained
access, and we'll also

00:00:19.470 --> 00:00:23.070 align:middle line:84%
take a look at how to utilize
the RDP protocol so that we can

00:00:23.070 --> 00:00:26.040 align:middle line:84%
actually authenticate with
the target system via RDP

00:00:26.040 --> 00:00:29.790 align:middle line:84%
and consequently gain access
and interact with the target

00:00:29.790 --> 00:00:30.420 align:middle line:90%
system, right?

00:00:30.420 --> 00:00:32.610 align:middle line:90%
So what is RDP?

00:00:32.610 --> 00:00:36.420 align:middle line:84%
Because I've been throwing the
word around for quite a while

00:00:36.420 --> 00:00:38.040 align:middle line:84%
during this course,
and we of course

00:00:38.040 --> 00:00:41.832 align:middle line:84%
explored-- we actually explored
the process of enabling RDP

00:00:41.832 --> 00:00:43.290 align:middle line:84%
previously, but in
this case, we'll

00:00:43.290 --> 00:00:45.450 align:middle line:84%
be, again, exploring
it a little bit more

00:00:45.450 --> 00:00:48.630 align:middle line:84%
and actually taking a look
at how we can utilize it

00:00:48.630 --> 00:00:51.960 align:middle line:84%
as a legitimate authentication
protocol or a protocol that

00:00:51.960 --> 00:00:56.400 align:middle line:84%
can give us access
to the target system

00:00:56.400 --> 00:00:59.130 align:middle line:84%
once we have credentials
that we can utilize, right?

00:00:59.130 --> 00:01:03.640 align:middle line:84%
So RDP stands for the
remote desktop protocol.

00:01:03.640 --> 00:01:06.630 align:middle line:84%
So it's a proprietary
graphical user interface

00:01:06.630 --> 00:01:09.420 align:middle line:84%
remote access protocol
developed by Microsoft

00:01:09.420 --> 00:01:12.240 align:middle line:84%
and is used to remotely connect
and interact with a Windows

00:01:12.240 --> 00:01:12.760 align:middle line:90%
system.

00:01:12.760 --> 00:01:15.870 align:middle line:84%
So the key things that you
need to take into consideration

00:01:15.870 --> 00:01:18.180 align:middle line:84%
there is that it's
a graphical user

00:01:18.180 --> 00:01:19.860 align:middle line:84%
interface remote
access protocol,

00:01:19.860 --> 00:01:24.060 align:middle line:84%
which means RDP provides
you with a GUI in terms

00:01:24.060 --> 00:01:25.390 align:middle line:90%
of controlling your target.

00:01:25.390 --> 00:01:28.650 align:middle line:84%
So it's not like a terminal
remote access tool or protocol

00:01:28.650 --> 00:01:30.240 align:middle line:84%
like switch where
you need to log in

00:01:30.240 --> 00:01:32.870 align:middle line:84%
and then you have access
with a command prompt.

00:01:32.870 --> 00:01:34.830 align:middle line:84%
In this case, you
actually get access

00:01:34.830 --> 00:01:36.960 align:middle line:90%
to the full Windows experience.

00:01:36.960 --> 00:01:40.170 align:middle line:84%
So you'll get access to the
desktop, et cetera, right?

00:01:40.170 --> 00:01:45.666 align:middle line:84%
And RDP by default will
utilize TCP Port 3389.

00:01:45.666 --> 00:01:48.120 align:middle line:84%
And again, that's something
that you need to be aware of.

00:01:48.120 --> 00:01:51.300 align:middle line:84%
Whenever you see 3389
running on a Windows target,

00:01:51.300 --> 00:01:53.010 align:middle line:84%
just know that
that's RDP, and that

00:01:53.010 --> 00:01:56.100 align:middle line:84%
is a very important protocol
that you can actually test,

00:01:56.100 --> 00:01:56.700 align:middle line:90%
right?

00:01:56.700 --> 00:02:01.020 align:middle line:84%
Now, RDP on Windows is
disabled by default. However,

00:02:01.020 --> 00:02:03.060 align:middle line:84%
we can utilize a
Metasploit framework

00:02:03.060 --> 00:02:05.460 align:middle line:84%
exploit module to enable
RDP on the Windows

00:02:05.460 --> 00:02:09.780 align:middle line:84%
system or the Windows target
and consequently utilize RDP

00:02:09.780 --> 00:02:11.490 align:middle line:90%
to remotely access the system.

00:02:11.490 --> 00:02:14.580 align:middle line:84%
Now, RDP requires
authentication,

00:02:14.580 --> 00:02:16.950 align:middle line:84%
and the authentication
it requires

00:02:16.950 --> 00:02:20.730 align:middle line:84%
is obviously going to be the
user account or the user name

00:02:20.730 --> 00:02:22.740 align:middle line:84%
and the password for
that user account, right?

00:02:22.740 --> 00:02:27.060 align:middle line:84%
So we'll actually need to
get or set those details.

00:02:27.060 --> 00:02:30.720 align:middle line:84%
And in our case, because we've
only been able to get hashes,

00:02:30.720 --> 00:02:33.660 align:middle line:84%
we'll actually be changing
the administrator's password

00:02:33.660 --> 00:02:37.440 align:middle line:84%
so that we can gain access
to or we can gain access

00:02:37.440 --> 00:02:41.670 align:middle line:84%
to the system via RDP, as
RDP will require clear text

00:02:41.670 --> 00:02:43.690 align:middle line:90%
credentials.

00:02:43.690 --> 00:02:46.250 align:middle line:84%
All right, so
let's actually take

00:02:46.250 --> 00:02:47.542 align:middle line:90%
a look at how this can be done.

00:02:47.542 --> 00:02:49.625 align:middle line:84%
So I'm just going to start
up the lab environment.

00:02:49.625 --> 00:02:50.840 align:middle line:90%
And of course, you can, too.

00:02:50.840 --> 00:02:54.380 align:middle line:84%
And let's take a look
at how we can enable RDP

00:02:54.380 --> 00:02:58.190 align:middle line:84%
and also utilize our RDP to
authenticate and gain access

00:02:58.190 --> 00:02:59.600 align:middle line:90%
to the target system.

00:02:59.600 --> 00:03:01.850 align:middle line:84%
All right, so I'll see you
within the lab environment.

00:03:01.850 --> 00:03:04.530 align:middle line:90%


00:03:04.530 --> 00:03:06.880 align:middle line:84%
All right, so I'm back
within the lab environment.

00:03:06.880 --> 00:03:09.360 align:middle line:84%
And in this case, we have
the target IP specified

00:03:09.360 --> 00:03:10.738 align:middle line:90%
for us, which is great.

00:03:10.738 --> 00:03:12.030 align:middle line:90%
So I'm just going to copy that.

00:03:12.030 --> 00:03:14.440 align:middle line:84%
And of course, we'll need
to start up the PostgreSQL

00:03:14.440 --> 00:03:16.270 align:middle line:90%
Database Service.

00:03:16.270 --> 00:03:17.940 align:middle line:84%
So I'm just going to
open up a terminal,

00:03:17.940 --> 00:03:20.290 align:middle line:84%
maximize that so you
can see what's going on.

00:03:20.290 --> 00:03:24.060 align:middle line:84%
So we're going to say
service PostgreSQL start,

00:03:24.060 --> 00:03:26.250 align:middle line:84%
and then we're also going
to start up MSF console

00:03:26.250 --> 00:03:28.590 align:middle line:84%
so we can save a little
bit of time, all right?

00:03:28.590 --> 00:03:31.800 align:middle line:84%
So that will ensure that we can
interact with the Metasploit

00:03:31.800 --> 00:03:34.382 align:middle line:90%
framework database.

00:03:34.382 --> 00:03:36.590 align:middle line:84%
And that's going to start
up the Metasploit framework

00:03:36.590 --> 00:03:40.430 align:middle line:84%
console for us, so we are then
going to create a workspace

00:03:40.430 --> 00:03:42.830 align:middle line:84%
and in this case, we're just
going to call it RDP, right?

00:03:42.830 --> 00:03:44.730 align:middle line:84%
Because that's what
we're dealing with.

00:03:44.730 --> 00:03:47.480 align:middle line:84%
We're then going to set up
the global variable value

00:03:47.480 --> 00:03:49.610 align:middle line:84%
for the ROS option
to the target IP

00:03:49.610 --> 00:03:51.380 align:middle line:84%
so that we don't
need to, again, keep

00:03:51.380 --> 00:03:55.800 align:middle line:84%
on typing the target IP address
for every module that we load.

00:03:55.800 --> 00:03:57.410 align:middle line:90%
So I'm going to hit Enter.

00:03:57.410 --> 00:04:00.560 align:middle line:84%
And then we need to perform an
Nmap scan on the target system,

00:04:00.560 --> 00:04:02.360 align:middle line:84%
because first and
foremost, we actually

00:04:02.360 --> 00:04:04.470 align:middle line:84%
need to gain access
to the target system.

00:04:04.470 --> 00:04:06.890 align:middle line:84%
So let's get an idea of what
services we can actually

00:04:06.890 --> 00:04:08.370 align:middle line:90%
exploit on the target system.

00:04:08.370 --> 00:04:11.270 align:middle line:84%
So I'm going to just perform
a simple service version

00:04:11.270 --> 00:04:13.760 align:middle line:84%
detection scan, and
I'll paste in the IP.

00:04:13.760 --> 00:04:16.610 align:middle line:84%
And of course, we're utilizing
the db_nmap command, which

00:04:16.610 --> 00:04:20.089 align:middle line:84%
allows us to perform an Nmap
scan from within MSF console,

00:04:20.089 --> 00:04:23.000 align:middle line:84%
and the Nmap scan
results will consequently

00:04:23.000 --> 00:04:25.280 align:middle line:84%
be saved within the
Metasploit framework database

00:04:25.280 --> 00:04:26.780 align:middle line:90%
within our current workspace.

00:04:26.780 --> 00:04:29.555 align:middle line:84%
So I'll hit Enter, and I'll
give that a few seconds.

00:04:29.555 --> 00:04:32.090 align:middle line:90%


00:04:32.090 --> 00:04:35.950 align:middle line:84%
All right, so as you can
see, the Nmap scan results,

00:04:35.950 --> 00:04:37.900 align:middle line:84%
or the actual results
from the Nmap scan

00:04:37.900 --> 00:04:41.380 align:middle line:84%
reveal that we have BadBlue
running on port 80, which we've

00:04:41.380 --> 00:04:42.852 align:middle line:84%
exploited before,
and that's what

00:04:42.852 --> 00:04:44.560 align:middle line:84%
we're going to be
exploiting in this case

00:04:44.560 --> 00:04:46.670 align:middle line:84%
to gain access to
the target system.

00:04:46.670 --> 00:04:48.550 align:middle line:84%
We can also see that
because we performed

00:04:48.550 --> 00:04:51.730 align:middle line:84%
a default scan or
a default port scan

00:04:51.730 --> 00:04:54.080 align:middle line:84%
that scanned 1,000 of
the most common ports,

00:04:54.080 --> 00:04:57.190 align:middle line:84%
so we weren't able to
identify 3389 as open,

00:04:57.190 --> 00:05:00.560 align:middle line:84%
so RDP by default on
this system is disabled.

00:05:00.560 --> 00:05:03.230 align:middle line:84%
So I just want you
to keep that in mind.

00:05:03.230 --> 00:05:05.800 align:middle line:84%
All right, so what we'll do is
we'll search for the BadBlue

00:05:05.800 --> 00:05:08.650 align:middle line:84%
exploit, so I'm just going
to say search BadBlue,

00:05:08.650 --> 00:05:11.290 align:middle line:84%
and we're going to utilize the
pass through buffer overflow

00:05:11.290 --> 00:05:13.450 align:middle line:90%
module.

00:05:13.450 --> 00:05:16.090 align:middle line:84%
All right, and I'll just say
use and paste that in there.

00:05:16.090 --> 00:05:17.680 align:middle line:84%
And of course, we
can actually confirm

00:05:17.680 --> 00:05:21.250 align:middle line:84%
that it's running on the target
by opening up our browser

00:05:21.250 --> 00:05:23.330 align:middle line:90%
and navigating to port 80.

00:05:23.330 --> 00:05:25.542 align:middle line:84%
So I'll paste in
the target IP there.

00:05:25.542 --> 00:05:27.250 align:middle line:84%
There we go, BadBlue
is running, and this

00:05:27.250 --> 00:05:30.170 align:middle line:84%
is the Enterprise Edition,
which is important in this case.

00:05:30.170 --> 00:05:33.130 align:middle line:84%
So I'm going to
say, show options.

00:05:33.130 --> 00:05:35.290 align:middle line:84%
And we have the
target IP specified,

00:05:35.290 --> 00:05:37.840 align:middle line:84%
because we set up the
global variable value

00:05:37.840 --> 00:05:39.460 align:middle line:90%
for the RHOST option.

00:05:39.460 --> 00:05:41.830 align:middle line:84%
And then we don't have
an SSL certificate

00:05:41.830 --> 00:05:43.510 align:middle line:84%
and the port is
configured correctly.

00:05:43.510 --> 00:05:45.260 align:middle line:84%
All we need to do is
set up the target.

00:05:45.260 --> 00:05:48.310 align:middle line:84%
So I'm going to say
set target, and we're

00:05:48.310 --> 00:05:52.270 align:middle line:84%
going to say BadBlue Enterprise
Edition 2.7 Universal,

00:05:52.270 --> 00:05:55.370 align:middle line:90%
and I'll just hit exploit.

00:05:55.370 --> 00:05:56.370 align:middle line:90%
All right, there we are.

00:05:56.370 --> 00:05:57.400 align:middle line:90%
Fantastic.

00:05:57.400 --> 00:05:59.580 align:middle line:90%
We get a Meterpreter session.

00:05:59.580 --> 00:06:01.230 align:middle line:84%
Just going to wait
for it to pop up.

00:06:01.230 --> 00:06:01.990 align:middle line:90%
There we are.

00:06:01.990 --> 00:06:04.380 align:middle line:90%
And we can then say get user ID.

00:06:04.380 --> 00:06:07.110 align:middle line:84%
And we currently have NT
authority system privileges,

00:06:07.110 --> 00:06:10.470 align:middle line:84%
which are the highest privileges
available on a Windows system.

00:06:10.470 --> 00:06:14.610 align:middle line:84%
If we perform some local
system enumeration,

00:06:14.610 --> 00:06:18.600 align:middle line:84%
we can see that it's a
Windows Server 2012 R2

00:06:18.600 --> 00:06:21.540 align:middle line:84%
version of Windows running,
and then the target operating

00:06:21.540 --> 00:06:23.820 align:middle line:90%
system architecture is 64-bit.

00:06:23.820 --> 00:06:27.360 align:middle line:84%
In this case, we don't need to
upgrade our Meterpreter session

00:06:27.360 --> 00:06:29.590 align:middle line:90%
to a 64-bit Meterpreter session.

00:06:29.590 --> 00:06:32.680 align:middle line:84%
So again, that's perfectly
fine in this case.

00:06:32.680 --> 00:06:36.420 align:middle line:84%
What we need to do now is, of
course enable RDP on the target

00:06:36.420 --> 00:06:39.540 align:middle line:84%
system, so I'm just going to
put this in the background using

00:06:39.540 --> 00:06:42.450 align:middle line:84%
the Control+Z
keyboard combination.

00:06:42.450 --> 00:06:43.110 align:middle line:90%
There we are.

00:06:43.110 --> 00:06:46.230 align:middle line:84%
And I'm going to search
for the Enable RDP module,

00:06:46.230 --> 00:06:49.590 align:middle line:84%
so I'm going to say search
enable_rdp, and that's

00:06:49.590 --> 00:06:52.290 align:middle line:90%
the model here, or the module.

00:06:52.290 --> 00:06:54.448 align:middle line:90%
And we can then say use.

00:06:54.448 --> 00:06:54.990 align:middle line:90%
There we are.

00:06:54.990 --> 00:06:57.570 align:middle line:84%
And if we show the
options, you can

00:06:57.570 --> 00:07:00.220 align:middle line:84%
see that we have the
enable options set to true,

00:07:00.220 --> 00:07:03.480 align:middle line:84%
so that will enable RDP and
add the firewall exception,

00:07:03.480 --> 00:07:06.870 align:middle line:84%
so it'll actually allow us to
communicate with port 3389.

00:07:06.870 --> 00:07:09.480 align:middle line:84%
And then we can perform
some port forwarding.

00:07:09.480 --> 00:07:12.010 align:middle line:84%
We'll be exploring this
during the pivoting video.

00:07:12.010 --> 00:07:14.070 align:middle line:84%
For now, we're just
going to be taking

00:07:14.070 --> 00:07:15.400 align:middle line:90%
a look at the LPORT option.

00:07:15.400 --> 00:07:17.250 align:middle line:84%
So this is if you
enable port forwarding,

00:07:17.250 --> 00:07:20.230 align:middle line:84%
you can set up the local
port to 3389, as well,

00:07:20.230 --> 00:07:24.060 align:middle line:84%
and connect to your
local host on port 3389,

00:07:24.060 --> 00:07:26.100 align:middle line:84%
as port forwarding
will essentially

00:07:26.100 --> 00:07:27.720 align:middle line:90%
handle the connection.

00:07:27.720 --> 00:07:29.730 align:middle line:84%
We also have the
password option.

00:07:29.730 --> 00:07:32.460 align:middle line:84%
So that will allow
you to create a user

00:07:32.460 --> 00:07:35.873 align:middle line:84%
and specify the password,
which you can do if you want.

00:07:35.873 --> 00:07:37.290 align:middle line:84%
However, in this
case, we're going

00:07:37.290 --> 00:07:39.700 align:middle line:84%
to be changing the
administrator password.

00:07:39.700 --> 00:07:42.480 align:middle line:84%
So I'm going to say
set the session to 1,

00:07:42.480 --> 00:07:43.965 align:middle line:84%
and then we can
just hit exploit.

00:07:43.965 --> 00:07:46.960 align:middle line:90%


00:07:46.960 --> 00:07:49.938 align:middle line:84%
And in this case, it looks
like RDP was already enabled.

00:07:49.938 --> 00:07:51.730 align:middle line:84%
However, we'll need to
confirm that, right?

00:07:51.730 --> 00:07:55.570 align:middle line:84%
So it's going to say opening
the RDP service is started,

00:07:55.570 --> 00:07:58.000 align:middle line:84%
and it's going to open the
port in the local firewall,

00:07:58.000 --> 00:07:59.330 align:middle line:90%
if necessary.

00:07:59.330 --> 00:08:02.120 align:middle line:84%
So we can perform a quick
Nmap scan to verify that.

00:08:02.120 --> 00:08:04.390 align:middle line:84%
So we're going to
say db_nmap -sV,

00:08:04.390 --> 00:08:07.825 align:middle line:84%
and we can then
specify the port 3389,

00:08:07.825 --> 00:08:10.990 align:middle line:84%
to be specific, and paste
in the target IP, which

00:08:10.990 --> 00:08:13.480 align:middle line:84%
I do not have
within my clipboard,

00:08:13.480 --> 00:08:15.590 align:middle line:90%
so let me just copy it there.

00:08:15.590 --> 00:08:17.230 align:middle line:90%
There we go.

00:08:17.230 --> 00:08:19.420 align:middle line:90%
So I'll paste it in there.

00:08:19.420 --> 00:08:22.580 align:middle line:84%
And let's see whether port
3389 is currently open,

00:08:22.580 --> 00:08:25.570 align:middle line:84%
so that we can confirm
that RDP is indeed

00:08:25.570 --> 00:08:27.097 align:middle line:90%
enabled on the target.

00:08:27.097 --> 00:08:28.930 align:middle line:84%
So I'll give that a few
seconds to complete.

00:08:28.930 --> 00:08:32.780 align:middle line:90%


00:08:32.780 --> 00:08:35.169 align:middle line:84%
All right, so I just
modified the Nmap scan

00:08:35.169 --> 00:08:39.280 align:middle line:84%
to only scan the actual port
or the status of the port

00:08:39.280 --> 00:08:41.470 align:middle line:84%
and ignored the service
version detection, because

00:08:41.470 --> 00:08:43.179 align:middle line:84%
for some reason,
it looked like that

00:08:43.179 --> 00:08:44.960 align:middle line:90%
was taking quite a bit of time.

00:08:44.960 --> 00:08:48.710 align:middle line:84%
And in this case, we can see
that port 3389 is now open,

00:08:48.710 --> 00:08:51.560 align:middle line:84%
which means we now have
RDP running on the target.

00:08:51.560 --> 00:08:53.620 align:middle line:90%
So how do we gain access to RDP?

00:08:53.620 --> 00:08:56.590 align:middle line:84%
Well, as I said, we need
a legitimate user account

00:08:56.590 --> 00:08:57.440 align:middle line:90%
on the system.

00:08:57.440 --> 00:09:00.460 align:middle line:84%
Furthermore, we also need
a clear text password.

00:09:00.460 --> 00:09:02.830 align:middle line:84%
So given the fact that
we already have access

00:09:02.830 --> 00:09:05.440 align:middle line:84%
to the target via a
Meterpreter session,

00:09:05.440 --> 00:09:08.650 align:middle line:84%
we can pop up a
shell or the command

00:09:08.650 --> 00:09:10.840 align:middle line:84%
prompt by typing in
shell, and list out

00:09:10.840 --> 00:09:14.400 align:middle line:84%
the actual users on the
system by saying net users.

00:09:14.400 --> 00:09:16.900 align:middle line:84%
And as you can see, we only
have the administrator and guest

00:09:16.900 --> 00:09:17.400 align:middle line:90%
user.

00:09:17.400 --> 00:09:20.060 align:middle line:84%
Now, you can create another
user account on the system,

00:09:20.060 --> 00:09:22.750 align:middle line:84%
and you can do that through
the Enable RDP module,

00:09:22.750 --> 00:09:24.503 align:middle line:84%
as we explored,
but in this case,

00:09:24.503 --> 00:09:25.670 align:middle line:90%
we are not going to do that.

00:09:25.670 --> 00:09:28.650 align:middle line:84%
So we are going to change the
password for the administrator

00:09:28.650 --> 00:09:29.150 align:middle line:90%
user.

00:09:29.150 --> 00:09:31.390 align:middle line:84%
Now, this is not recommended,
because of course, this

00:09:31.390 --> 00:09:34.480 align:middle line:84%
is an obvious indicator of
compromise on the target

00:09:34.480 --> 00:09:38.543 align:middle line:84%
system, because once the
administrator tries to log on,

00:09:38.543 --> 00:09:40.210 align:middle line:84%
then of course they're
going to find out

00:09:40.210 --> 00:09:41.710 align:middle line:84%
that their password
has been changed

00:09:41.710 --> 00:09:44.140 align:middle line:84%
and consequently
determine or find out

00:09:44.140 --> 00:09:46.510 align:middle line:84%
that the system has been
hacked, so this is not

00:09:46.510 --> 00:09:47.750 align:middle line:90%
really recommended.

00:09:47.750 --> 00:09:50.920 align:middle line:84%
However, if you wanted to do
that, we could say net user,

00:09:50.920 --> 00:09:53.470 align:middle line:84%
or just specify the
actual user that we want

00:09:53.470 --> 00:09:55.130 align:middle line:90%
to modify the password for.

00:09:55.130 --> 00:09:57.970 align:middle line:84%
So we're going to say
net user administrator,

00:09:57.970 --> 00:09:59.680 align:middle line:84%
and then specify
the new password.

00:09:59.680 --> 00:10:04.030 align:middle line:84%
In this case, we'll just
call it hacker_123321.

00:10:04.030 --> 00:10:07.060 align:middle line:84%
We hit Enter, and it's going to
tell you the command completed

00:10:07.060 --> 00:10:07.820 align:middle line:90%
successfully.

00:10:07.820 --> 00:10:09.790 align:middle line:84%
Now, in order to change
user account passwords,

00:10:09.790 --> 00:10:12.850 align:middle line:84%
you of course need to have
administrative privileges,

00:10:12.850 --> 00:10:13.510 align:middle line:90%
which we have.

00:10:13.510 --> 00:10:15.265 align:middle line:84%
So that's the only
way we can do that.

00:10:15.265 --> 00:10:17.890 align:middle line:84%
Otherwise, you would have to go
through the process of cracking

00:10:17.890 --> 00:10:20.830 align:middle line:84%
hashes or utilize Mimikatz
to dump clear text

00:10:20.830 --> 00:10:22.840 align:middle line:84%
passwords from memory,
which again is a hit

00:10:22.840 --> 00:10:25.355 align:middle line:90%
and miss type of process.

00:10:25.355 --> 00:10:27.230 align:middle line:84%
But in this case, we
have been able to do it.

00:10:27.230 --> 00:10:29.260 align:middle line:84%
So I'm just going to
terminate the channel here,

00:10:29.260 --> 00:10:32.150 align:middle line:84%
and we'll go back to
our Meterpreter session.

00:10:32.150 --> 00:10:35.330 align:middle line:84%
So now that we have obtained
legitimate credentials here,

00:10:35.330 --> 00:10:37.570 align:middle line:84%
which I'll just copy the
password that we specified,

00:10:37.570 --> 00:10:40.240 align:middle line:84%
how do we gain access, or
how do we interact with RDP

00:10:40.240 --> 00:10:41.720 align:middle line:90%
from a Linux system?

00:10:41.720 --> 00:10:44.440 align:middle line:84%
Well, we can create a new
tab and we can utilize

00:10:44.440 --> 00:10:47.140 align:middle line:90%
a utility called X Free RDP.

00:10:47.140 --> 00:10:50.080 align:middle line:84%
So we can just type
it in, xfreerdp,

00:10:50.080 --> 00:10:53.470 align:middle line:84%
and then we need to specify
the actual username that we

00:10:53.470 --> 00:10:54.730 align:middle line:90%
want to authenticate as.

00:10:54.730 --> 00:10:58.060 align:middle line:84%
So that can be done by using
the forward slash, u, colon,

00:10:58.060 --> 00:11:00.550 align:middle line:84%
and then the username,
administrator,

00:11:00.550 --> 00:11:04.540 align:middle line:84%
and then we use a forward
slash, p, colon, password.

00:11:04.540 --> 00:11:07.180 align:middle line:84%
We specify the password here,
which I'll just paste in.

00:11:07.180 --> 00:11:10.570 align:middle line:84%
And then we need to specify the
actual target host or the IP

00:11:10.570 --> 00:11:14.281 align:middle line:84%
address, which is done by
specifying the forward slash v

00:11:14.281 --> 00:11:16.360 align:middle line:84%
hyphen option, and then
we paste in the target

00:11:16.360 --> 00:11:19.260 align:middle line:90%
IP, which I'll do right now.

00:11:19.260 --> 00:11:21.270 align:middle line:90%
There we are, and we hit Enter.

00:11:21.270 --> 00:11:23.820 align:middle line:84%
And it's going to ask you
whether we want to essentially

00:11:23.820 --> 00:11:25.260 align:middle line:90%
accept the certificate.

00:11:25.260 --> 00:11:26.820 align:middle line:90%
And I'm going to hit yes.

00:11:26.820 --> 00:11:31.410 align:middle line:84%
And it will open up a remote
desktop session on the target

00:11:31.410 --> 00:11:32.880 align:middle line:90%
system, as you can see here.

00:11:32.880 --> 00:11:34.590 align:middle line:84%
And it authenticates
successfully,

00:11:34.590 --> 00:11:37.450 align:middle line:84%
and we now have access to
the Windows target system.

00:11:37.450 --> 00:11:40.230 align:middle line:84%
And as you can see, this is
the advantage of having RDP.

00:11:40.230 --> 00:11:42.330 align:middle line:84%
You can essentially
interact with the target

00:11:42.330 --> 00:11:44.850 align:middle line:84%
through the actual
Windows desktop,

00:11:44.850 --> 00:11:47.220 align:middle line:84%
and it provides you with
a graphical user interface

00:11:47.220 --> 00:11:49.560 align:middle line:84%
and we can essentially
navigate around the system.

00:11:49.560 --> 00:11:52.920 align:middle line:84%
And of course, in this case,
or with this particular lab

00:11:52.920 --> 00:11:55.350 align:middle line:84%
environment, we're supposed
to get the flag, and we do,

00:11:55.350 --> 00:11:58.355 align:middle line:84%
so we have actually gone
through all the steps necessary.

00:11:58.355 --> 00:11:59.730 align:middle line:84%
All right, so you
can pretty much

00:11:59.730 --> 00:12:01.440 align:middle line:84%
do whatever you want
on the system now.

00:12:01.440 --> 00:12:04.830 align:middle line:84%
However, again, if
another user is logged on

00:12:04.830 --> 00:12:07.350 align:middle line:84%
or the administrator user
is currently logged on,

00:12:07.350 --> 00:12:10.390 align:middle line:84%
then they will see some
activity that looks strange.

00:12:10.390 --> 00:12:12.540 align:middle line:84%
So this is something that
you would do typically

00:12:12.540 --> 00:12:14.410 align:middle line:90%
through another user account.

00:12:14.410 --> 00:12:16.620 align:middle line:84%
So during a standard
penetration test,

00:12:16.620 --> 00:12:19.030 align:middle line:84%
I would recommend creating
another user account.

00:12:19.030 --> 00:12:20.410 align:middle line:90%
And then utilizing that.

00:12:20.410 --> 00:12:23.320 align:middle line:84%
However, in that
particular case,

00:12:23.320 --> 00:12:25.170 align:middle line:84%
you will also need to
add that other user

00:12:25.170 --> 00:12:26.850 align:middle line:84%
account to the
Administrators group

00:12:26.850 --> 00:12:29.010 align:middle line:84%
so that you have
administrative privileges.

00:12:29.010 --> 00:12:31.500 align:middle line:84%
Otherwise, you'll have
standard user privileges.

00:12:31.500 --> 00:12:34.890 align:middle line:84%
All right, so that is how to
enable RDP on a Windows target

00:12:34.890 --> 00:12:39.180 align:middle line:84%
and consequently gain access
to the target system via RDP.

00:12:39.180 --> 00:12:43.770 align:middle line:84%
So that is going to conclude the
practical demonstration aspect

00:12:43.770 --> 00:12:46.350 align:middle line:90%
or side of this video.

00:12:46.350 --> 00:12:48.230 align:middle line:84%
In the next video,
we will be exploring

00:12:48.230 --> 00:12:51.240 align:middle line:84%
the process of performing key
logging on a Windows target.

00:12:51.240 --> 00:12:53.360 align:middle line:84%
So we'll take a look
at how to capture

00:12:53.360 --> 00:12:57.050 align:middle line:84%
the keys or the keyboard
input on the target system

00:12:57.050 --> 00:13:00.315 align:middle line:84%
and consequently get
back that keyboard input.

00:13:00.315 --> 00:13:01.940 align:middle line:84%
And the reason why
this is so important

00:13:01.940 --> 00:13:05.750 align:middle line:84%
is because if you capture
all the keyboard input that's

00:13:05.750 --> 00:13:08.060 align:middle line:84%
being input on
the target system,

00:13:08.060 --> 00:13:10.880 align:middle line:84%
you have a good chance of
capturing maybe a few usernames

00:13:10.880 --> 00:13:13.770 align:middle line:84%
and passwords that can allow
you to compromise other systems.

00:13:13.770 --> 00:13:16.440 align:middle line:84%
So that's what we'll be
exploring in the next video,

00:13:16.440 --> 00:13:18.708 align:middle line:90%
and I'll see you there.

00:13:18.708 --> 00:13:19.208 align:middle line:90%