WEBVTT

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


00:00:03.430 --> 00:00:06.860 align:middle line:90%
[OPENING MUSIC]

00:00:06.860 --> 00:00:10.290 align:middle line:90%


00:00:10.290 --> 00:00:11.910 align:middle line:90%
FTP enumeration.

00:00:11.910 --> 00:00:14.580 align:middle line:84%
In this video, we are going
to be taking a look at how

00:00:14.580 --> 00:00:16.560 align:middle line:84%
to utilize the
various Metasploit

00:00:16.560 --> 00:00:19.110 align:middle line:84%
framework auxiliary
modules to enumerate

00:00:19.110 --> 00:00:22.470 align:middle line:84%
as much information
as possible from FTP.

00:00:22.470 --> 00:00:25.980 align:middle line:84%
So first and
foremost, what is FTP?

00:00:25.980 --> 00:00:29.190 align:middle line:84%
FTP stands for the
File Transfer Protocol.

00:00:29.190 --> 00:00:31.890 align:middle line:84%
This is a file transfer
protocol that is typically

00:00:31.890 --> 00:00:34.050 align:middle line:84%
hosted on port 21,
and that, of course,

00:00:34.050 --> 00:00:36.450 align:middle line:84%
is TCP, and is
used to facilitate

00:00:36.450 --> 00:00:40.440 align:middle line:84%
file sharing between a server
and client or multiple clients.

00:00:40.440 --> 00:00:42.630 align:middle line:84%
It is also frequently
deployed or used

00:00:42.630 --> 00:00:45.930 align:middle line:84%
as a means of transferring
files to and from the directory

00:00:45.930 --> 00:00:47.020 align:middle line:90%
of a web server.

00:00:47.020 --> 00:00:49.140 align:middle line:84%
So if you have ever
bought a domain name

00:00:49.140 --> 00:00:51.240 align:middle line:84%
and set up a website,
you know that you

00:00:51.240 --> 00:00:54.750 align:middle line:84%
can utilize FTP to essentially
transfer your website

00:00:54.750 --> 00:00:58.320 align:middle line:84%
files to the server and you
can also do that vice versa,

00:00:58.320 --> 00:01:01.020 align:middle line:84%
in that you can download
files from the web server

00:01:01.020 --> 00:01:03.360 align:middle line:84%
to your system, to
your local system.

00:01:03.360 --> 00:01:05.830 align:middle line:84%
And of course, in order
for you to do this,

00:01:05.830 --> 00:01:08.010 align:middle line:84%
you will need to authenticate
to the FTP server.

00:01:08.010 --> 00:01:11.010 align:middle line:84%
So FTP, essentially,
handles authentication

00:01:11.010 --> 00:01:13.410 align:middle line:84%
in the form of a username
and password combination.

00:01:13.410 --> 00:01:15.780 align:middle line:84%
So you log in to the
FTP server, you then

00:01:15.780 --> 00:01:18.810 align:middle line:84%
provide a username and a
password and if successful,

00:01:18.810 --> 00:01:22.200 align:middle line:84%
you'll get access to the FTP
server and the directory that

00:01:22.200 --> 00:01:23.340 align:middle line:90%
has been configured.

00:01:23.340 --> 00:01:26.910 align:middle line:84%
And you can then download files
from that particular directory,

00:01:26.910 --> 00:01:29.340 align:middle line:90%
or you can upload files to it.

00:01:29.340 --> 00:01:31.650 align:middle line:84%
You can again work, and
essentially, transfer

00:01:31.650 --> 00:01:35.610 align:middle line:84%
files between the FTP server
and your local system.

00:01:35.610 --> 00:01:38.160 align:middle line:84%
Now, we can use multiple
auxiliary modules

00:01:38.160 --> 00:01:43.080 align:middle line:84%
to enumerate as much
information as possible

00:01:43.080 --> 00:01:44.310 align:middle line:90%
from the FTP service.

00:01:44.310 --> 00:01:46.770 align:middle line:84%
And the type of information
that we're after

00:01:46.770 --> 00:01:50.370 align:middle line:84%
is typically the version
of FTP that's running.

00:01:50.370 --> 00:01:55.080 align:middle line:84%
Secondly, we can also perform
a brute force attack on it

00:01:55.080 --> 00:01:58.890 align:middle line:84%
to try and identify any username
and password combinations

00:01:58.890 --> 00:02:03.270 align:middle line:84%
that we can use to log in or
authenticate to the FTP server.

00:02:03.270 --> 00:02:06.330 align:middle line:84%
So we are going to be taking
a look at various techniques

00:02:06.330 --> 00:02:09.660 align:middle line:84%
and various modules that we can
use to essentially enumerate

00:02:09.660 --> 00:02:12.790 align:middle line:84%
as much information as
possible from an FTP server.

00:02:12.790 --> 00:02:17.140 align:middle line:84%
So let's get started
with the lab.

00:02:17.140 --> 00:02:19.810 align:middle line:84%
All right, so I'm back
on the lab environment,

00:02:19.810 --> 00:02:23.350 align:middle line:84%
and we can get started
now, firstly, by--

00:02:23.350 --> 00:02:26.780 align:middle line:84%
first and foremost by starting
the PostgreSQL service.

00:02:26.780 --> 00:02:29.980 align:middle line:84%
So we can actually do
that by typing in service

00:02:29.980 --> 00:02:35.050 align:middle line:84%
postgresql start, just to
ensure that we can actually

00:02:35.050 --> 00:02:38.620 align:middle line:84%
interact with the Metasploit
framework database.

00:02:38.620 --> 00:02:40.240 align:middle line:84%
Once that is done,
as you can see

00:02:40.240 --> 00:02:44.320 align:middle line:84%
everything's good on that front,
we can now get the target IP.

00:02:44.320 --> 00:02:46.540 align:middle line:84%
That can be done by
typing in ifconfig.

00:02:46.540 --> 00:02:49.600 align:middle line:84%
And of course, we're looking
for the ethernet one interface.

00:02:49.600 --> 00:02:51.700 align:middle line:84%
And we know that the
target IP is always

00:02:51.700 --> 00:02:55.270 align:middle line:84%
going to be the following
IP address with a three

00:02:55.270 --> 00:02:56.050 align:middle line:90%
instead of a two.

00:02:56.050 --> 00:02:58.790 align:middle line:90%
So again, we have copied that.

00:02:58.790 --> 00:03:01.790 align:middle line:84%
And we can now start up the
Metasploit framework console,

00:03:01.790 --> 00:03:02.770 align:middle line:90%
which I will do.

00:03:02.770 --> 00:03:05.800 align:middle line:84%
And that should just take
a few seconds to start up,

00:03:05.800 --> 00:03:08.530 align:middle line:84%
after which we can begin
creating our workspace

00:03:08.530 --> 00:03:11.260 align:middle line:84%
and then begin taking a
look at the various modules

00:03:11.260 --> 00:03:12.380 align:middle line:90%
that we can use.

00:03:12.380 --> 00:03:15.730 align:middle line:84%
So first and foremost,
we'll say workspace, add,

00:03:15.730 --> 00:03:17.770 align:middle line:84%
and then we'll just
call this FTP_enum.

00:03:17.770 --> 00:03:21.560 align:middle line:90%


00:03:21.560 --> 00:03:24.020 align:middle line:84%
And we are currently
within that workspace.

00:03:24.020 --> 00:03:26.690 align:middle line:84%
And again, we can confirm
that by saying workspace.

00:03:26.690 --> 00:03:27.510 align:middle line:90%
There we are.

00:03:27.510 --> 00:03:28.590 align:middle line:90%
And let's get started.

00:03:28.590 --> 00:03:31.160 align:middle line:84%
So the first module that
we want to take a look at

00:03:31.160 --> 00:03:35.390 align:middle line:84%
is the auxiliary module
FTP version check, right?

00:03:35.390 --> 00:03:37.280 align:middle line:84%
And which is,
essentially, used to check

00:03:37.280 --> 00:03:38.960 align:middle line:90%
for the version of FTP.

00:03:38.960 --> 00:03:41.630 align:middle line:84%
However, let us
perform a port scan

00:03:41.630 --> 00:03:44.990 align:middle line:84%
to ensure that the target
is, in fact, running FTP.

00:03:44.990 --> 00:03:48.062 align:middle line:84%
So again, I'll just
search for port scan.

00:03:48.062 --> 00:03:48.980 align:middle line:90%
There we are.

00:03:48.980 --> 00:03:52.040 align:middle line:84%
And we will be using
the following modules,

00:03:52.040 --> 00:03:54.890 align:middle line:84%
so we'll use
auxiliary/scanner/portscan/tcp,

00:03:54.890 --> 00:03:57.690 align:middle line:84%
which I'll just copy
right over there.

00:03:57.690 --> 00:03:58.707 align:middle line:90%
There we go.

00:03:58.707 --> 00:04:00.290 align:middle line:84%
And we're going to
say use, of course.

00:04:00.290 --> 00:04:03.060 align:middle line:84%
I'm going to say
use, paste that in.

00:04:03.060 --> 00:04:04.520 align:middle line:90%
So it's currently active.

00:04:04.520 --> 00:04:06.330 align:middle line:84%
I'll just get the
target IP again.

00:04:06.330 --> 00:04:09.350 align:middle line:84%
So I'll just copy that, make
sure that I have it on hand.

00:04:09.350 --> 00:04:10.730 align:middle line:90%
There we go, fantastic.

00:04:10.730 --> 00:04:13.908 align:middle line:90%
We can now say show options.

00:04:13.908 --> 00:04:16.200 align:middle line:84%
And then we're going to set
the our RHOST option, which

00:04:16.200 --> 00:04:18.240 align:middle line:90%
is the target IP.

00:04:18.240 --> 00:04:20.490 align:middle line:84%
And we're just going to
type in the IP there.

00:04:20.490 --> 00:04:23.220 align:middle line:84%
And of course, remember to
change the two to a three, that

00:04:23.220 --> 00:04:24.660 align:middle line:90%
is the target IP.

00:04:24.660 --> 00:04:26.520 align:middle line:84%
And all we need
to do is just hit

00:04:26.520 --> 00:04:30.215 align:middle line:84%
Run, because we know
that FTP is on port 21.

00:04:30.215 --> 00:04:31.590 align:middle line:84%
And that means
that we don't have

00:04:31.590 --> 00:04:34.020 align:middle line:84%
to increase the port range
that's being scanned.

00:04:34.020 --> 00:04:36.420 align:middle line:84%
And as you can see,
immediately, we're

00:04:36.420 --> 00:04:39.250 align:middle line:84%
able to identify that
FTP is actually open.

00:04:39.250 --> 00:04:40.590 align:middle line:90%
So port 21 open.

00:04:40.590 --> 00:04:43.560 align:middle line:84%
However, we don't know what
service version is running,

00:04:43.560 --> 00:04:47.010 align:middle line:84%
so we can't actually perform
any vulnerability identification

00:04:47.010 --> 00:04:47.980 align:middle line:90%
or anything like that.

00:04:47.980 --> 00:04:50.670 align:middle line:84%
So in order to do this,
what we're going to do

00:04:50.670 --> 00:04:53.430 align:middle line:84%
is let me just copy
the IP there just

00:04:53.430 --> 00:04:54.600 align:middle line:90%
so that we have it on hand.

00:04:54.600 --> 00:04:55.890 align:middle line:90%
We're just going to go back.

00:04:55.890 --> 00:04:59.730 align:middle line:84%
And now, we are going to search
for FTP auxiliary modules,

00:04:59.730 --> 00:05:03.030 align:middle line:84%
which again, can be done
by typing in search FTP.

00:05:03.030 --> 00:05:07.200 align:middle line:84%
And in this case, you can see
we have quite a few FTP modules

00:05:07.200 --> 00:05:09.960 align:middle line:84%
here, and most of them
look like their exploits

00:05:09.960 --> 00:05:12.390 align:middle line:84%
and of course, we then
have the auxiliary modules.

00:05:12.390 --> 00:05:15.660 align:middle line:84%
If we want to limit the
search results, what we can do

00:05:15.660 --> 00:05:20.730 align:middle line:84%
is we can say search and then
we can specify the type here.

00:05:20.730 --> 00:05:24.000 align:middle line:84%
And the type is going
to be auxiliary.

00:05:24.000 --> 00:05:27.540 align:middle line:84%
And then we can provide a
name, so we can say name FTP.

00:05:27.540 --> 00:05:29.970 align:middle line:84%
We hit Enter, and
that's going to reduce

00:05:29.970 --> 00:05:33.850 align:middle line:84%
the amount of results here
that are going to be displayed.

00:05:33.850 --> 00:05:37.440 align:middle line:84%
And we are primarily looking
for the scan auxiliary modules,

00:05:37.440 --> 00:05:39.120 align:middle line:84%
and the one that
we're interested in

00:05:39.120 --> 00:05:40.810 align:middle line:90%
is this one right over here.

00:05:40.810 --> 00:05:43.020 align:middle line:84%
So that is
auxiliary/scanner/ftp/ftp

00:05:43.020 --> 00:05:48.600 align:middle line:84%
version, and it essentially
performs a version scanning

00:05:48.600 --> 00:05:53.400 align:middle line:84%
which will allow us to detect
what version of FTP is running.

00:05:53.400 --> 00:05:56.430 align:middle line:84%
And we can then copy that
and we're going to say use.

00:05:56.430 --> 00:05:58.830 align:middle line:84%
Paste in the module
name right over there,

00:05:58.830 --> 00:06:00.850 align:middle line:90%
clear up the options.

00:06:00.850 --> 00:06:04.200 align:middle line:84%
Let me just get the target IP
because, again, I copied it

00:06:04.200 --> 00:06:07.170 align:middle line:90%
to my previous clipboard.

00:06:07.170 --> 00:06:10.950 align:middle line:84%
And we can now show the options
for this particular module.

00:06:10.950 --> 00:06:15.010 align:middle line:84%
Show Options, and what we need
to provide is the target IP.

00:06:15.010 --> 00:06:18.420 align:middle line:84%
The port has been configured
to 21, which is perfectly fine.

00:06:18.420 --> 00:06:20.460 align:middle line:84%
If you find a target
that is running

00:06:20.460 --> 00:06:24.220 align:middle line:84%
FTP on a different port, then
you also need to change that.

00:06:24.220 --> 00:06:26.670 align:middle line:84%
We don't need to provide
the FTP user and password

00:06:26.670 --> 00:06:27.940 align:middle line:90%
because we don't have them.

00:06:27.940 --> 00:06:29.648 align:middle line:84%
And as you can see,
they are not required

00:06:29.648 --> 00:06:31.050 align:middle line:90%
under the required column.

00:06:31.050 --> 00:06:35.220 align:middle line:84%
So we'll say set our
hosts based in the IP.

00:06:35.220 --> 00:06:37.410 align:middle line:84%
And of course, change
the two to a three.

00:06:37.410 --> 00:06:38.310 align:middle line:90%
Hit Enter.

00:06:38.310 --> 00:06:39.900 align:middle line:90%
And then hit Run.

00:06:39.900 --> 00:06:43.050 align:middle line:84%
And as you can see, it's able
to detect the version of FTP

00:06:43.050 --> 00:06:43.690 align:middle line:90%
that's running.

00:06:43.690 --> 00:06:46.920 align:middle line:84%
And you can see its
ProFTPD 1.3.5 A.

00:06:46.920 --> 00:06:49.900 align:middle line:84%
And of course, it gives you
the other host information.

00:06:49.900 --> 00:06:51.330 align:middle line:90%
So this is the FTP banner.

00:06:51.330 --> 00:06:53.190 align:middle line:84%
Now, this information
is very useful,

00:06:53.190 --> 00:06:55.830 align:middle line:84%
because we can use it to
identify vulnerabilities

00:06:55.830 --> 00:06:58.830 align:middle line:84%
for this specific
version of ProFTOP.

00:06:58.830 --> 00:07:06.090 align:middle line:84%
So for example, if I say
search ProFTDP and I hit Enter,

00:07:06.090 --> 00:07:10.140 align:middle line:84%
you can see that we can identify
various exploits for ProFTPD.

00:07:10.140 --> 00:07:13.920 align:middle line:84%
However, this version
of ProFTPD is really not

00:07:13.920 --> 00:07:15.750 align:middle line:84%
vulnerable to any
particular exploit

00:07:15.750 --> 00:07:18.487 align:middle line:84%
apart from this one
here, which you can see.

00:07:18.487 --> 00:07:21.070 align:middle line:84%
In this case, we're not going
to be using this, because we are

00:07:21.070 --> 00:07:23.230 align:middle line:90%
not at the exploitation phase.

00:07:23.230 --> 00:07:26.080 align:middle line:84%
We're pretty much working
with enumeration here.

00:07:26.080 --> 00:07:29.520 align:middle line:84%
So that's the FTP
version check module,

00:07:29.520 --> 00:07:32.530 align:middle line:84%
and it's extremely helpful in
identifying the exact version

00:07:32.530 --> 00:07:33.030 align:middle line:90%
there.

00:07:33.030 --> 00:07:34.920 align:middle line:84%
So we're just going
to clear that out.

00:07:34.920 --> 00:07:37.680 align:middle line:84%
And I'm going to go
back a step, and we

00:07:37.680 --> 00:07:40.990 align:middle line:84%
are going to take a look at
the next FTP auxiliary module,

00:07:40.990 --> 00:07:45.300 align:middle line:84%
which is the FTP brute force
module, which essentially

00:07:45.300 --> 00:07:48.870 align:middle line:84%
allows us to perform a brute
force in order to identify

00:07:48.870 --> 00:07:50.280 align:middle line:90%
the username and password.

00:07:50.280 --> 00:07:53.340 align:middle line:84%
And of course, this will depend
on the strength of the word

00:07:53.340 --> 00:07:54.930 align:middle line:90%
list that you utilize.

00:07:54.930 --> 00:07:57.970 align:middle line:84%
And in this case, I'm just going
to search again for the module.

00:07:57.970 --> 00:08:01.350 align:middle line:84%
So I'll use my previous command,
search, the type is auxiliary,

00:08:01.350 --> 00:08:02.970 align:middle line:90%
and the name is FTP.

00:08:02.970 --> 00:08:07.290 align:middle line:84%
And the module that we're
looking for is this one right

00:08:07.290 --> 00:08:10.530 align:middle line:84%
over here,
auxiliary/scanner/ftp/ftp_login.

00:08:10.530 --> 00:08:13.890 align:middle line:84%
As you can see, this is an
FTP authentication scanner.

00:08:13.890 --> 00:08:16.710 align:middle line:84%
So we're just going to
copy it right over there.

00:08:16.710 --> 00:08:20.500 align:middle line:84%
Just get that information
and then paste that in there.

00:08:20.500 --> 00:08:21.870 align:middle line:90%
And it's currently active.

00:08:21.870 --> 00:08:25.860 align:middle line:84%
If we show the Options, the
options that we need to set

00:08:25.860 --> 00:08:29.070 align:middle line:84%
are going to be the RHOST
option, which is the target IP

00:08:29.070 --> 00:08:29.890 align:middle line:90%
address.

00:08:29.890 --> 00:08:33.059 align:middle line:84%
The port is configured
already, so our port is done.

00:08:33.059 --> 00:08:35.100 align:middle line:84%
What we then need
to provide is either

00:08:35.100 --> 00:08:37.140 align:middle line:84%
a username that we
want to test for,

00:08:37.140 --> 00:08:40.590 align:middle line:84%
or a user file that
contains a list of usernames

00:08:40.590 --> 00:08:42.460 align:middle line:90%
that we want to brute force.

00:08:42.460 --> 00:08:46.350 align:middle line:84%
And we also need to provide
a password file that, again,

00:08:46.350 --> 00:08:48.360 align:middle line:84%
is essentially a
series of passwords

00:08:48.360 --> 00:08:51.310 align:middle line:84%
that we want to perform
our brute force with.

00:08:51.310 --> 00:08:53.280 align:middle line:84%
We can also change
the brute force speed

00:08:53.280 --> 00:08:55.410 align:middle line:84%
to, again, as you
can see, it says

00:08:55.410 --> 00:08:57.930 align:middle line:84%
how fast to brute force
from zero to five,

00:08:57.930 --> 00:08:59.580 align:middle line:90%
and it's currently set to five.

00:08:59.580 --> 00:09:01.740 align:middle line:84%
So again, based on
the information,

00:09:01.740 --> 00:09:04.860 align:middle line:84%
you have you can either provide
a single password that you want

00:09:04.860 --> 00:09:07.990 align:middle line:84%
to test or a single
username, and in this case

00:09:07.990 --> 00:09:10.140 align:middle line:84%
we don't have any, so we're
going to provide a user

00:09:10.140 --> 00:09:12.420 align:middle line:90%
file and the password file.

00:09:12.420 --> 00:09:14.340 align:middle line:84%
Now, the Metasploit
framework comes

00:09:14.340 --> 00:09:17.520 align:middle line:84%
with a really, really
powerful or really good

00:09:17.520 --> 00:09:19.950 align:middle line:84%
list of word lists
that we can utilize.

00:09:19.950 --> 00:09:23.160 align:middle line:84%
However, before we do that,
let's, again, paste in the IP

00:09:23.160 --> 00:09:24.300 align:middle line:90%
here, the target IP.

00:09:24.300 --> 00:09:25.890 align:middle line:90%
So I'll just copy that there.

00:09:25.890 --> 00:09:30.840 align:middle line:84%
And we will say set our
hosts based on the IP there.

00:09:30.840 --> 00:09:32.460 align:middle line:84%
Sorry, let's change
that to a three.

00:09:32.460 --> 00:09:33.400 align:middle line:90%
There we go.

00:09:33.400 --> 00:09:36.100 align:middle line:84%
And now, what we want
to do is, of course,

00:09:36.100 --> 00:09:40.650 align:middle line:84%
set the user list, or
rather the user file,

00:09:40.650 --> 00:09:41.800 align:middle line:90%
and then the password file.

00:09:41.800 --> 00:09:45.960 align:middle line:84%
So we're going to
say set user file

00:09:45.960 --> 00:09:48.420 align:middle line:84%
and we then need to
specify the location

00:09:48.420 --> 00:09:50.280 align:middle line:90%
where the user file is stored.

00:09:50.280 --> 00:09:51.990 align:middle line:84%
In this case, we
will be utilizing

00:09:51.990 --> 00:09:57.060 align:middle line:84%
one of the inbuilt Metasploit
framework username lists,

00:09:57.060 --> 00:09:58.620 align:middle line:90%
or user lists, as it were.

00:09:58.620 --> 00:10:01.500 align:middle line:84%
And this is found under
the user share directory

00:10:01.500 --> 00:10:03.510 align:middle line:84%
under the Metasploit
framework folder,

00:10:03.510 --> 00:10:05.220 align:middle line:84%
as we have already
taken a look at when

00:10:05.220 --> 00:10:08.160 align:middle line:84%
we were exploring the Metasploit
framework architecture.

00:10:08.160 --> 00:10:11.430 align:middle line:84%
We then want to head over
into data, word lists,

00:10:11.430 --> 00:10:15.270 align:middle line:84%
and we're looking for
common usernames .txt.

00:10:15.270 --> 00:10:18.750 align:middle line:84%
So that's the file that
contains a list of usernames

00:10:18.750 --> 00:10:21.450 align:middle line:84%
that we can use to perform
the brute force attack.

00:10:21.450 --> 00:10:22.530 align:middle line:90%
I'm going to hit Enter.

00:10:22.530 --> 00:10:24.900 align:middle line:84%
As you can see, that's
been set successfully.

00:10:24.900 --> 00:10:26.880 align:middle line:84%
We are now going to
set the password file,

00:10:26.880 --> 00:10:28.380 align:middle line:84%
so I'm just going
to get rid of user

00:10:28.380 --> 00:10:30.280 align:middle line:84%
here and change it
to password files.

00:10:30.280 --> 00:10:32.790 align:middle line:90%
So pass, set pass file.

00:10:32.790 --> 00:10:35.340 align:middle line:84%
And instead of
using common users,

00:10:35.340 --> 00:10:38.970 align:middle line:84%
we're going to use Unix
passwords or the Unix passwords

00:10:38.970 --> 00:10:39.760 align:middle line:90%
parse list.

00:10:39.760 --> 00:10:42.840 align:middle line:84%
So unix_passwords.txt,
hit Enter,

00:10:42.840 --> 00:10:46.015 align:middle line:84%
and it has set the
password word list there.

00:10:46.015 --> 00:10:46.890 align:middle line:90%
All right, excellent.

00:10:46.890 --> 00:10:48.720 align:middle line:84%
So we have all the
options configured.

00:10:48.720 --> 00:10:51.870 align:middle line:84%
We can now hit Run, and that is
going to begin the brute force.

00:10:51.870 --> 00:10:53.610 align:middle line:84%
Now again, depending
on the number

00:10:53.610 --> 00:10:56.460 align:middle line:84%
of usernames and
passwords within the user

00:10:56.460 --> 00:10:59.020 align:middle line:84%
list and the password list,
it's going to take time.

00:10:59.020 --> 00:11:01.860 align:middle line:84%
So again, as you can see, it's
going through each username

00:11:01.860 --> 00:11:03.430 align:middle line:90%
and password combination.

00:11:03.430 --> 00:11:05.140 align:middle line:84%
And when it actually
has a match,

00:11:05.140 --> 00:11:06.517 align:middle line:90%
it will be highlighted in green.

00:11:06.517 --> 00:11:08.100 align:middle line:84%
And that's what I'm
going to wait for.

00:11:08.100 --> 00:11:12.010 align:middle line:84%
So I'm just going to let
this perform the brute force.

00:11:12.010 --> 00:11:14.770 align:middle line:84%
All right, so it
looks like we were

00:11:14.770 --> 00:11:17.830 align:middle line:84%
able to find a username and
password combination that

00:11:17.830 --> 00:11:21.640 align:middle line:84%
was successful, or that we can
use to log in to the FTP server

00:11:21.640 --> 00:11:23.390 align:middle line:84%
and the credentials
are listed here.

00:11:23.390 --> 00:11:27.138 align:middle line:84%
So sysadmin, and the password
is this number combination,

00:11:27.138 --> 00:11:29.180 align:middle line:84%
which is essentially one,
two, three, four, five,

00:11:29.180 --> 00:11:31.850 align:middle line:90%
six in a reversed format.

00:11:31.850 --> 00:11:34.480 align:middle line:84%
So what we can do is
just terminate it here.

00:11:34.480 --> 00:11:37.000 align:middle line:84%
Of course, you can let it
run to see whether you will

00:11:37.000 --> 00:11:40.090 align:middle line:84%
be able to identify any other
usernames and passwords,

00:11:40.090 --> 00:11:41.740 align:middle line:84%
and you can see it
actually completed

00:11:41.740 --> 00:11:43.250 align:middle line:90%
without finding any others.

00:11:43.250 --> 00:11:46.510 align:middle line:84%
So these are the credentials
that we'll be using.

00:11:46.510 --> 00:11:49.180 align:middle line:84%
Now, in order to log
in to an FTP server,

00:11:49.180 --> 00:11:51.340 align:middle line:84%
we will need to
exit or we actually

00:11:51.340 --> 00:11:53.860 align:middle line:84%
can try and log in directly
from the Metasploit framework

00:11:53.860 --> 00:11:56.350 align:middle line:84%
console, but we
need the target IP.

00:11:56.350 --> 00:11:58.900 align:middle line:90%
So let me just copy that there.

00:11:58.900 --> 00:12:03.520 align:middle line:84%
If I just show the options
here, let me just show Options.

00:12:03.520 --> 00:12:04.130 align:middle line:90%
There we go.

00:12:04.130 --> 00:12:05.860 align:middle line:90%
And we'll just copy the IP.

00:12:05.860 --> 00:12:08.450 align:middle line:84%
What we can say is let's
see if we can log in.

00:12:08.450 --> 00:12:11.905 align:middle line:84%
So FTP, and I'll try
and open up the docu--

00:12:11.905 --> 00:12:13.030 align:middle line:90%
let's see if we can log in.

00:12:13.030 --> 00:12:13.572 align:middle line:90%
There we are.

00:12:13.572 --> 00:12:16.360 align:middle line:84%
Looks like we can actually
interact with FTP.

00:12:16.360 --> 00:12:18.310 align:middle line:84%
So I'm going to say
FTP, and then we

00:12:18.310 --> 00:12:20.380 align:middle line:90%
provide the target IP there.

00:12:20.380 --> 00:12:22.720 align:middle line:84%
And we then want to
copy the password.

00:12:22.720 --> 00:12:24.790 align:middle line:84%
So we know that the
username is sysadmin,

00:12:24.790 --> 00:12:28.310 align:middle line:84%
and the password is this
combination of numbers.

00:12:28.310 --> 00:12:30.220 align:middle line:84%
So we'll hit Enter,
and it's going

00:12:30.220 --> 00:12:33.100 align:middle line:84%
to say service not
available, remote servers,

00:12:33.100 --> 00:12:33.910 align:middle line:90%
closed connection.

00:12:33.910 --> 00:12:36.640 align:middle line:84%
That is probably because
of the brute force,

00:12:36.640 --> 00:12:40.330 align:middle line:84%
and this is something that you
need to keep into consideration

00:12:40.330 --> 00:12:43.510 align:middle line:84%
or that you need to keep in
mind is that a brute force can

00:12:43.510 --> 00:12:47.230 align:middle line:84%
sometimes cause a service
to actually be overwhelmed,

00:12:47.230 --> 00:12:49.840 align:middle line:84%
or you can actually
initiate a DDOS that, again,

00:12:49.840 --> 00:12:51.275 align:middle line:90%
will take down the service.

00:12:51.275 --> 00:12:52.900 align:middle line:84%
So you want to give
that a few seconds.

00:12:52.900 --> 00:12:56.020 align:middle line:84%
So while we're waiting for
that to reset, what we can do

00:12:56.020 --> 00:12:58.510 align:middle line:84%
is take a look at
the other modules

00:12:58.510 --> 00:13:01.450 align:middle line:84%
that we can use or rather
the final module that we'll

00:13:01.450 --> 00:13:02.410 align:middle line:90%
be exploring.

00:13:02.410 --> 00:13:04.360 align:middle line:84%
And in this case,
the module name

00:13:04.360 --> 00:13:06.160 align:middle line:84%
or the module that
we will be exploring

00:13:06.160 --> 00:13:08.860 align:middle line:84%
is the anonymous login
module, which will essentially

00:13:08.860 --> 00:13:13.570 align:middle line:84%
check whether we can log in
to the FTP server anonymously.

00:13:13.570 --> 00:13:16.390 align:middle line:84%
So again, I'm just going
to give this a few seconds.

00:13:16.390 --> 00:13:17.950 align:middle line:84%
I'm just going to
clear that out.

00:13:17.950 --> 00:13:18.740 align:middle line:90%
There we are.

00:13:18.740 --> 00:13:20.860 align:middle line:84%
And let's see if
we can access that.

00:13:20.860 --> 00:13:22.660 align:middle line:90%
I'm going to hit back.

00:13:22.660 --> 00:13:28.520 align:middle line:84%
Let me just terminate there, and
we can actually just exit here.

00:13:28.520 --> 00:13:32.860 align:middle line:84%
So in order to use the FTP
anonymous login module,

00:13:32.860 --> 00:13:36.100 align:middle line:84%
again, we can essentially just
say search and then the type,

00:13:36.100 --> 00:13:38.350 align:middle line:90%
we can set to auxiliary.

00:13:38.350 --> 00:13:41.380 align:middle line:84%
And then the name
is going to be FTP.

00:13:41.380 --> 00:13:45.760 align:middle line:84%
And we're looking for the
module that allows us to log in.

00:13:45.760 --> 00:13:47.390 align:middle line:90%
So this is the module here.

00:13:47.390 --> 00:13:49.630 align:middle line:84%
So
auxiliary/scanner/FTP/anonymous,

00:13:49.630 --> 00:13:52.278 align:middle line:84%
this will check for
anonymous FTP access.

00:13:52.278 --> 00:13:54.070 align:middle line:84%
So again, it'll actually
detect and tell us

00:13:54.070 --> 00:13:55.400 align:middle line:90%
whether we can use this.

00:13:55.400 --> 00:13:58.600 align:middle line:84%
So we're just going to copy the
module name here and then paste

00:13:58.600 --> 00:13:59.210 align:middle line:90%
it.

00:13:59.210 --> 00:14:00.680 align:middle line:90%
And that should be active.

00:14:00.680 --> 00:14:04.690 align:middle line:84%
So again, let me just get
the IP here real quick.

00:14:04.690 --> 00:14:10.670 align:middle line:84%
And we can just copy that
and then show the options.

00:14:10.670 --> 00:14:11.460 align:middle line:90%
There we go.

00:14:11.460 --> 00:14:14.820 align:middle line:84%
And we can now, again,
set the RHOST option.

00:14:14.820 --> 00:14:18.170 align:middle line:84%
And again, we don't need
to provide the username

00:14:18.170 --> 00:14:18.870 align:middle line:90%
and password.

00:14:18.870 --> 00:14:20.953 align:middle line:84%
Although, we'll take a
look at how to authenticate

00:14:20.953 --> 00:14:22.130 align:middle line:90%
in a few seconds.

00:14:22.130 --> 00:14:25.820 align:middle line:84%
If we say set our hosts
and we paste in that

00:14:25.820 --> 00:14:28.220 align:middle line:84%
and change that to
three and then hit Run,

00:14:28.220 --> 00:14:29.640 align:middle line:90%
it's going to run the module.

00:14:29.640 --> 00:14:31.910 align:middle line:84%
And let's see whether
the target FTP

00:14:31.910 --> 00:14:36.440 align:middle line:84%
server is vulnerable to
an anonymous FTP login.

00:14:36.440 --> 00:14:39.950 align:middle line:84%
And as you can see, it is
not, which again, we expected.

00:14:39.950 --> 00:14:41.660 align:middle line:84%
But in many cases,
you always want

00:14:41.660 --> 00:14:46.370 align:middle line:84%
to run this particular auxiliary
module as it can reveal, again,

00:14:46.370 --> 00:14:49.130 align:middle line:84%
quite a bit of important
information in regards

00:14:49.130 --> 00:14:52.970 align:middle line:84%
to whether or not you can
access the FTP server remotely,

00:14:52.970 --> 00:14:54.230 align:middle line:90%
or rather, anonymously.

00:14:54.230 --> 00:14:57.230 align:middle line:84%
So now that we've done
that, we can actually

00:14:57.230 --> 00:15:01.070 align:middle line:84%
try and log in to the FTP
server as I did previously.

00:15:01.070 --> 00:15:05.330 align:middle line:84%
And I'm just going to say FTP,
hit Enter, and as you can see,

00:15:05.330 --> 00:15:07.130 align:middle line:90%
it says we are connected.

00:15:07.130 --> 00:15:09.380 align:middle line:84%
And it looks like we need
to provide the username

00:15:09.380 --> 00:15:10.110 align:middle line:90%
and password.

00:15:10.110 --> 00:15:12.080 align:middle line:84%
So what I'm going
to do is I'm just

00:15:12.080 --> 00:15:14.660 align:middle line:84%
going to exit from the
Metasploit framework console.

00:15:14.660 --> 00:15:17.210 align:middle line:90%
So let me just exit.

00:15:17.210 --> 00:15:19.610 align:middle line:84%
All right, so once
exited, what we can say

00:15:19.610 --> 00:15:22.790 align:middle line:84%
is FTP and then paste
in the IP there.

00:15:22.790 --> 00:15:24.380 align:middle line:84%
And then we'll be
prompted to enter

00:15:24.380 --> 00:15:28.580 align:middle line:84%
a username, which in this
case, we know is sysadmin.

00:15:28.580 --> 00:15:31.440 align:middle line:84%
And then we know that the
password is six, five, four,

00:15:31.440 --> 00:15:32.330 align:middle line:90%
three, two, one.

00:15:32.330 --> 00:15:33.080 align:middle line:90%
Hit Enter.

00:15:33.080 --> 00:15:36.290 align:middle line:84%
And it says, it gives
us a status code 230,

00:15:36.290 --> 00:15:38.150 align:middle line:90%
user sysadmin logged in.

00:15:38.150 --> 00:15:41.840 align:middle line:84%
Remote system type is unix, so
we know it's a Linux system.

00:15:41.840 --> 00:15:43.340 align:middle line:84%
And then, of course,
we can list out

00:15:43.340 --> 00:15:45.390 align:middle line:90%
the contents of the directory.

00:15:45.390 --> 00:15:49.730 align:middle line:84%
And you can see that we have
a file here called secret.txt.

00:15:49.730 --> 00:15:53.300 align:middle line:84%
So we can actually download
this file onto our VM

00:15:53.300 --> 00:15:58.580 align:middle line:84%
or onto our system by
saying get secret.txt.

00:15:58.580 --> 00:16:00.350 align:middle line:84%
And that is going to
download it for us.

00:16:00.350 --> 00:16:02.600 align:middle line:84%
As you can see, that
transfer is complete.

00:16:02.600 --> 00:16:05.030 align:middle line:84%
And now we can exit
from the FTP server,

00:16:05.030 --> 00:16:07.640 align:middle line:84%
and if we list out the
contents of our directory,

00:16:07.640 --> 00:16:10.560 align:middle line:84%
you can see we have the
secret.txt file here.

00:16:10.560 --> 00:16:13.650 align:middle line:84%
And we can tap out the contents
of that file and there you go.

00:16:13.650 --> 00:16:17.600 align:middle line:84%
So again, FTP enumeration
is extremely important

00:16:17.600 --> 00:16:20.240 align:middle line:84%
not only in identifying
the service version,

00:16:20.240 --> 00:16:22.520 align:middle line:84%
but also identifying
potential exploits

00:16:22.520 --> 00:16:25.040 align:middle line:84%
for that specific
service version.

00:16:25.040 --> 00:16:27.230 align:middle line:84%
As I said or as
I've mentioned, you

00:16:27.230 --> 00:16:29.780 align:middle line:84%
can also perform
an FTP brute force

00:16:29.780 --> 00:16:32.810 align:middle line:84%
in order to see whether you
can identify any username

00:16:32.810 --> 00:16:34.350 align:middle line:90%
and password combination.

00:16:34.350 --> 00:16:36.890 align:middle line:84%
If you're already able
to identify a username,

00:16:36.890 --> 00:16:39.140 align:middle line:84%
then the brute force
might be more effective.

00:16:39.140 --> 00:16:43.430 align:middle line:84%
And in our case, we were able
to find a username and password

00:16:43.430 --> 00:16:47.430 align:middle line:84%
combination that we
actually use to log in.

00:16:47.430 --> 00:16:50.340 align:middle line:84%
And as you can see, we were
able to get a hold of some data,

00:16:50.340 --> 00:16:51.950 align:middle line:84%
and in this case,
the lab environment

00:16:51.950 --> 00:16:55.560 align:middle line:84%
has been set up to show you that
this can be quite dangerous.

00:16:55.560 --> 00:16:58.700 align:middle line:84%
And again, as an attacker,
this data-- or we

00:16:58.700 --> 00:17:01.010 align:middle line:84%
could have had access
to the entire web

00:17:01.010 --> 00:17:04.460 align:middle line:84%
server or any other
directory that,

00:17:04.460 --> 00:17:08.359 align:middle line:84%
again, has been configured
to be shared via FTP.

00:17:08.359 --> 00:17:12.530 align:middle line:84%
You can also use the FTP
anonymous login module

00:17:12.530 --> 00:17:14.329 align:middle line:84%
to actually check
and see whether you

00:17:14.329 --> 00:17:17.690 align:middle line:84%
can log in to the FTP server
anonymously without providing

00:17:17.690 --> 00:17:18.630 align:middle line:90%
any credentials.

00:17:18.630 --> 00:17:20.760 align:middle line:84%
And that's an equally
important module.

00:17:20.760 --> 00:17:22.910 align:middle line:84%
So that is going
to be it in regards

00:17:22.910 --> 00:17:26.040 align:middle line:84%
to the practical section
and the lab environment.

00:17:26.040 --> 00:17:29.090 align:middle line:84%
So let me just switch
back to my slides.

00:17:29.090 --> 00:17:32.030 align:middle line:84%
In the next video, we are going
to be taking a look at how

00:17:32.030 --> 00:17:34.160 align:middle line:90%
to perform SMB enumeration.

00:17:34.160 --> 00:17:37.790 align:middle line:84%
SMB is quite an important
protocol to understand

00:17:37.790 --> 00:17:41.250 align:middle line:84%
and of course to learn how
to perform enumeration on,

00:17:41.250 --> 00:17:44.300 align:middle line:84%
so that you can discover
various vulnerabilities.

00:17:44.300 --> 00:17:47.450 align:middle line:84%
You can also discover the
version of SMB that's running,

00:17:47.450 --> 00:17:50.450 align:middle line:84%
as well as perform an
SMB brute force attack.

00:17:50.450 --> 00:17:52.130 align:middle line:84%
So that's what we're
going to be taking

00:17:52.130 --> 00:17:54.500 align:middle line:90%
a look at in the next video.

00:17:54.500 --> 00:17:55.000 align:middle line:90%