WEBVTT

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


00:00:03.402 --> 00:00:06.804 align:middle line:90%
[MUSIC PLAYING]

00:00:06.804 --> 00:00:10.210 align:middle line:90%


00:00:10.210 --> 00:00:13.640 align:middle line:84%
Welcome to the upgrading
shells section of this course.

00:00:13.640 --> 00:00:16.630 align:middle line:84%
This is going to be a relatively
short section in that we're

00:00:16.630 --> 00:00:18.220 align:middle line:90%
only going to have one video.

00:00:18.220 --> 00:00:20.003 align:middle line:84%
And this is the
topic of the video

00:00:20.003 --> 00:00:21.170 align:middle line:90%
we're going to be exploring.

00:00:21.170 --> 00:00:22.720 align:middle line:84%
So in this video,
we're going to be

00:00:22.720 --> 00:00:26.410 align:middle line:84%
exploring the process of how to
upgrade noninteractive shells.

00:00:26.410 --> 00:00:29.810 align:middle line:84%
And this is pertinent to
Linux postexploitation.

00:00:29.810 --> 00:00:34.520 align:middle line:84%
So throughout or up to
this point in the course,

00:00:34.520 --> 00:00:37.302 align:middle line:84%
we have exploited a
few Linux systems.

00:00:37.302 --> 00:00:39.010 align:middle line:84%
And one of the things
you might have seen

00:00:39.010 --> 00:00:42.820 align:middle line:84%
is that we, in some cases,
have obtained a command shell

00:00:42.820 --> 00:00:43.750 align:middle line:90%
session, right?

00:00:43.750 --> 00:00:46.360 align:middle line:84%
And the command shell session
was a little bit weird

00:00:46.360 --> 00:00:48.250 align:middle line:84%
because it didn't
provide me with a prompt

00:00:48.250 --> 00:00:50.230 align:middle line:84%
or it didn't give me
any indication as to

00:00:50.230 --> 00:00:52.480 align:middle line:84%
whether or not I
can type in commands

00:00:52.480 --> 00:00:54.430 align:middle line:84%
or I'm interacting
with the target system

00:00:54.430 --> 00:00:55.780 align:middle line:90%
that I've just compromised.

00:00:55.780 --> 00:00:59.620 align:middle line:84%
And in order to obtain a
semi-interactive shell,

00:00:59.620 --> 00:01:02.890 align:middle line:84%
we typed in the command
bin bash I, right?

00:01:02.890 --> 00:01:05.110 align:middle line:84%
And that provided us
with a bash session.

00:01:05.110 --> 00:01:07.820 align:middle line:84%
And that, again, is
an interactive shell.

00:01:07.820 --> 00:01:10.450 align:middle line:84%
So that was-- as I said,
we've already covered it,

00:01:10.450 --> 00:01:14.080 align:middle line:84%
but I'm going to be explaining
why you should actually upgrade

00:01:14.080 --> 00:01:17.680 align:middle line:84%
noninteractive shells and why
they are counterproductive

00:01:17.680 --> 00:01:19.450 align:middle line:90%
and really aren't that useful.

00:01:19.450 --> 00:01:22.220 align:middle line:84%
And that's why I actually
recommend this process.

00:01:22.220 --> 00:01:24.890 align:middle line:84%
So that is what we're going
to be exploring in this video.

00:01:24.890 --> 00:01:26.440 align:middle line:84%
And as I said, this
is not a problem

00:01:26.440 --> 00:01:28.870 align:middle line:84%
that affects Windows
postexploitation.

00:01:28.870 --> 00:01:31.630 align:middle line:84%
This is really pertinent
to Linux, all right?

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

00:01:35.360 --> 00:01:37.180 align:middle line:84%
And what we're
going to be doing is

00:01:37.180 --> 00:01:40.210 align:middle line:84%
we are going to start off by
exploiting the target system.

00:01:40.210 --> 00:01:42.788 align:middle line:84%
Once we obtain the
command shell session,

00:01:42.788 --> 00:01:44.830 align:middle line:84%
I'll then take you through
the various techniques

00:01:44.830 --> 00:01:48.310 align:middle line:84%
that you can utilize to upgrade
the noninteractive shell

00:01:48.310 --> 00:01:50.860 align:middle line:84%
into an interactive
shell, all right?

00:01:50.860 --> 00:01:53.440 align:middle line:84%
So I'll be seeing you
in the lab environment.

00:01:53.440 --> 00:01:56.200 align:middle line:90%


00:01:56.200 --> 00:01:58.690 align:middle line:84%
All right, so I'm back
within the lab environment.

00:01:58.690 --> 00:02:00.790 align:middle line:84%
And in this lab
environment, you'll

00:02:00.790 --> 00:02:02.710 align:middle line:84%
only be provided
with a command line

00:02:02.710 --> 00:02:05.440 align:middle line:84%
interface, which is
perfectly fine for what

00:02:05.440 --> 00:02:06.620 align:middle line:90%
we're going to be doing.

00:02:06.620 --> 00:02:09.460 align:middle line:84%
So the first step, of course,
is to identify the target IP

00:02:09.460 --> 00:02:12.790 align:middle line:84%
address, which can be done by
typing in the IF config command

00:02:12.790 --> 00:02:15.595 align:middle line:84%
and taking a look at the
interface ethernet one.

00:02:15.595 --> 00:02:18.320 align:middle line:84%
And the INET value is
what you want to copy.

00:02:18.320 --> 00:02:21.040 align:middle line:84%
So this is the IP address
of the Kali Linux system.

00:02:21.040 --> 00:02:23.560 align:middle line:84%
The target IP address
is always going to be--

00:02:23.560 --> 00:02:25.780 align:middle line:84%
or the target is always
going to be the third IP

00:02:25.780 --> 00:02:27.230 align:middle line:90%
address on the subnet.

00:02:27.230 --> 00:02:28.960 align:middle line:90%
So just copy this value here.

00:02:28.960 --> 00:02:30.550 align:middle line:84%
In your case,
it'll be different.

00:02:30.550 --> 00:02:33.650 align:middle line:84%
But just copy it and change
the two at the end to a three,

00:02:33.650 --> 00:02:34.150 align:middle line:90%
all right?

00:02:34.150 --> 00:02:35.440 align:middle line:90%
So I'll copy that there.

00:02:35.440 --> 00:02:37.630 align:middle line:84%
Now, this target
system is vulnerable

00:02:37.630 --> 00:02:41.660 align:middle line:84%
or has a vulnerable version
of Samba running on it.

00:02:41.660 --> 00:02:45.170 align:middle line:84%
And this is a lab that we
explored in the previous video.

00:02:45.170 --> 00:02:48.580 align:middle line:84%
So exploiting it can be done
through the use of a Metasploit

00:02:48.580 --> 00:02:50.110 align:middle line:90%
framework exploit module.

00:02:50.110 --> 00:02:52.810 align:middle line:84%
So I'm going to open
up MSF console here.

00:02:52.810 --> 00:02:54.520 align:middle line:84%
And we'll give that
a couple of seconds

00:02:54.520 --> 00:02:56.950 align:middle line:84%
to start up, after
which we'll set up

00:02:56.950 --> 00:03:00.830 align:middle line:84%
the global variable value
for the Rhosts option.

00:03:00.830 --> 00:03:04.870 align:middle line:84%
So I'll say set G Rhosts,
paste in the IP I copied,

00:03:04.870 --> 00:03:06.280 align:middle line:90%
and change the two to three.

00:03:06.280 --> 00:03:07.750 align:middle line:90%
And that's the target IP.

00:03:07.750 --> 00:03:11.170 align:middle line:84%
And the reason we are
setting the Rhosts value

00:03:11.170 --> 00:03:15.190 align:middle line:84%
globally is so that whenever
we load a Metasploit framework

00:03:15.190 --> 00:03:17.800 align:middle line:84%
module, the target IP
address will already

00:03:17.800 --> 00:03:19.030 align:middle line:90%
be specified for us.

00:03:19.030 --> 00:03:21.490 align:middle line:84%
It's just a quick
time-saving tip.

00:03:21.490 --> 00:03:24.490 align:middle line:84%
So I'll then say
search samba, and we

00:03:24.490 --> 00:03:26.560 align:middle line:84%
are looking for the
following exploit module.

00:03:26.560 --> 00:03:30.310 align:middle line:84%
So exploit Linux Samba is
known pipe name, all right?

00:03:30.310 --> 00:03:32.500 align:middle line:84%
I'll copy that there,
and I'll say use.

00:03:32.500 --> 00:03:33.850 align:middle line:90%
Paste that in there.

00:03:33.850 --> 00:03:36.130 align:middle line:90%
And I'll show the options here.

00:03:36.130 --> 00:03:39.490 align:middle line:84%
And you can see the target IP
address is already specified.

00:03:39.490 --> 00:03:42.710 align:middle line:84%
And the target port is
445, which is correct.

00:03:42.710 --> 00:03:45.790 align:middle line:84%
So I'll type in exploit,
and this will provide us

00:03:45.790 --> 00:03:48.260 align:middle line:90%
with a noninteractive shell.

00:03:48.260 --> 00:03:49.870 align:middle line:84%
And you'll actually
see what I mean

00:03:49.870 --> 00:03:52.660 align:middle line:90%
when I say that it is really--

00:03:52.660 --> 00:03:54.580 align:middle line:90%
it really is noninteractive.

00:03:54.580 --> 00:03:57.490 align:middle line:84%
So again, this is
not just limited

00:03:57.490 --> 00:04:00.130 align:middle line:84%
to Metasploit framework
exploit modules.

00:04:00.130 --> 00:04:04.180 align:middle line:84%
A noninteractive shell can also
be obtained through a Netcat

00:04:04.180 --> 00:04:05.560 align:middle line:90%
reverse shell listener.

00:04:05.560 --> 00:04:09.500 align:middle line:84%
So if you have ever exploited
a Linux system, in some cases,

00:04:09.500 --> 00:04:12.100 align:middle line:84%
you may be provided with
a noninteractive shell.

00:04:12.100 --> 00:04:14.290 align:middle line:84%
And one of the easiest
ways to identify

00:04:14.290 --> 00:04:17.246 align:middle line:84%
that it is noninteractive is
that it doesn't provide you

00:04:17.246 --> 00:04:17.829 align:middle line:90%
with a prompt.

00:04:17.829 --> 00:04:20.769 align:middle line:84%
So you can see that it tells
me the command shell is opened,

00:04:20.769 --> 00:04:23.500 align:middle line:84%
but I really don't know
whether I have access

00:04:23.500 --> 00:04:24.430 align:middle line:90%
to the target system.

00:04:24.430 --> 00:04:25.810 align:middle line:90%
And that's an issue, right?

00:04:25.810 --> 00:04:28.780 align:middle line:84%
However, it is a shell
session-- a very basic one--

00:04:28.780 --> 00:04:32.330 align:middle line:84%
that can be used to perform
very basic tasks and commands.

00:04:32.330 --> 00:04:35.440 align:middle line:90%
So I can say, for example, LS.

00:04:35.440 --> 00:04:36.338 align:middle line:90%
That will work out.

00:04:36.338 --> 00:04:37.630 align:middle line:90%
It's not displaying any output.

00:04:37.630 --> 00:04:41.480 align:middle line:84%
But if I type in PWD,
that works out just fine.

00:04:41.480 --> 00:04:44.680 align:middle line:84%
Now, throughout the
entirety of this course

00:04:44.680 --> 00:04:46.540 align:middle line:84%
till this point,
what I was doing

00:04:46.540 --> 00:04:49.360 align:middle line:84%
is I was saying
bin bash I, right?

00:04:49.360 --> 00:04:52.480 align:middle line:84%
And that would provide me with
an interactive bash session--

00:04:52.480 --> 00:04:56.470 align:middle line:84%
although or albeit without any
job control, which is something

00:04:56.470 --> 00:04:58.460 align:middle line:84%
we'll be exploring
in another course.

00:04:58.460 --> 00:05:02.020 align:middle line:84%
But this is much better than
having a noninteractive shell

00:05:02.020 --> 00:05:05.710 align:middle line:84%
session primarily because it
provides me with a bash session

00:05:05.710 --> 00:05:09.040 align:middle line:84%
here, which is much more stable
than a simple command shell

00:05:09.040 --> 00:05:09.760 align:middle line:90%
session.

00:05:09.760 --> 00:05:12.310 align:middle line:84%
And what I'll do now
is-- let me just exit

00:05:12.310 --> 00:05:14.500 align:middle line:84%
from the bash session,
and I'll take you

00:05:14.500 --> 00:05:15.790 align:middle line:90%
through a few techniques.

00:05:15.790 --> 00:05:18.790 align:middle line:84%
Now, before you start
using any of the techniques

00:05:18.790 --> 00:05:22.180 align:middle line:84%
I'm about to highlight-- or
what I was doing previously

00:05:22.180 --> 00:05:27.070 align:middle line:84%
was typing in bin bash I,
that was without any context.

00:05:27.070 --> 00:05:28.900 align:middle line:84%
And I was doing that
under the assumption

00:05:28.900 --> 00:05:32.570 align:middle line:84%
that bash was installed
on the target system.

00:05:32.570 --> 00:05:35.530 align:middle line:84%
And this is something very
important to actually realize

00:05:35.530 --> 00:05:39.250 align:middle line:84%
is that a Linux system does not
need to have bash installed.

00:05:39.250 --> 00:05:43.630 align:middle line:84%
It could have the Bourne shell,
which has bin SH, installed.

00:05:43.630 --> 00:05:47.050 align:middle line:84%
And in that case, you then
need to modify or switch up

00:05:47.050 --> 00:05:50.630 align:middle line:84%
the technique you use to
obtain an interactive shell.

00:05:50.630 --> 00:05:52.600 align:middle line:84%
So the first thing I
recommend that you do

00:05:52.600 --> 00:05:55.840 align:middle line:84%
is display the list of shells
that is installed on the target

00:05:55.840 --> 00:05:56.560 align:middle line:90%
system.

00:05:56.560 --> 00:06:00.040 align:middle line:84%
That can be done by cutting out
the content of the etc shells

00:06:00.040 --> 00:06:00.550 align:middle line:90%
file.

00:06:00.550 --> 00:06:03.850 align:middle line:84%
In this case, it tells us
that these are the valid login

00:06:03.850 --> 00:06:05.150 align:middle line:90%
shells available.

00:06:05.150 --> 00:06:08.890 align:middle line:84%
So we have the bone shell, we
have dash, bash, and Rbash.

00:06:08.890 --> 00:06:10.930 align:middle line:84%
Now, based on these
options, you can then

00:06:10.930 --> 00:06:14.080 align:middle line:84%
tailor what specific
command to use.

00:06:14.080 --> 00:06:17.590 align:middle line:84%
Now, if bash is installed,
then you can use bin bash I.

00:06:17.590 --> 00:06:22.030 align:middle line:84%
And one additional
really cool trick or tip

00:06:22.030 --> 00:06:24.280 align:middle line:84%
is to identify what
version of Python

00:06:24.280 --> 00:06:27.730 align:middle line:84%
is installed if Python is
installed at all because

00:06:27.730 --> 00:06:30.850 align:middle line:84%
in addition to
typing in bin bash I,

00:06:30.850 --> 00:06:34.100 align:middle line:84%
because the Bourne shell
or bin is installed,

00:06:34.100 --> 00:06:36.550 align:middle line:84%
I can also type in
bin SH I, and that

00:06:36.550 --> 00:06:39.890 align:middle line:84%
will provide me with a simple
Bourne PowerShell session.

00:06:39.890 --> 00:06:42.820 align:middle line:84%
So again, and yes, this
is somewhat interactive,

00:06:42.820 --> 00:06:46.970 align:middle line:84%
but bash is pretty much
what you want in most cases.

00:06:46.970 --> 00:06:48.640 align:middle line:90%
So I'll just hit Exit.

00:06:48.640 --> 00:06:51.830 align:middle line:84%
And as I said, if you
have Python installed,

00:06:51.830 --> 00:06:57.560 align:middle line:84%
then you can also obtain a
bash session or a Bourne shell

00:06:57.560 --> 00:06:58.650 align:middle line:90%
if you want.

00:06:58.650 --> 00:07:00.650 align:middle line:84%
So the quickest
way of identifying

00:07:00.650 --> 00:07:04.950 align:middle line:84%
whether Python is installed is
by typing in Python version.

00:07:04.950 --> 00:07:07.128 align:middle line:84%
And if it is installed,
then what you can do

00:07:07.128 --> 00:07:08.670 align:middle line:84%
is you can run the
following command.

00:07:08.670 --> 00:07:12.380 align:middle line:84%
So you can see Python C.
And then, in single quotes,

00:07:12.380 --> 00:07:14.000 align:middle line:90%
you can type in import PTY--

00:07:14.000 --> 00:07:16.650 align:middle line:90%


00:07:16.650 --> 00:07:17.790 align:middle line:90%
import PTY.

00:07:17.790 --> 00:07:20.580 align:middle line:84%
And this will allow us
to spawn a PTY session.

00:07:20.580 --> 00:07:23.280 align:middle line:90%
So we'll say PTY.spawn.

00:07:23.280 --> 00:07:25.740 align:middle line:84%
And within this,
we can then say--

00:07:25.740 --> 00:07:28.210 align:middle line:84%
or specify the shell that
we would like to execute.

00:07:28.210 --> 00:07:32.610 align:middle line:84%
So I can say bin bash,
and I'll close the quotes

00:07:32.610 --> 00:07:35.760 align:middle line:90%
and the actual brackets there.

00:07:35.760 --> 00:07:38.680 align:middle line:84%
And we can then, again,
close the single quotes.

00:07:38.680 --> 00:07:40.410 align:middle line:90%
So be cognizant of the syntax.

00:07:40.410 --> 00:07:43.590 align:middle line:84%
If I hit Enter, you can
see I also obtain a bash

00:07:43.590 --> 00:07:46.350 align:middle line:90%
session, which is fantastic.

00:07:46.350 --> 00:07:48.120 align:middle line:84%
So as I said, there's
multiple techniques

00:07:48.120 --> 00:07:51.180 align:middle line:84%
that you can use to obtain
an interactive session.

00:07:51.180 --> 00:07:53.160 align:middle line:84%
Now, the reason why
I'm not covering

00:07:53.160 --> 00:07:56.070 align:middle line:84%
how to upgrade a command
shell to a Meterpreter session

00:07:56.070 --> 00:07:57.850 align:middle line:90%
is because it's very simple.

00:07:57.850 --> 00:08:02.310 align:middle line:84%
And this video is directly
targeted towards scenarios

00:08:02.310 --> 00:08:06.100 align:middle line:84%
where you've obtained a command
shell session with Netcat,

00:08:06.100 --> 00:08:06.600 align:middle line:90%
right?

00:08:06.600 --> 00:08:08.520 align:middle line:84%
And in that case,
you can't upgraded

00:08:08.520 --> 00:08:10.890 align:middle line:84%
to Meterpreter directly
unless you generate

00:08:10.890 --> 00:08:14.820 align:middle line:84%
a payload with MSFvenom and
then somehow transfer it

00:08:14.820 --> 00:08:17.700 align:middle line:84%
onto the target system,
execute it, and then receive

00:08:17.700 --> 00:08:18.690 align:middle line:90%
the connection.

00:08:18.690 --> 00:08:22.170 align:middle line:84%
So as I said, it'll
all come down to what

00:08:22.170 --> 00:08:24.570 align:middle line:84%
utilities or shells
you have installed

00:08:24.570 --> 00:08:27.490 align:middle line:84%
in addition to the interpreters
you have installed.

00:08:27.490 --> 00:08:29.860 align:middle line:84%
So if the Python
interpreter is installed,

00:08:29.860 --> 00:08:33.929 align:middle line:84%
then you can use Python to
spawn a bash session in addition

00:08:33.929 --> 00:08:37.890 align:middle line:84%
to a Bourne shell session
or bin SH session.

00:08:37.890 --> 00:08:41.159 align:middle line:84%
And again, if you
have Perl installed--

00:08:41.159 --> 00:08:44.220 align:middle line:90%
so if I type in Perl help--

00:08:44.220 --> 00:08:46.500 align:middle line:84%
if you have Perl installed,
then what you can do

00:08:46.500 --> 00:08:51.660 align:middle line:84%
is I'll just exit, and I
can then say Perl execute,

00:08:51.660 --> 00:08:55.500 align:middle line:84%
and then I can say
exec in single quotes.

00:08:55.500 --> 00:08:58.980 align:middle line:84%
And within that, I can then
specify in double quotes

00:08:58.980 --> 00:09:01.380 align:middle line:90%
that I want to execute bin bash.

00:09:01.380 --> 00:09:03.060 align:middle line:90%
There we are.

00:09:03.060 --> 00:09:06.690 align:middle line:84%
And then I'll add a semicolon
and a single quote and hit

00:09:06.690 --> 00:09:07.650 align:middle line:90%
Enter.

00:09:07.650 --> 00:09:10.020 align:middle line:84%
And if this doesn't
work, then, again, you

00:09:10.020 --> 00:09:11.380 align:middle line:90%
can see that is the case.

00:09:11.380 --> 00:09:13.230 align:middle line:84%
So you can see
we're still within

00:09:13.230 --> 00:09:15.180 align:middle line:90%
our noninteractive shell.

00:09:15.180 --> 00:09:17.910 align:middle line:84%
So again, it all comes
down to what techniques

00:09:17.910 --> 00:09:19.770 align:middle line:90%
you can essentially use.

00:09:19.770 --> 00:09:21.960 align:middle line:84%
Now, if Ruby is
installed, you can also

00:09:21.960 --> 00:09:26.010 align:middle line:84%
say Ruby and then colon exec,
and within single quotes,

00:09:26.010 --> 00:09:28.320 align:middle line:90%
you can say bin bash.

00:09:28.320 --> 00:09:29.310 align:middle line:90%
There we are.

00:09:29.310 --> 00:09:31.590 align:middle line:84%
And you can see
that, in this case,

00:09:31.590 --> 00:09:33.640 align:middle line:84%
it looks like Ruby
is not installed.

00:09:33.640 --> 00:09:36.960 align:middle line:84%
So again, it's all going to
depend on what interpreters

00:09:36.960 --> 00:09:38.280 align:middle line:90%
are installed.

00:09:38.280 --> 00:09:39.907 align:middle line:84%
We can try, once
again, with Perl.

00:09:39.907 --> 00:09:41.490 align:middle line:84%
Let's see if this
will work because we

00:09:41.490 --> 00:09:42.820 align:middle line:90%
know that Perl is installed.

00:09:42.820 --> 00:09:47.190 align:middle line:84%
So I can say Perl exec, and
we can then say bin bash.

00:09:47.190 --> 00:09:55.140 align:middle line:84%
And what I'll do here is I'll
just close the quotes there,

00:09:55.140 --> 00:09:58.210 align:middle line:84%
and I'll just add a
semicolon at the end.

00:09:58.210 --> 00:10:01.500 align:middle line:84%
And it looks like Perl, in
this case, is not installed.

00:10:01.500 --> 00:10:04.860 align:middle line:84%
All right, so you learn
something new every day.

00:10:04.860 --> 00:10:06.960 align:middle line:84%
But again, if
that's not the case

00:10:06.960 --> 00:10:09.050 align:middle line:84%
or if you don't have these
interpreters installed,

00:10:09.050 --> 00:10:13.140 align:middle line:84%
then you can utilize the
actual shell commands.

00:10:13.140 --> 00:10:14.700 align:middle line:84%
So if we have bash
installed, you

00:10:14.700 --> 00:10:19.530 align:middle line:84%
can say bin bash I. You'll
then get a bash session.

00:10:19.530 --> 00:10:22.110 align:middle line:84%
You can also use Python
if Python is installed,

00:10:22.110 --> 00:10:24.480 align:middle line:84%
and there's a plethora
of other interpreters

00:10:24.480 --> 00:10:28.860 align:middle line:84%
that you can use to obtain
an interactive shell.

00:10:28.860 --> 00:10:31.950 align:middle line:84%
Now, one additional thing
that you want to check or do

00:10:31.950 --> 00:10:35.520 align:middle line:84%
after you have obtained
an interactive shell

00:10:35.520 --> 00:10:37.740 align:middle line:84%
is to display the
environment variables.

00:10:37.740 --> 00:10:39.960 align:middle line:90%
That can be done by saying ENV.

00:10:39.960 --> 00:10:43.170 align:middle line:84%
And in this case, you can see
that we have a few issues here.

00:10:43.170 --> 00:10:46.290 align:middle line:84%
For one, the actual path
environment variable

00:10:46.290 --> 00:10:48.690 align:middle line:84%
that is used to specify
the default path that

00:10:48.690 --> 00:10:51.270 align:middle line:84%
will be used to search
for a binary when you type

00:10:51.270 --> 00:10:53.440 align:middle line:90%
in a command is not specified.

00:10:53.440 --> 00:10:55.090 align:middle line:90%
So I recommend setting that up.

00:10:55.090 --> 00:11:00.870 align:middle line:84%
So this-- we can say export path
is equal to user local sbin.

00:11:00.870 --> 00:11:02.700 align:middle line:90%
And then we can say colon.

00:11:02.700 --> 00:11:08.640 align:middle line:84%
And then we can say user
local bin colon user--

00:11:08.640 --> 00:11:12.000 align:middle line:84%
we can say sbin in
this case-- so sbin

00:11:12.000 --> 00:11:15.795 align:middle line:90%
and then colon user bin.

00:11:15.795 --> 00:11:17.420 align:middle line:84%
And I know that this
is a long command,

00:11:17.420 --> 00:11:20.400 align:middle line:84%
but this is something that I
really recommend that you do.

00:11:20.400 --> 00:11:25.490 align:middle line:84%
And then you can say sbin
and bin and hit Enter.

00:11:25.490 --> 00:11:27.680 align:middle line:90%
That's going to export the--

00:11:27.680 --> 00:11:30.260 align:middle line:84%
or is going to set the
path environment variable.

00:11:30.260 --> 00:11:33.690 align:middle line:84%
As you can see, when I type
in ENV, the path is now set.

00:11:33.690 --> 00:11:36.930 align:middle line:84%
I can also set
the term variable.

00:11:36.930 --> 00:11:39.970 align:middle line:84%
So I can say term
is equal to X term.

00:11:39.970 --> 00:11:41.690 align:middle line:90%
There we are.

00:11:41.690 --> 00:11:44.150 align:middle line:84%
And I can then say
export the shell

00:11:44.150 --> 00:11:48.790 align:middle line:84%
or set the shell environment
variable to bash.

00:11:48.790 --> 00:11:49.550 align:middle line:90%
There we go.

00:11:49.550 --> 00:11:54.190 align:middle line:84%
And again, this and just ensures
that the interactive shell

00:11:54.190 --> 00:11:56.560 align:middle line:84%
that you've obtained
is fully functional.

00:11:56.560 --> 00:11:58.930 align:middle line:84%
Although, as I said, it
doesn't have job control.

00:11:58.930 --> 00:12:01.190 align:middle line:84%
But that's something
that we'll be exploring.

00:12:01.190 --> 00:12:04.240 align:middle line:84%
So again, we can now
pretty much perform

00:12:04.240 --> 00:12:06.100 align:middle line:90%
whatever we wanted to do.

00:12:06.100 --> 00:12:10.450 align:middle line:84%
We can check whether specific
utilities are installed.

00:12:10.450 --> 00:12:14.930 align:middle line:84%
So we can essentially
do whatever we want.

00:12:14.930 --> 00:12:18.610 align:middle line:84%
We can execute commands,
so on and so forth.

00:12:18.610 --> 00:12:22.930 align:middle line:84%
One-- again, as I said,
obtaining an interactive shell

00:12:22.930 --> 00:12:23.920 align:middle line:90%
is very important.

00:12:23.920 --> 00:12:25.240 align:middle line:90%
And you'll actually see this.

00:12:25.240 --> 00:12:27.670 align:middle line:84%
If you actually follow
along and try and use

00:12:27.670 --> 00:12:29.732 align:middle line:84%
a noninteractive
shell, you'll find

00:12:29.732 --> 00:12:31.690 align:middle line:84%
that it's very confusing
because you don't know

00:12:31.690 --> 00:12:32.950 align:middle line:90%
what command you just typed.

00:12:32.950 --> 00:12:34.820 align:middle line:84%
You don't know
what's the output.

00:12:34.820 --> 00:12:36.280 align:middle line:90%
Some tools don't work well.

00:12:36.280 --> 00:12:38.020 align:middle line:84%
You can't authenticate
to services

00:12:38.020 --> 00:12:41.110 align:middle line:84%
because it doesn't
display dynamic data

00:12:41.110 --> 00:12:43.270 align:middle line:84%
or it doesn't actually
have the ability

00:12:43.270 --> 00:12:47.020 align:middle line:84%
to emulate other sessions
within a session.

00:12:47.020 --> 00:12:49.780 align:middle line:84%
So, yeah, you can utilize
all the techniques

00:12:49.780 --> 00:12:52.060 align:middle line:84%
that I've highlighted
in this video

00:12:52.060 --> 00:12:54.730 align:middle line:90%
or in this practical section.

00:12:54.730 --> 00:12:56.290 align:middle line:84%
With that being
said, that is going

00:12:56.290 --> 00:12:58.270 align:middle line:84%
to conclude the
practical demonstration

00:12:58.270 --> 00:13:01.080 align:middle line:90%
side of this video.

00:13:01.080 --> 00:13:03.590 align:middle line:84%
All right, so now that we have
explored the process of how

00:13:03.590 --> 00:13:06.260 align:middle line:84%
to perform local
enumeration both manually

00:13:06.260 --> 00:13:09.590 align:middle line:84%
and automatically, as well
as how to transfer files

00:13:09.590 --> 00:13:12.470 align:middle line:84%
onto target systems in
addition to upgrading

00:13:12.470 --> 00:13:14.630 align:middle line:84%
noninteractive
shells, we can now

00:13:14.630 --> 00:13:17.690 align:middle line:84%
move on to the Windows
privilege escalation

00:13:17.690 --> 00:13:19.530 align:middle line:90%
section of this course.

00:13:19.530 --> 00:13:23.380 align:middle line:84%
So I'll be seeing you
in the next video.

00:13:23.380 --> 00:13:24.000 align:middle line:90%