WEBVTT

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


00:00:10.140 --> 00:00:13.560 align:middle line:84%
Enumerating users and
groups on Windows.

00:00:13.560 --> 00:00:16.410 align:middle line:84%
In this video, we're going to
be exploring the process of how

00:00:16.410 --> 00:00:18.900 align:middle line:84%
to identify the
current user, you

00:00:18.900 --> 00:00:21.130 align:middle line:84%
have access to on
a Windows system.

00:00:21.130 --> 00:00:23.860 align:middle line:84%
We'll also learn more
about user accounts.

00:00:23.860 --> 00:00:26.610 align:middle line:84%
How to enumerate other user
accounts on a Windows system

00:00:26.610 --> 00:00:28.320 align:middle line:90%
as well as groups.

00:00:28.320 --> 00:00:31.600 align:middle line:84%
All right, so why is this
information important?

00:00:31.600 --> 00:00:34.080 align:middle line:84%
Well, again, going back
to the previous video

00:00:34.080 --> 00:00:37.050 align:middle line:84%
after gaining initial
access to a target system,

00:00:37.050 --> 00:00:39.450 align:middle line:84%
it's always important to
learn more about the system.

00:00:39.450 --> 00:00:41.550 align:middle line:84%
And one additional
piece of information

00:00:41.550 --> 00:00:44.220 align:middle line:84%
that's very important
to know is what

00:00:44.220 --> 00:00:46.920 align:middle line:84%
user account you have
access to, as well

00:00:46.920 --> 00:00:49.200 align:middle line:84%
as the privileges that you
currently have access to

00:00:49.200 --> 00:00:51.880 align:middle line:84%
and the other user
accounts on the system.

00:00:51.880 --> 00:00:53.680 align:middle line:90%
So why is this important?

00:00:53.680 --> 00:00:56.970 align:middle line:84%
Well, firstly, you won't need to
get an idea of what privileges

00:00:56.970 --> 00:00:57.480 align:middle line:90%
you have.

00:00:57.480 --> 00:00:59.410 align:middle line:90%
Are you an elevated user?

00:00:59.410 --> 00:01:01.020 align:middle line:90%
Are you the administrator?

00:01:01.020 --> 00:01:03.960 align:middle line:84%
Do you have NT Authority
system privileges?

00:01:03.960 --> 00:01:06.760 align:middle line:84%
That will essentially tie-in,
again, to privilege escalation.

00:01:06.760 --> 00:01:10.320 align:middle line:84%
So for example, if you are
the administrator user,

00:01:10.320 --> 00:01:12.570 align:middle line:84%
then you don't need to
perform privilege escalation.

00:01:12.570 --> 00:01:15.580 align:middle line:90%
So this is very, very important.

00:01:15.580 --> 00:01:17.400 align:middle line:84%
Another reason why
this is so important

00:01:17.400 --> 00:01:21.330 align:middle line:84%
is primarily because if you
gain access to a Windows system

00:01:21.330 --> 00:01:24.930 align:middle line:84%
and you identify other user
accounts on that system that

00:01:24.930 --> 00:01:27.720 align:middle line:84%
are part of the local
administrators group,

00:01:27.720 --> 00:01:29.730 align:middle line:84%
you can again then
tailor your attacks

00:01:29.730 --> 00:01:32.580 align:middle line:84%
to that specific account or
you can try and gain access

00:01:32.580 --> 00:01:36.030 align:middle line:84%
to that specific user
account and consequently gain

00:01:36.030 --> 00:01:38.260 align:middle line:84%
administrative or
elevated privileges.

00:01:38.260 --> 00:01:41.490 align:middle line:84%
So enumerating users
and groups on Windows

00:01:41.490 --> 00:01:43.360 align:middle line:90%
is really, really important.

00:01:43.360 --> 00:01:46.450 align:middle line:84%
So what type of information
are we looking for?

00:01:46.450 --> 00:01:48.180 align:middle line:84%
Well, firstly, we
want to enumerate

00:01:48.180 --> 00:01:50.040 align:middle line:84%
our current user
and the privileges

00:01:50.040 --> 00:01:51.940 align:middle line:84%
that we currently
have access to.

00:01:51.940 --> 00:01:55.260 align:middle line:84%
We also need to identify
additional user information

00:01:55.260 --> 00:01:59.400 align:middle line:84%
like the password policy,
the password age, when

00:01:59.400 --> 00:02:01.936 align:middle line:90%
this user's password expires?

00:02:01.936 --> 00:02:04.420 align:middle line:90%
Important information like that.

00:02:04.420 --> 00:02:08.190 align:middle line:84%
We also need to enumerate other
user accounts on the system,

00:02:08.190 --> 00:02:11.610 align:middle line:84%
as well as the groups that
are currently on the system

00:02:11.610 --> 00:02:15.270 align:middle line:84%
and trying to identify
interesting groups that might

00:02:15.270 --> 00:02:17.440 align:middle line:90%
have interesting privileges.

00:02:17.440 --> 00:02:19.590 align:middle line:84%
And of course, most
importantly, we

00:02:19.590 --> 00:02:22.590 align:middle line:84%
need to be able to enumerate
the user accounts that

00:02:22.590 --> 00:02:25.890 align:middle line:84%
are members of the built-in
administrator group.

00:02:25.890 --> 00:02:27.660 align:middle line:84%
So the built-in
administrator group

00:02:27.660 --> 00:02:30.070 align:middle line:84%
is essentially as
the name suggests.

00:02:30.070 --> 00:02:33.900 align:middle line:84%
An administrator group that,
again, essentially provides

00:02:33.900 --> 00:02:35.970 align:middle line:84%
administrative
privileges to any members

00:02:35.970 --> 00:02:37.180 align:middle line:90%
that are part of that group.

00:02:37.180 --> 00:02:40.680 align:middle line:84%
So for example, if we gain
access to a Windows system

00:02:40.680 --> 00:02:43.530 align:middle line:84%
and we currently have access
as a non-privileged user

00:02:43.530 --> 00:02:46.620 align:middle line:84%
account called Bob and
we identify another user

00:02:46.620 --> 00:02:49.290 align:middle line:84%
account called
Alice, and we also

00:02:49.290 --> 00:02:52.380 align:middle line:84%
learned that Alice is part of
the local administrators group,

00:02:52.380 --> 00:02:54.780 align:middle line:84%
then we could potentially
try and gain access

00:02:54.780 --> 00:02:57.150 align:middle line:84%
to the Alice user
account, to obtain

00:02:57.150 --> 00:02:58.930 align:middle line:90%
administrative privileges.

00:02:58.930 --> 00:03:00.760 align:middle line:84%
So again, that's
just an example.

00:03:00.760 --> 00:03:03.450 align:middle line:84%
This is a very,
very important phase

00:03:03.450 --> 00:03:07.950 align:middle line:84%
of performing local
enumeration on Windows.

00:03:07.950 --> 00:03:09.930 align:middle line:84%
So the way I'm going to
be demonstrating this

00:03:09.930 --> 00:03:11.440 align:middle line:90%
is through a lab environment.

00:03:11.440 --> 00:03:13.680 align:middle line:84%
So we are going to be
utilizing the same lab

00:03:13.680 --> 00:03:16.000 align:middle line:84%
environment that we used
in the previous video.

00:03:16.000 --> 00:03:18.308 align:middle line:84%
So again, it's
linked to this video.

00:03:18.308 --> 00:03:19.600 align:middle line:90%
All you need to do is start it.

00:03:19.600 --> 00:03:21.580 align:middle line:84%
And the first step
will, of course,

00:03:21.580 --> 00:03:24.780 align:middle line:84%
involve exploiting the system
or gaining access to it.

00:03:24.780 --> 00:03:26.250 align:middle line:84%
And we can then
take a look at how

00:03:26.250 --> 00:03:28.060 align:middle line:90%
to enumerate users and groups.

00:03:28.060 --> 00:03:30.450 align:middle line:84%
So I'll see you within
the lab environment.

00:03:30.450 --> 00:03:33.260 align:middle line:90%


00:03:33.260 --> 00:03:35.370 align:middle line:84%
All right, so I'm back
in the lab environment.

00:03:35.370 --> 00:03:37.260 align:middle line:84%
And similarly to
the previous video,

00:03:37.260 --> 00:03:39.960 align:middle line:84%
you will be provided with
the target IP address.

00:03:39.960 --> 00:03:42.410 align:middle line:84%
So given the fact that
this is the same--

00:03:42.410 --> 00:03:45.510 align:middle line:84%
this is the same lab environment
we used in the previous video,

00:03:45.510 --> 00:03:48.290 align:middle line:84%
all we need to do is
load up MSFconsole

00:03:48.290 --> 00:03:51.510 align:middle line:84%
and we can exploit
the HTTP file server.

00:03:51.510 --> 00:03:53.210 align:middle line:84%
So I'm just going to
open up my terminal

00:03:53.210 --> 00:03:54.630 align:middle line:90%
and I'll just zoom in here.

00:03:54.630 --> 00:03:57.860 align:middle line:84%
So I can say MSFconsole
and we'll give this

00:03:57.860 --> 00:03:59.840 align:middle line:84%
a couple of seconds to
start up, and we can

00:03:59.840 --> 00:04:03.490 align:middle line:90%
search for the Rejetto exploit.

00:04:03.490 --> 00:04:04.000 align:middle line:90%
Here we are.

00:04:04.000 --> 00:04:07.240 align:middle line:84%
So I'll just say search
rejetto, and we're

00:04:07.240 --> 00:04:08.950 align:middle line:90%
going to be using this exploit.

00:04:08.950 --> 00:04:11.080 align:middle line:84%
So I'll just say
use 0, because that

00:04:11.080 --> 00:04:12.670 align:middle line:90%
is the idea of the exploit.

00:04:12.670 --> 00:04:13.490 align:middle line:90%
There we are.

00:04:13.490 --> 00:04:18.177 align:middle line:84%
And we can set the arrows option
to the target IP as follows.

00:04:18.177 --> 00:04:20.510 align:middle line:84%
And of course, in your case,
it's going to be different.

00:04:20.510 --> 00:04:22.840 align:middle line:90%
So just adapt accordingly.

00:04:22.840 --> 00:04:24.610 align:middle line:84%
And then I'll type
in exploit and we

00:04:24.610 --> 00:04:27.880 align:middle line:84%
should obtain a meterpreter
session on the target system.

00:04:27.880 --> 00:04:30.617 align:middle line:90%


00:04:30.617 --> 00:04:32.200 align:middle line:84%
So I'll give this a
couple of seconds.

00:04:32.200 --> 00:04:35.780 align:middle line:90%


00:04:35.780 --> 00:04:38.360 align:middle line:84%
All right, so it looks like we
get the meterpreter session,

00:04:38.360 --> 00:04:39.560 align:middle line:90%
fantastic.

00:04:39.560 --> 00:04:41.750 align:middle line:84%
So again, I'm going to
be going through this

00:04:41.750 --> 00:04:44.600 align:middle line:84%
both through meterpreter,
as well as manually

00:04:44.600 --> 00:04:45.980 align:middle line:90%
through a command shell.

00:04:45.980 --> 00:04:48.650 align:middle line:84%
So again, if you're using
a meterpreter session,

00:04:48.650 --> 00:04:51.710 align:middle line:84%
you can enumerate information
about the current user

00:04:51.710 --> 00:04:53.790 align:middle line:90%
by typing and get user ID.

00:04:53.790 --> 00:04:55.310 align:middle line:84%
In this case, we
can see that we're

00:04:55.310 --> 00:04:57.680 align:middle line:84%
logged on as the
administrator user, which

00:04:57.680 --> 00:05:00.770 align:middle line:84%
means that we have elevated
privileges right out

00:05:00.770 --> 00:05:02.180 align:middle line:90%
of the box, right?

00:05:02.180 --> 00:05:04.730 align:middle line:84%
So again, that will
tie into whether or not

00:05:04.730 --> 00:05:07.590 align:middle line:84%
we need to perform privilege
escalation, and in this case,

00:05:07.590 --> 00:05:08.760 align:middle line:90%
we don't need to do that.

00:05:08.760 --> 00:05:11.870 align:middle line:84%
So again, you can see
how this information all

00:05:11.870 --> 00:05:16.140 align:middle line:84%
ties into the next phases of the
post exploitation methodology.

00:05:16.140 --> 00:05:19.670 align:middle line:84%
We can also enumerate the
current privileges we have,

00:05:19.670 --> 00:05:21.650 align:middle line:84%
all the current
privileges associated

00:05:21.650 --> 00:05:23.240 align:middle line:90%
with the administrator user.

00:05:23.240 --> 00:05:25.735 align:middle line:84%
And that will tell us whether
we have elevated privileges

00:05:25.735 --> 00:05:27.110 align:middle line:84%
and, in this case,
you can see we

00:05:27.110 --> 00:05:30.380 align:middle line:84%
have the entire gamut of
privileges that you typically

00:05:30.380 --> 00:05:34.210 align:middle line:84%
associate with a
privileged user.

00:05:34.210 --> 00:05:37.580 align:middle line:84%
We can also enumerate an
additional piece of information

00:05:37.580 --> 00:05:40.480 align:middle line:84%
and that is the currently
logged on users, right,

00:05:40.480 --> 00:05:43.300 align:middle line:84%
as well as users who have
logged on in the past.

00:05:43.300 --> 00:05:46.510 align:middle line:84%
And if you're doing this through
the Metasploit Framework,

00:05:46.510 --> 00:05:49.120 align:middle line:84%
one of the interesting
modules you can use

00:05:49.120 --> 00:05:52.150 align:middle line:84%
is a post exploitation
module that will essentially

00:05:52.150 --> 00:05:55.930 align:middle line:84%
display all information
pertinent to the current users

00:05:55.930 --> 00:05:58.240 align:middle line:84%
that are logged on,
as well as users

00:05:58.240 --> 00:06:00.232 align:middle line:90%
that previously logged on.

00:06:00.232 --> 00:06:02.440 align:middle line:84%
So I'm just going to put
this in the background, that

00:06:02.440 --> 00:06:04.210 align:middle line:84%
can be done by
typing in background

00:06:04.210 --> 00:06:07.960 align:middle line:84%
or using the keyboard
combination Control and Z.

00:06:07.960 --> 00:06:10.520 align:middle line:84%
And we can search for that
post exploitation module.

00:06:10.520 --> 00:06:14.560 align:middle line:84%
So I'll just say
searched for logged_on,

00:06:14.560 --> 00:06:16.310 align:middle line:90%
and this is the module here.

00:06:16.310 --> 00:06:18.010 align:middle line:90%
So I'll just say use 0.

00:06:18.010 --> 00:06:20.960 align:middle line:84%
And because this is a
post exploitation module,

00:06:20.960 --> 00:06:24.920 align:middle line:84%
we can set the session
option to our session ID.

00:06:24.920 --> 00:06:26.470 align:middle line:84%
So if I list out
my sessions, you

00:06:26.470 --> 00:06:29.230 align:middle line:84%
can see that meterpreter
is running on session--

00:06:29.230 --> 00:06:30.730 align:middle line:90%
on this session ID 1.

00:06:30.730 --> 00:06:35.020 align:middle line:84%
So I'll say set SESSION
1, and I can then hit run.

00:06:35.020 --> 00:06:37.970 align:middle line:84%
We'll give this a
couple of seconds.

00:06:37.970 --> 00:06:39.782 align:middle line:84%
And it will enumerate
the information

00:06:39.782 --> 00:06:40.740 align:middle line:90%
that we're looking for.

00:06:40.740 --> 00:06:42.500 align:middle line:84%
So firstly, it'll
tell us the currently

00:06:42.500 --> 00:06:46.490 align:middle line:84%
logged on users, in this case,
the administrator user, which

00:06:46.490 --> 00:06:50.180 align:middle line:84%
is us and this is the session
that we are currently logged on

00:06:50.180 --> 00:06:50.720 align:middle line:90%
to.

00:06:50.720 --> 00:06:53.750 align:middle line:84%
And then, of course, the
other piece of information

00:06:53.750 --> 00:06:56.030 align:middle line:90%
is the recently logged on users.

00:06:56.030 --> 00:06:59.600 align:middle line:84%
And in this case, it looks like
we haven't had any other user

00:06:59.600 --> 00:07:02.930 align:middle line:84%
accounts logging in apart from
the administrator account.

00:07:02.930 --> 00:07:06.500 align:middle line:84%
These other accounts are
network and service accounts

00:07:06.500 --> 00:07:07.290 align:middle line:90%
right over here.

00:07:07.290 --> 00:07:09.440 align:middle line:84%
So they're not
really user accounts.

00:07:09.440 --> 00:07:12.650 align:middle line:84%
All right, so that is how
to perform user and group

00:07:12.650 --> 00:07:14.360 align:middle line:90%
enumeration with meterpreter.

00:07:14.360 --> 00:07:16.490 align:middle line:84%
And of course, there's a
plethora of other modules

00:07:16.490 --> 00:07:17.780 align:middle line:90%
that you can utilize.

00:07:17.780 --> 00:07:21.300 align:middle line:84%
However, in this case, I will
not be going through them.

00:07:21.300 --> 00:07:24.470 align:middle line:84%
So we can navigate back into
our meterpreter session.

00:07:24.470 --> 00:07:27.980 align:middle line:84%
So I'll say sessions 1 and
we'll open up a command shell

00:07:27.980 --> 00:07:29.330 align:middle line:90%
session.

00:07:29.330 --> 00:07:31.850 align:middle line:84%
All right, and let's take a
look at how we can perform

00:07:31.850 --> 00:07:34.350 align:middle line:90%
the enumeration manually.

00:07:34.350 --> 00:07:36.320 align:middle line:84%
So we'll give this
a couple of seconds.

00:07:36.320 --> 00:07:39.920 align:middle line:84%
It should open or provide me
with a command shell session.

00:07:39.920 --> 00:07:41.120 align:middle line:90%
There we are.

00:07:41.120 --> 00:07:43.020 align:middle line:84%
And I'll just zoom
in a little bit here.

00:07:43.020 --> 00:07:45.410 align:middle line:84%
So again, if you want to
enumerate your current user,

00:07:45.410 --> 00:07:47.310 align:middle line:84%
you can do that by
saying, who am I?

00:07:47.310 --> 00:07:48.590 align:middle line:90%
That's fairly simple.

00:07:48.590 --> 00:07:50.690 align:middle line:84%
It'll provide you
with the actual host

00:07:50.690 --> 00:07:54.200 align:middle line:84%
name and the current
user, so administrator.

00:07:54.200 --> 00:07:56.750 align:middle line:84%
We can also display the
privileges that we have

00:07:56.750 --> 00:07:59.450 align:middle line:90%
as we did with meterpreter.

00:07:59.450 --> 00:08:03.777 align:middle line:84%
And this can be done
by saying, whoami/priv.

00:08:03.777 --> 00:08:05.860 align:middle line:84%
And this will tell us the
privileges that we have.

00:08:05.860 --> 00:08:08.950 align:middle line:84%
But in the case of the
Windows command itself,

00:08:08.950 --> 00:08:12.280 align:middle line:84%
it'll provide us with
additional information regarding

00:08:12.280 --> 00:08:16.210 align:middle line:84%
what each of these privileges
is used for and the state.

00:08:16.210 --> 00:08:18.790 align:middle line:84%
So you can see for all of
these privileges the state is

00:08:18.790 --> 00:08:21.520 align:middle line:84%
set to enable, which
makes sense because this

00:08:21.520 --> 00:08:23.020 align:middle line:90%
is the administrator account.

00:08:23.020 --> 00:08:25.660 align:middle line:84%
And if we take a closer look
at some of these privileges,

00:08:25.660 --> 00:08:28.150 align:middle line:84%
you can see like
SeBackupPrivilege.

00:08:28.150 --> 00:08:31.330 align:middle line:84%
That's used to back up
files and directories.

00:08:31.330 --> 00:08:33.669 align:middle line:84%
We can also take a look
at a few others that

00:08:33.669 --> 00:08:37.900 align:middle line:84%
are quite interesting
here like take ownership

00:08:37.900 --> 00:08:39.490 align:middle line:90%
of files and other objects.

00:08:39.490 --> 00:08:42.850 align:middle line:84%
You can see that is the
SeTakeOwnershipPrivilege, which

00:08:42.850 --> 00:08:44.620 align:middle line:84%
means that this account
can take ownership

00:08:44.620 --> 00:08:46.420 align:middle line:90%
of files or other objects.

00:08:46.420 --> 00:08:49.390 align:middle line:84%
It can load and
unload device drivers.

00:08:49.390 --> 00:08:51.160 align:middle line:90%
It can change the system time.

00:08:51.160 --> 00:08:54.040 align:middle line:84%
All of the functionality
that you typically associate

00:08:54.040 --> 00:08:56.620 align:middle line:90%
with an administrator account.

00:08:56.620 --> 00:09:00.340 align:middle line:84%
Now if I currently had access
through a non-privileged user

00:09:00.340 --> 00:09:01.990 align:middle line:84%
account, the
privileges displayed

00:09:01.990 --> 00:09:06.580 align:middle line:84%
would actually be quite
fewer and you'd only

00:09:06.580 --> 00:09:11.260 align:middle line:84%
see a few privileges associated
with that specific user

00:09:11.260 --> 00:09:12.650 align:middle line:90%
account.

00:09:12.650 --> 00:09:16.120 align:middle line:84%
Now if we wanted to list out
the currently logged on users,

00:09:16.120 --> 00:09:18.520 align:middle line:84%
we can also do that through
the Windows command prompt

00:09:18.520 --> 00:09:23.020 align:middle line:84%
or command session by
saying query and user.

00:09:23.020 --> 00:09:25.310 align:middle line:84%
And that'll tell us the
currently logged on user.

00:09:25.310 --> 00:09:28.720 align:middle line:84%
So you can see that the
administrator user is currently

00:09:28.720 --> 00:09:32.290 align:middle line:84%
logged on, and it'll tell
us that the state is active

00:09:32.290 --> 00:09:34.370 align:middle line:84%
and the log on time
is specified here.

00:09:34.370 --> 00:09:37.720 align:middle line:84%
This is very, very important,
especially after gaining access

00:09:37.720 --> 00:09:38.740 align:middle line:90%
to a target system.

00:09:38.740 --> 00:09:41.200 align:middle line:84%
It's a really, really
wise to check and see

00:09:41.200 --> 00:09:44.080 align:middle line:84%
whether any other users
are logged on to the system

00:09:44.080 --> 00:09:48.265 align:middle line:84%
as that could be a potential
vector for detection.

00:09:48.265 --> 00:09:50.140 align:middle line:84%
And if you're not careful,
you could actually

00:09:50.140 --> 00:09:52.040 align:middle line:90%
get detected really easily.

00:09:52.040 --> 00:09:54.820 align:middle line:84%
So always be cognizant
of who is logged

00:09:54.820 --> 00:09:57.610 align:middle line:84%
on the system in
addition to yourself.

00:09:57.610 --> 00:09:58.600 align:middle line:90%
All right.

00:09:58.600 --> 00:10:03.070 align:middle line:84%
Now if we wanted to
identify the user accounts

00:10:03.070 --> 00:10:05.980 align:middle line:84%
on the system or all other
user accounts on the system,

00:10:05.980 --> 00:10:09.160 align:middle line:84%
we can do that by
saying net users.

00:10:09.160 --> 00:10:11.950 align:middle line:84%
So net users will display
all other accounts

00:10:11.950 --> 00:10:13.302 align:middle line:90%
on this particular system.

00:10:13.302 --> 00:10:15.010 align:middle line:84%
So in this case, you
can see that we only

00:10:15.010 --> 00:10:17.140 align:middle line:84%
have the administrator
and the guest account,

00:10:17.140 --> 00:10:18.430 align:middle line:90%
which again is fine.

00:10:18.430 --> 00:10:20.350 align:middle line:84%
If there are any
other user accounts,

00:10:20.350 --> 00:10:23.290 align:middle line:84%
you'll be able to see
them listed out here, OK?

00:10:23.290 --> 00:10:27.430 align:middle line:84%
So that is how to
list out all the user

00:10:27.430 --> 00:10:28.430 align:middle line:90%
accounts on the system.

00:10:28.430 --> 00:10:31.300 align:middle line:84%
Now, if you wanted to learn
more about a particular user

00:10:31.300 --> 00:10:34.210 align:middle line:84%
like the administrator user that
we currently have access to,

00:10:34.210 --> 00:10:40.120 align:middle line:84%
we can say net
user administrator.

00:10:40.120 --> 00:10:42.010 align:middle line:84%
And of course, you can
just substitute that

00:10:42.010 --> 00:10:43.910 align:middle line:84%
with the username
or the user account

00:10:43.910 --> 00:10:45.410 align:middle line:84%
that you'd like to
learn more about.

00:10:45.410 --> 00:10:47.890 align:middle line:84%
So this will
essentially tell you--

00:10:47.890 --> 00:10:50.440 align:middle line:84%
provide you with additional
information regarding

00:10:50.440 --> 00:10:54.070 align:middle line:84%
that specific user account like
the username, the full name

00:10:54.070 --> 00:10:55.973 align:middle line:84%
if it was specified,
the comment.

00:10:55.973 --> 00:10:57.640 align:middle line:84%
And, in this case,
it tells us that this

00:10:57.640 --> 00:11:00.310 align:middle line:84%
is the built-in account for
administering the computer

00:11:00.310 --> 00:11:01.690 align:middle line:90%
or domain.

00:11:01.690 --> 00:11:06.100 align:middle line:84%
The country region code,
whether the account is active,

00:11:06.100 --> 00:11:09.850 align:middle line:84%
whether the account expires,
when the password was last set,

00:11:09.850 --> 00:11:11.620 align:middle line:90%
that's very important.

00:11:11.620 --> 00:11:12.970 align:middle line:90%
Does the password expire?

00:11:12.970 --> 00:11:15.670 align:middle line:84%
In this case, it's set to
never, which is a good thing.

00:11:15.670 --> 00:11:18.520 align:middle line:84%
Because, again, if
we're able to identify

00:11:18.520 --> 00:11:21.160 align:middle line:84%
the password of this
user account, then

00:11:21.160 --> 00:11:23.800 align:middle line:84%
it means that the
administrator user will never

00:11:23.800 --> 00:11:25.930 align:middle line:84%
be prompted to renew
their password,

00:11:25.930 --> 00:11:29.170 align:middle line:84%
therefore, we don't need
to obtain the new password

00:11:29.170 --> 00:11:32.303 align:middle line:84%
or crack the new password
if it is changed.

00:11:32.303 --> 00:11:33.970 align:middle line:84%
You can also see
whether the password is

00:11:33.970 --> 00:11:36.550 align:middle line:84%
required, of course, for
the administrator account,

00:11:36.550 --> 00:11:37.690 align:middle line:90%
it is required.

00:11:37.690 --> 00:11:39.220 align:middle line:84%
Can the user change
the password?

00:11:39.220 --> 00:11:41.200 align:middle line:90%
Yes, they can.

00:11:41.200 --> 00:11:44.080 align:middle line:84%
It'll then provide you
with additional information

00:11:44.080 --> 00:11:46.160 align:middle line:90%
regarding the logon itself.

00:11:46.160 --> 00:11:48.250 align:middle line:84%
So whether there
is a logon script

00:11:48.250 --> 00:11:51.190 align:middle line:84%
configured to run
when a user logs on,

00:11:51.190 --> 00:11:54.400 align:middle line:84%
the user profile, the
home directory when

00:11:54.400 --> 00:11:58.300 align:middle line:84%
the user last logged on and,
of course, the log on hours.

00:11:58.300 --> 00:12:00.550 align:middle line:84%
So if you're working
within a company or your

00:12:00.550 --> 00:12:03.520 align:middle line:84%
performing a pentest on
a company environment,

00:12:03.520 --> 00:12:07.180 align:middle line:84%
they typically have policies
to restrict log on hours.

00:12:07.180 --> 00:12:09.550 align:middle line:84%
And that is usually
set in accordance

00:12:09.550 --> 00:12:13.220 align:middle line:84%
to when employees are
typically working on a system.

00:12:13.220 --> 00:12:15.100 align:middle line:90%
So they could set it to--

00:12:15.100 --> 00:12:18.190 align:middle line:84%
they could set the log on hours
to 8:00 AM to maybe 5:00 PM.

00:12:18.190 --> 00:12:21.110 align:middle line:84%
And after that, users will
not be able to log in.

00:12:21.110 --> 00:12:24.460 align:middle line:84%
So that's a security feature
that you need to be aware of.

00:12:24.460 --> 00:12:27.260 align:middle line:84%
It also tell you the
local group membership.

00:12:27.260 --> 00:12:29.980 align:middle line:84%
So this will tell you what
groups this user account

00:12:29.980 --> 00:12:30.940 align:middle line:90%
is a part of.

00:12:30.940 --> 00:12:33.250 align:middle line:84%
And it makes sense that
the administrator user

00:12:33.250 --> 00:12:37.150 align:middle line:84%
is part of the local built-in
administrators group, right,

00:12:37.150 --> 00:12:39.050 align:middle line:84%
which I mentioned
within the slides.

00:12:39.050 --> 00:12:41.020 align:middle line:84%
So that's something
that you need

00:12:41.020 --> 00:12:42.470 align:middle line:90%
to take into consideration.

00:12:42.470 --> 00:12:44.890 align:middle line:84%
And of course, we can do
this for the-- we can do this

00:12:44.890 --> 00:12:46.400 align:middle line:90%
for the other user accounts.

00:12:46.400 --> 00:12:53.180 align:middle line:84%
So if I say net users and say
net user guest, for example.

00:12:53.180 --> 00:12:56.040 align:middle line:84%
They'll display information
for the guest account here.

00:12:56.040 --> 00:12:58.980 align:middle line:84%
So you can see
that, in this case,

00:12:58.980 --> 00:13:01.130 align:middle line:84%
the most important
piece of information

00:13:01.130 --> 00:13:03.110 align:middle line:84%
is whether the account
is active and it's

00:13:03.110 --> 00:13:06.500 align:middle line:84%
set to no, which means on this
system the guest account has

00:13:06.500 --> 00:13:08.430 align:middle line:90%
been disabled or is not active.

00:13:08.430 --> 00:13:10.790 align:middle line:84%
And as a result, we
really cannot use it.

00:13:10.790 --> 00:13:14.840 align:middle line:84%
And of course, if we were
performing a real penetration

00:13:14.840 --> 00:13:17.610 align:middle line:84%
test, there would be other
user accounts on the system.

00:13:17.610 --> 00:13:22.470 align:middle line:84%
And we could identify additional
information regarding them.

00:13:22.470 --> 00:13:26.120 align:middle line:84%
We can also enumerate a list of
all other groups on the system

00:13:26.120 --> 00:13:28.570 align:middle line:84%
or really all groups
on the system,

00:13:28.570 --> 00:13:32.210 align:middle line:84%
and that can be done by
saying net local group.

00:13:32.210 --> 00:13:34.480 align:middle line:84%
And you can see that these
are all the local groups

00:13:34.480 --> 00:13:35.270 align:middle line:90%
on the system.

00:13:35.270 --> 00:13:38.800 align:middle line:84%
So for example, we have
the administrators group,

00:13:38.800 --> 00:13:40.210 align:middle line:90%
which have already explained.

00:13:40.210 --> 00:13:43.150 align:middle line:84%
We then have backup operators,
and these are really

00:13:43.150 --> 00:13:46.900 align:middle line:84%
tied into services or
these particular groups

00:13:46.900 --> 00:13:50.530 align:middle line:84%
are used for to essentially
provide specific users

00:13:50.530 --> 00:13:52.120 align:middle line:90%
with specific privileges.

00:13:52.120 --> 00:13:55.060 align:middle line:84%
An example of this would
be remote desktop users.

00:13:55.060 --> 00:13:59.230 align:middle line:84%
So this group if a user is part
of the remote desktop users

00:13:59.230 --> 00:14:01.420 align:middle line:84%
group, then it means
that, again, they

00:14:01.420 --> 00:14:03.610 align:middle line:84%
have the permissions
or privileges

00:14:03.610 --> 00:14:08.590 align:middle line:84%
to log onto a system via RDP
or the remote desktop protocol.

00:14:08.590 --> 00:14:11.450 align:middle line:84%
And of course, we then have
the standard users group here,

00:14:11.450 --> 00:14:14.950 align:middle line:84%
which again is used to
or essentially contains

00:14:14.950 --> 00:14:17.500 align:middle line:84%
user accounts that are
just standard users

00:14:17.500 --> 00:14:19.660 align:middle line:84%
without any
additional privileges.

00:14:19.660 --> 00:14:22.090 align:middle line:84%
The same thing goes for
the guest group here.

00:14:22.090 --> 00:14:25.210 align:middle line:84%
If there is a guest
account, then they

00:14:25.210 --> 00:14:27.800 align:middle line:90%
will be part of the guest group.

00:14:27.800 --> 00:14:32.020 align:middle line:84%
However, in this case, we know
that the administrator account

00:14:32.020 --> 00:14:35.290 align:middle line:84%
is part of the local building
administrators group.

00:14:35.290 --> 00:14:38.680 align:middle line:84%
Now if we didn't know that, we
could identify other members

00:14:38.680 --> 00:14:41.320 align:middle line:84%
that are part of the
local administrators group

00:14:41.320 --> 00:14:46.910 align:middle line:84%
by typing in net local
group administrator.

00:14:46.910 --> 00:14:50.770 align:middle line:90%


00:14:50.770 --> 00:14:53.530 align:middle line:84%
And in this case, we need to
specify the name correctly.

00:14:53.530 --> 00:14:58.100 align:middle line:84%
So net local group
administrators because that

00:14:58.100 --> 00:14:59.360 align:middle line:90%
is the name of the group.

00:14:59.360 --> 00:15:00.260 align:middle line:90%
There we are.

00:15:00.260 --> 00:15:03.140 align:middle line:84%
And you can see that the
only member of this group

00:15:03.140 --> 00:15:04.760 align:middle line:90%
is the administrator account.

00:15:04.760 --> 00:15:07.010 align:middle line:84%
And this is a very
important command

00:15:07.010 --> 00:15:09.440 align:middle line:84%
because it'll tell you what
other user accounts are

00:15:09.440 --> 00:15:11.690 align:middle line:90%
part of this group.

00:15:11.690 --> 00:15:13.940 align:middle line:84%
And that will give
you an idea as to what

00:15:13.940 --> 00:15:17.120 align:middle line:84%
account you can try and
attack or gain access to

00:15:17.120 --> 00:15:20.820 align:middle line:84%
in order to obtain
administrative privileges.

00:15:20.820 --> 00:15:23.120 align:middle line:84%
And you can see that is
highlighted under the comment

00:15:23.120 --> 00:15:23.620 align:middle line:90%
here.

00:15:23.620 --> 00:15:27.020 align:middle line:84%
So administrators have complete
and unrestricted access

00:15:27.020 --> 00:15:28.730 align:middle line:90%
to the computer or domain.

00:15:28.730 --> 00:15:32.510 align:middle line:84%
So that means that any member
of the administrators group

00:15:32.510 --> 00:15:35.090 align:middle line:84%
will have, essentially,
all the privileges

00:15:35.090 --> 00:15:37.940 align:middle line:84%
required to have
unrestricted access

00:15:37.940 --> 00:15:40.520 align:middle line:90%
to the target system or domain.

00:15:40.520 --> 00:15:43.880 align:middle line:84%
All right, so that is how
to perform user and group

00:15:43.880 --> 00:15:45.590 align:middle line:90%
enumeration on Windows.

00:15:45.590 --> 00:15:48.740 align:middle line:84%
And that is going to conclude
the practical demonstration

00:15:48.740 --> 00:15:51.770 align:middle line:90%
side of this video.

00:15:51.770 --> 00:15:54.400 align:middle line:84%
All right, so now that
we've been able to identify

00:15:54.400 --> 00:15:57.490 align:middle line:84%
all the user accounts on the
Windows system as well as

00:15:57.490 --> 00:15:59.590 align:middle line:84%
the groups, and we've
been able to learn more

00:15:59.590 --> 00:16:03.250 align:middle line:84%
about how to enumerate
information regarding

00:16:03.250 --> 00:16:05.620 align:middle line:84%
a specific user and
a specific group.

00:16:05.620 --> 00:16:09.280 align:middle line:84%
We can move on to the next
step, which is enumerating

00:16:09.280 --> 00:16:11.590 align:middle line:90%
network information on Windows.

00:16:11.590 --> 00:16:15.330 align:middle line:84%
So I'll be seeing you
in the next video.

00:16:15.330 --> 00:16:16.144 align:middle line:90%