WEBVTT

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


00:00:03.374 --> 00:00:06.266 align:middle line:90%
[MUSIC LOGO]

00:00:06.266 --> 00:00:10.140 align:middle line:90%


00:00:10.140 --> 00:00:12.840 align:middle line:84%
Transferring files
to Windows targets.

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

00:00:14.460 --> 00:00:17.910 align:middle line:84%
the process of how to transfer
files to a Windows target

00:00:17.910 --> 00:00:21.210 align:middle line:84%
that you have just compromised,
in the event that you do not

00:00:21.210 --> 00:00:23.670 align:middle line:84%
have access to a
meterpreter session.

00:00:23.670 --> 00:00:26.220 align:middle line:84%
And of course, this is
going to work in conjunction

00:00:26.220 --> 00:00:27.930 align:middle line:84%
with the web server
that we learned

00:00:27.930 --> 00:00:30.810 align:middle line:84%
how to set up in the
previous video with Python.

00:00:30.810 --> 00:00:34.710 align:middle line:84%
So this video has a lab
environment attached to it.

00:00:34.710 --> 00:00:37.660 align:middle line:84%
All you need to do is just fire
it up, and we can get started.

00:00:37.660 --> 00:00:39.750 align:middle line:84%
So the way this is
going to work is

00:00:39.750 --> 00:00:42.600 align:middle line:84%
we'll firstly need to gain
access to the target system.

00:00:42.600 --> 00:00:44.220 align:middle line:84%
And we're not going
to be utilizing

00:00:44.220 --> 00:00:46.860 align:middle line:84%
a Metasploit framework
exploit module to gain access.

00:00:46.860 --> 00:00:49.890 align:middle line:84%
We're going to be utilizing
an exploit or a piece

00:00:49.890 --> 00:00:52.560 align:middle line:90%
of exploit code from ExploitDB.

00:00:52.560 --> 00:00:55.260 align:middle line:84%
We're going to run it, and
once we gain access and obtain

00:00:55.260 --> 00:00:57.150 align:middle line:84%
a standard command
shield session,

00:00:57.150 --> 00:01:01.200 align:middle line:84%
we're then going to transfer
a useful post-exploitation

00:01:01.200 --> 00:01:05.440 align:middle line:84%
executable that we probably want
to use on the target system.

00:01:05.440 --> 00:01:08.370 align:middle line:84%
And we'll take a look at
how this can be facilitated

00:01:08.370 --> 00:01:12.030 align:middle line:84%
with the Python or, rather,
the simple HTTP web server

00:01:12.030 --> 00:01:16.170 align:middle line:84%
that we can set up with Python
as well as inbuilt utilities

00:01:16.170 --> 00:01:19.260 align:middle line:84%
on Windows that can be used
to download a file that

00:01:19.260 --> 00:01:21.510 align:middle line:90%
is hosted on a web server.

00:01:21.510 --> 00:01:23.520 align:middle line:84%
With that being said,
I'll be seeing you

00:01:23.520 --> 00:01:24.990 align:middle line:90%
in the lab environment.

00:01:24.990 --> 00:01:28.550 align:middle line:90%


00:01:28.550 --> 00:01:30.350 align:middle line:84%
So I'm back within
the lab environment,

00:01:30.350 --> 00:01:32.990 align:middle line:84%
and you will be provided
with the target IP address.

00:01:32.990 --> 00:01:34.760 align:middle line:84%
In your case, it's
going to be different.

00:01:34.760 --> 00:01:36.630 align:middle line:84%
All you need to do
is just copy it.

00:01:36.630 --> 00:01:39.080 align:middle line:84%
So as I said, the first
step is we actually

00:01:39.080 --> 00:01:41.400 align:middle line:84%
need to gain access
to the target system.

00:01:41.400 --> 00:01:42.890 align:middle line:84%
And before we do
that, we actually

00:01:42.890 --> 00:01:45.230 align:middle line:84%
need to identify what
vulnerable service is

00:01:45.230 --> 00:01:47.160 align:middle line:90%
running on the Windows target.

00:01:47.160 --> 00:01:49.010 align:middle line:90%
So I'll just zoom in here.

00:01:49.010 --> 00:01:51.350 align:middle line:84%
And we can perform
a quick Nmap scan

00:01:51.350 --> 00:01:53.940 align:middle line:90%
on the target system on port 80.

00:01:53.940 --> 00:01:55.155 align:middle line:90%
So there we are.

00:01:55.155 --> 00:01:57.530 align:middle line:84%
I'll just specify that we're
performing a service version

00:01:57.530 --> 00:01:59.540 align:middle line:90%
detection scan on port 80.

00:01:59.540 --> 00:02:02.120 align:middle line:84%
I'll paste in the target
IP, and I'll hit Enter.

00:02:02.120 --> 00:02:05.990 align:middle line:84%
And let's see what service
is running on port 80.

00:02:05.990 --> 00:02:07.940 align:middle line:84%
Of course, that's going
to be a web server.

00:02:07.940 --> 00:02:10.729 align:middle line:84%
But we're interested in the
specific service and service

00:02:10.729 --> 00:02:11.420 align:middle line:90%
version.

00:02:11.420 --> 00:02:14.000 align:middle line:84%
As you can see, the
Nmap scan is complete.

00:02:14.000 --> 00:02:16.850 align:middle line:84%
Port 80 is open, and
the actual service

00:02:16.850 --> 00:02:20.240 align:middle line:84%
that's running on port
80 is the Rejetto HTTP

00:02:20.240 --> 00:02:22.670 align:middle line:90%
file server version 2.3.

00:02:22.670 --> 00:02:25.370 align:middle line:84%
And we've already
exploited this service

00:02:25.370 --> 00:02:27.350 align:middle line:84%
in this course in
earlier sections.

00:02:27.350 --> 00:02:30.320 align:middle line:84%
However, we actually
performed or exploited

00:02:30.320 --> 00:02:33.560 align:middle line:84%
this particular service
with a Metasploit framework

00:02:33.560 --> 00:02:34.850 align:middle line:90%
exploit module.

00:02:34.850 --> 00:02:37.760 align:middle line:84%
In this video, we will be
exploring how to exploit it

00:02:37.760 --> 00:02:41.390 align:middle line:90%
with an exploit on ExploitDB.

00:02:41.390 --> 00:02:43.820 align:middle line:84%
So if we want to
search for exploits

00:02:43.820 --> 00:02:46.250 align:middle line:84%
pertinent to this
particular service that's

00:02:46.250 --> 00:02:50.390 align:middle line:84%
running on the target system,
we can utilize the command line

00:02:50.390 --> 00:02:52.670 align:middle line:84%
utility searchsploit,
which essentially

00:02:52.670 --> 00:02:56.240 align:middle line:84%
allows you to search for locally
stored ExploitDB exploits.

00:02:56.240 --> 00:02:58.760 align:middle line:84%
So we can say
searchsploit and Rejetto.

00:02:58.760 --> 00:03:01.340 align:middle line:84%
That is the vendor
name that actually

00:03:01.340 --> 00:03:04.400 align:middle line:90%
developed the HTTP file server.

00:03:04.400 --> 00:03:06.420 align:middle line:84%
And right away, you
can see at the bottom,

00:03:06.420 --> 00:03:10.190 align:middle line:84%
we have a remote command
execution exploit.

00:03:10.190 --> 00:03:11.750 align:middle line:90%
This is a Python exploit.

00:03:11.750 --> 00:03:14.652 align:middle line:84%
And of course, we had the
Metasploit exploit module here,

00:03:14.652 --> 00:03:16.110 align:middle line:84%
which we are not
going to be using.

00:03:16.110 --> 00:03:18.710 align:middle line:84%
So this is the exploit
that we want to use.

00:03:18.710 --> 00:03:20.840 align:middle line:84%
It is a Python script,
and we can copy it

00:03:20.840 --> 00:03:22.970 align:middle line:84%
to our current working
directory, which

00:03:22.970 --> 00:03:26.900 align:middle line:84%
is under root, by
saying searchsploit -m,

00:03:26.900 --> 00:03:32.450 align:middle line:84%
and we can then specify
the ExploitDB ID or EDB ID

00:03:32.450 --> 00:03:34.640 align:middle line:90%
by just specifying the ID here.

00:03:34.640 --> 00:03:36.590 align:middle line:90%
So 39161.

00:03:36.590 --> 00:03:40.700 align:middle line:84%
So we can say
searchsploit -m 39161,

00:03:40.700 --> 00:03:43.280 align:middle line:84%
and that will copy
the actual Python

00:03:43.280 --> 00:03:45.650 align:middle line:84%
exploit into our current
working directory.

00:03:45.650 --> 00:03:48.030 align:middle line:84%
As you can see, it's
copied successfully.

00:03:48.030 --> 00:03:50.930 align:middle line:84%
And if I list all the
contents of my current working

00:03:50.930 --> 00:03:54.030 align:middle line:84%
directory, you can see that
we have it right over here.

00:03:54.030 --> 00:03:55.820 align:middle line:84%
Now, in order to
use this exploit,

00:03:55.820 --> 00:03:57.470 align:middle line:84%
we need to configure
a few options.

00:03:57.470 --> 00:03:59.210 align:middle line:84%
We actually need to
modify the exploit.

00:03:59.210 --> 00:04:00.920 align:middle line:90%
So I'm going to open it up.

00:04:00.920 --> 00:04:02.930 align:middle line:90%
This is a Python 2 exploit.

00:04:02.930 --> 00:04:04.520 align:middle line:90%
So we'll open it up with Vim.

00:04:04.520 --> 00:04:06.200 align:middle line:84%
You can open it up
with whatever text

00:04:06.200 --> 00:04:09.230 align:middle line:90%
editor you're comfortable with.

00:04:09.230 --> 00:04:11.750 align:middle line:84%
This Python exploit has
a great documentation

00:04:11.750 --> 00:04:12.930 align:middle line:90%
regarding how to use it.

00:04:12.930 --> 00:04:14.690 align:middle line:90%
So you specify Python 2.

00:04:14.690 --> 00:04:17.390 align:middle line:84%
You then execute the
Python script itself.

00:04:17.390 --> 00:04:20.880 align:middle line:84%
You specify the target IP
address and the port number.

00:04:20.880 --> 00:04:25.170 align:middle line:84%
So this is the port on which,
or the port where the HTTP file

00:04:25.170 --> 00:04:26.570 align:middle line:90%
server is running.

00:04:26.570 --> 00:04:31.290 align:middle line:84%
And we also need to customize
the actual IP address--

00:04:31.290 --> 00:04:33.230 align:middle line:90%
so this is your Kali Linux IP--

00:04:33.230 --> 00:04:35.460 align:middle line:84%
as well as the
local port number.

00:04:35.460 --> 00:04:38.450 align:middle line:84%
So in order to obtain a
command shell session,

00:04:38.450 --> 00:04:41.990 align:middle line:84%
we need to specify our
Kali Linux IP and the port

00:04:41.990 --> 00:04:44.900 align:middle line:84%
that we will be setting up
a Netcat listener now with.

00:04:44.900 --> 00:04:47.660 align:middle line:84%
So we're going to set
up a Netcat listener now

00:04:47.660 --> 00:04:49.520 align:middle line:90%
to receive the connection.

00:04:49.520 --> 00:04:52.850 align:middle line:84%
So we are going to change
this to our Kali Linux IP.

00:04:52.850 --> 00:04:55.770 align:middle line:84%
We can obtain that by
opening up a new tab here.

00:04:55.770 --> 00:04:57.440 align:middle line:90%
And I'll just say ifconfig.

00:04:57.440 --> 00:05:01.040 align:middle line:84%
And in your case, again,
the ethernet 1 inet address

00:05:01.040 --> 00:05:01.850 align:middle line:90%
will be different.

00:05:01.850 --> 00:05:04.400 align:middle line:84%
All you need to do is just
copy it and replace it

00:05:04.400 --> 00:05:06.780 align:middle line:84%
with the one within
the exploit itself.

00:05:06.780 --> 00:05:08.990 align:middle line:90%
So I'll just change it.

00:05:08.990 --> 00:05:12.098 align:middle line:90%
And I'll just paste it in here.

00:05:12.098 --> 00:05:12.640 align:middle line:90%
There we are.

00:05:12.640 --> 00:05:15.290 align:middle line:84%
And the port that I'm going
to be setting up my Netcat

00:05:15.290 --> 00:05:20.880 align:middle line:84%
listener on is port 1234, just
to keep things nice and simple.

00:05:20.880 --> 00:05:22.650 align:middle line:84%
I'll then write
the changes here.

00:05:22.650 --> 00:05:25.260 align:middle line:84%
And let's take a look
at the documentation

00:05:25.260 --> 00:05:27.430 align:middle line:84%
again because there's
something very important here.

00:05:27.430 --> 00:05:30.210 align:middle line:84%
So you can see that you
need to be using a web

00:05:30.210 --> 00:05:34.860 align:middle line:84%
server hosting Netcat or the
Windows Netcat executable.

00:05:34.860 --> 00:05:38.400 align:middle line:84%
And this needs to be on
your Kali Linux IP address

00:05:38.400 --> 00:05:39.660 align:middle line:90%
on port 80.

00:05:39.660 --> 00:05:42.630 align:middle line:84%
And again, you need to have
the Netcat executable, which

00:05:42.630 --> 00:05:45.690 align:middle line:84%
again, comes pre-packaged
with Kali Linux.

00:05:45.690 --> 00:05:48.030 align:middle line:84%
So this is another
great example where

00:05:48.030 --> 00:05:50.910 align:middle line:84%
we can showcase the
advantage of utilizing

00:05:50.910 --> 00:05:55.380 align:middle line:84%
the Python module or the Python
module simple HTTP server

00:05:55.380 --> 00:05:57.640 align:middle line:90%
or http.server.

00:05:57.640 --> 00:06:00.120 align:middle line:84%
So I'm just going
to write in quit.

00:06:00.120 --> 00:06:02.280 align:middle line:84%
And in order to
run this exploit,

00:06:02.280 --> 00:06:05.290 align:middle line:84%
we are going to need a couple
of tabs or Windows open.

00:06:05.290 --> 00:06:08.430 align:middle line:84%
So in this window, we're going
to be running the actual Python

00:06:08.430 --> 00:06:09.810 align:middle line:90%
exploit.

00:06:09.810 --> 00:06:12.390 align:middle line:84%
In the next one, we're going
to set up our Netcat listener.

00:06:12.390 --> 00:06:15.510 align:middle line:84%
So Netcat nvlp
1234 because that's

00:06:15.510 --> 00:06:17.790 align:middle line:84%
the port we specified that
we will be listening on

00:06:17.790 --> 00:06:19.990 align:middle line:84%
within the Python
exploit itself.

00:06:19.990 --> 00:06:21.390 align:middle line:90%
So that is listening.

00:06:21.390 --> 00:06:24.450 align:middle line:84%
We're then going to
open up a new tab

00:06:24.450 --> 00:06:26.250 align:middle line:84%
and under because
we actually need

00:06:26.250 --> 00:06:28.140 align:middle line:90%
to Host the Netcat executable.

00:06:28.140 --> 00:06:35.100 align:middle line:84%
We're going to go under cd
user share windows binaries,

00:06:35.100 --> 00:06:35.670 align:middle line:90%
I believe.

00:06:35.670 --> 00:06:36.270 align:middle line:90%
There we are.

00:06:36.270 --> 00:06:37.950 align:middle line:84%
And under Windows
binaries, you can

00:06:37.950 --> 00:06:41.590 align:middle line:84%
see you have the netcat.exe
file here, which is fantastic.

00:06:41.590 --> 00:06:42.840 align:middle line:90%
So how do we host this?

00:06:42.840 --> 00:06:45.130 align:middle line:84%
We can utilize
the Python module.

00:06:45.130 --> 00:06:49.680 align:middle line:84%
And in this case, I'll use the
Python 3 module, http.server.

00:06:49.680 --> 00:06:52.920 align:middle line:84%
And it needs to be on port
80, as per the instructions

00:06:52.920 --> 00:06:55.815 align:middle line:84%
or documentation specified
within the Python exploit.

00:06:55.815 --> 00:06:58.890 align:middle line:90%
So I'll hit Enter.

00:06:58.890 --> 00:07:01.770 align:middle line:84%
And we have the Netcat
listener, and we can now

00:07:01.770 --> 00:07:02.860 align:middle line:90%
launch this exploit.

00:07:02.860 --> 00:07:07.230 align:middle line:84%
So I'll say Python
391, and we then

00:07:07.230 --> 00:07:09.310 align:middle line:84%
need to specify the
target IP address.

00:07:09.310 --> 00:07:11.500 align:middle line:90%
So I'll just copy it here.

00:07:11.500 --> 00:07:15.220 align:middle line:84%
And we then need to specify
the port on which the HTTP file

00:07:15.220 --> 00:07:17.170 align:middle line:84%
server is running,
which is port 80.

00:07:17.170 --> 00:07:19.780 align:middle line:84%
Now, this exploit doesn't
work on its first try.

00:07:19.780 --> 00:07:21.400 align:middle line:84%
But if I hit Enter,
you'll actually

00:07:21.400 --> 00:07:22.820 align:middle line:90%
see something interesting.

00:07:22.820 --> 00:07:25.240 align:middle line:84%
If I head over
into the actual tab

00:07:25.240 --> 00:07:30.100 align:middle line:84%
where I'd set up the web server,
the simple HTTP web server,

00:07:30.100 --> 00:07:32.620 align:middle line:84%
you can see that a
get request is made,

00:07:32.620 --> 00:07:35.770 align:middle line:84%
which means that netcat.exe
was actually downloaded,

00:07:35.770 --> 00:07:37.900 align:middle line:84%
but as I said, if we take
a look at our listener

00:07:37.900 --> 00:07:41.050 align:middle line:84%
here, our Netcat listener, we
didn't receive a command shell

00:07:41.050 --> 00:07:41.680 align:middle line:90%
session.

00:07:41.680 --> 00:07:44.590 align:middle line:84%
So we need to run
the exploit again.

00:07:44.590 --> 00:07:45.250 align:middle line:90%
There we are.

00:07:45.250 --> 00:07:48.040 align:middle line:84%
And now, if we take a look
at our netcat listener,

00:07:48.040 --> 00:07:51.610 align:middle line:84%
we have obtained or essentially
exploited the target system.

00:07:51.610 --> 00:07:54.400 align:middle line:84%
And we are provided with
a simple command shell

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

00:07:56.740 --> 00:07:58.600 align:middle line:84%
We can perform some
local enumeration

00:07:58.600 --> 00:08:00.820 align:middle line:90%
to identify who we are exactly.

00:08:00.820 --> 00:08:01.900 align:middle line:90%
So who am I?

00:08:01.900 --> 00:08:04.520 align:middle line:84%
You can see, we are currently
the administrator user.

00:08:04.520 --> 00:08:07.180 align:middle line:84%
So in this case, we do not
need to elevate our privileges.

00:08:07.180 --> 00:08:10.120 align:middle line:84%
We can confirm that
by saying whoamipriv

00:08:10.120 --> 00:08:12.760 align:middle line:84%
to display the list of
privileges associated

00:08:12.760 --> 00:08:13.840 align:middle line:90%
with this account.

00:08:13.840 --> 00:08:16.630 align:middle line:84%
And you can see, we have the
entire gamut of privileges

00:08:16.630 --> 00:08:19.060 align:middle line:84%
that you typically associate
with the administrator's

00:08:19.060 --> 00:08:19.970 align:middle line:90%
account.

00:08:19.970 --> 00:08:22.960 align:middle line:84%
Now, this is where the
whole file transfer

00:08:22.960 --> 00:08:24.620 align:middle line:90%
process comes into play.

00:08:24.620 --> 00:08:26.830 align:middle line:84%
Remember, we don't have
a meterpreter session.

00:08:26.830 --> 00:08:29.620 align:middle line:84%
This is a simple
command shell session.

00:08:29.620 --> 00:08:33.010 align:middle line:84%
Let's say we wanted to
transfer mimikatz.exe.

00:08:33.010 --> 00:08:36.250 align:middle line:84%
Mimkatz.exe is a
post-exploitation tool

00:08:36.250 --> 00:08:39.340 align:middle line:84%
that is used to dump Windows
hashes and passwords that

00:08:39.340 --> 00:08:40.549 align:middle line:90%
are stored in memory.

00:08:40.549 --> 00:08:43.510 align:middle line:84%
So I'll just terminate
the web server here.

00:08:43.510 --> 00:08:48.340 align:middle line:84%
And I'll head over into
user share and Windows.

00:08:48.340 --> 00:08:51.070 align:middle line:84%
I'll head over to the
directory Windows Resources.

00:08:51.070 --> 00:08:54.250 align:middle line:84%
And under Windows Resources,
there's a Mimikatz folder.

00:08:54.250 --> 00:08:58.360 align:middle line:84%
And I'll head over into
the x64 folder here.

00:08:58.360 --> 00:09:00.310 align:middle line:84%
And within this folder,
you can see we have

00:09:00.310 --> 00:09:03.050 align:middle line:90%
the mimikatz.exe file here.

00:09:03.050 --> 00:09:06.610 align:middle line:84%
So if I wanted to transfer
this, how would I do this?

00:09:06.610 --> 00:09:09.670 align:middle line:84%
How would I transfer this file
onto the Windows target system?

00:09:09.670 --> 00:09:13.600 align:middle line:84%
Because I don't have the
ability to upload a file,

00:09:13.600 --> 00:09:15.760 align:middle line:84%
because I don't have
meterpreter, et cetera.

00:09:15.760 --> 00:09:18.710 align:middle line:84%
So we're currently
within the hfs directory.

00:09:18.710 --> 00:09:20.710 align:middle line:84%
So I'll navigate to the
root of the C drive.

00:09:20.710 --> 00:09:23.500 align:middle line:84%
And remember what I said
in the previous section?

00:09:23.500 --> 00:09:26.260 align:middle line:84%
Whenever you're transferring
a file to a target system,

00:09:26.260 --> 00:09:28.450 align:middle line:84%
always do it within
the temp directory.

00:09:28.450 --> 00:09:30.850 align:middle line:84%
If we list out the
content of the temp,

00:09:30.850 --> 00:09:34.270 align:middle line:84%
of the actual C drive,
you can see that we

00:09:34.270 --> 00:09:35.690 align:middle line:90%
don't have a temp directory.

00:09:35.690 --> 00:09:38.140 align:middle line:84%
So I'll just create
a temp directory.

00:09:38.140 --> 00:09:39.670 align:middle line:90%
Make directory temp.

00:09:39.670 --> 00:09:42.010 align:middle line:84%
And I'll navigate into
the temp directory.

00:09:42.010 --> 00:09:43.480 align:middle line:90%
So how do we transfer it?

00:09:43.480 --> 00:09:46.630 align:middle line:84%
We know that the file is being
hosted on the web server.

00:09:46.630 --> 00:09:48.650 align:middle line:84%
Well, not yet, because
we haven't set it up.

00:09:48.650 --> 00:09:50.330 align:middle line:84%
So let's actually
do that right now.

00:09:50.330 --> 00:09:52.990 align:middle line:90%
So I'll use Python 3.

00:09:52.990 --> 00:09:57.300 align:middle line:84%
http.server, and I'll
host it on port 80.

00:09:57.300 --> 00:10:00.780 align:middle line:84%
So now the actual
mimikatz.exe file,

00:10:00.780 --> 00:10:04.140 align:middle line:84%
or rather, all files
within the x64 folder

00:10:04.140 --> 00:10:08.230 align:middle line:84%
are being hosted on the Kali
Linux IP address on port 80.

00:10:08.230 --> 00:10:09.600 align:middle line:90%
So how do we download it?

00:10:09.600 --> 00:10:11.460 align:middle line:84%
Well, the best
utility that comes

00:10:11.460 --> 00:10:14.580 align:middle line:84%
pre-packaged on pretty much
all versions of Windows

00:10:14.580 --> 00:10:17.010 align:middle line:90%
is the certutil utility.

00:10:17.010 --> 00:10:20.340 align:middle line:84%
Now, the certutil utility
is used for a wide range

00:10:20.340 --> 00:10:21.340 align:middle line:90%
of functionality.

00:10:21.340 --> 00:10:23.430 align:middle line:84%
However, one of the
really cool features

00:10:23.430 --> 00:10:26.280 align:middle line:84%
that it provides to
users is the ability

00:10:26.280 --> 00:10:29.130 align:middle line:84%
to download a file
from a web server.

00:10:29.130 --> 00:10:31.380 align:middle line:84%
So make sure you're
in the directory where

00:10:31.380 --> 00:10:33.300 align:middle line:90%
you want to download the file.

00:10:33.300 --> 00:10:37.090 align:middle line:84%
You can then type in
the command certutil,

00:10:37.090 --> 00:10:39.850 align:middle line:84%
and then utilize
the option urlcache.

00:10:39.850 --> 00:10:42.430 align:middle line:84%
So -urlcache, and
then you specify

00:10:42.430 --> 00:10:46.630 align:middle line:84%
that you want to download
a file using the option -f.

00:10:46.630 --> 00:10:49.310 align:middle line:84%
You then specify the
address of the web server.

00:10:49.310 --> 00:10:52.340 align:middle line:84%
So you now need your
Kali Linux IP address.

00:10:52.340 --> 00:10:54.080 align:middle line:84%
So I'll open up a
new terminal here.

00:10:54.080 --> 00:10:57.580 align:middle line:84%
And I'll just say ifconfig, and
I'll copy the inet value there.

00:10:57.580 --> 00:11:01.060 align:middle line:84%
Make sure to replace it
with the one with the IP

00:11:01.060 --> 00:11:04.720 align:middle line:84%
address of the Kali Linux
system in your lab environment.

00:11:04.720 --> 00:11:06.400 align:middle line:84%
And the file that
we want to download

00:11:06.400 --> 00:11:10.640 align:middle line:84%
is called mimikatz.exe, which is
being hosted on the web server.

00:11:10.640 --> 00:11:14.140 align:middle line:84%
You then need to
specify what you

00:11:14.140 --> 00:11:16.420 align:middle line:84%
want to call the file
after it's downloaded

00:11:16.420 --> 00:11:19.660 align:middle line:84%
because, on Windows, you
need to specify a file

00:11:19.660 --> 00:11:21.820 align:middle line:84%
name for the file that
you're downloading.

00:11:21.820 --> 00:11:24.490 align:middle line:84%
So we'll just call
it mimikatz.exe,

00:11:24.490 --> 00:11:26.830 align:middle line:84%
the same as the file
that we're downloading.

00:11:26.830 --> 00:11:28.120 align:middle line:90%
And we hit Enter.

00:11:28.120 --> 00:11:31.990 align:middle line:90%


00:11:31.990 --> 00:11:33.880 align:middle line:84%
So we'll give this
a couple of seconds.

00:11:33.880 --> 00:11:36.370 align:middle line:84%
Let's take a look at
the web server here.

00:11:36.370 --> 00:11:39.068 align:middle line:84%
In this case, it doesn't
look like it's working.

00:11:39.068 --> 00:11:39.610 align:middle line:90%
There we are.

00:11:39.610 --> 00:11:42.160 align:middle line:84%
So it's actually
downloaded mimikatz.exe.

00:11:42.160 --> 00:11:46.390 align:middle line:84%
So you can see it says
online and certutil URL cache

00:11:46.390 --> 00:11:48.320 align:middle line:90%
command completed successfully.

00:11:48.320 --> 00:11:51.130 align:middle line:84%
So we've successfully
transferred the mimikatz

00:11:51.130 --> 00:11:55.310 align:middle line:84%
executable from our Kali Linux
system onto the target system.

00:11:55.310 --> 00:11:57.700 align:middle line:84%
So if I type in
dir, you can see we

00:11:57.700 --> 00:11:59.830 align:middle line:90%
have our mimikatz executable.

00:11:59.830 --> 00:12:00.850 align:middle line:90%
Fantastic.

00:12:00.850 --> 00:12:03.490 align:middle line:84%
So from this
demonstration, you can

00:12:03.490 --> 00:12:06.220 align:middle line:84%
see that you don't need
to have a meterpreter

00:12:06.220 --> 00:12:07.960 align:middle line:90%
session on the target system.

00:12:07.960 --> 00:12:11.740 align:middle line:84%
You can transfer files, if
you want, really as easily

00:12:11.740 --> 00:12:16.780 align:middle line:84%
as what we've just done
through the use of a web server

00:12:16.780 --> 00:12:21.470 align:middle line:84%
that we set up with Python as
well as the certutil utility.

00:12:21.470 --> 00:12:24.310 align:middle line:84%
So we can now execute
the mimikatz executable.

00:12:24.310 --> 00:12:27.340 align:middle line:84%
And of course, this video is not
focused on how to use mimikatz.

00:12:27.340 --> 00:12:30.880 align:middle line:84%
But again, as I said, it
can be used to dump hashes.

00:12:30.880 --> 00:12:32.140 align:middle line:90%
So I'll execute it.

00:12:32.140 --> 00:12:36.370 align:middle line:84%
I can then check whether I
have the necessary permissions

00:12:36.370 --> 00:12:38.810 align:middle line:90%
to execute it or to use it.

00:12:38.810 --> 00:12:40.840 align:middle line:84%
So I'll say privilege
colon colon debug.

00:12:40.840 --> 00:12:43.890 align:middle line:90%


00:12:43.890 --> 00:12:45.750 align:middle line:90%
And it tells me privilege 20 OK.

00:12:45.750 --> 00:12:52.260 align:middle line:84%
So I can then say, for
example, lsa dump or type

00:12:52.260 --> 00:12:54.370 align:middle line:90%
any of the mimikatz commands.

00:12:54.370 --> 00:12:57.690 align:middle line:84%
So I can say, for
example, lsa dump.

00:12:57.690 --> 00:13:02.070 align:middle line:84%
And I can then specify
what I want to dump.

00:13:02.070 --> 00:13:05.580 align:middle line:84%
So I can also display
the logon passwords,

00:13:05.580 --> 00:13:08.170 align:middle line:84%
if it's been enabled
on this Windows system.

00:13:08.170 --> 00:13:10.710 align:middle line:84%
So yeah, there's tons
of things that I can do.

00:13:10.710 --> 00:13:17.670 align:middle line:84%
If I want to dump the actual
contents of the LSASS process,

00:13:17.670 --> 00:13:20.850 align:middle line:90%
or the LSASS cache from memory,

00:13:20.850 --> 00:13:25.140 align:middle line:84%
I can say lsa dump SAM to
dump the actual data that's

00:13:25.140 --> 00:13:27.630 align:middle line:84%
stored within the cache
pertinent to the SAM

00:13:27.630 --> 00:13:29.190 align:middle line:90%
database on Windows.

00:13:29.190 --> 00:13:29.970 align:middle line:90%
And there we are.

00:13:29.970 --> 00:13:32.700 align:middle line:84%
You can see that I don't really
get any additional information

00:13:32.700 --> 00:13:35.940 align:middle line:84%
regarding the actual domain
and the syskey for the SAM

00:13:35.940 --> 00:13:36.570 align:middle line:90%
database.

00:13:36.570 --> 00:13:41.190 align:middle line:84%
But again, this video is not
focused on how to use mimikatz.

00:13:41.190 --> 00:13:43.620 align:middle line:84%
With that being said, I can
just exit from mimikatz.

00:13:43.620 --> 00:13:46.180 align:middle line:84%
And again, I can transfer
any file that I want.

00:13:46.180 --> 00:13:47.670 align:middle line:84%
So I'll just use
one more example.

00:13:47.670 --> 00:13:49.950 align:middle line:84%
I'll just terminate
the web server here.

00:13:49.950 --> 00:13:54.150 align:middle line:84%
And I'll navigate to the
root user's home directory.

00:13:54.150 --> 00:13:56.550 align:middle line:90%
And I can create a simple file.

00:13:56.550 --> 00:13:57.840 align:middle line:90%
I'll just create a text file.

00:13:57.840 --> 00:14:00.180 align:middle line:90%
I call it test.txt,

00:14:00.180 --> 00:14:03.030 align:middle line:84%
And I can just enter
some test data here.

00:14:03.030 --> 00:14:07.660 align:middle line:84%
I can say, this
is some test data.

00:14:07.660 --> 00:14:09.050 align:middle line:90%
I'll write and quit.

00:14:09.050 --> 00:14:12.380 align:middle line:84%
And then I can set up the web
server within this directory.

00:14:12.380 --> 00:14:16.900 align:middle line:84%
So I'll say Python 3 -m
http.server on port 80.

00:14:16.900 --> 00:14:19.630 align:middle line:84%
And then I'll just
copy my Kali Linux IP,

00:14:19.630 --> 00:14:21.850 align:middle line:84%
as I'll need it to
transfer the file

00:14:21.850 --> 00:14:23.590 align:middle line:90%
or to download it with certutil.

00:14:23.590 --> 00:14:28.480 align:middle line:84%
So I'll say certutil
URL cache file http,

00:14:28.480 --> 00:14:30.340 align:middle line:84%
specify the address
of the web server,

00:14:30.340 --> 00:14:32.470 align:middle line:84%
in this case, our
Kali Linux system.

00:14:32.470 --> 00:14:37.630 align:middle line:84%
The file that we're
downloading is called test.txt.

00:14:37.630 --> 00:14:43.150 align:middle line:84%
So I'll say test.txt, and then
we'll also save it as test.txt.

00:14:43.150 --> 00:14:43.780 align:middle line:90%
There we are.

00:14:43.780 --> 00:14:45.110 align:middle line:90%
That is done successfully.

00:14:45.110 --> 00:14:48.760 align:middle line:84%
If I type in dir, you can
see test.txt is downloaded.

00:14:48.760 --> 00:14:50.528 align:middle line:84%
I can display the
content of the file

00:14:50.528 --> 00:14:52.570 align:middle line:84%
to show you that it was
transferred successfully,

00:14:52.570 --> 00:14:55.650 align:middle line:84%
by saying type test.txt,
and there you are.

00:14:55.650 --> 00:14:57.890 align:middle line:84%
You can see this
is some test data.

00:14:57.890 --> 00:15:01.750 align:middle line:84%
So that is how to transfer
a file or a series of files

00:15:01.750 --> 00:15:04.900 align:middle line:84%
from your Kali Linux system
onto a Windows target

00:15:04.900 --> 00:15:06.592 align:middle line:90%
that you have compromised.

00:15:06.592 --> 00:15:08.050 align:middle line:84%
With that being
said, that is going

00:15:08.050 --> 00:15:09.970 align:middle line:84%
to conclude the
practical demonstration

00:15:09.970 --> 00:15:12.310 align:middle line:90%
side of this video.

00:15:12.310 --> 00:15:14.560 align:middle line:84%
So now that we have an
understanding of how

00:15:14.560 --> 00:15:17.920 align:middle line:84%
to transfer files onto
a Windows target system,

00:15:17.920 --> 00:15:20.110 align:middle line:84%
we can actually
explore the process

00:15:20.110 --> 00:15:22.750 align:middle line:84%
of transferring files
onto a Linux system

00:15:22.750 --> 00:15:23.990 align:middle line:90%
that you have compromised.

00:15:23.990 --> 00:15:27.900 align:middle line:84%
So I'll be seeing you
in the next video.

00:15:27.900 --> 00:15:28.450 align:middle line:90%