WEBVTT

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


00:00:03.374 --> 00:00:05.302 align:middle line:90%
[ELECTRONIC NOISES]

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


00:00:10.140 --> 00:00:13.570 align:middle line:84%
Dumping hashes with
Mimikatz-- in this video,

00:00:13.570 --> 00:00:17.160 align:middle line:84%
we will be exploring the process
of dumping both NDLM hashes

00:00:17.160 --> 00:00:20.880 align:middle line:84%
as well as clear-text passwords
with Mimikatz on a Windows

00:00:20.880 --> 00:00:22.020 align:middle line:90%
system.

00:00:22.020 --> 00:00:25.170 align:middle line:84%
So first and foremost,
what is Mimikatz?

00:00:25.170 --> 00:00:28.710 align:middle line:84%
Mimikatz is a Windows
post-exploitation tool that was

00:00:28.710 --> 00:00:32.430 align:middle line:84%
developed by Benjamin Delpy,
and it allows for the extraction

00:00:32.430 --> 00:00:35.760 align:middle line:84%
of plaintext credentials from
memory as well as password

00:00:35.760 --> 00:00:38.670 align:middle line:84%
hashes from the
local SAM database--

00:00:38.670 --> 00:00:41.860 align:middle line:84%
or rather, the SAM
databases-- and much more.

00:00:41.860 --> 00:00:44.520 align:middle line:84%
Now, what is SAM because we
are going to be interacting

00:00:44.520 --> 00:00:46.390 align:middle line:90%
with SAM quite a bit here?

00:00:46.390 --> 00:00:49.590 align:middle line:84%
So SAM stands for the
Security Account Manager.

00:00:49.590 --> 00:00:51.540 align:middle line:84%
And the SAM database
is essentially

00:00:51.540 --> 00:00:53.820 align:middle line:84%
a database file
on Windows systems

00:00:53.820 --> 00:00:56.070 align:middle line:84%
that stores users'
passwords and can

00:00:56.070 --> 00:00:59.530 align:middle line:84%
be used to authenticate users
both locally and remotely.

00:00:59.530 --> 00:01:03.720 align:middle line:84%
So we can either utilize the
prebuilt Mimikatz executable

00:01:03.720 --> 00:01:05.580 align:middle line:84%
that we can transfer
over to the target

00:01:05.580 --> 00:01:07.480 align:middle line:90%
and then execute manually.

00:01:07.480 --> 00:01:10.650 align:middle line:84%
However, or alternatively,
if we have access

00:01:10.650 --> 00:01:12.750 align:middle line:84%
to a Meterpreter session
on a Windows target,

00:01:12.750 --> 00:01:16.290 align:middle line:84%
we can essentially utilize the
inbuilt Meterpreter extension

00:01:16.290 --> 00:01:17.610 align:middle line:90%
called Kiwi.

00:01:17.610 --> 00:01:21.090 align:middle line:84%
So Kiwi is essentially just
a Meterpreter extension

00:01:21.090 --> 00:01:23.610 align:middle line:84%
that allows us to,
again, execute Mimikatz

00:01:23.610 --> 00:01:27.240 align:middle line:84%
from within memory as opposed
to utilizing the actual Mimikatz

00:01:27.240 --> 00:01:28.410 align:middle line:90%
executable.

00:01:28.410 --> 00:01:31.590 align:middle line:84%
So Kiwi allows us to
dynamically execute Mimikatz

00:01:31.590 --> 00:01:33.790 align:middle line:84%
on the target system
without touching the disk.

00:01:33.790 --> 00:01:37.200 align:middle line:84%
So Kiwi is a
fantastic extension.

00:01:37.200 --> 00:01:41.580 align:middle line:84%
Similar to Incognito, everything
can be done really simply.

00:01:41.580 --> 00:01:44.760 align:middle line:84%
And you don't have to go through
the process of transferring

00:01:44.760 --> 00:01:47.010 align:middle line:90%
over the Mimikatz executable.

00:01:47.010 --> 00:01:50.430 align:middle line:84%
And then, of course, that
also comes with its own risk,

00:01:50.430 --> 00:01:53.040 align:middle line:84%
and the risks associated
with transferring

00:01:53.040 --> 00:01:56.310 align:middle line:84%
exploit code or executables
onto the target system

00:01:56.310 --> 00:01:59.040 align:middle line:84%
are that you need to take
into consideration things

00:01:59.040 --> 00:02:00.900 align:middle line:90%
like antivirus detection.

00:02:00.900 --> 00:02:03.420 align:middle line:84%
You may also--
the actual exploit

00:02:03.420 --> 00:02:04.800 align:middle line:90%
files may actually be found.

00:02:04.800 --> 00:02:06.870 align:middle line:84%
So, again, it's always
good to do things

00:02:06.870 --> 00:02:08.470 align:middle line:90%
dynamically and in memory.

00:02:08.470 --> 00:02:11.670 align:middle line:84%
So let's take a look at
how this can be done.

00:02:11.670 --> 00:02:15.000 align:middle line:84%
And all you need to do is just
fire up your lab environment,

00:02:15.000 --> 00:02:16.540 align:middle line:90%
and we can get started.

00:02:16.540 --> 00:02:20.760 align:middle line:84%
So I'll see you within
the lab environment.

00:02:20.760 --> 00:02:23.130 align:middle line:84%
So I'm back within
the lab environment,

00:02:23.130 --> 00:02:25.140 align:middle line:84%
and we have the
target IP already

00:02:25.140 --> 00:02:27.870 align:middle line:90%
provided for us, which is great.

00:02:27.870 --> 00:02:30.060 align:middle line:84%
You'll also probably
notice that you

00:02:30.060 --> 00:02:32.430 align:middle line:84%
have another tab at
the top here that

00:02:32.430 --> 00:02:35.550 align:middle line:84%
allows you to essentially
engage or interact

00:02:35.550 --> 00:02:37.330 align:middle line:90%
with the target machine.

00:02:37.330 --> 00:02:39.690 align:middle line:84%
So if we click on
that, as you can see,

00:02:39.690 --> 00:02:42.870 align:middle line:84%
this will essentially
provide you with access

00:02:42.870 --> 00:02:44.440 align:middle line:90%
to the Windows system.

00:02:44.440 --> 00:02:46.530 align:middle line:84%
So, again, if I
just minimize that,

00:02:46.530 --> 00:02:48.570 align:middle line:84%
you can see that we
currently have access

00:02:48.570 --> 00:02:49.650 align:middle line:90%
to the Windows target.

00:02:49.650 --> 00:02:52.320 align:middle line:84%
And you have the
ability to start up

00:02:52.320 --> 00:02:55.530 align:middle line:84%
the actual vulnerable service
that we will be exploiting

00:02:55.530 --> 00:02:57.130 align:middle line:90%
in order to gain access.

00:02:57.130 --> 00:03:00.630 align:middle line:84%
So, again, you can always
utilize the target machine

00:03:00.630 --> 00:03:03.910 align:middle line:84%
or access to the target machine
if you ever have any issues.

00:03:03.910 --> 00:03:05.850 align:middle line:84%
So let's switch back to
the attacker machine.

00:03:05.850 --> 00:03:08.910 align:middle line:84%
I'm just going to copy the
target IP address here.

00:03:08.910 --> 00:03:13.590 align:middle line:84%
And I will open up my terminal,
and let me just maximize that.

00:03:13.590 --> 00:03:16.920 align:middle line:84%
And we can also zoom in, so
you can see what's going on.

00:03:16.920 --> 00:03:18.220 align:middle line:90%
There we are, fantastic.

00:03:18.220 --> 00:03:20.520 align:middle line:84%
So the first thing we
want to do is, of course,

00:03:20.520 --> 00:03:23.860 align:middle line:84%
start up the PostgreSQL
Database Service, as well as

00:03:23.860 --> 00:03:26.380 align:middle line:84%
MSF console, so we can
save a bit of time.

00:03:26.380 --> 00:03:28.800 align:middle line:84%
So I'm just going
to say msfconsole.

00:03:28.800 --> 00:03:29.980 align:middle line:90%
There we are.

00:03:29.980 --> 00:03:32.010 align:middle line:84%
That's going to start
the PostgreSQL database

00:03:32.010 --> 00:03:34.860 align:middle line:84%
server so that we can interact
with the Metasploit framework

00:03:34.860 --> 00:03:35.730 align:middle line:90%
database.

00:03:35.730 --> 00:03:39.140 align:middle line:84%
And it's then going to
start up MSF console.

00:03:39.140 --> 00:03:41.270 align:middle line:84%
Fantastic, MSF
console is started up,

00:03:41.270 --> 00:03:43.280 align:middle line:90%
and we can create a workspace.

00:03:43.280 --> 00:03:45.620 align:middle line:84%
And in this case, I'm just
going to call this Mimikatz

00:03:45.620 --> 00:03:49.040 align:middle line:84%
because that's the tool
we will be utilizing.

00:03:49.040 --> 00:03:51.170 align:middle line:84%
And I'm going to set
up the global variable

00:03:51.170 --> 00:03:53.540 align:middle line:84%
for the rhosts option
to the target IP

00:03:53.540 --> 00:03:58.640 align:middle line:84%
so that we don't need to
keep on typing the target IP

00:03:58.640 --> 00:04:02.750 align:middle line:84%
or specifying the target IP
whenever we load a module.

00:04:02.750 --> 00:04:04.190 align:middle line:84%
Now that that is
done, we actually

00:04:04.190 --> 00:04:07.550 align:middle line:84%
need to exploit the vulnerable
service or the target system

00:04:07.550 --> 00:04:08.970 align:middle line:90%
in order to gain access.

00:04:08.970 --> 00:04:12.140 align:middle line:84%
So we're going to perform an
Nmap scan using the db_nmap

00:04:12.140 --> 00:04:14.660 align:middle line:84%
command, which will allow
us to perform an Nmap

00:04:14.660 --> 00:04:17.720 align:middle line:84%
scan from within the
Metasploit framework console

00:04:17.720 --> 00:04:20.480 align:middle line:84%
and consequently save the
results into the Metasploit

00:04:20.480 --> 00:04:23.190 align:middle line:84%
framework database within
our current workspace.

00:04:23.190 --> 00:04:26.310 align:middle line:84%
So I'll just perform a quick
service version detection scan.

00:04:26.310 --> 00:04:28.910 align:middle line:84%
I'll paste in the target
IP, and we'll give this

00:04:28.910 --> 00:04:32.720 align:middle line:90%
a few seconds to a few minutes.

00:04:32.720 --> 00:04:35.030 align:middle line:84%
As we can see from
the Nmap scan results,

00:04:35.030 --> 00:04:38.010 align:middle line:84%
we have a web server
running on the target.

00:04:38.010 --> 00:04:40.790 align:middle line:84%
We also know that the
target is running Windows,

00:04:40.790 --> 00:04:44.720 align:middle line:84%
most likely a version of
Windows Server or probably

00:04:44.720 --> 00:04:45.620 align:middle line:90%
Windows 7 or 10.

00:04:45.620 --> 00:04:49.430 align:middle line:84%
We're really not sure, but
probably Windows 10 and later.

00:04:49.430 --> 00:04:53.060 align:middle line:84%
And we have a web server
running here on port 80.

00:04:53.060 --> 00:04:57.680 align:middle line:84%
The web server is
BadBlue httpd 2.7.

00:04:57.680 --> 00:04:59.150 align:middle line:90%
So we can actually verify that.

00:04:59.150 --> 00:05:01.408 align:middle line:90%
Let's open this up here.

00:05:01.408 --> 00:05:03.200 align:middle line:84%
I'm just going to open
up the browser here.

00:05:03.200 --> 00:05:06.110 align:middle line:84%
And let's see whether we
can actually access BadBlue

00:05:06.110 --> 00:05:07.500 align:middle line:90%
through our website browser.

00:05:07.500 --> 00:05:12.100 align:middle line:90%
So I'll just copy the target IP.

00:05:12.100 --> 00:05:12.730 align:middle line:90%
There we are.

00:05:12.730 --> 00:05:15.790 align:middle line:84%
And I'll open up
Mozilla Firefox here.

00:05:15.790 --> 00:05:17.230 align:middle line:90%
And we'll paste in the IP.

00:05:17.230 --> 00:05:19.300 align:middle line:84%
And as you can see,
BadBlue is currently

00:05:19.300 --> 00:05:20.260 align:middle line:90%
running on the target.

00:05:20.260 --> 00:05:22.570 align:middle line:84%
And this is the
Enterprise Edition.

00:05:22.570 --> 00:05:25.600 align:middle line:84%
So you want to pay close
attention to the actual edition

00:05:25.600 --> 00:05:27.920 align:middle line:84%
here as it will
actually come in handy.

00:05:27.920 --> 00:05:31.420 align:middle line:90%


00:05:31.420 --> 00:05:34.000 align:middle line:84%
That's the actual service
we will be exploiting.

00:05:34.000 --> 00:05:38.740 align:middle line:84%
Now, BadBlue version 2.7 is
vulnerable to a buffer overflow

00:05:38.740 --> 00:05:39.240 align:middle line:90%
attack.

00:05:39.240 --> 00:05:45.210 align:middle line:84%
So if we run a search
for BadBlue 2.7,

00:05:45.210 --> 00:05:48.220 align:middle line:84%
we'll get the actual exploit
module that we can use here.

00:05:48.220 --> 00:05:52.710 align:middle line:84%
So this is the BadBlue 2.72b
PassThru Buffer Overflow,

00:05:52.710 --> 00:05:55.290 align:middle line:84%
and we can use that
particular exploit module.

00:05:55.290 --> 00:05:56.740 align:middle line:90%
So I'm going to copy it there.

00:05:56.740 --> 00:06:00.660 align:middle line:84%
And I'm going to say
use, paste that in there.

00:06:00.660 --> 00:06:01.410 align:middle line:90%
There we are.

00:06:01.410 --> 00:06:04.980 align:middle line:84%
And the default payload
that it is utilizing

00:06:04.980 --> 00:06:08.170 align:middle line:84%
is the 32-bit Meterpreter
payload, which is fine.

00:06:08.170 --> 00:06:10.860 align:middle line:84%
So I'm going to
say show options.

00:06:10.860 --> 00:06:14.220 align:middle line:84%
We have the ability to
actually specify the target IP.

00:06:14.220 --> 00:06:17.640 align:middle line:84%
But that's done for us
automatically because we set up

00:06:17.640 --> 00:06:20.280 align:middle line:84%
the global variable
value for rhosts.

00:06:20.280 --> 00:06:21.570 align:middle line:90%
rport is fine.

00:06:21.570 --> 00:06:24.765 align:middle line:84%
We know that the web
server is not running SSL.

00:06:24.765 --> 00:06:28.170 align:middle line:84%
Well, it actually looks
like, but there isn't an SSL

00:06:28.170 --> 00:06:30.030 align:middle line:90%
or a valid SSL certificate.

00:06:30.030 --> 00:06:33.580 align:middle line:84%
And furthermore, the port has
been configured to port 80.

00:06:33.580 --> 00:06:37.200 align:middle line:84%
So we'll leave the
SSL option as false.

00:06:37.200 --> 00:06:39.690 align:middle line:90%
We then have the payload option.

00:06:39.690 --> 00:06:41.980 align:middle line:84%
So we can specify
the lhost option.

00:06:41.980 --> 00:06:45.720 align:middle line:84%
And this is going to be our
current IP address, which again

00:06:45.720 --> 00:06:47.700 align:middle line:90%
is automatically added for us.

00:06:47.700 --> 00:06:49.780 align:middle line:84%
And then we have
the lport option,

00:06:49.780 --> 00:06:52.770 align:middle line:90%
which we'll leave to port 4444.

00:06:52.770 --> 00:06:55.590 align:middle line:84%
So the next thing that
we need to specify

00:06:55.590 --> 00:06:57.930 align:middle line:84%
is the actual exploit
target, and that

00:06:57.930 --> 00:07:01.410 align:middle line:84%
is going to be in reference to
the actual version of BadBlue

00:07:01.410 --> 00:07:03.280 align:middle line:90%
that we're targeting.

00:07:03.280 --> 00:07:07.290 align:middle line:84%
So if we take a look
at the actual web page

00:07:07.290 --> 00:07:09.690 align:middle line:84%
here that's been
provided to us, we

00:07:09.690 --> 00:07:12.370 align:middle line:84%
don't get any version
information here.

00:07:12.370 --> 00:07:15.870 align:middle line:84%
So if we actually take a look at
the set target option and what

00:07:15.870 --> 00:07:20.400 align:middle line:84%
options we can specify, you can
see that we can specify BadBlue

00:07:20.400 --> 00:07:26.950 align:middle line:84%
2.72b Universal or BadBlue
Enterprise Edition 2.7,

00:07:26.950 --> 00:07:28.920 align:middle line:84%
which is exactly
what we want to do.

00:07:28.920 --> 00:07:30.750 align:middle line:84%
So we want to set
it to-- we're going

00:07:30.750 --> 00:07:36.550 align:middle line:84%
to set the target to BadBlue
Enterprise Edition 2.7

00:07:36.550 --> 00:07:37.690 align:middle line:90%
Universal.

00:07:37.690 --> 00:07:40.150 align:middle line:84%
And then we're just
going to type in exploit.

00:07:40.150 --> 00:07:41.770 align:middle line:84%
So we'll give that
a few seconds.

00:07:41.770 --> 00:07:43.660 align:middle line:84%
And it looks like
it sends the stage,

00:07:43.660 --> 00:07:46.360 align:middle line:90%
and we get a Meterpreter.

00:07:46.360 --> 00:07:50.750 align:middle line:84%
So we've now obtained initial
access to the target system.

00:07:50.750 --> 00:07:53.110 align:middle line:84%
So I'm just going to
clear out the terminal.

00:07:53.110 --> 00:07:57.310 align:middle line:84%
And we can, again, perform
some local system enumeration

00:07:57.310 --> 00:07:59.680 align:middle line:90%
by typing in sysinfo.

00:07:59.680 --> 00:08:03.350 align:middle line:84%
And we get the actual target
operating system version.

00:08:03.350 --> 00:08:06.340 align:middle line:84%
In this case, it's
Windows Server 2016.

00:08:06.340 --> 00:08:08.650 align:middle line:84%
The actual
architecture is 64-bit,

00:08:08.650 --> 00:08:14.180 align:middle line:84%
but our Meterpreter payload
that we're using is 32-bit.

00:08:14.180 --> 00:08:17.620 align:middle line:84%
So that will probably be
our next order of process

00:08:17.620 --> 00:08:20.480 align:middle line:84%
or the next order of
business, if you will.

00:08:20.480 --> 00:08:23.530 align:middle line:84%
So let me list out the
processes that we can actually

00:08:23.530 --> 00:08:24.280 align:middle line:90%
migrate to.

00:08:24.280 --> 00:08:27.070 align:middle line:84%
Before we do that,
if we type in getuid,

00:08:27.070 --> 00:08:30.400 align:middle line:84%
you can see that we have
access via the administrator

00:08:30.400 --> 00:08:32.830 align:middle line:84%
account, which pretty much
means that our privileges are

00:08:32.830 --> 00:08:33.669 align:middle line:90%
elevated.

00:08:33.669 --> 00:08:36.610 align:middle line:84%
And in order to dump
hashes or credentials,

00:08:36.610 --> 00:08:38.320 align:middle line:90%
you need elevated privileges.

00:08:38.320 --> 00:08:41.020 align:middle line:84%
That that's why we covered
the privilege escalation

00:08:41.020 --> 00:08:43.090 align:middle line:90%
process beforehand.

00:08:43.090 --> 00:08:46.070 align:middle line:84%
So we can migrate to
the LSASS process.

00:08:46.070 --> 00:08:49.960 align:middle line:84%
So if I want to search
for a specific process,

00:08:49.960 --> 00:08:53.290 align:middle line:84%
I can essentially utilize
the actual pgrep option.

00:08:53.290 --> 00:08:57.920 align:middle line:84%
So I can say pgrep and
then search for LSASS.

00:08:57.920 --> 00:09:01.940 align:middle line:84%
As you can see, that's
under the process ID 792.

00:09:01.940 --> 00:09:04.520 align:middle line:90%
So I can say migrate 792.

00:09:04.520 --> 00:09:06.230 align:middle line:84%
And because we have
elevated privileges,

00:09:06.230 --> 00:09:09.440 align:middle line:84%
we should be able to
migrate without any issues.

00:09:09.440 --> 00:09:11.610 align:middle line:84%
There we are, migration
completed successfully.

00:09:11.610 --> 00:09:13.910 align:middle line:84%
So if I type in
sysinfo, you can now

00:09:13.910 --> 00:09:16.790 align:middle line:84%
see that our Meterpreter
payload is currently

00:09:16.790 --> 00:09:19.190 align:middle line:90%
now a 64-bit payload.

00:09:19.190 --> 00:09:22.310 align:middle line:84%
We have a 64-bit
session, essentially.

00:09:22.310 --> 00:09:25.130 align:middle line:84%
So now that we've done
that, we can essentially

00:09:25.130 --> 00:09:27.270 align:middle line:84%
go ahead and load
Kiwi which, as I said,

00:09:27.270 --> 00:09:30.620 align:middle line:84%
is essentially just
Mimikatz but a module that

00:09:30.620 --> 00:09:33.080 align:middle line:90%
was made for Meterpreter.

00:09:33.080 --> 00:09:35.720 align:middle line:84%
So in order to do
that, we can say load,

00:09:35.720 --> 00:09:38.310 align:middle line:90%
and then we say kiwi, hit Enter.

00:09:38.310 --> 00:09:40.130 align:middle line:84%
It's going to load
the Kiwi extension,

00:09:40.130 --> 00:09:41.450 align:middle line:90%
and it's going to say success.

00:09:41.450 --> 00:09:46.310 align:middle line:84%
So there we are Mimikatz,
2.2.0 on x64 Windows.

00:09:46.310 --> 00:09:49.160 align:middle line:90%
Now if we open up the help--

00:09:49.160 --> 00:09:52.670 align:middle line:84%
or rather, the documentation
for Meterpreter at the bottom

00:09:52.670 --> 00:09:56.390 align:middle line:84%
here once you've loaded
the Kiwi extension it'll

00:09:56.390 --> 00:09:57.890 align:middle line:84%
give you a list of
commands that you

00:09:57.890 --> 00:10:00.530 align:middle line:84%
can run based on the
type of credentials

00:10:00.530 --> 00:10:01.590 align:middle line:90%
that you want to dump.

00:10:01.590 --> 00:10:05.060 align:middle line:84%
So we can first and foremost
run the credentials all command

00:10:05.060 --> 00:10:07.400 align:middle line:90%
to retrieve all credentials.

00:10:07.400 --> 00:10:12.230 align:middle line:84%
We can also dump the LSA or
other the contents of the SAM

00:10:12.230 --> 00:10:15.020 align:middle line:90%
database using lsa_dump_sam.

00:10:15.020 --> 00:10:19.220 align:middle line:84%
And we can also dump the LSA
secrets using lsa_dump_secrets.

00:10:19.220 --> 00:10:21.510 align:middle line:84%
So let's try and dump all
the credentials first.

00:10:21.510 --> 00:10:24.800 align:middle line:90%
So we're going to say creds_all.

00:10:24.800 --> 00:10:26.930 align:middle line:84%
And that will dump
all the credentials.

00:10:26.930 --> 00:10:29.210 align:middle line:84%
So we get the W
digest credentials,

00:10:29.210 --> 00:10:33.090 align:middle line:84%
Kerberos credentials, as
well as MSV credentials.

00:10:33.090 --> 00:10:36.890 align:middle line:84%
So for the administrator
user, we get the NTLM hash.

00:10:36.890 --> 00:10:41.240 align:middle line:84%
And then for the W digest
credentials as well as

00:10:41.240 --> 00:10:44.240 align:middle line:84%
Kerberos credentials, you can
see that the password is null.

00:10:44.240 --> 00:10:46.850 align:middle line:84%
So we haven't been able
to get either the hash

00:10:46.850 --> 00:10:49.220 align:middle line:84%
or the actual
clear-text password.

00:10:49.220 --> 00:10:52.170 align:middle line:84%
However, as I've
mentioned previously,

00:10:52.170 --> 00:10:55.860 align:middle line:84%
you can only get the hashes or
the passwords of actual user

00:10:55.860 --> 00:10:56.880 align:middle line:90%
accounts on the system.

00:10:56.880 --> 00:11:00.240 align:middle line:84%
And in this case, it looks like
we only have one user account,

00:11:00.240 --> 00:11:02.512 align:middle line:84%
and that is the
administrator account.

00:11:02.512 --> 00:11:04.220 align:middle line:84%
So we pretty much will
not be able to get

00:11:04.220 --> 00:11:07.790 align:middle line:84%
any other credentials apart from
the administrator credentials.

00:11:07.790 --> 00:11:11.180 align:middle line:84%
So we can also dump the
contents of the SAM database

00:11:11.180 --> 00:11:15.620 align:middle line:90%
by saying lsa_dump_sam.

00:11:15.620 --> 00:11:19.140 align:middle line:84%
And in this case, it looks
like we get the other account.

00:11:19.140 --> 00:11:21.320 align:middle line:84%
So we have another account
here called student,

00:11:21.320 --> 00:11:23.990 align:middle line:84%
and we get the NTLM
hash for student.

00:11:23.990 --> 00:11:26.400 align:middle line:90%
We also get the guest account.

00:11:26.400 --> 00:11:29.240 align:middle line:84%
But no hash is provided there
because the guest account

00:11:29.240 --> 00:11:31.190 align:middle line:90%
doesn't require any passwords.

00:11:31.190 --> 00:11:35.330 align:middle line:84%
So we get the administrator
NTLM hash as well as

00:11:35.330 --> 00:11:38.120 align:middle line:84%
the actual student
account NTLM hash.

00:11:38.120 --> 00:11:39.300 align:middle line:90%
So that's great.

00:11:39.300 --> 00:11:41.510 align:middle line:84%
We've been able to
get these hashes.

00:11:41.510 --> 00:11:43.970 align:middle line:84%
We can also take a look
at how to dump the LSA

00:11:43.970 --> 00:11:48.350 align:middle line:84%
secrets by saying
lsa_dump_secrets, hit Enter.

00:11:48.350 --> 00:11:51.680 align:middle line:84%
And in this case, we
only get the system key

00:11:51.680 --> 00:11:55.920 align:middle line:84%
for the actual domain, which
again in this case is the flag.

00:11:55.920 --> 00:11:57.320 align:middle line:84%
Now in the next
video, we will be

00:11:57.320 --> 00:11:59.690 align:middle line:84%
exploring the
process of utilizing

00:11:59.690 --> 00:12:02.990 align:middle line:84%
these hashes to perform
a pass-the-hash attack

00:12:02.990 --> 00:12:06.500 align:middle line:84%
and consequently authenticate to
the target system legitimately

00:12:06.500 --> 00:12:07.670 align:middle line:90%
using the hash.

00:12:07.670 --> 00:12:11.300 align:middle line:84%
So we haven't been able to find
any clear-text passwords, which

00:12:11.300 --> 00:12:13.290 align:middle line:84%
again is something
that I expected.

00:12:13.290 --> 00:12:16.460 align:middle line:84%
And, again, in this
case, the only piece

00:12:16.460 --> 00:12:18.620 align:middle line:84%
of information that we
have been able to gather

00:12:18.620 --> 00:12:20.390 align:middle line:90%
is just the NTLM hash.

00:12:20.390 --> 00:12:24.230 align:middle line:84%
Now as I said, the NTLM
hash does not necessarily

00:12:24.230 --> 00:12:27.860 align:middle line:84%
need to be cracked in order
to get the clear-text password

00:12:27.860 --> 00:12:29.570 align:middle line:84%
in the next video,
we'll be exploring

00:12:29.570 --> 00:12:32.870 align:middle line:84%
the process of how to
utilize these hashes

00:12:32.870 --> 00:12:35.190 align:middle line:90%
for legitimate authentication.

00:12:35.190 --> 00:12:38.750 align:middle line:84%
So that's pretty much it in
regards to dumping hashes

00:12:38.750 --> 00:12:39.470 align:middle line:90%
with Mimikatz.

00:12:39.470 --> 00:12:42.920 align:middle line:84%
As I said, you have the
ability of also transferring

00:12:42.920 --> 00:12:45.960 align:middle line:84%
the Mimikatz binary onto
the target system manually.

00:12:45.960 --> 00:12:48.830 align:middle line:84%
So if I say upload
and we can head over

00:12:48.830 --> 00:12:50.780 align:middle line:84%
into the
usr/share/windows-resources/

00:12:50.780 --> 00:12:56.180 align:middle line:84%
Windows resources directory, if
we head over into the binaries

00:12:56.180 --> 00:12:58.670 align:middle line:84%
folder, you can see
that we have Mimikatz.

00:12:58.670 --> 00:13:00.980 align:middle line:84%
If we don't have it
within, here then

00:13:00.980 --> 00:13:03.350 align:middle line:84%
it should be under
the Mimikatz folder.

00:13:03.350 --> 00:13:06.340 align:middle line:84%
And we have two
versions of Mimikatz.

00:13:06.340 --> 00:13:08.570 align:middle line:84%
We have the 64-bit
version of Mimikatz

00:13:08.570 --> 00:13:10.320 align:middle line:90%
as well as the 32-bit version.

00:13:10.320 --> 00:13:14.640 align:middle line:84%
So if we head over into the
64-bit memory case folder,

00:13:14.640 --> 00:13:19.100 align:middle line:84%
you can see that we can
upload the Mimikatz.exe

00:13:19.100 --> 00:13:20.580 align:middle line:90%
executable onto the target.

00:13:20.580 --> 00:13:23.930 align:middle line:84%
So I can just say
Mimikatz.exe, hit Enter,

00:13:23.930 --> 00:13:27.452 align:middle line:84%
and that will upload it
to the target system.

00:13:27.452 --> 00:13:29.660 align:middle line:84%
And if I list out the contents
of our current working

00:13:29.660 --> 00:13:31.790 align:middle line:84%
directory, we should
see that we have

00:13:31.790 --> 00:13:33.650 align:middle line:90%
the Mimikatz.exe stored here.

00:13:33.650 --> 00:13:37.220 align:middle line:84%
And this wasn't a very good
directory to store it in.

00:13:37.220 --> 00:13:39.300 align:middle line:84%
But we can probably
execute it as well.

00:13:39.300 --> 00:13:42.230 align:middle line:84%
So if I open up a
command prompt session,

00:13:42.230 --> 00:13:47.840 align:middle line:84%
I can then execute it by saying
Mimikatz.exe and hit Enter.

00:13:47.840 --> 00:13:50.960 align:middle line:84%
And in this case, we
specified that incorrectly

00:13:50.960 --> 00:13:54.290 align:middle line:84%
So I'm going to
say Mimikatz.exe.

00:13:54.290 --> 00:13:54.930 align:middle line:90%
There we are.

00:13:54.930 --> 00:13:58.110 align:middle line:84%
Let's make sure we specify
the actual name correctly.

00:13:58.110 --> 00:14:00.470 align:middle line:84%
And as you can see,
Mimikatz loads directly

00:14:00.470 --> 00:14:02.030 align:middle line:90%
from within the command shell.

00:14:02.030 --> 00:14:07.930 align:middle line:84%
And then of course, we can type
in the privilege::debug command

00:14:07.930 --> 00:14:11.000 align:middle line:84%
to ensure that we have the
appropriate privileges.

00:14:11.000 --> 00:14:13.090 align:middle line:84%
And if it tells us
"Privilege '20' OK,"

00:14:13.090 --> 00:14:16.180 align:middle line:84%
then it means that we have the
required privileges in order

00:14:16.180 --> 00:14:17.450 align:middle line:90%
to dump our passwords.

00:14:17.450 --> 00:14:21.250 align:middle line:84%
So in terms of the native
Mimikatz commands and not

00:14:21.250 --> 00:14:24.370 align:middle line:84%
Meterpreter commands, we
can dump the logon passwords

00:14:24.370 --> 00:14:30.220 align:middle line:84%
by typing in sekurlsa
and then saying--

00:14:30.220 --> 00:14:33.820 align:middle line:84%
we can probably just say logon
passwords, so logonpasswords.

00:14:33.820 --> 00:14:35.110 align:middle line:90%
There we are.

00:14:35.110 --> 00:14:37.018 align:middle line:84%
That'll dump the
logon passwords.

00:14:37.018 --> 00:14:38.560 align:middle line:84%
And in this case
let's see whether we

00:14:38.560 --> 00:14:41.650 align:middle line:84%
were able to get any
clear-text logon passwords.

00:14:41.650 --> 00:14:45.530 align:middle line:84%
So we'll start off with
the administrator user.

00:14:45.530 --> 00:14:48.010 align:middle line:90%
So there we are.

00:14:48.010 --> 00:14:50.140 align:middle line:84%
If we take a look at
the administrator user,

00:14:50.140 --> 00:14:51.340 align:middle line:90%
we don't get the password.

00:14:51.340 --> 00:14:53.240 align:middle line:84%
As you can see,
it says null here.

00:14:53.240 --> 00:14:56.480 align:middle line:84%
So in this case, we weren't able
to get the clear-text password,

00:14:56.480 --> 00:14:58.060 align:middle line:90%
which is fine.

00:14:58.060 --> 00:14:59.890 align:middle line:84%
In terms of the
student user, let

00:14:59.890 --> 00:15:02.080 align:middle line:84%
me see if I can find
the student user here.

00:15:02.080 --> 00:15:07.640 align:middle line:90%


00:15:07.640 --> 00:15:10.730 align:middle line:84%
And it looks like we weren't
able to identify the student

00:15:10.730 --> 00:15:12.710 align:middle line:90%
user account.

00:15:12.710 --> 00:15:17.270 align:middle line:84%
And of course, this is going to
require that the student user

00:15:17.270 --> 00:15:19.070 align:middle line:90%
account has been logged into.

00:15:19.070 --> 00:15:21.060 align:middle line:84%
And in this case, it
doesn't look like it has,

00:15:21.060 --> 00:15:24.770 align:middle line:84%
so we aren't able to get
any of the logon passwords.

00:15:24.770 --> 00:15:27.110 align:middle line:84%
We can also dump the
SAM database by saying

00:15:27.110 --> 00:15:30.390 align:middle line:90%
lsadump::sam.

00:15:30.390 --> 00:15:32.070 align:middle line:84%
Let me just type
that in correctly,

00:15:32.070 --> 00:15:36.360 align:middle line:90%
lsadump, double colon, sam.

00:15:36.360 --> 00:15:38.760 align:middle line:84%
Hit Enter and that, of
course, will dump the contents

00:15:38.760 --> 00:15:40.440 align:middle line:90%
of the SAM database.

00:15:40.440 --> 00:15:43.170 align:middle line:84%
And in this case, it's
very similar to the results

00:15:43.170 --> 00:15:45.060 align:middle line:90%
we got using Kiwi.

00:15:45.060 --> 00:15:46.980 align:middle line:84%
The great thing with
Kiwi is the commands

00:15:46.980 --> 00:15:51.030 align:middle line:84%
are fairly simple to remember
and very easy to type in.

00:15:51.030 --> 00:15:53.040 align:middle line:84%
So, again, if you want
to do this manually

00:15:53.040 --> 00:15:56.220 align:middle line:84%
through the Mimikatz executable,
you can do that as well.

00:15:56.220 --> 00:16:00.160 align:middle line:84%
Although, I would recommend
utilizing the Kiwi module,

00:16:00.160 --> 00:16:04.680 align:middle line:84%
so we get the NTLM hash
for the administrator user.

00:16:04.680 --> 00:16:09.870 align:middle line:84%
So that is how to utilize
Mimikatz to dump NTLM hashes as

00:16:09.870 --> 00:16:11.792 align:middle line:90%
well as clear-text passwords.

00:16:11.792 --> 00:16:13.500 align:middle line:84%
But in this case, we
weren't able to find

00:16:13.500 --> 00:16:14.700 align:middle line:90%
any clear-text passwords.

00:16:14.700 --> 00:16:17.220 align:middle line:84%
And that's, again,
by design because I'm

00:16:17.220 --> 00:16:22.230 align:middle line:84%
going to show you how to utilize
NTLM hashes for authentication.

00:16:22.230 --> 00:16:25.500 align:middle line:84%
So that is going to conclude
the practical demonstration

00:16:25.500 --> 00:16:26.385 align:middle line:90%
side of this video.

00:16:26.385 --> 00:16:29.580 align:middle line:90%


00:16:29.580 --> 00:16:31.730 align:middle line:84%
In the next video,
we will be exploring

00:16:31.730 --> 00:16:35.480 align:middle line:84%
the process of performing the
pass-the-hash attack with BSXX.

00:16:35.480 --> 00:16:39.250 align:middle line:84%
So I'll see you
in the next video.

00:16:39.250 --> 00:16:40.000 align:middle line:90%