WEBVTT

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


00:00:04.356 --> 00:00:08.228 align:middle line:90%
[MUSIC PLAYING]

00:00:08.228 --> 00:00:10.180 align:middle line:90%


00:00:10.180 --> 00:00:13.610 align:middle line:84%
Welcome to the file transfer
section of this course.

00:00:13.610 --> 00:00:15.490 align:middle line:84%
In this section, we
will be exploring

00:00:15.490 --> 00:00:19.270 align:middle line:84%
the process of how to transfer
files onto both Windows

00:00:19.270 --> 00:00:20.890 align:middle line:90%
and Linux targets.

00:00:20.890 --> 00:00:22.960 align:middle line:84%
In this video, we're
going to be starting off

00:00:22.960 --> 00:00:25.630 align:middle line:84%
by exploring the process
of how to set up a web

00:00:25.630 --> 00:00:27.640 align:middle line:90%
server with Python, right?

00:00:27.640 --> 00:00:29.680 align:middle line:84%
And the reason we're
setting up a web server

00:00:29.680 --> 00:00:31.840 align:middle line:84%
is primarily to host
the files that we

00:00:31.840 --> 00:00:36.170 align:middle line:84%
would like to transfer onto both
our Windows and Linux target.

00:00:36.170 --> 00:00:38.020 align:middle line:84%
So before we
actually get started,

00:00:38.020 --> 00:00:42.500 align:middle line:84%
let's get an understanding as
to why file transfers are very,

00:00:42.500 --> 00:00:45.010 align:middle line:84%
very important or the
process of transferring files

00:00:45.010 --> 00:00:47.950 align:middle line:84%
to a target system is
very important during

00:00:47.950 --> 00:00:49.480 align:middle line:90%
post-exploitation, right?

00:00:49.480 --> 00:00:53.260 align:middle line:84%
So after obtaining initial
access to or on a target

00:00:53.260 --> 00:00:55.900 align:middle line:84%
system, you will need
to transfer files

00:00:55.900 --> 00:00:56.990 align:middle line:90%
to the target system.

00:00:56.990 --> 00:00:59.590 align:middle line:84%
This is something that you may
not need to do in some cases.

00:00:59.590 --> 00:01:02.470 align:middle line:84%
But in most cases, you will
need to transfer either

00:01:02.470 --> 00:01:04.989 align:middle line:84%
a script that you
like to execute

00:01:04.989 --> 00:01:08.230 align:middle line:84%
or maybe a binary or an
exploit, et cetera, right?

00:01:08.230 --> 00:01:11.290 align:middle line:84%
And you might be thinking
to yourself, well,

00:01:11.290 --> 00:01:13.095 align:middle line:84%
we have already
done this before.

00:01:13.095 --> 00:01:14.470 align:middle line:84%
We did it with
Meterpreter, where

00:01:14.470 --> 00:01:17.620 align:middle line:84%
I downloaded and uploaded
files to the target system

00:01:17.620 --> 00:01:18.760 align:middle line:90%
with one simple command.

00:01:18.760 --> 00:01:21.460 align:middle line:84%
Well, in some
cases, you will not

00:01:21.460 --> 00:01:25.060 align:middle line:84%
have access to the target system
via a Meterpreter session.

00:01:25.060 --> 00:01:27.430 align:middle line:84%
And as a result, you
will need to utilize

00:01:27.430 --> 00:01:30.640 align:middle line:84%
the in-built operating
system specific utilities

00:01:30.640 --> 00:01:32.560 align:middle line:84%
to facilitate the
transfer of files

00:01:32.560 --> 00:01:34.870 align:middle line:84%
from your system or
your penetration testing

00:01:34.870 --> 00:01:37.510 align:middle line:84%
distribution to the
target system, right?

00:01:37.510 --> 00:01:41.050 align:middle line:84%
So let's say I gain access
to a Windows target system,

00:01:41.050 --> 00:01:43.090 align:middle line:84%
and I gain access
to the target system

00:01:43.090 --> 00:01:45.730 align:middle line:84%
and obtain a standard
command shell session.

00:01:45.730 --> 00:01:48.700 align:middle line:84%
If I wanted to transfer the
JAWS enumeration script,

00:01:48.700 --> 00:01:51.550 align:middle line:84%
for example, how would I do
that if I don't have access

00:01:51.550 --> 00:01:52.690 align:middle line:90%
to Meterpreter?

00:01:52.690 --> 00:01:56.500 align:middle line:84%
Well, one option is I could
generate an MSFvenom payload.

00:01:56.500 --> 00:02:00.070 align:middle line:84%
And then wait, I actually
needed to transfer the MSFvenom

00:02:00.070 --> 00:02:00.640 align:middle line:90%
payload.

00:02:00.640 --> 00:02:01.700 align:middle line:90%
How do I do that?

00:02:01.700 --> 00:02:05.050 align:middle line:84%
So you can actually start to
see why this is so important.

00:02:05.050 --> 00:02:08.020 align:middle line:84%
And it is actually a
pivotal phase or rather

00:02:08.020 --> 00:02:10.850 align:middle line:84%
step in the post-exploitation
phase as a whole.

00:02:10.850 --> 00:02:13.270 align:middle line:84%
And it's not just limited
to privilege escalation

00:02:13.270 --> 00:02:14.630 align:middle line:90%
or anything like that.

00:02:14.630 --> 00:02:16.540 align:middle line:84%
It's very important
that you understand

00:02:16.540 --> 00:02:20.500 align:middle line:84%
how to transfer a file from your
system onto the target system

00:02:20.500 --> 00:02:24.130 align:middle line:84%
that you've just compromised
irregardless of the target

00:02:24.130 --> 00:02:28.120 align:middle line:84%
operating system or
the operating system

00:02:28.120 --> 00:02:29.750 align:middle line:84%
that's running on
the target system.

00:02:29.750 --> 00:02:32.680 align:middle line:84%
So you never should
rely on Meterpreter.

00:02:32.680 --> 00:02:35.590 align:middle line:84%
And as I said, if
you utilize a manual

00:02:35.590 --> 00:02:41.200 align:middle line:84%
exploit that you get from the
internet or from ExploitDB

00:02:41.200 --> 00:02:44.540 align:middle line:84%
and not a Metasploit framework
exploit module, then again,

00:02:44.540 --> 00:02:47.480 align:middle line:84%
this is where this
will come into play.

00:02:47.480 --> 00:02:51.190 align:middle line:84%
So this process utilizes
a 2-step approach,

00:02:51.190 --> 00:02:54.490 align:middle line:84%
where you will, firstly, need
to host the files that you want

00:02:54.490 --> 00:02:56.500 align:middle line:90%
to transfer on a web server.

00:02:56.500 --> 00:02:59.560 align:middle line:84%
And then secondly, you then
need to download the files that

00:02:59.560 --> 00:03:01.750 align:middle line:84%
are hosted on the web
server you have set up

00:03:01.750 --> 00:03:04.583 align:middle line:90%
onto the target system.

00:03:04.583 --> 00:03:06.250 align:middle line:84%
In this video, we're
going to be dealing

00:03:06.250 --> 00:03:08.320 align:middle line:84%
with the first step,
where we actually

00:03:08.320 --> 00:03:10.180 align:middle line:84%
need to set up the
web server that's

00:03:10.180 --> 00:03:13.270 align:middle line:84%
going to host the files that we
would like to transfer, right?

00:03:13.270 --> 00:03:14.830 align:middle line:84%
And we are doing
this on the attacker

00:03:14.830 --> 00:03:17.870 align:middle line:84%
system or your penetration
testing distribution.

00:03:17.870 --> 00:03:20.260 align:middle line:84%
So how can we set
up a web server

00:03:20.260 --> 00:03:22.540 align:middle line:84%
to host the files that we
would like to transfer?

00:03:22.540 --> 00:03:26.410 align:middle line:84%
Well, one option is to utilize
a service or package like Apache

00:03:26.410 --> 00:03:28.480 align:middle line:90%
2 or nginx to host the files.

00:03:28.480 --> 00:03:31.930 align:middle line:84%
But there is a better
time-efficient and

00:03:31.930 --> 00:03:36.430 align:middle line:84%
resource-efficient alternative
to utilizing a proper web

00:03:36.430 --> 00:03:39.040 align:middle line:84%
server technology
or stack, and that

00:03:39.040 --> 00:03:45.250 align:middle line:84%
is the Python module known
as SimpleHTTPServer or HTTP

00:03:45.250 --> 00:03:46.180 align:middle line:90%
server, right?

00:03:46.180 --> 00:03:49.090 align:middle line:84%
So Python comes with
a built-in module

00:03:49.090 --> 00:03:52.720 align:middle line:84%
known as SimpleHTTPServer,
in the case of python2,

00:03:52.720 --> 00:03:56.260 align:middle line:84%
and http.server, in
the case of python3,

00:03:56.260 --> 00:04:00.550 align:middle line:84%
that can be used to facilitate
a simple HTTP server that

00:04:00.550 --> 00:04:03.740 align:middle line:84%
gives you the standard GET
and HEAD request handlers.

00:04:03.740 --> 00:04:05.830 align:middle line:84%
This module can be
used to host files

00:04:05.830 --> 00:04:08.350 align:middle line:84%
in any directory on
your system and can

00:04:08.350 --> 00:04:11.480 align:middle line:84%
be implemented through a single
command in your terminal.

00:04:11.480 --> 00:04:13.180 align:middle line:84%
So the only
prerequisite is that you

00:04:13.180 --> 00:04:16.029 align:middle line:84%
need to have either python2
installed on your pen testing

00:04:16.029 --> 00:04:18.399 align:middle line:90%
distribution or python3, right?

00:04:18.399 --> 00:04:20.120 align:middle line:84%
And if you have any
of those installed,

00:04:20.120 --> 00:04:23.590 align:middle line:84%
then you can easily launch
or execute this module

00:04:23.590 --> 00:04:26.950 align:middle line:84%
and set up a simple
HTTP web server

00:04:26.950 --> 00:04:29.500 align:middle line:84%
to host the files in
any specific directory

00:04:29.500 --> 00:04:31.120 align:middle line:84%
that you want,
which is fantastic

00:04:31.120 --> 00:04:35.200 align:middle line:84%
because if we utilized a package
or service like Apache, then

00:04:35.200 --> 00:04:37.900 align:middle line:84%
we would need to transfer
the files that we would like

00:04:37.900 --> 00:04:39.580 align:middle line:84%
to transfer onto
the target system

00:04:39.580 --> 00:04:42.130 align:middle line:84%
into the default
Apache directory.

00:04:42.130 --> 00:04:45.375 align:middle line:84%
However, with the
Python module, we

00:04:45.375 --> 00:04:46.750 align:middle line:84%
don't need to
transfer any files.

00:04:46.750 --> 00:04:48.280 align:middle line:84%
If we are working
on the desktop,

00:04:48.280 --> 00:04:52.162 align:middle line:84%
we can set up or launch the
HTTP server within our desktop,

00:04:52.162 --> 00:04:53.620 align:middle line:84%
and it will host
the files that are

00:04:53.620 --> 00:04:56.208 align:middle line:84%
stored on our desktop,
which is fantastic.

00:04:56.208 --> 00:04:58.000 align:middle line:84%
So that's what we're
going to be exploring,

00:04:58.000 --> 00:04:59.660 align:middle line:90%
how to do in this video.

00:04:59.660 --> 00:05:02.690 align:middle line:84%
So this video has a lab
environment attached to it.

00:05:02.690 --> 00:05:04.840 align:middle line:84%
And we're not going to
be exploiting any system.

00:05:04.840 --> 00:05:07.870 align:middle line:84%
We're just going to be exploring
the process of how to set up

00:05:07.870 --> 00:05:09.400 align:middle line:90%
a web server with Python.

00:05:09.400 --> 00:05:13.090 align:middle line:84%
And we'll be exploring it
for both python2 and python3.

00:05:13.090 --> 00:05:15.130 align:middle line:84%
So all that you
need to do is just

00:05:15.130 --> 00:05:17.870 align:middle line:84%
fire up the lab environment,
and we can get started.

00:05:17.870 --> 00:05:20.830 align:middle line:84%
So I'll see you in a couple of
seconds in the lab environment.

00:05:20.830 --> 00:05:23.370 align:middle line:90%


00:05:23.370 --> 00:05:25.300 align:middle line:84%
All right, so I'm back
in the lab environment.

00:05:25.300 --> 00:05:28.180 align:middle line:84%
And you'll be provided
with a target IP address.

00:05:28.180 --> 00:05:30.690 align:middle line:84%
But just disregard this as
we're not going to be using it,

00:05:30.690 --> 00:05:31.230 align:middle line:90%
right?

00:05:31.230 --> 00:05:33.540 align:middle line:84%
So let's take a look
at a few examples.

00:05:33.540 --> 00:05:36.270 align:middle line:84%
On your desktop, you'll
have a folder called tools.

00:05:36.270 --> 00:05:39.000 align:middle line:84%
And if you open that up, this
is just a collection of tools

00:05:39.000 --> 00:05:42.190 align:middle line:84%
that you typically
utilize during a pen test.

00:05:42.190 --> 00:05:44.290 align:middle line:84%
So we can click on
the scripts directory.

00:05:44.290 --> 00:05:46.390 align:middle line:84%
And you can see we have
a few scripts here.

00:05:46.390 --> 00:05:48.180 align:middle line:84%
And all I'm trying
to do is I'm trying

00:05:48.180 --> 00:05:51.750 align:middle line:84%
to identify a file that we would
like to transfer onto a target

00:05:51.750 --> 00:05:57.340 align:middle line:84%
system or that we would like to
host on our Python web server.

00:05:57.340 --> 00:06:00.420 align:middle line:84%
So I'm just going to
open up my terminal here.

00:06:00.420 --> 00:06:03.750 align:middle line:84%
And given the fact that this
is a Kali Linux instance,

00:06:03.750 --> 00:06:07.890 align:middle line:84%
I can actually list out the
content of a directory under

00:06:07.890 --> 00:06:11.295 align:middle line:84%
or rather a set of
files under /usr/share

00:06:11.295 --> 00:06:13.660 align:middle line:90%
and windows-binaries, right?

00:06:13.660 --> 00:06:17.040 align:middle line:84%
And let's say I wanted to
transfer the following binary.

00:06:17.040 --> 00:06:19.980 align:middle line:90%
Let's say I wanted to transfer--

00:06:19.980 --> 00:06:22.770 align:middle line:84%
we can just use a
simple example here.

00:06:22.770 --> 00:06:24.360 align:middle line:84%
Instead of saying
windows-binaries,

00:06:24.360 --> 00:06:29.460 align:middle line:84%
and I say windows-resources, we
should have the actual mimikatz

00:06:29.460 --> 00:06:30.810 align:middle line:90%
executable, right?

00:06:30.810 --> 00:06:32.670 align:middle line:84%
So let's say I
wanted to transfer

00:06:32.670 --> 00:06:36.300 align:middle line:84%
the x64-bit version of
the mimikatz executable,

00:06:36.300 --> 00:06:38.940 align:middle line:90%
so mimikatz.exe, right?

00:06:38.940 --> 00:06:40.500 align:middle line:90%
Well, what would I need to do?

00:06:40.500 --> 00:06:43.230 align:middle line:84%
Well I could set up
the SimpleHTTPServer

00:06:43.230 --> 00:06:45.180 align:middle line:90%
within the following directory.

00:06:45.180 --> 00:06:49.950 align:middle line:84%
Alternatively, I could copy
this executable into whatever

00:06:49.950 --> 00:06:51.400 align:middle line:90%
directory I'm comfortable with.

00:06:51.400 --> 00:06:54.540 align:middle line:84%
So instead of listing
out, I can just say copy.

00:06:54.540 --> 00:06:57.240 align:middle line:84%
And at the end here,
I can just say copy it

00:06:57.240 --> 00:07:00.930 align:middle line:84%
into our current directory, or
I can say copy it into whatever

00:07:00.930 --> 00:07:02.543 align:middle line:90%
directory I want to copy to.

00:07:02.543 --> 00:07:03.960 align:middle line:84%
So in this case,
I'll just copy it

00:07:03.960 --> 00:07:07.720 align:middle line:84%
to the root of the root
user's home directory.

00:07:07.720 --> 00:07:10.290 align:middle line:90%
So just specify a full stop.

00:07:10.290 --> 00:07:11.190 align:middle line:90%
Hit Enter.

00:07:11.190 --> 00:07:14.460 align:middle line:84%
And now, if I list the contents
of the root user's home

00:07:14.460 --> 00:07:17.460 align:middle line:84%
directory, you can see
we have mimikatz.exe.

00:07:17.460 --> 00:07:20.940 align:middle line:84%
So let's say I wanted to host
this particular executable,

00:07:20.940 --> 00:07:23.040 align:middle line:84%
and then download it
onto a target system,

00:07:23.040 --> 00:07:25.330 align:middle line:84%
and in this case, a
Windows target system.

00:07:25.330 --> 00:07:28.800 align:middle line:84%
So again, I can set
up a simple or rather

00:07:28.800 --> 00:07:31.020 align:middle line:90%
a SimpleHTTPServer with Python.

00:07:31.020 --> 00:07:34.770 align:middle line:84%
So if you're using python2,
then you can just say python,

00:07:34.770 --> 00:07:37.950 align:middle line:84%
and then you use the m
option to essentially say

00:07:37.950 --> 00:07:39.600 align:middle line:84%
that you want to
load a module, or you

00:07:39.600 --> 00:07:41.470 align:middle line:90%
want to use a specific module.

00:07:41.470 --> 00:07:45.780 align:middle line:84%
And in the case of python2,
you can say SimpleHTTPServer,

00:07:45.780 --> 00:07:47.580 align:middle line:90%
and this is case-sensitive.

00:07:47.580 --> 00:07:50.640 align:middle line:84%
You then need to
specify what port you

00:07:50.640 --> 00:07:52.770 align:middle line:90%
want to host the web server on.

00:07:52.770 --> 00:07:54.870 align:middle line:84%
Now remember, when
I hit Enter, or when

00:07:54.870 --> 00:07:58.320 align:middle line:84%
I'm using the
SimpleHTTPServer, it

00:07:58.320 --> 00:08:01.980 align:middle line:84%
is going to create a web
server on the Kali Linux IP

00:08:01.980 --> 00:08:04.800 align:middle line:84%
or on your penetration
testing distribution, right?

00:08:04.800 --> 00:08:08.670 align:middle line:84%
So I could host it on
the default web server

00:08:08.670 --> 00:08:12.330 align:middle line:84%
port, which is port
80 or port 443 or even

00:08:12.330 --> 00:08:13.770 align:middle line:90%
another obscure port, right?

00:08:13.770 --> 00:08:16.290 align:middle line:84%
So I could say,
for example, 1234.

00:08:16.290 --> 00:08:18.120 align:middle line:84%
As long as this port
is currently not

00:08:18.120 --> 00:08:20.730 align:middle line:84%
being used by any other service
on your Kali Linux system,

00:08:20.730 --> 00:08:21.720 align:middle line:90%
you can use it.

00:08:21.720 --> 00:08:25.270 align:middle line:84%
In this case, we will just say
we want to host it on port 80.

00:08:25.270 --> 00:08:26.333 align:middle line:90%
So I'll hit Enter.

00:08:26.333 --> 00:08:27.750 align:middle line:84%
And you can see
it's going to tell

00:08:27.750 --> 00:08:33.309 align:middle line:84%
you serving HTTP on your Kali
Linux IP address on port 80.

00:08:33.309 --> 00:08:35.770 align:middle line:84%
So we can actually verify
that this is working.

00:08:35.770 --> 00:08:38.110 align:middle line:84%
So I'll just open
up a new tab here.

00:08:38.110 --> 00:08:41.549 align:middle line:84%
And I'll say ifconfig to
get my Linux IP address.

00:08:41.549 --> 00:08:44.035 align:middle line:84%
Under ethernet 1,
I'll just copy my IP.

00:08:44.035 --> 00:08:46.410 align:middle line:84%
And in your case, this is
going to be different, but just

00:08:46.410 --> 00:08:47.680 align:middle line:90%
copy the value.

00:08:47.680 --> 00:08:50.620 align:middle line:84%
And if we open it up
in our web browser--

00:08:50.620 --> 00:08:53.370 align:middle line:84%
I'll open up Firefox, and
I'll paste the address there.

00:08:53.370 --> 00:08:56.340 align:middle line:84%
You can see that
it is essentially

00:08:56.340 --> 00:08:58.080 align:middle line:84%
hosting all the
files that are stored

00:08:58.080 --> 00:09:01.930 align:middle line:84%
within the home directory of the
root user, which is fantastic.

00:09:01.930 --> 00:09:04.750 align:middle line:84%
And we can see the
mimikatz executable here.

00:09:04.750 --> 00:09:06.780 align:middle line:84%
So on the target
system, I can now

00:09:06.780 --> 00:09:09.660 align:middle line:84%
utilize the following
address, or I can say,

00:09:09.660 --> 00:09:11.970 align:middle line:84%
for example, I want you
to download the file

00:09:11.970 --> 00:09:14.880 align:middle line:84%
from the following
web server, and I

00:09:14.880 --> 00:09:17.760 align:middle line:84%
want to download a file
called mimikatz.exe.

00:09:17.760 --> 00:09:20.080 align:middle line:84%
This will make much more
sense in the next video,

00:09:20.080 --> 00:09:22.500 align:middle line:84%
where we'll actually be
transferring or taking

00:09:22.500 --> 00:09:25.890 align:middle line:84%
a look at how to transfer a file
or download a file from a web

00:09:25.890 --> 00:09:29.050 align:middle line:90%
server onto a Windows system.

00:09:29.050 --> 00:09:32.010 align:middle line:84%
So that is how to do
this with python2.

00:09:32.010 --> 00:09:34.900 align:middle line:84%
With python3, the process
is essentially the same.

00:09:34.900 --> 00:09:37.110 align:middle line:84%
I'll just hit Control
and C to terminate it.

00:09:37.110 --> 00:09:39.060 align:middle line:84%
However, before I
do that, you can

00:09:39.060 --> 00:09:42.870 align:middle line:84%
see that the SimpleHTTPServer
Python module will actually

00:09:42.870 --> 00:09:44.680 align:middle line:90%
show you all GET requests here.

00:09:44.680 --> 00:09:47.070 align:middle line:84%
So you can see a
request was made.

00:09:47.070 --> 00:09:48.180 align:middle line:90%
This is a GET request.

00:09:48.180 --> 00:09:51.190 align:middle line:84%
And you can see in some
cases or in this case,

00:09:51.190 --> 00:09:56.080 align:middle line:84%
it's saying that there is a
404 status code, which is fine.

00:09:56.080 --> 00:09:56.880 align:middle line:90%
And yeah.

00:09:56.880 --> 00:10:00.360 align:middle line:84%
So if I downloaded a file or
if anyone else downloads a file

00:10:00.360 --> 00:10:02.040 align:middle line:84%
from the web server
that I've set up,

00:10:02.040 --> 00:10:05.700 align:middle line:84%
I would essentially
get the actual request

00:10:05.700 --> 00:10:07.810 align:middle line:90%
logged right over here.

00:10:07.810 --> 00:10:10.380 align:middle line:84%
So I'll just hit Control
and C to terminate it.

00:10:10.380 --> 00:10:12.360 align:middle line:84%
And if I'm doing
this with python3,

00:10:12.360 --> 00:10:15.030 align:middle line:90%
I can then say python3 module.

00:10:15.030 --> 00:10:18.060 align:middle line:84%
And the actual module name
is different for python3.

00:10:18.060 --> 00:10:21.250 align:middle line:90%
It is http.server.

00:10:21.250 --> 00:10:25.050 align:middle line:84%
So not SimpleHTTPServer,
it is http.server,

00:10:25.050 --> 00:10:26.920 align:middle line:90%
and then you specify the port.

00:10:26.920 --> 00:10:31.830 align:middle line:84%
So you can now say port 80,
port 8080, et cetera, port 1234,

00:10:31.830 --> 00:10:33.840 align:middle line:84%
whatever port you
want to host it on.

00:10:33.840 --> 00:10:35.620 align:middle line:90%
Hit Enter, and there we are.

00:10:35.620 --> 00:10:39.900 align:middle line:84%
So it's serving HTTP on the Kali
Linux IP address on port 80.

00:10:39.900 --> 00:10:43.410 align:middle line:84%
And you can access it directly
from the following URL.

00:10:43.410 --> 00:10:46.660 align:middle line:84%
So if we open up our browser,
and we reload it again,

00:10:46.660 --> 00:10:48.540 align:middle line:84%
you can see it's still
working irregardless

00:10:48.540 --> 00:10:51.700 align:middle line:84%
of the version of
Python that you utilize.

00:10:51.700 --> 00:10:54.960 align:middle line:84%
So the reason why I am
actually recommending

00:10:54.960 --> 00:10:57.300 align:middle line:84%
the process of setting
up a web server

00:10:57.300 --> 00:11:00.390 align:middle line:84%
is primarily because it is
really simple, especially

00:11:00.390 --> 00:11:04.500 align:middle line:84%
with the advent of Python
modules like http.server

00:11:04.500 --> 00:11:06.450 align:middle line:90%
or SimpleHTTPServer.

00:11:06.450 --> 00:11:10.290 align:middle line:84%
And one of the great advantages
is I can host any directory,

00:11:10.290 --> 00:11:12.510 align:middle line:84%
or I can host any files
within any directory

00:11:12.510 --> 00:11:14.440 align:middle line:90%
that I want on my file system.

00:11:14.440 --> 00:11:16.890 align:middle line:84%
Another example is
for example, if I

00:11:16.890 --> 00:11:21.030 align:middle line:84%
wanted to host the files within
the tools directory, which

00:11:21.030 --> 00:11:24.600 align:middle line:84%
is on the desktop, I can just
run the previous command.

00:11:24.600 --> 00:11:28.650 align:middle line:84%
So I can say python3 -m
http.server server on port 80.

00:11:28.650 --> 00:11:29.640 align:middle line:90%
Hit Enter.

00:11:29.640 --> 00:11:32.010 align:middle line:84%
And now, if I reload
the web server,

00:11:32.010 --> 00:11:33.690 align:middle line:84%
you can see that
it gives me access

00:11:33.690 --> 00:11:37.060 align:middle line:84%
to all the directories and files
within the tools directory.

00:11:37.060 --> 00:11:39.780 align:middle line:84%
So if I open up
this directory here,

00:11:39.780 --> 00:11:41.850 align:middle line:84%
I can then download
any of the files

00:11:41.850 --> 00:11:43.780 align:middle line:90%
within that particular folder.

00:11:43.780 --> 00:11:48.480 align:middle line:84%
So the Python module
SimpleHTTPServer or HTTP server

00:11:48.480 --> 00:11:52.090 align:middle line:84%
in the context of python3
is extremely powerful.

00:11:52.090 --> 00:11:56.110 align:middle line:84%
So this is the first step of
the file transfer process.

00:11:56.110 --> 00:12:00.750 align:middle line:84%
The next step is, of course, how
we can download a specific file

00:12:00.750 --> 00:12:04.900 align:middle line:84%
on the target system once it
has been hosted on a web server.

00:12:04.900 --> 00:12:08.010 align:middle line:84%
So that is going to conclude
the practical demonstration

00:12:08.010 --> 00:12:10.230 align:middle line:90%
side of this video.

00:12:10.230 --> 00:12:10.730 align:middle line:90%
All right.

00:12:10.730 --> 00:12:14.060 align:middle line:84%
So now that we know how to set
up a web server with Python

00:12:14.060 --> 00:12:16.550 align:middle line:84%
to host the files that we
would like to transfer,

00:12:16.550 --> 00:12:18.410 align:middle line:84%
in the next video,
we will be exploring

00:12:18.410 --> 00:12:22.460 align:middle line:84%
the process of how to transfer
files onto a Windows target

00:12:22.460 --> 00:12:24.770 align:middle line:84%
system after you
have compromised it

00:12:24.770 --> 00:12:26.400 align:middle line:90%
or gained access to it.

00:12:26.400 --> 00:12:29.980 align:middle line:84%
So I'll be seeing you
in the next video.

00:12:29.980 --> 00:12:31.000 align:middle line:90%