WEBVTT

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


00:00:09.610 --> 00:00:10.110 align:middle line:90%
All right.

00:00:10.110 --> 00:00:14.070 align:middle line:84%
So now that we've explored
the frequently exploited Linux

00:00:14.070 --> 00:00:17.200 align:middle line:84%
services and we've taken a look
at how they can be exploited,

00:00:17.200 --> 00:00:20.010 align:middle line:84%
we can now move on to the next
section within this course.

00:00:20.010 --> 00:00:23.460 align:middle line:84%
And that is the Linux
privilege escalation section,

00:00:23.460 --> 00:00:27.180 align:middle line:84%
where we will be exploring some
of the inherent vulnerabilities

00:00:27.180 --> 00:00:29.700 align:middle line:84%
that can be exploited
on a Linux system

00:00:29.700 --> 00:00:32.310 align:middle line:84%
in order to elevate
your privileges.

00:00:32.310 --> 00:00:34.650 align:middle line:84%
All right, so we're going to
start off with Linux kernel

00:00:34.650 --> 00:00:37.270 align:middle line:84%
exploits, and we have already
explored Windows kernel

00:00:37.270 --> 00:00:37.770 align:middle line:90%
exploits.

00:00:37.770 --> 00:00:40.440 align:middle line:84%
And really, the process
is fairly similar,

00:00:40.440 --> 00:00:43.330 align:middle line:84%
and I'm going to be walking
you through that right now.

00:00:43.330 --> 00:00:45.570 align:middle line:84%
So again, I've
already explained what

00:00:45.570 --> 00:00:49.590 align:middle line:84%
a kernel is during the Windows
privilege escalation section.

00:00:49.590 --> 00:00:51.870 align:middle line:84%
In regards to Linux
kernel exploitation,

00:00:51.870 --> 00:00:54.540 align:middle line:84%
it's very important to
understand what's going on.

00:00:54.540 --> 00:00:57.720 align:middle line:84%
So kernel exploits on
Linux will typically

00:00:57.720 --> 00:01:01.020 align:middle line:84%
target vulnerabilities in
or within the Linux kernel

00:01:01.020 --> 00:01:03.900 align:middle line:84%
in order to execute
arbitrary code in order

00:01:03.900 --> 00:01:07.290 align:middle line:84%
to run privilege system commands
or to obtain a system shell.

00:01:07.290 --> 00:01:11.040 align:middle line:84%
So we're essentially trying
to identify a vulnerability

00:01:11.040 --> 00:01:13.470 align:middle line:84%
within the actual
Linux kernel that's

00:01:13.470 --> 00:01:17.100 align:middle line:84%
running on the Linux target
or the actual Linux server

00:01:17.100 --> 00:01:18.480 align:middle line:90%
or Linux system.

00:01:18.480 --> 00:01:21.480 align:middle line:84%
And of course, this particular
kernel vulnerability

00:01:21.480 --> 00:01:23.430 align:middle line:84%
has to, again,
provide an attacker

00:01:23.430 --> 00:01:25.380 align:middle line:84%
or to provide us
with the ability

00:01:25.380 --> 00:01:27.125 align:middle line:90%
to execute arbitrary code.

00:01:27.125 --> 00:01:28.500 align:middle line:84%
And of course,
this code is going

00:01:28.500 --> 00:01:31.200 align:middle line:84%
to be executed with
elevated privileges.

00:01:31.200 --> 00:01:33.720 align:middle line:84%
Now, it's very important
to understand or to note

00:01:33.720 --> 00:01:36.120 align:middle line:84%
that this process will
differ based on the kernel

00:01:36.120 --> 00:01:39.090 align:middle line:84%
version and the
distribution being targeted

00:01:39.090 --> 00:01:40.960 align:middle line:84%
and the kernel
exploit being used.

00:01:40.960 --> 00:01:43.950 align:middle line:84%
So on Windows, it's
fairly straightforward

00:01:43.950 --> 00:01:47.100 align:middle line:84%
because you have specific
versions of-- or editions

00:01:47.100 --> 00:01:51.210 align:middle line:84%
of Windows ranging from Windows
7 to Windows 10 and even older.

00:01:51.210 --> 00:01:55.050 align:middle line:84%
And then each of these operating
systems or versions of Windows

00:01:55.050 --> 00:01:57.300 align:middle line:90%
have a specific build versions.

00:01:57.300 --> 00:02:00.330 align:middle line:84%
And based on that
information, we

00:02:00.330 --> 00:02:03.330 align:middle line:84%
utilized a tool called the
Windows Exploit Suggester that

00:02:03.330 --> 00:02:06.960 align:middle line:84%
essentially checked the current
state of the Windows operating

00:02:06.960 --> 00:02:10.139 align:middle line:84%
system that's being
targeted and actually took

00:02:10.139 --> 00:02:13.140 align:middle line:84%
a look at the hotfixes that
were installed and used

00:02:13.140 --> 00:02:16.500 align:middle line:84%
that information to
determine what this system is

00:02:16.500 --> 00:02:19.320 align:middle line:84%
vulnerable to in regards
to kernel exploits.

00:02:19.320 --> 00:02:22.680 align:middle line:84%
Now, the privilege escalation
process on Linux systems

00:02:22.680 --> 00:02:25.470 align:middle line:84%
will typically follow the
following methodology.

00:02:25.470 --> 00:02:27.840 align:middle line:84%
So we'll start
off by identifying

00:02:27.840 --> 00:02:29.020 align:middle line:90%
kernel vulnerabilities.

00:02:29.020 --> 00:02:30.930 align:middle line:84%
And this will be
facilitated through the use

00:02:30.930 --> 00:02:35.490 align:middle line:84%
of an automated script called
the Linux Exploit Suggester.

00:02:35.490 --> 00:02:39.070 align:middle line:84%
And once we have identified
a kernel exploit that, again,

00:02:39.070 --> 00:02:42.570 align:middle line:84%
will work on the specific
kernel version and distribution

00:02:42.570 --> 00:02:45.330 align:middle line:84%
release version that is
running on our target,

00:02:45.330 --> 00:02:48.570 align:middle line:84%
we can then download the
exploit code, which is typically

00:02:48.570 --> 00:02:51.658 align:middle line:84%
going to be in C. And we
will also need to compile it.

00:02:51.658 --> 00:02:53.700 align:middle line:84%
So I'll take you through
the compilation process.

00:02:53.700 --> 00:02:56.550 align:middle line:84%
And then we need to transfer
it over to the target system

00:02:56.550 --> 00:03:00.180 align:middle line:84%
and execute it with whatever
arguments or parameters

00:03:00.180 --> 00:03:02.340 align:middle line:90%
you need to specify.

00:03:02.340 --> 00:03:02.840 align:middle line:90%
All right.

00:03:02.840 --> 00:03:06.410 align:middle line:84%
So as I said, the tools and the
environment that we'll be using

00:03:06.410 --> 00:03:10.370 align:middle line:84%
will essentially revolve around
the Linux Exploit Suggester.

00:03:10.370 --> 00:03:13.550 align:middle line:84%
So the Linux Exploit Suggester
is very, very, very similar

00:03:13.550 --> 00:03:15.680 align:middle line:84%
to the Windows Exploit
Suggester and is

00:03:15.680 --> 00:03:18.950 align:middle line:84%
designed to assist in
detecting security deficiencies

00:03:18.950 --> 00:03:21.860 align:middle line:84%
for given Linux kernel
and Linux-based systems

00:03:21.860 --> 00:03:22.940 align:middle line:90%
or machines.

00:03:22.940 --> 00:03:26.540 align:middle line:84%
It assesses, using heuristic
methods, the exposure

00:03:26.540 --> 00:03:28.610 align:middle line:90%
of the given kernel on very--

00:03:28.610 --> 00:03:31.340 align:middle line:84%
on every publicly known
Linux kernel exploit.

00:03:31.340 --> 00:03:33.500 align:middle line:84%
So you can check out
this particular tool.

00:03:33.500 --> 00:03:37.860 align:middle line:84%
The GitHub repository is linked
below or within the slides.

00:03:37.860 --> 00:03:40.130 align:middle line:84%
And again, one thing
to note is that I'm

00:03:40.130 --> 00:03:42.920 align:middle line:84%
going to be performing these
techniques within my own home

00:03:42.920 --> 00:03:45.530 align:middle line:84%
lab given the nature
of kernel exploits,

00:03:45.530 --> 00:03:49.940 align:middle line:84%
and they're being performed
on an Ubuntu 12.04 VM.

00:03:49.940 --> 00:03:52.280 align:middle line:84%
All right, so one
thing that I need

00:03:52.280 --> 00:03:55.730 align:middle line:84%
to caution you on as I did
within the Windows video

00:03:55.730 --> 00:03:58.220 align:middle line:84%
is that kernel
exploits are targeting

00:03:58.220 --> 00:04:01.610 align:middle line:84%
the actual kernel, which is the
core of the operating system.

00:04:01.610 --> 00:04:05.120 align:middle line:84%
And as a result, if you run any
kernel exploits that are not

00:04:05.120 --> 00:04:08.150 align:middle line:84%
compatible with the specific
version or the specific kernel

00:04:08.150 --> 00:04:10.370 align:middle line:84%
version running on
the target, then you

00:04:10.370 --> 00:04:13.670 align:middle line:84%
can cause crashes
or kernel panics

00:04:13.670 --> 00:04:14.970 align:middle line:90%
which can lead to data loss.

00:04:14.970 --> 00:04:18.500 align:middle line:84%
So again, be very careful with
the types of kernel exploits

00:04:18.500 --> 00:04:21.740 align:middle line:84%
you run, especially in a
production or enterprise

00:04:21.740 --> 00:04:23.750 align:middle line:84%
environment because
this is something

00:04:23.750 --> 00:04:25.370 align:middle line:84%
that you want to
avoid happening.

00:04:25.370 --> 00:04:26.990 align:middle line:84%
You never want to
be in a position

00:04:26.990 --> 00:04:29.360 align:middle line:84%
where you have actually
caused data loss

00:04:29.360 --> 00:04:31.610 align:middle line:90%
by running a kernel exploit.

00:04:31.610 --> 00:04:34.730 align:middle line:84%
So be very careful
with kernel exploits.

00:04:34.730 --> 00:04:36.540 align:middle line:84%
With that out of
the way, as I said,

00:04:36.540 --> 00:04:39.690 align:middle line:84%
this video doesn't have a lab
environment attached to it.

00:04:39.690 --> 00:04:41.540 align:middle line:84%
You can follow along
with the techniques.

00:04:41.540 --> 00:04:43.310 align:middle line:84%
Essentially what I'm
trying to demonstrate

00:04:43.310 --> 00:04:46.070 align:middle line:84%
here is the actual
methodology and the tools

00:04:46.070 --> 00:04:50.210 align:middle line:84%
behind the methodology, so from
identifying kernel exploits

00:04:50.210 --> 00:04:54.170 align:middle line:84%
or kernel vulnerabilities to
compiling kernel exploit code

00:04:54.170 --> 00:04:56.360 align:middle line:84%
and then transferring
it over to the target.

00:04:56.360 --> 00:04:57.950 align:middle line:84%
So again, it really
doesn't matter

00:04:57.950 --> 00:05:00.740 align:middle line:84%
what exploit is being
used as long as you

00:05:00.740 --> 00:05:04.610 align:middle line:84%
understand the methodology and
the tools behind the process.

00:05:04.610 --> 00:05:08.780 align:middle line:84%
All right, so I'll see you
within my Kali Linux VM.

00:05:08.780 --> 00:05:09.280 align:middle line:90%
All right.

00:05:09.280 --> 00:05:11.650 align:middle line:84%
So I'm back within
my Kali Linux VM.

00:05:11.650 --> 00:05:13.930 align:middle line:84%
And I've already obtained
a meterpreter session

00:05:13.930 --> 00:05:14.560 align:middle line:90%
on the target.

00:05:14.560 --> 00:05:17.950 align:middle line:84%
So let's perform some
local enumeration.

00:05:17.950 --> 00:05:21.550 align:middle line:84%
So if I type in sysinfo, you'll
see that the target is running

00:05:21.550 --> 00:05:27.640 align:middle line:84%
Ubuntu 12.04, and the Linux
kernel is 3.2.0-23-generic.

00:05:27.640 --> 00:05:31.840 align:middle line:84%
It is a 64-bit operating system,
and our meterpreter session

00:05:31.840 --> 00:05:35.110 align:middle line:84%
is a 32-bit meterpreter session,
which really doesn't matter

00:05:35.110 --> 00:05:37.030 align:middle line:90%
in this particular context.

00:05:37.030 --> 00:05:39.075 align:middle line:84%
Well, you might be
asking yourself, well,

00:05:39.075 --> 00:05:40.450 align:middle line:84%
what are your
current privileges?

00:05:40.450 --> 00:05:42.340 align:middle line:90%
Well, I can say get user ID.

00:05:42.340 --> 00:05:44.650 align:middle line:84%
And you can see I'm
currently logged on

00:05:44.650 --> 00:05:46.870 align:middle line:84%
or I currently have access
to the target system

00:05:46.870 --> 00:05:50.870 align:middle line:84%
with the privileges associated
with the user account www-data.

00:05:50.870 --> 00:05:53.050 align:middle line:84%
So this is a service account
that you'll typically

00:05:53.050 --> 00:05:55.840 align:middle line:84%
find on Linux systems
that have a web server

00:05:55.840 --> 00:05:57.580 align:middle line:84%
or that are hosting
a web server.

00:05:57.580 --> 00:06:00.280 align:middle line:84%
And this is a service account
because it's essentially used

00:06:00.280 --> 00:06:04.360 align:middle line:84%
to manage the actual web server,
whether it be Apache or NGINX.

00:06:04.360 --> 00:06:08.020 align:middle line:84%
And it is, generally
speaking, unprivileged given

00:06:08.020 --> 00:06:11.320 align:middle line:84%
the fact that if you exploit
the web application or the web

00:06:11.320 --> 00:06:15.160 align:middle line:84%
server, then this account
is essentially there

00:06:15.160 --> 00:06:16.000 align:middle line:90%
as a safeguard.

00:06:16.000 --> 00:06:19.690 align:middle line:84%
And as a result, it is not
part of the pseudo group or any

00:06:19.690 --> 00:06:25.160 align:middle line:84%
administrative group on the
Linux system and cannot execute

00:06:25.160 --> 00:06:27.490 align:middle line:84%
any commands that
require root privileges.

00:06:27.490 --> 00:06:31.240 align:middle line:84%
So I can verify this by
opening up a shell session,

00:06:31.240 --> 00:06:35.260 align:middle line:84%
and I'll obtain a bash session
here, so I'll say /bin/bash -i.

00:06:35.260 --> 00:06:37.600 align:middle line:84%
And again, if I
list all the groups

00:06:37.600 --> 00:06:40.300 align:middle line:84%
that www-data is
a part of, you can

00:06:40.300 --> 00:06:42.550 align:middle line:84%
see that it's only a
part of its own group.

00:06:42.550 --> 00:06:44.862 align:middle line:90%
And you can list out the users.

00:06:44.862 --> 00:06:46.570 align:middle line:84%
So I'll list all the
users on the system.

00:06:46.570 --> 00:06:47.240 align:middle line:90%
There we are.

00:06:47.240 --> 00:06:49.480 align:middle line:84%
So you can see that we
have a few user accounts.

00:06:49.480 --> 00:06:50.950 align:middle line:90%
We have the root user account.

00:06:50.950 --> 00:06:52.720 align:middle line:84%
We have a user
account called sumo,

00:06:52.720 --> 00:06:55.030 align:middle line:84%
and then we have the service
account right over here.

00:06:55.030 --> 00:06:56.950 align:middle line:90%
So that's www-data.

00:06:56.950 --> 00:06:59.000 align:middle line:84%
All right, and that is
an unprivileged account.

00:06:59.000 --> 00:07:02.740 align:middle line:84%
So if we try and say
sudo apt-get update--

00:07:02.740 --> 00:07:05.210 align:middle line:84%
if we try and update
our repositories--

00:07:05.210 --> 00:07:06.670 align:middle line:90%
you can see that we are--

00:07:06.670 --> 00:07:08.410 align:middle line:84%
it's going to ask
us for a password.

00:07:08.410 --> 00:07:10.780 align:middle line:84%
But because this is
a service account,

00:07:10.780 --> 00:07:12.670 align:middle line:84%
it's going to tell us
right over there no tty

00:07:12.670 --> 00:07:15.550 align:middle line:84%
present and no askpass
program specified.

00:07:15.550 --> 00:07:17.275 align:middle line:84%
What that really
means is that we

00:07:17.275 --> 00:07:18.980 align:middle line:90%
need to elevate our privileges.

00:07:18.980 --> 00:07:21.040 align:middle line:84%
And we are targeting
the root account

00:07:21.040 --> 00:07:24.970 align:middle line:84%
as that is the account with the
highest privileges on a Linux

00:07:24.970 --> 00:07:25.730 align:middle line:90%
system.

00:07:25.730 --> 00:07:27.340 align:middle line:90%
So this is our target.

00:07:27.340 --> 00:07:30.610 align:middle line:84%
All right, and the way we're
going to obtain a root access

00:07:30.610 --> 00:07:33.700 align:middle line:84%
is through the use of a kernel
vulnerability or a kernel

00:07:33.700 --> 00:07:34.450 align:middle line:90%
exploit.

00:07:34.450 --> 00:07:35.950 align:middle line:84%
So what I'm going
to do is I'm just

00:07:35.950 --> 00:07:38.290 align:middle line:84%
going to terminate this
particular channel.

00:07:38.290 --> 00:07:39.903 align:middle line:84%
And I'll just clear
up my terminal.

00:07:39.903 --> 00:07:42.070 align:middle line:84%
So as I said, the script
we're going to be utilizing

00:07:42.070 --> 00:07:44.860 align:middle line:84%
is a script called the
Linux Exploit Suggester,

00:07:44.860 --> 00:07:47.440 align:middle line:84%
and the GitHub repository
is highlighted or added

00:07:47.440 --> 00:07:48.130 align:middle line:90%
in the slides.

00:07:48.130 --> 00:07:50.680 align:middle line:84%
And it's really very simple
in regards to using it.

00:07:50.680 --> 00:07:52.480 align:middle line:90%
You can see it's a shell script.

00:07:52.480 --> 00:07:55.930 align:middle line:84%
And all you need to do is just
utilize the Quick Download

00:07:55.930 --> 00:07:59.680 align:middle line:84%
option here, so wget,
and it'll save it

00:07:59.680 --> 00:08:03.760 align:middle line:84%
as a script called les.sh, as
you can see right over there.

00:08:03.760 --> 00:08:07.610 align:middle line:84%
All right, so that stands for
linux-exploit-suggester.shell.

00:08:07.610 --> 00:08:11.080 align:middle line:84%
So I would recommend downloading
this onto your Kali Linux

00:08:11.080 --> 00:08:13.570 align:middle line:84%
system or your penetration
testing distribution

00:08:13.570 --> 00:08:16.690 align:middle line:84%
and then transferring it
over to the target system.

00:08:16.690 --> 00:08:19.030 align:middle line:84%
In this case, because we
have a meterpreter session,

00:08:19.030 --> 00:08:21.855 align:middle line:84%
we can easily transfer it
over to the target system.

00:08:21.855 --> 00:08:23.230 align:middle line:84%
What I'm going to
do is I'm going

00:08:23.230 --> 00:08:25.150 align:middle line:84%
to navigate to
the Temp directory

00:08:25.150 --> 00:08:26.800 align:middle line:90%
within the Linux file system.

00:08:26.800 --> 00:08:29.710 align:middle line:84%
The Temp directory is very
similar to the Temp directory

00:08:29.710 --> 00:08:30.820 align:middle line:90%
on Windows.

00:08:30.820 --> 00:08:33.669 align:middle line:84%
It's essentially a directory
that stores temporary files.

00:08:33.669 --> 00:08:35.980 align:middle line:84%
If I list all the contents
of this directory,

00:08:35.980 --> 00:08:39.159 align:middle line:84%
you can see that we just
have a random file there.

00:08:39.159 --> 00:08:43.549 align:middle line:84%
That's really not pertinent to
the actual kernel exploitation.

00:08:43.549 --> 00:08:46.810 align:middle line:84%
So I've already download the
Linux Exploit Suggester script.

00:08:46.810 --> 00:08:50.830 align:middle line:84%
So I'll just upload it, and
I'll specify where it's stored.

00:08:50.830 --> 00:08:52.780 align:middle line:84%
In my case, it's
stored on my desktop

00:08:52.780 --> 00:08:56.000 align:middle line:90%
under Linux-Enum and les.sh.

00:08:56.000 --> 00:08:57.010 align:middle line:90%
So I'll upload it.

00:08:57.010 --> 00:08:59.230 align:middle line:90%
That is uploaded successfully.

00:08:59.230 --> 00:09:01.390 align:middle line:84%
And I'll open up a
shell session now

00:09:01.390 --> 00:09:03.040 align:middle line:84%
because I want to
execute the script.

00:09:03.040 --> 00:09:04.915 align:middle line:90%
So I'll say /bin/bash -i.

00:09:04.915 --> 00:09:08.393 align:middle line:84%
I'll then provide the script
with executable permissions.

00:09:08.393 --> 00:09:09.560 align:middle line:90%
We can see it right of here.

00:09:09.560 --> 00:09:13.150 align:middle line:84%
In order to do that, I'm
going to say chmod +x,

00:09:13.150 --> 00:09:15.730 align:middle line:84%
so I'm providing this file
with executable permissions,

00:09:15.730 --> 00:09:17.500 align:middle line:90%
and then les.sh.

00:09:17.500 --> 00:09:18.190 align:middle line:90%
There we are.

00:09:18.190 --> 00:09:20.707 align:middle line:84%
If I now lists of the
contents of this directory,

00:09:20.707 --> 00:09:22.540 align:middle line:84%
you can take a look at
the permissions here.

00:09:22.540 --> 00:09:25.180 align:middle line:84%
You can see that we have
the ability to execute it.

00:09:25.180 --> 00:09:31.140 align:middle line:84%
So we can execute it by saying
les.sh, and I'll hit Enter.

00:09:31.140 --> 00:09:33.088 align:middle line:84%
And you want to give
this a couple of seconds.

00:09:33.088 --> 00:09:33.630 align:middle line:90%
There we are.

00:09:33.630 --> 00:09:36.960 align:middle line:84%
So it's enumerated a
list of vulnerabilities

00:09:36.960 --> 00:09:40.020 align:middle line:84%
that essentially or
rather a list of exploits

00:09:40.020 --> 00:09:43.050 align:middle line:84%
that this particular
version of Ubuntu

00:09:43.050 --> 00:09:46.590 align:middle line:84%
or this specific version--
the specific kernel version

00:09:46.590 --> 00:09:48.240 align:middle line:90%
is vulnerable to.

00:09:48.240 --> 00:09:50.550 align:middle line:84%
Right now, you can
see right over here

00:09:50.550 --> 00:09:53.070 align:middle line:84%
that it will display really
important information

00:09:53.070 --> 00:09:56.760 align:middle line:84%
like the kernel version, the
architecture, the distribution,

00:09:56.760 --> 00:09:58.390 align:middle line:84%
and then the
distribution version.

00:09:58.390 --> 00:10:01.860 align:middle line:84%
So in terms of kernel
exploitation on Linux,

00:10:01.860 --> 00:10:05.040 align:middle line:84%
this is really the most
important piece of information,

00:10:05.040 --> 00:10:07.290 align:middle line:84%
or really these are the
most important pieces

00:10:07.290 --> 00:10:09.000 align:middle line:90%
of information.

00:10:09.000 --> 00:10:11.910 align:middle line:84%
And you can see it's going to
search among 76 kernel space

00:10:11.910 --> 00:10:14.880 align:middle line:84%
exploits and 48
user space exploits.

00:10:14.880 --> 00:10:17.010 align:middle line:84%
Don't worry if it gives
you the actual write error

00:10:17.010 --> 00:10:19.800 align:middle line:84%
broken pipe, or rather
the broken pipe error

00:10:19.800 --> 00:10:20.880 align:middle line:90%
right over here.

00:10:20.880 --> 00:10:23.220 align:middle line:84%
So getting started,
you can see that we

00:10:23.220 --> 00:10:26.100 align:middle line:84%
have a list of exploits
or vulnerabilities

00:10:26.100 --> 00:10:29.250 align:middle line:84%
and their respective
CVE identifiers.

00:10:29.250 --> 00:10:33.000 align:middle line:84%
And the way this script
works is the exploits listed

00:10:33.000 --> 00:10:35.340 align:middle line:84%
at the very top are the ones
with the highest chances

00:10:35.340 --> 00:10:36.280 align:middle line:90%
of success.

00:10:36.280 --> 00:10:39.220 align:middle line:84%
However, you need to take a look
at the information listed here.

00:10:39.220 --> 00:10:42.510 align:middle line:84%
So firstly, for a particular
vulnerability or exploit--

00:10:42.510 --> 00:10:44.500 align:middle line:84%
in this case, we have
the dirtycow exploit,

00:10:44.500 --> 00:10:46.708 align:middle line:84%
which is exactly what we're
going to be taking a look

00:10:46.708 --> 00:10:49.350 align:middle line:84%
at-- it will provide you
with details regarding this

00:10:49.350 --> 00:10:53.250 align:middle line:84%
vulnerability, the exposure of
your system to this or rather

00:10:53.250 --> 00:10:55.710 align:middle line:84%
the exposure of the target
system to this particular

00:10:55.710 --> 00:10:57.360 align:middle line:90%
vulnerability or exploit--

00:10:57.360 --> 00:11:00.000 align:middle line:84%
in this case, you can see
it as highly probable--

00:11:00.000 --> 00:11:01.150 align:middle line:90%
and then the tags.

00:11:01.150 --> 00:11:02.260 align:middle line:90%
This is very important.

00:11:02.260 --> 00:11:04.770 align:middle line:84%
So the tags essentially give
you information regarding

00:11:04.770 --> 00:11:07.440 align:middle line:84%
what distribution release
version and kernel

00:11:07.440 --> 00:11:11.610 align:middle line:84%
version this particular
exploit is essentially

00:11:11.610 --> 00:11:16.200 align:middle line:84%
or this particular vulnerability
can be exploited on.

00:11:16.200 --> 00:11:19.560 align:middle line:84%
So, for example, you can
see it says right over here

00:11:19.560 --> 00:11:23.340 align:middle line:84%
Debian 7, 8 Red Hat Enterprise
Linux version 5 and then

00:11:23.340 --> 00:11:26.820 align:middle line:84%
specifies the kernel that
this exploit will work on.

00:11:26.820 --> 00:11:28.440 align:middle line:84%
In our case, you
can see that it's

00:11:28.440 --> 00:11:30.300 align:middle line:84%
highlighted in yellow
right over here

00:11:30.300 --> 00:11:35.610 align:middle line:84%
that Ubuntu 16.04,
14.04, and 12.04 are all

00:11:35.610 --> 00:11:37.860 align:middle line:84%
vulnerable to the
dirtycow exploit.

00:11:37.860 --> 00:11:40.703 align:middle line:84%
And that is the most important
piece of information.

00:11:40.703 --> 00:11:42.870 align:middle line:84%
The other great thing that
it also provides you with

00:11:42.870 --> 00:11:45.360 align:middle line:84%
is the download URL
for the exploit code,

00:11:45.360 --> 00:11:48.600 align:middle line:84%
which is an Exploit-DB
link, which is trustworthy.

00:11:48.600 --> 00:11:50.940 align:middle line:84%
However, I recommend going
through the exploit code

00:11:50.940 --> 00:11:52.980 align:middle line:84%
yourself manually and
verifying that it's not

00:11:52.980 --> 00:11:57.850 align:middle line:84%
doing anything malicious other
than what it is intended to do.

00:11:57.850 --> 00:11:59.650 align:middle line:84%
And again, in this
case, we are going

00:11:59.650 --> 00:12:01.510 align:middle line:84%
to be utilizing
the dirtycow ex--

00:12:01.510 --> 00:12:03.230 align:middle line:90%
the dirtycow 2 exploit.

00:12:03.230 --> 00:12:05.680 align:middle line:84%
So again, you can get
information regarding

00:12:05.680 --> 00:12:06.730 align:middle line:90%
the vulnerability here.

00:12:06.730 --> 00:12:09.610 align:middle line:84%
And we can see that it works on
the current version of Ubuntu

00:12:09.610 --> 00:12:13.840 align:middle line:84%
that is running on the target
as well as the actual kernel.

00:12:13.840 --> 00:12:17.410 align:middle line:84%
So what we can do is if we
take a look at the download URL

00:12:17.410 --> 00:12:20.380 align:middle line:84%
here, that's the Exploit-DB
link which I'll just open up

00:12:20.380 --> 00:12:22.150 align:middle line:90%
within my Firefox browser.

00:12:22.150 --> 00:12:24.320 align:middle line:84%
You can see I have
it right over here.

00:12:24.320 --> 00:12:28.960 align:middle line:84%
So this is the Linux Kernel
version 2.6.22 or any Linux

00:12:28.960 --> 00:12:32.530 align:middle line:90%
Kernel less than 3.9.

00:12:32.530 --> 00:12:34.870 align:middle line:84%
The name of the vulnerability
is called Dirty COW,

00:12:34.870 --> 00:12:37.330 align:middle line:84%
and the way it works
is fairly simple.

00:12:37.330 --> 00:12:41.410 align:middle line:84%
Let me just open the actual
disclosure site or a reference

00:12:41.410 --> 00:12:43.210 align:middle line:84%
to this particular
vulnerability.

00:12:43.210 --> 00:12:45.640 align:middle line:84%
You can see that the
Dirty COW exploit

00:12:45.640 --> 00:12:48.640 align:middle line:84%
is a privilege escalation
vulnerability in the Linux

00:12:48.640 --> 00:12:49.420 align:middle line:90%
Kernel.

00:12:49.420 --> 00:12:51.610 align:middle line:84%
And you can view the
details regarding

00:12:51.610 --> 00:12:53.060 align:middle line:90%
this particular vulnerability.

00:12:53.060 --> 00:12:54.280 align:middle line:90%
So there we are.

00:12:54.280 --> 00:12:58.240 align:middle line:84%
A race condition was found in
the way the Linux Kernel memory

00:12:58.240 --> 00:13:02.770 align:middle line:84%
subsystem handled the
copy-on-write breakage

00:13:02.770 --> 00:13:05.710 align:middle line:84%
of private read-only
memory mappings.

00:13:05.710 --> 00:13:08.590 align:middle line:84%
All the information we have so
far is included in this page.

00:13:08.590 --> 00:13:11.080 align:middle line:84%
So impact-- an
unprivileged local user

00:13:11.080 --> 00:13:13.600 align:middle line:84%
could use this flaw
to gain write access

00:13:13.600 --> 00:13:16.090 align:middle line:84%
to otherwise read-only
memory mappings

00:13:16.090 --> 00:13:18.880 align:middle line:84%
and thus increase their
privileges on the system.

00:13:18.880 --> 00:13:22.240 align:middle line:84%
And the exploit code
here is quite ingenious

00:13:22.240 --> 00:13:25.750 align:middle line:84%
because it essentially
utilizes that vulnerability

00:13:25.750 --> 00:13:28.780 align:middle line:84%
and allows you to create
a privileged user account.

00:13:28.780 --> 00:13:30.700 align:middle line:84%
And the default user
account that it actually

00:13:30.700 --> 00:13:33.250 align:middle line:90%
specifies is called firefart.

00:13:33.250 --> 00:13:34.940 align:middle line:90%
So what it does is--

00:13:34.940 --> 00:13:38.320 align:middle line:84%
again, all you need to do is
just compile this exploit code.

00:13:38.320 --> 00:13:39.820 align:middle line:84%
Once it's compiled,
you'll then be

00:13:39.820 --> 00:13:42.160 align:middle line:84%
provided with the exploit
binary, which you can then

00:13:42.160 --> 00:13:44.440 align:middle line:90%
transfer over to the target.

00:13:44.440 --> 00:13:46.660 align:middle line:84%
And then you can run
the newly created binary

00:13:46.660 --> 00:13:47.710 align:middle line:90%
by either doing--

00:13:47.710 --> 00:13:50.800 align:middle line:84%
by the running dirty or
running the dirty command

00:13:50.800 --> 00:13:53.560 align:middle line:84%
and specifying a password
for the user firefart.

00:13:53.560 --> 00:13:58.090 align:middle line:84%
Now, you can actually
customize the actual username

00:13:58.090 --> 00:14:01.390 align:middle line:84%
and change it from firefart to
anything else that you'd like.

00:14:01.390 --> 00:14:03.437 align:middle line:84%
And again, this is
fairly simple to run.

00:14:03.437 --> 00:14:05.020 align:middle line:84%
So what we're going
to do is I'm going

00:14:05.020 --> 00:14:08.198 align:middle line:84%
to download this exploit
code from Exploit-DB.

00:14:08.198 --> 00:14:08.740 align:middle line:90%
There we are.

00:14:08.740 --> 00:14:10.840 align:middle line:84%
I'll just click on
the Download link,

00:14:10.840 --> 00:14:13.330 align:middle line:84%
and I'm just going to give
Exploit-DB a couple of seconds

00:14:13.330 --> 00:14:15.055 align:middle line:90%
because it usually has a delay.

00:14:15.055 --> 00:14:21.600 align:middle line:90%


00:14:21.600 --> 00:14:24.420 align:middle line:84%
All right, so it's prompting
me to download the C code

00:14:24.420 --> 00:14:27.720 align:middle line:84%
or the C exploit code which is
written in the C programming

00:14:27.720 --> 00:14:28.780 align:middle line:90%
language.

00:14:28.780 --> 00:14:29.880 align:middle line:90%
So I'll just hit OK.

00:14:29.880 --> 00:14:33.000 align:middle line:84%
That's going to save it
within my Download directory.

00:14:33.000 --> 00:14:36.540 align:middle line:84%
Now, in terms of compilation
of the actual exploit,

00:14:36.540 --> 00:14:40.570 align:middle line:84%
there are a few things or a few
techniques that can be used.

00:14:40.570 --> 00:14:42.600 align:middle line:84%
The first technique is
to compile it locally

00:14:42.600 --> 00:14:44.730 align:middle line:84%
on your Kali Linux or
penetration testing

00:14:44.730 --> 00:14:46.350 align:middle line:90%
distribution.

00:14:46.350 --> 00:14:48.930 align:middle line:84%
Or you can transfer it
over to the target system

00:14:48.930 --> 00:14:50.765 align:middle line:90%
and compile it on that system.

00:14:50.765 --> 00:14:54.090 align:middle line:84%
Now, in order to
compile C code on Linux,

00:14:54.090 --> 00:14:57.060 align:middle line:84%
you will need the GCC
package, which is the GNU C

00:14:57.060 --> 00:14:58.770 align:middle line:90%
compiler, installed.

00:14:58.770 --> 00:15:02.040 align:middle line:84%
And you can install that fairly
simply on your Kali Linux

00:15:02.040 --> 00:15:04.620 align:middle line:90%
system by opening up a new tab.

00:15:04.620 --> 00:15:10.410 align:middle line:84%
And you can simply say
sudo apt-get install gcc,

00:15:10.410 --> 00:15:13.468 align:middle line:84%
and I'll just paste
in my password here.

00:15:13.468 --> 00:15:15.010 align:middle line:84%
And I should have
the latest version.

00:15:15.010 --> 00:15:17.152 align:middle line:84%
In this case, it looks
like I have a few updates.

00:15:17.152 --> 00:15:19.360 align:middle line:84%
I'm going to skip those
updates because the version I

00:15:19.360 --> 00:15:21.980 align:middle line:84%
have running right
now is quite stable.

00:15:21.980 --> 00:15:24.520 align:middle line:84%
So now that we've downloaded
the exploit code--

00:15:24.520 --> 00:15:26.590 align:middle line:84%
it's currently within
my Downloads directory.

00:15:26.590 --> 00:15:29.500 align:middle line:84%
So I'll just navigate to that
Downloads directory there,

00:15:29.500 --> 00:15:34.120 align:middle line:84%
and I have the Windows exploit
executable here or privilege

00:15:34.120 --> 00:15:35.630 align:middle line:90%
escalation kernel exploits.

00:15:35.630 --> 00:15:37.180 align:middle line:90%
So I'll just remove that.

00:15:37.180 --> 00:15:39.520 align:middle line:84%
And if we follow the
compilation instructions,

00:15:39.520 --> 00:15:42.850 align:middle line:84%
we need to use GCC
and then pthread,

00:15:42.850 --> 00:15:46.600 align:middle line:84%
specify the actual name
of the exploit file, which

00:15:46.600 --> 00:15:48.550 align:middle line:90%
is, in this case, dirty.c.

00:15:48.550 --> 00:15:50.110 align:middle line:90%
So we can actually rename that.

00:15:50.110 --> 00:15:52.008 align:middle line:90%
I don't need to rename it.

00:15:52.008 --> 00:15:54.050 align:middle line:84%
However, in this case,
it'll make a lot of sense.

00:15:54.050 --> 00:15:55.690 align:middle line:84%
So I'll rename
this into dirty.c.

00:15:55.690 --> 00:15:58.480 align:middle line:90%


00:15:58.480 --> 00:16:02.530 align:middle line:84%
Sorry, that is, we need
to move it, not remove.

00:16:02.530 --> 00:16:04.900 align:middle line:90%
So I'm just going to say move.

00:16:04.900 --> 00:16:06.340 align:middle line:90%
Let me type that in correctly.

00:16:06.340 --> 00:16:09.370 align:middle line:84%
For some reason, I
can't type in correctly.

00:16:09.370 --> 00:16:10.240 align:middle line:90%
Did we delete it?

00:16:10.240 --> 00:16:10.740 align:middle line:90%
Yeah.

00:16:10.740 --> 00:16:12.310 align:middle line:84%
So I'll need to
download it again.

00:16:12.310 --> 00:16:14.018 align:middle line:84%
So I'll just download
the exploit again.

00:16:14.018 --> 00:16:14.560 align:middle line:90%
There we are.

00:16:14.560 --> 00:16:17.020 align:middle line:84%
Save file and I'll just
move it or rename it.

00:16:17.020 --> 00:16:24.730 align:middle line:84%
So there we are, and I'll
call it dirty.c, or-- yeah,

00:16:24.730 --> 00:16:26.260 align:middle line:90%
we can just call it dirty.c.

00:16:26.260 --> 00:16:27.020 align:middle line:90%
There we are.

00:16:27.020 --> 00:16:30.700 align:middle line:84%
And we can now run the
actual GCC command here.

00:16:30.700 --> 00:16:32.690 align:middle line:90%
We can just copy directly.

00:16:32.690 --> 00:16:36.310 align:middle line:84%
And again, in some
cases, the Linux kernel

00:16:36.310 --> 00:16:39.130 align:middle line:84%
exploit code will not have
compilation instructions.

00:16:39.130 --> 00:16:42.200 align:middle line:84%
So you might have
to research that.

00:16:42.200 --> 00:16:43.870 align:middle line:90%
So I'll just paste this in here.

00:16:43.870 --> 00:16:45.040 align:middle line:90%
We'll hit Enter.

00:16:45.040 --> 00:16:47.230 align:middle line:84%
And we get no error
messages, which

00:16:47.230 --> 00:16:50.020 align:middle line:84%
tells us that the dirty
binary has been compiled.

00:16:50.020 --> 00:16:51.430 align:middle line:90%
That's the one there.

00:16:51.430 --> 00:16:54.160 align:middle line:84%
And we can now transfer this
over to the target system,

00:16:54.160 --> 00:16:55.610 align:middle line:90%
and let's see whether it works.

00:16:55.610 --> 00:16:57.068 align:middle line:84%
If it doesn't work,
then we'll need

00:16:57.068 --> 00:16:59.930 align:middle line:84%
to compile the C code
on the target system.

00:16:59.930 --> 00:17:05.349 align:middle line:84%
So I'll just terminate this
channel and head back over

00:17:05.349 --> 00:17:06.579 align:middle line:90%
into my meterpreter.

00:17:06.579 --> 00:17:09.940 align:middle line:84%
And I'll upload the actual
binary, the compiled binary.

00:17:09.940 --> 00:17:12.760 align:middle line:84%
So I'll say, this is under
my Downloads directory,

00:17:12.760 --> 00:17:16.928 align:middle line:84%
and I want to download
the dirty binary there.

00:17:16.928 --> 00:17:17.470 align:middle line:90%
There we are.

00:17:17.470 --> 00:17:18.520 align:middle line:90%
So that's downloaded.

00:17:18.520 --> 00:17:21.550 align:middle line:84%
So what I can do is
open up a shell session,

00:17:21.550 --> 00:17:26.339 align:middle line:84%
and I'll say /bin/bash
-i to get a bash session.

00:17:26.339 --> 00:17:28.830 align:middle line:84%
And I can then provide it
with executable permissions.

00:17:28.830 --> 00:17:33.970 align:middle line:84%
So we'll say chmod +x dirty,
and then we can execute it,

00:17:33.970 --> 00:17:35.280 align:middle line:90%
so dirty.

00:17:35.280 --> 00:17:39.480 align:middle line:84%
And we can provide a password as
specified within the actual run

00:17:39.480 --> 00:17:40.270 align:middle line:90%
command here.

00:17:40.270 --> 00:17:42.640 align:middle line:84%
So we can say
dirty new-password.

00:17:42.640 --> 00:17:46.860 align:middle line:84%
So I can say, for example,
password123, hit Enter,

00:17:46.860 --> 00:17:48.970 align:middle line:84%
and you can see we
get a few errors here.

00:17:48.970 --> 00:17:52.110 align:middle line:84%
So this is because the
exploit code was not

00:17:52.110 --> 00:17:53.980 align:middle line:90%
compiled on this system.

00:17:53.980 --> 00:17:55.830 align:middle line:84%
So what we'll need
to do is I'm just

00:17:55.830 --> 00:17:58.140 align:middle line:84%
going to remove the
dirty binary here.

00:17:58.140 --> 00:18:00.810 align:middle line:84%
And I'll head back over
into my meterpreter session,

00:18:00.810 --> 00:18:02.940 align:middle line:90%
and I'll upload the C code.

00:18:02.940 --> 00:18:06.990 align:middle line:84%
So that's on the Downloads,
and that is dirty.c.

00:18:06.990 --> 00:18:10.410 align:middle line:84%
I'll upload that to the target,
open up a shell session there.

00:18:10.410 --> 00:18:14.940 align:middle line:90%


00:18:14.940 --> 00:18:18.360 align:middle line:84%
And I can now compile it
using the same instructions,

00:18:18.360 --> 00:18:22.300 align:middle line:84%
so again, gcc, and I'll
paste that in there.

00:18:22.300 --> 00:18:23.140 align:middle line:90%
Hit Enter.

00:18:23.140 --> 00:18:24.890 align:middle line:90%
That compiled successfully.

00:18:24.890 --> 00:18:28.555 align:middle line:90%
So chmod +x, and we say dirty.

00:18:28.555 --> 00:18:31.610 align:middle line:90%


00:18:31.610 --> 00:18:32.430 align:middle line:90%
There we are.

00:18:32.430 --> 00:18:35.670 align:middle line:84%
And we can then execute
the dirty binary

00:18:35.670 --> 00:18:38.550 align:middle line:84%
and specify the
password, so password123.

00:18:38.550 --> 00:18:39.825 align:middle line:90%
Hit Enter.

00:18:39.825 --> 00:18:41.700 align:middle line:84%
And we want to give this
a couple of seconds.

00:18:41.700 --> 00:18:44.310 align:middle line:84%
If successful, it
should actually give you

00:18:44.310 --> 00:18:46.055 align:middle line:90%
a message that highlights that.

00:18:46.055 --> 00:18:48.180 align:middle line:84%
So I'm just going to give
this a couple of seconds.

00:18:48.180 --> 00:18:50.580 align:middle line:90%


00:18:50.580 --> 00:18:51.080 align:middle line:90%
All right.

00:18:51.080 --> 00:18:54.710 align:middle line:84%
So after a couple of seconds,
you can see right over here,

00:18:54.710 --> 00:18:57.650 align:middle line:84%
if we take a look
at the output, it'll

00:18:57.650 --> 00:18:59.280 align:middle line:90%
tell us that was successful.

00:18:59.280 --> 00:19:00.870 align:middle line:90%
So there we are.

00:19:00.870 --> 00:19:03.260 align:middle line:84%
So you can see /etc/passwd
successfully backed up

00:19:03.260 --> 00:19:04.580 align:middle line:90%
to /tmp/passwd.bak.

00:19:04.580 --> 00:19:08.670 align:middle line:84%
So it'll actually take a backup
of the original password file.

00:19:08.670 --> 00:19:11.390 align:middle line:84%
It'll say please enter
new password, password123,

00:19:11.390 --> 00:19:12.110 align:middle line:90%
which we entered.

00:19:12.110 --> 00:19:14.480 align:middle line:84%
And it created
the firefart user,

00:19:14.480 --> 00:19:17.700 align:middle line:84%
and it provides us with the
actual user information.

00:19:17.700 --> 00:19:18.720 align:middle line:90%
There we go.

00:19:18.720 --> 00:19:21.140 align:middle line:84%
And you can see right over
here, it tells us done.

00:19:21.140 --> 00:19:23.630 align:middle line:84%
Check the /etc/passwd file
to see if the new user was

00:19:23.630 --> 00:19:24.470 align:middle line:90%
created.

00:19:24.470 --> 00:19:26.960 align:middle line:84%
And then you can log in
with the username firefart

00:19:26.960 --> 00:19:29.840 align:middle line:90%
and the password password123.

00:19:29.840 --> 00:19:32.630 align:middle line:84%
So what I'm going to do
is display the contents

00:19:32.630 --> 00:19:35.680 align:middle line:90%
of the password file here.

00:19:35.680 --> 00:19:36.680 align:middle line:90%
And there we are.

00:19:36.680 --> 00:19:38.950 align:middle line:84%
We can see the firefart
user was created,

00:19:38.950 --> 00:19:41.540 align:middle line:90%
and this is a privileged user.

00:19:41.540 --> 00:19:45.520 align:middle line:84%
So what this means is that we
can essentially log into it,

00:19:45.520 --> 00:19:47.680 align:middle line:84%
and we will have
root privileges.

00:19:47.680 --> 00:19:53.830 align:middle line:84%
So we can say switch
user or su and firefat.

00:19:53.830 --> 00:19:56.310 align:middle line:90%
There we are.

00:19:56.310 --> 00:19:59.130 align:middle line:84%
And you can see it's telling
us must be run from terminal.

00:19:59.130 --> 00:20:03.030 align:middle line:84%
Now, this particular target
is actually running SSH,

00:20:03.030 --> 00:20:05.850 align:middle line:84%
so I can actually
log in with SSH.

00:20:05.850 --> 00:20:07.660 align:middle line:84%
So I'm just going to
open up a new tab.

00:20:07.660 --> 00:20:13.660 align:middle line:84%
So I'll say ssh firefart@ the
target IP, which, in this case,

00:20:13.660 --> 00:20:16.096 align:middle line:90%
is 10.10.10.15.

00:20:16.096 --> 00:20:16.820 align:middle line:90%
There we are.

00:20:16.820 --> 00:20:20.840 align:middle line:84%
So it looks like we
have a few issues here.

00:20:20.840 --> 00:20:22.940 align:middle line:84%
So it's telling us it's
possible that someone

00:20:22.940 --> 00:20:24.320 align:middle line:90%
is doing something nasty.

00:20:24.320 --> 00:20:28.520 align:middle line:84%
So let's actually remove
the actual key, the RSA key,

00:20:28.520 --> 00:20:31.948 align:middle line:84%
that's currently within
my known hosts file.

00:20:31.948 --> 00:20:32.490 align:middle line:90%
There we are.

00:20:32.490 --> 00:20:34.250 align:middle line:84%
That's not a problem
with the target.

00:20:34.250 --> 00:20:34.820 align:middle line:90%
There we are.

00:20:34.820 --> 00:20:36.237 align:middle line:84%
So it's going to
ask us whether we

00:20:36.237 --> 00:20:38.000 align:middle line:90%
want to accept the fingerprint.

00:20:38.000 --> 00:20:40.670 align:middle line:84%
And the password
was password123.

00:20:40.670 --> 00:20:44.030 align:middle line:84%
Hit Enter, and we log
in as the user firefart,

00:20:44.030 --> 00:20:46.400 align:middle line:84%
and I can now run
administrative commands.

00:20:46.400 --> 00:20:49.340 align:middle line:84%
So I can say sudo
apt-get update.

00:20:49.340 --> 00:20:54.830 align:middle line:84%
There we go, and it's saying
the unknown user root, so unable

00:20:54.830 --> 00:20:56.630 align:middle line:90%
to initialize the policy plugin.

00:20:56.630 --> 00:20:59.660 align:middle line:90%
So we can say apt-get update.

00:20:59.660 --> 00:21:04.380 align:middle line:84%
There we are, and that works out
just fine as we can see there.

00:21:04.380 --> 00:21:07.140 align:middle line:84%
And of course, don't worry
about the errors associated

00:21:07.140 --> 00:21:10.275 align:middle line:84%
with the actual
repositories there but

00:21:10.275 --> 00:21:13.500 align:middle line:84%
the objective or
rather the highlight

00:21:13.500 --> 00:21:16.600 align:middle line:84%
being that we have obtained
administrative privileges.

00:21:16.600 --> 00:21:18.420 align:middle line:90%
So again, I can say who am I?

00:21:18.420 --> 00:21:20.470 align:middle line:90%
As you can see, firefart there.

00:21:20.470 --> 00:21:23.580 align:middle line:84%
And if we try and
list out a file that

00:21:23.580 --> 00:21:26.760 align:middle line:84%
is only accessible by
root users or users

00:21:26.760 --> 00:21:29.310 align:middle line:84%
with root privileges
like the shadow file,

00:21:29.310 --> 00:21:30.990 align:middle line:84%
you can see I can
access it here.

00:21:30.990 --> 00:21:34.200 align:middle line:84%
And we'll be exploring the
shadow file within the Linux

00:21:34.200 --> 00:21:35.650 align:middle line:90%
credential dumping section.

00:21:35.650 --> 00:21:39.120 align:middle line:84%
So this contains the hashed
passwords, the hashed Linux

00:21:39.120 --> 00:21:40.410 align:middle line:90%
user account passwords.

00:21:40.410 --> 00:21:44.130 align:middle line:84%
And this, as I said, this file
is only accessible by users

00:21:44.130 --> 00:21:45.180 align:middle line:90%
with root privileges.

00:21:45.180 --> 00:21:49.920 align:middle line:84%
So that is how to elevate your
privileges on a Linux system

00:21:49.920 --> 00:21:52.560 align:middle line:84%
through the use of
a kernel exploit.

00:21:52.560 --> 00:21:55.230 align:middle line:84%
And as I said, this
particular video

00:21:55.230 --> 00:21:57.390 align:middle line:84%
is really not about
this particular system

00:21:57.390 --> 00:21:59.880 align:middle line:84%
or the exploit
that we just used.

00:21:59.880 --> 00:22:02.880 align:middle line:84%
I primarily wanted to highlight
the process of utilizing

00:22:02.880 --> 00:22:06.750 align:middle line:84%
the Linux Exploit Suggester
to identify potential kernel

00:22:06.750 --> 00:22:09.540 align:middle line:84%
exploits that you can use
and then how to identify

00:22:09.540 --> 00:22:13.350 align:middle line:84%
the correct kernel exploit code
to use and how to compile it,

00:22:13.350 --> 00:22:15.420 align:middle line:84%
how to transfer it
over to the target,

00:22:15.420 --> 00:22:18.060 align:middle line:84%
how to deal with specific
issues that you might face

00:22:18.060 --> 00:22:21.150 align:middle line:84%
during compilation of the
exploit code, and then,

00:22:21.150 --> 00:22:24.655 align:middle line:84%
of course, executing it,
which was fairly simple.

00:22:24.655 --> 00:22:26.280 align:middle line:84%
All right, so that
is going to conclude

00:22:26.280 --> 00:22:30.590 align:middle line:84%
the practical demonstration
side of this video.

00:22:30.590 --> 00:22:31.120 align:middle line:90%
All right.

00:22:31.120 --> 00:22:33.280 align:middle line:84%
In the next video,
we will be exploring

00:22:33.280 --> 00:22:35.470 align:middle line:84%
the process of
elevating our privileges

00:22:35.470 --> 00:22:40.160 align:middle line:84%
by exploiting misconfigured
or insecure Cron jobs.

00:22:40.160 --> 00:22:43.740 align:middle line:84%
So I'll see you
in the next video.

00:22:43.740 --> 00:22:45.000 align:middle line:90%