WEBVTT

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


00:00:03.395 --> 00:00:05.820 align:middle line:90%
[MUSIC PLAYING]

00:00:05.820 --> 00:00:10.200 align:middle line:90%


00:00:10.200 --> 00:00:14.490 align:middle line:84%
Enumerating users and groups
on a Linux target system.

00:00:14.490 --> 00:00:15.960 align:middle line:84%
In this video,
we'll be exploring

00:00:15.960 --> 00:00:19.380 align:middle line:84%
the process of how to identify
user accounts, as well

00:00:19.380 --> 00:00:21.750 align:middle line:84%
as service accounts on
a Linux target system,

00:00:21.750 --> 00:00:24.750 align:middle line:84%
in addition to the
actual groups that

00:00:24.750 --> 00:00:28.030 align:middle line:84%
have been set up or configured
on the Linux system.

00:00:28.030 --> 00:00:30.000 align:middle line:84%
So again, you
should have an idea

00:00:30.000 --> 00:00:32.640 align:middle line:84%
as to why this
information is important,

00:00:32.640 --> 00:00:35.610 align:middle line:84%
as we already explored
the same process,

00:00:35.610 --> 00:00:38.790 align:middle line:84%
with the exception
that we were focusing

00:00:38.790 --> 00:00:40.560 align:middle line:90%
on how to do it on Windows.

00:00:40.560 --> 00:00:43.020 align:middle line:84%
In this case, we're essentially
doing the same thing,

00:00:43.020 --> 00:00:43.860 align:middle line:90%
but on Linux.

00:00:43.860 --> 00:00:47.200 align:middle line:84%
So in terms of what
information we're looking for,

00:00:47.200 --> 00:00:49.140 align:middle line:84%
we are looking for the
current user account

00:00:49.140 --> 00:00:52.080 align:middle line:84%
that we have access to and
the privileges associated

00:00:52.080 --> 00:00:53.620 align:middle line:90%
with that account.

00:00:53.620 --> 00:00:56.700 align:middle line:84%
We also want to identify
other user accounts as well

00:00:56.700 --> 00:00:59.430 align:middle line:84%
as service accounts
on the Linux system,

00:00:59.430 --> 00:01:03.840 align:middle line:84%
and we also want to identify
the groups on the Linux system,

00:01:03.840 --> 00:01:06.395 align:middle line:84%
as well as the members
of these groups.

00:01:06.395 --> 00:01:07.770 align:middle line:84%
With that being
said, we're going

00:01:07.770 --> 00:01:09.450 align:middle line:84%
to be using the
same lab environment

00:01:09.450 --> 00:01:11.670 align:middle line:84%
that we used in
the previous video,

00:01:11.670 --> 00:01:14.590 align:middle line:84%
and that lab environment
is attached to this video.

00:01:14.590 --> 00:01:16.420 align:middle line:84%
So all you need to do
is just fire it up.

00:01:16.420 --> 00:01:19.150 align:middle line:84%
We still need to gain
access to the target system.

00:01:19.150 --> 00:01:22.050 align:middle line:84%
And we already know what
vulnerable service is running

00:01:22.050 --> 00:01:24.210 align:middle line:84%
on the target system,
so we'll actually

00:01:24.210 --> 00:01:27.090 align:middle line:84%
streamline the
exploitation process

00:01:27.090 --> 00:01:28.920 align:middle line:84%
so that we can
essentially get down

00:01:28.920 --> 00:01:33.420 align:middle line:84%
to the actual business of
the day, which is enumerating

00:01:33.420 --> 00:01:35.400 align:middle line:90%
users and groups on Linux.

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

00:01:38.070 --> 00:01:40.850 align:middle line:90%


00:01:40.850 --> 00:01:41.390 align:middle line:90%
All right.

00:01:41.390 --> 00:01:43.790 align:middle line:84%
So I'm back within
the lab environment,

00:01:43.790 --> 00:01:47.300 align:middle line:84%
and the first step, of course,
is to identify the target IP

00:01:47.300 --> 00:01:49.700 align:middle line:84%
address, because every
time you restart the lab,

00:01:49.700 --> 00:01:51.870 align:middle line:84%
the target IP address
will be different.

00:01:51.870 --> 00:01:54.980 align:middle line:84%
So you can identify that
by typing in ifconfig

00:01:54.980 --> 00:01:57.545 align:middle line:84%
and take a look at the
interface ethernet 1.

00:01:57.545 --> 00:01:59.210 align:middle line:90%
Just copy this value here.

00:01:59.210 --> 00:02:01.040 align:middle line:84%
In your case, it's
going to be different.

00:02:01.040 --> 00:02:04.640 align:middle line:84%
And just change the 2 to a
3, and that's the target IP.

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

00:02:05.840 --> 00:02:10.550 align:middle line:84%
We already know that the target
system has a vsftpd 2.3.4

00:02:10.550 --> 00:02:13.430 align:middle line:90%
running on it on 0.21.

00:02:13.430 --> 00:02:17.120 align:middle line:84%
So we've already identified the
Metasploit framework exploit

00:02:17.120 --> 00:02:18.600 align:middle line:90%
module that we will be using.

00:02:18.600 --> 00:02:23.450 align:middle line:84%
So I'll start up msf
console, and we can then

00:02:23.450 --> 00:02:25.910 align:middle line:84%
set the global variable
for the rhost option

00:02:25.910 --> 00:02:27.740 align:middle line:84%
to the target IP
address so that we

00:02:27.740 --> 00:02:31.280 align:middle line:84%
don't have to type in or
specify the target IP address

00:02:31.280 --> 00:02:35.060 align:middle line:84%
every time we utilize a
specific exploit module.

00:02:35.060 --> 00:02:40.820 align:middle line:84%
So I'll change the 2 to a 3, and
we can then say search vsftpd,

00:02:40.820 --> 00:02:43.760 align:middle line:84%
and we are going to use
this exploit module here

00:02:43.760 --> 00:02:44.660 align:middle line:90%
to gain access.

00:02:44.660 --> 00:02:48.440 align:middle line:84%
So I'll say use, paste in
the exploit module name,

00:02:48.440 --> 00:02:50.690 align:middle line:84%
and if I show the options,
you can see the target

00:02:50.690 --> 00:02:52.700 align:middle line:90%
IP has already been set for me.

00:02:52.700 --> 00:02:54.350 align:middle line:90%
I can then type in exploit.

00:02:54.350 --> 00:02:57.860 align:middle line:84%
This will provide us with
a command shell session.

00:02:57.860 --> 00:03:00.420 align:middle line:84%
And of course, we can also
upgrade this to a Materpreter

00:03:00.420 --> 00:03:03.320 align:middle line:84%
session so that we also put
this in the background using

00:03:03.320 --> 00:03:06.480 align:middle line:84%
the control and z
keys on my keyboard.

00:03:06.480 --> 00:03:09.440 align:middle line:84%
So I'll say, yes, I want to
put that into the background.

00:03:09.440 --> 00:03:10.670 align:middle line:90%
Let's start my sessions.

00:03:10.670 --> 00:03:14.360 align:middle line:84%
The command shall session is
running or has an IP of 1.

00:03:14.360 --> 00:03:18.080 align:middle line:84%
So I can say
sessions, upgrade, 1,

00:03:18.080 --> 00:03:20.330 align:middle line:84%
and that will provide me
with a Meterpreter session.

00:03:20.330 --> 00:03:23.688 align:middle line:90%


00:03:23.688 --> 00:03:24.230 align:middle line:90%
There we are.

00:03:24.230 --> 00:03:25.980 align:middle line:90%
It looks like we've obtained it.

00:03:25.980 --> 00:03:29.600 align:middle line:84%
So if I now say sessions
again, we'll have sessions 2,

00:03:29.600 --> 00:03:32.510 align:middle line:84%
or session 2, and I can
interact with session 2

00:03:32.510 --> 00:03:34.370 align:middle line:90%
by typing in sessions 2.

00:03:34.370 --> 00:03:36.870 align:middle line:84%
And we now have a
Meterpreter session.

00:03:36.870 --> 00:03:40.700 align:middle line:84%
So again, whenever you're
performing or enumerating

00:03:40.700 --> 00:03:43.190 align:middle line:84%
user and group information,
you can either go through it

00:03:43.190 --> 00:03:45.020 align:middle line:90%
or do it with Meterpreter.

00:03:45.020 --> 00:03:47.300 align:middle line:84%
Alternatively, you
can do it manually.

00:03:47.300 --> 00:03:50.180 align:middle line:84%
With Meterpreter, you can pretty
much just say get user ID,

00:03:50.180 --> 00:03:52.850 align:middle line:84%
and that will tell you
the actual username.

00:03:52.850 --> 00:03:55.548 align:middle line:84%
And the way this
information is displayed

00:03:55.548 --> 00:03:57.590 align:middle line:84%
might be a little bit
confusing, because it's not

00:03:57.590 --> 00:03:58.970 align:middle line:90%
displaying the username.

00:03:58.970 --> 00:04:02.490 align:middle line:84%
It's instead displaying the
user ID of the user account.

00:04:02.490 --> 00:04:05.510 align:middle line:84%
In this case, whenever
it says 0, on Linux,

00:04:05.510 --> 00:04:09.270 align:middle line:84%
the user ID 0 is always
reserved for the root user.

00:04:09.270 --> 00:04:11.340 align:middle line:84%
And as I mentioned in
the previous video,

00:04:11.340 --> 00:04:14.360 align:middle line:84%
the root user is essentially
the Linux equivalent

00:04:14.360 --> 00:04:17.570 align:middle line:84%
of the administrator
account on Windows.

00:04:17.570 --> 00:04:20.510 align:middle line:84%
It's a user account with the
highest level of privileges

00:04:20.510 --> 00:04:24.740 align:middle line:84%
available on the Linux operating
system, or the Linux kernel.

00:04:24.740 --> 00:04:27.560 align:middle line:84%
So that means we have access to
the target system with the root

00:04:27.560 --> 00:04:28.280 align:middle line:90%
user.

00:04:28.280 --> 00:04:30.470 align:middle line:84%
And we can open up
a Shell session,

00:04:30.470 --> 00:04:33.450 align:middle line:84%
and I'll just open up
a bash session here.

00:04:33.450 --> 00:04:36.730 align:middle line:90%
So bin bash I. And there we are.

00:04:36.730 --> 00:04:39.850 align:middle line:84%
All right, so I'll navigate to
the home directory of the root

00:04:39.850 --> 00:04:40.840 align:middle line:90%
user here.

00:04:40.840 --> 00:04:43.930 align:middle line:84%
And we can type in
who am I to identify

00:04:43.930 --> 00:04:47.740 align:middle line:84%
the current user that we have
access to, which is root.

00:04:47.740 --> 00:04:49.840 align:middle line:84%
And you can see
that that means we

00:04:49.840 --> 00:04:51.970 align:middle line:84%
don't have to perform
any privilege escalation,

00:04:51.970 --> 00:04:56.200 align:middle line:84%
because we currently have access
to the system through the root

00:04:56.200 --> 00:04:56.840 align:middle line:90%
user.

00:04:56.840 --> 00:05:00.100 align:middle line:84%
And again, the root user
has the highest privileges

00:05:00.100 --> 00:05:02.300 align:middle line:90%
available on the Linux system.

00:05:02.300 --> 00:05:06.010 align:middle line:84%
Now, if I had access to the
target system via another user

00:05:06.010 --> 00:05:08.170 align:middle line:84%
account, like Bob,
then you'd need

00:05:08.170 --> 00:05:11.830 align:middle line:84%
to identify the privileges
associated with that account.

00:05:11.830 --> 00:05:14.230 align:middle line:84%
And really, when it
comes down to Linux,

00:05:14.230 --> 00:05:18.520 align:middle line:84%
the user account will either be
a non privileged user account

00:05:18.520 --> 00:05:21.880 align:middle line:84%
or the user account will
be part of the root group

00:05:21.880 --> 00:05:24.100 align:middle line:90%
or the sudo group on Ubuntu.

00:05:24.100 --> 00:05:27.340 align:middle line:84%
And if the user account
is part of that group,

00:05:27.340 --> 00:05:29.620 align:middle line:84%
it means that they have
administrative privileges

00:05:29.620 --> 00:05:33.820 align:middle line:84%
or root privileges and can run
commands with root privileges.

00:05:33.820 --> 00:05:36.190 align:middle line:84%
So again, that
can easily be done

00:05:36.190 --> 00:05:38.980 align:middle line:84%
by typing in the command
groups and then specifying

00:05:38.980 --> 00:05:39.920 align:middle line:90%
the user account.

00:05:39.920 --> 00:05:42.490 align:middle line:84%
So for example, if
there was a user account

00:05:42.490 --> 00:05:44.410 align:middle line:84%
or you gained access
to a target system

00:05:44.410 --> 00:05:47.140 align:middle line:84%
with the user account of Bob,
you would just say groups Bob.

00:05:47.140 --> 00:05:49.390 align:middle line:84%
And if it said that
user account was

00:05:49.390 --> 00:05:52.000 align:middle line:84%
part of the root group
or the sudo group,

00:05:52.000 --> 00:05:55.030 align:middle line:84%
then it meant that they have
root privileges available.

00:05:55.030 --> 00:05:59.260 align:middle line:84%
We can type in groups and root
to see what groups the root

00:05:59.260 --> 00:06:01.480 align:middle line:84%
user is a part of,
and of course, it'll

00:06:01.480 --> 00:06:05.120 align:middle line:84%
tell you that the root user
is a part of the root group.

00:06:05.120 --> 00:06:08.560 align:middle line:84%
So if you want to get an
idea of the other users

00:06:08.560 --> 00:06:10.540 align:middle line:84%
on a Linux system,
you can do that

00:06:10.540 --> 00:06:16.270 align:middle line:84%
by catting out the contents
of the etc/passwd file.

00:06:16.270 --> 00:06:19.480 align:middle line:84%
And this will display a
series of both user accounts

00:06:19.480 --> 00:06:21.125 align:middle line:90%
and service accounts.

00:06:21.125 --> 00:06:23.500 align:middle line:84%
So there's a difference between
user accounts and service

00:06:23.500 --> 00:06:24.000 align:middle line:90%
accounts.

00:06:24.000 --> 00:06:26.410 align:middle line:84%
The easiest way to
distinguish between the two

00:06:26.410 --> 00:06:28.840 align:middle line:84%
is that a user account,
like the root account

00:06:28.840 --> 00:06:32.230 align:middle line:84%
here, at the end of it, it
will have a specification

00:06:32.230 --> 00:06:35.230 align:middle line:84%
for the shell that
has been configured

00:06:35.230 --> 00:06:37.545 align:middle line:84%
for this particular
user account.

00:06:37.545 --> 00:06:38.920 align:middle line:84%
So if it's a user
account, you'll

00:06:38.920 --> 00:06:42.430 align:middle line:84%
typically see that the shell
will either be bin bash or bin

00:06:42.430 --> 00:06:44.380 align:middle line:90%
SSH for the Bourne shell.

00:06:44.380 --> 00:06:47.590 align:middle line:84%
If it is a service account,
then the shell specified

00:06:47.590 --> 00:06:49.840 align:middle line:90%
will be user s bin no login.

00:06:49.840 --> 00:06:53.170 align:middle line:84%
The reason that is the case
is because a service account

00:06:53.170 --> 00:06:56.290 align:middle line:84%
has not been set up
to essentially provide

00:06:56.290 --> 00:07:00.130 align:middle line:84%
access for users to log into
that account it has essentially

00:07:00.130 --> 00:07:02.740 align:middle line:84%
been set up to manage
a particular service.

00:07:02.740 --> 00:07:07.210 align:middle line:84%
A good example of this is the
data service account, which

00:07:07.210 --> 00:07:09.280 align:middle line:84%
again you can see has
the shell specified

00:07:09.280 --> 00:07:11.500 align:middle line:90%
as user s bin no login.

00:07:11.500 --> 00:07:14.590 align:middle line:84%
This service account is used
to manage the Apache web

00:07:14.590 --> 00:07:16.250 align:middle line:90%
server on a Linux system.

00:07:16.250 --> 00:07:20.200 align:middle line:84%
So a Linux system will have a
collection of service accounts

00:07:20.200 --> 00:07:23.650 align:middle line:84%
that is used to manage specific
services that you cannot

00:07:23.650 --> 00:07:27.910 align:middle line:84%
explicitly log into
via SSH, for example.

00:07:27.910 --> 00:07:32.030 align:middle line:84%
And if you want to limit this
list to only user accounts,

00:07:32.030 --> 00:07:33.880 align:middle line:84%
you can do that by,
again, just cutting out

00:07:33.880 --> 00:07:38.140 align:middle line:84%
the content of the password file
and then piping out the content

00:07:38.140 --> 00:07:41.830 align:middle line:84%
and grabbing essentially
using the grep

00:07:41.830 --> 00:07:47.290 align:middle line:84%
utility to exclude the no login
option or the no login string.

00:07:47.290 --> 00:07:50.290 align:middle line:84%
And once you hit Enter, you
can see that these are really

00:07:50.290 --> 00:07:53.270 align:middle line:84%
the only user accounts, with
the exception of these two,

00:07:53.270 --> 00:07:56.210 align:middle line:84%
which appear to be
service accounts as well.

00:07:56.210 --> 00:07:59.000 align:middle line:84%
So if there were other user
accounts on this Linux system,

00:07:59.000 --> 00:08:00.860 align:middle line:84%
they would be displayed
right over here.

00:08:00.860 --> 00:08:03.550 align:middle line:84%
Now the structure
of all user accounts

00:08:03.550 --> 00:08:06.370 align:middle line:84%
are specified within
the etc/passwd file

00:08:06.370 --> 00:08:07.430 align:middle line:90%
is the following.

00:08:07.430 --> 00:08:09.160 align:middle line:84%
So firstly, you
have the username.

00:08:09.160 --> 00:08:11.930 align:middle line:84%
You then have the user
ID and the group ID.

00:08:11.930 --> 00:08:14.860 align:middle line:84%
So for the root user it's
always going to be 0,

00:08:14.860 --> 00:08:18.460 align:middle line:84%
and for the root group it's
always going to be 0 as well.

00:08:18.460 --> 00:08:20.170 align:middle line:84%
You'll then have
the home directory

00:08:20.170 --> 00:08:22.960 align:middle line:84%
of that user, which is going
to be in the case of the root

00:08:22.960 --> 00:08:27.280 align:middle line:84%
user under the root directory
and then of course the shell.

00:08:27.280 --> 00:08:29.590 align:middle line:84%
Now, if there was
another user account,

00:08:29.590 --> 00:08:32.559 align:middle line:84%
a standard user account,
then the home directory

00:08:32.559 --> 00:08:34.520 align:middle line:84%
would be stored under
the home directory.

00:08:34.520 --> 00:08:37.450 align:middle line:84%
So if I list out the contents
of the home directory,

00:08:37.450 --> 00:08:40.270 align:middle line:84%
you can see there are no folders
within that directory, which

00:08:40.270 --> 00:08:44.440 align:middle line:84%
means there are no
other user accounts.

00:08:44.440 --> 00:08:46.810 align:middle line:84%
If there were other
user accounts, then

00:08:46.810 --> 00:08:48.020 align:middle line:90%
they would be displayed here.

00:08:48.020 --> 00:08:50.890 align:middle line:84%
So for example,
if I say user add,

00:08:50.890 --> 00:08:54.020 align:middle line:84%
and then I can add a user,
like Bob, for example.

00:08:54.020 --> 00:08:57.310 align:middle line:84%
So I can say user
add Bob and then

00:08:57.310 --> 00:08:59.410 align:middle line:90%
specify the SHA1 as being bash.

00:08:59.410 --> 00:09:01.810 align:middle line:84%
Because I'm the root user,
I can create other users

00:09:01.810 --> 00:09:02.830 align:middle line:90%
on the system.

00:09:02.830 --> 00:09:06.490 align:middle line:84%
I don't recommend doing this in
a real enterprise environment.

00:09:06.490 --> 00:09:09.850 align:middle line:84%
I'm just doing this for the
purposes of demonstration.

00:09:09.850 --> 00:09:11.580 align:middle line:84%
You can see it's going
to add that user.

00:09:11.580 --> 00:09:15.030 align:middle line:84%
Now if I say cat
etc/passwd you can

00:09:15.030 --> 00:09:18.840 align:middle line:84%
see that the user account Bob
is specified right over here.

00:09:18.840 --> 00:09:21.360 align:middle line:84%
And you can see the home
directory is under home Bob.

00:09:21.360 --> 00:09:25.680 align:middle line:84%
So if I say LSAL and
I specify or list

00:09:25.680 --> 00:09:28.050 align:middle line:84%
of the contents of
the home directory,

00:09:28.050 --> 00:09:30.630 align:middle line:84%
you can now see that we
have a folder called Bob.

00:09:30.630 --> 00:09:32.880 align:middle line:84%
In this case, it's
not been created,

00:09:32.880 --> 00:09:35.940 align:middle line:84%
because we did not specify
that when creating a user

00:09:35.940 --> 00:09:37.540 align:middle line:90%
or when creating the Bob user.

00:09:37.540 --> 00:09:40.830 align:middle line:84%
So I can say in this case, we
can create another user here.

00:09:40.830 --> 00:09:43.320 align:middle line:90%
I can say user add m.

00:09:43.320 --> 00:09:46.440 align:middle line:84%
I'll specify the home
directory, or we can just

00:09:46.440 --> 00:09:49.830 align:middle line:84%
use the m flag there, and I'll
specify a new name, like John,

00:09:49.830 --> 00:09:53.040 align:middle line:84%
and the shell is
going to be bin bash.

00:09:53.040 --> 00:09:56.580 align:middle line:84%
And now if I get all the
content of the password file,

00:09:56.580 --> 00:10:02.650 align:middle line:84%
you can see we have the
John user ls LSAL home.

00:10:02.650 --> 00:10:05.230 align:middle line:84%
You can see that the
John home directory,

00:10:05.230 --> 00:10:08.330 align:middle line:84%
or the folder for the user
John, has been created.

00:10:08.330 --> 00:10:10.420 align:middle line:84%
So again, as I said,
I don't recommend

00:10:10.420 --> 00:10:11.860 align:middle line:90%
that you actually create users.

00:10:11.860 --> 00:10:14.830 align:middle line:84%
This is just for
demonstration purposes.

00:10:14.830 --> 00:10:18.790 align:middle line:84%
Now, that is how to display
the list of user accounts

00:10:18.790 --> 00:10:21.400 align:middle line:84%
as well as service
accounts on a Linux system.

00:10:21.400 --> 00:10:24.460 align:middle line:84%
If you want to display the list
of groups on a Linux system,

00:10:24.460 --> 00:10:26.750 align:middle line:84%
you can essentially
just type in groups.

00:10:26.750 --> 00:10:28.600 align:middle line:84%
And in this case,
the Linux system

00:10:28.600 --> 00:10:31.400 align:middle line:84%
only has one group
right of here,

00:10:31.400 --> 00:10:33.940 align:middle line:84%
which is the root group,
which makes sense.

00:10:33.940 --> 00:10:35.590 align:middle line:84%
If there were others
then they would

00:10:35.590 --> 00:10:37.510 align:middle line:90%
be displayed there as well.

00:10:37.510 --> 00:10:40.210 align:middle line:84%
As I said, if you want to
display the members of a group,

00:10:40.210 --> 00:10:43.240 align:middle line:84%
you can just say,
for example, groups,

00:10:43.240 --> 00:10:44.900 align:middle line:90%
and then specify the user.

00:10:44.900 --> 00:10:50.140 align:middle line:84%
So I can say groups,
and we can specify Bob,

00:10:50.140 --> 00:10:52.130 align:middle line:90%
for example, that we created.

00:10:52.130 --> 00:10:54.130 align:middle line:84%
And you can see that
Bob is just part

00:10:54.130 --> 00:10:56.350 align:middle line:84%
of the Bob group,
which means it's not

00:10:56.350 --> 00:10:57.820 align:middle line:90%
part of any other group.

00:10:57.820 --> 00:11:00.310 align:middle line:84%
Now, if I wanted to
add Bob to a group,

00:11:00.310 --> 00:11:03.400 align:middle line:84%
and I'm just doing this for
the purpose of demonstration,

00:11:03.400 --> 00:11:06.190 align:middle line:84%
I can say user
mod, add to group,

00:11:06.190 --> 00:11:08.470 align:middle line:84%
and then I say,
for example, I want

00:11:08.470 --> 00:11:11.950 align:middle line:84%
to add the user Bob
to the root group,

00:11:11.950 --> 00:11:16.090 align:middle line:84%
I can say user mode
ag root and Bob.

00:11:16.090 --> 00:11:17.890 align:middle line:84%
So we're specifying
the group that we

00:11:17.890 --> 00:11:21.070 align:middle line:84%
would like to add Bob to
and then the user name

00:11:21.070 --> 00:11:24.460 align:middle line:84%
or other the user that we would
like to add to the root group.

00:11:24.460 --> 00:11:28.270 align:middle line:84%
I can then hit Enter, and
now if I say groups Bob,

00:11:28.270 --> 00:11:31.120 align:middle line:84%
you can see that Bob is now
part of the root group, which

00:11:31.120 --> 00:11:34.210 align:middle line:84%
means that he has the ability
to run commands with root

00:11:34.210 --> 00:11:39.020 align:middle line:84%
privileges, or lack of a better
word administrative privileges.

00:11:39.020 --> 00:11:42.970 align:middle line:84%
Now, if you also
want to list out--

00:11:42.970 --> 00:11:44.860 align:middle line:84%
and this is very
important, as we did it

00:11:44.860 --> 00:11:48.290 align:middle line:84%
on Windows as well-- a list
of currently logged on users,

00:11:48.290 --> 00:11:53.050 align:middle line:84%
we can do that using the w
command or we can type in W

00:11:53.050 --> 00:11:55.360 align:middle line:84%
or we can utilize
the who utility.

00:11:55.360 --> 00:11:58.180 align:middle line:84%
Now, I don't think that
the W utility and the

00:11:58.180 --> 00:12:01.400 align:middle line:84%
who utility is installed
on the target system.

00:12:01.400 --> 00:12:04.180 align:middle line:84%
But if I hit Enter, you can
see that command is not found.

00:12:04.180 --> 00:12:06.940 align:middle line:84%
I can then type in who,
and that's not displaying

00:12:06.940 --> 00:12:08.530 align:middle line:90%
any information there.

00:12:08.530 --> 00:12:10.630 align:middle line:84%
We can also utilize
the last command

00:12:10.630 --> 00:12:12.790 align:middle line:84%
to show a listing of
the last users that

00:12:12.790 --> 00:12:14.360 align:middle line:90%
logged on to the system.

00:12:14.360 --> 00:12:16.930 align:middle line:84%
So last, and you can see
that it doesn't display

00:12:16.930 --> 00:12:19.540 align:middle line:84%
any information, which means
that no users have logged

00:12:19.540 --> 00:12:21.790 align:middle line:90%
on to the system legitimately.

00:12:21.790 --> 00:12:23.530 align:middle line:84%
You might be a
little bit confused

00:12:23.530 --> 00:12:27.670 align:middle line:84%
because you're essentially
looking at this lab environment

00:12:27.670 --> 00:12:30.220 align:middle line:84%
and you've gained access to
the target system via the root

00:12:30.220 --> 00:12:32.290 align:middle line:84%
user, and you're
saying, why isn't

00:12:32.290 --> 00:12:33.490 align:middle line:90%
that being reflected here?

00:12:33.490 --> 00:12:37.540 align:middle line:84%
Well, this command
essentially only displays

00:12:37.540 --> 00:12:40.720 align:middle line:84%
legitimate authentication--
essentially,

00:12:40.720 --> 00:12:43.240 align:middle line:84%
connections or
authentication that

00:12:43.240 --> 00:12:46.000 align:middle line:84%
has been made legitimately,
either through SSH

00:12:46.000 --> 00:12:49.330 align:middle line:84%
or through a
physical TTY session.

00:12:49.330 --> 00:12:51.580 align:middle line:84%
So that's why it's not
displaying anything there.

00:12:51.580 --> 00:12:55.020 align:middle line:84%
We can also utilize
the last log command

00:12:55.020 --> 00:12:57.930 align:middle line:84%
to essentially display
a list of users that

00:12:57.930 --> 00:12:59.740 align:middle line:90%
have logged into the system.

00:12:59.740 --> 00:13:02.970 align:middle line:84%
And you can see that this
will display or will sort out

00:13:02.970 --> 00:13:05.330 align:middle line:84%
the information based on
the following columns.

00:13:05.330 --> 00:13:08.010 align:middle line:84%
So the username,
the port, their IP

00:13:08.010 --> 00:13:11.290 align:middle line:84%
address they're connecting
from, and when they logged in.

00:13:11.290 --> 00:13:14.850 align:middle line:84%
So in this case, because no
user has ever logged in via SSH

00:13:14.850 --> 00:13:18.640 align:middle line:84%
or have logged in physically,
it's not being reflected here.

00:13:18.640 --> 00:13:21.570 align:middle line:84%
However, if a user
logged in via SSH, then

00:13:21.570 --> 00:13:23.790 align:middle line:84%
it would show you
that information.

00:13:23.790 --> 00:13:25.860 align:middle line:84%
All right, so we've
covered quite a lot

00:13:25.860 --> 00:13:30.030 align:middle line:84%
of system or other user
and group enumeration,

00:13:30.030 --> 00:13:35.620 align:middle line:84%
so that is going to conclude the
practical side of this video.

00:13:35.620 --> 00:13:37.390 align:middle line:84%
So now that we have
an idea as to how

00:13:37.390 --> 00:13:41.320 align:middle line:84%
to enumerate user and group
information on a Linux system,

00:13:41.320 --> 00:13:45.280 align:middle line:84%
we can now turn our attention to
enumerating network information

00:13:45.280 --> 00:13:46.400 align:middle line:90%
on a Linux system.

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

00:13:50.190 --> 00:13:51.000 align:middle line:90%