WEBVTT

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


00:00:04.820 --> 00:00:07.712 align:middle line:90%
[MUSIC PLAYING]

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


00:00:10.140 --> 00:00:14.040 align:middle line:84%
Enumerating network
information on Windows.

00:00:14.040 --> 00:00:15.990 align:middle line:84%
In this video, we're
going to be exploring

00:00:15.990 --> 00:00:20.310 align:middle line:84%
the process of enumerating as
much information as possible in

00:00:20.310 --> 00:00:21.970 align:middle line:90%
regards to networking.

00:00:21.970 --> 00:00:25.470 align:middle line:84%
So what are we looking for
in terms of information?

00:00:25.470 --> 00:00:28.560 align:middle line:84%
Well, firstly, we need to
identify the current IP

00:00:28.560 --> 00:00:32.159 align:middle line:84%
address of the target system,
which we pretty much should

00:00:32.159 --> 00:00:34.650 align:middle line:84%
have already obtained
if we are exploiting it.

00:00:34.650 --> 00:00:37.500 align:middle line:84%
But we want to learn more
about the actual network

00:00:37.500 --> 00:00:40.770 align:middle line:84%
configuration, as well
as the network adapter,

00:00:40.770 --> 00:00:45.180 align:middle line:84%
and information like
the actual gateway

00:00:45.180 --> 00:00:46.860 align:middle line:90%
of that particular adapter.

00:00:46.860 --> 00:00:50.070 align:middle line:84%
So we are trying to
identify what host

00:00:50.070 --> 00:00:52.380 align:middle line:84%
or what IP address
on the network

00:00:52.380 --> 00:00:55.620 align:middle line:84%
is responsible or is
actually fulfilling

00:00:55.620 --> 00:00:57.670 align:middle line:90%
the role of the gateway.

00:00:57.670 --> 00:01:01.170 align:middle line:84%
We also want to identify any
internal networks that we

00:01:01.170 --> 00:01:03.120 align:middle line:90%
couldn't access publicly.

00:01:03.120 --> 00:01:05.580 align:middle line:84%
So we want to know
whether this system is

00:01:05.580 --> 00:01:08.430 align:middle line:84%
part of an internal
network that we can then

00:01:08.430 --> 00:01:12.780 align:middle line:84%
scan for to identify other
hosts on that network

00:01:12.780 --> 00:01:14.610 align:middle line:90%
that we can pivot to.

00:01:14.610 --> 00:01:19.380 align:middle line:84%
We also want to identify
the TCP UDP services that

00:01:19.380 --> 00:01:21.060 align:middle line:84%
are running on
the target system,

00:01:21.060 --> 00:01:23.820 align:middle line:84%
as well as their
respective ports.

00:01:23.820 --> 00:01:25.290 align:middle line:84%
And of course, we
also want to be

00:01:25.290 --> 00:01:29.760 align:middle line:84%
able to identify other
hosts on the network.

00:01:29.760 --> 00:01:32.010 align:middle line:84%
We are also interested in
the routing table, which

00:01:32.010 --> 00:01:37.980 align:middle line:84%
will shed light on any specific
routes that look interesting,

00:01:37.980 --> 00:01:40.710 align:middle line:84%
as well as the
current routing table.

00:01:40.710 --> 00:01:44.160 align:middle line:84%
And of course, we also
need to identify or get

00:01:44.160 --> 00:01:48.030 align:middle line:84%
an understanding of the current
state of Windows Firewall--

00:01:48.030 --> 00:01:50.220 align:middle line:84%
whether it's enabled,
whether it's disabled.

00:01:50.220 --> 00:01:53.010 align:middle line:84%
And all of this
information is really

00:01:53.010 --> 00:01:55.320 align:middle line:90%
important for various reasons.

00:01:55.320 --> 00:01:59.070 align:middle line:84%
More specifically, it's really
important during the pivoting

00:01:59.070 --> 00:02:02.970 align:middle line:84%
phase of post exploitation
in that we are essentially

00:02:02.970 --> 00:02:05.700 align:middle line:84%
trying to identify whether
the most important pieces

00:02:05.700 --> 00:02:07.590 align:middle line:84%
of information that
we're trying to identify

00:02:07.590 --> 00:02:12.150 align:middle line:84%
are internal networks or
whether we can identify

00:02:12.150 --> 00:02:15.870 align:middle line:84%
other hosts that are
part of that network

00:02:15.870 --> 00:02:17.220 align:middle line:90%
that we can pivot to.

00:02:17.220 --> 00:02:19.620 align:middle line:84%
And also, in the case
of Windows Firewall,

00:02:19.620 --> 00:02:23.430 align:middle line:84%
that can give us an idea of what
we can and cannot do in regards

00:02:23.430 --> 00:02:25.680 align:middle line:90%
to targeting specific ports.

00:02:25.680 --> 00:02:29.620 align:middle line:84%
So again, this is also
incredibly important,

00:02:29.620 --> 00:02:31.910 align:middle line:84%
especially during
the pivoting phase.

00:02:31.910 --> 00:02:35.220 align:middle line:84%
So enumeration is
essentially setting up

00:02:35.220 --> 00:02:39.270 align:middle line:84%
the stage for the other
phases of post exploitation.

00:02:39.270 --> 00:02:42.510 align:middle line:84%
With that being said, this
video has a lab environment

00:02:42.510 --> 00:02:43.200 align:middle line:90%
attached to it.

00:02:43.200 --> 00:02:44.700 align:middle line:84%
We're going to be
using the same lab

00:02:44.700 --> 00:02:47.520 align:middle line:84%
environment we've been
using during the Windows

00:02:47.520 --> 00:02:49.390 align:middle line:90%
Local enumeration section.

00:02:49.390 --> 00:02:51.180 align:middle line:84%
So all you need to do
is just fire it up,

00:02:51.180 --> 00:02:54.550 align:middle line:84%
and we can start off by gaining
access to the target system.

00:02:54.550 --> 00:02:57.660 align:middle line:84%
And then, we can take a
look at how to enumerate

00:02:57.660 --> 00:02:58.840 align:middle line:90%
network information.

00:02:58.840 --> 00:03:01.650 align:middle line:84%
So I'll be seeing you
within the lab environment.

00:03:01.650 --> 00:03:04.660 align:middle line:90%


00:03:04.660 --> 00:03:06.880 align:middle line:84%
All right, so I'm back
within the lab environment.

00:03:06.880 --> 00:03:10.970 align:middle line:84%
And like the previous videos
in this particular section,

00:03:10.970 --> 00:03:13.072 align:middle line:84%
we are provided with
the target IP address.

00:03:13.072 --> 00:03:14.530 align:middle line:84%
Of course, in your
lab environment,

00:03:14.530 --> 00:03:16.750 align:middle line:84%
the target IP address is
going to be different.

00:03:16.750 --> 00:03:18.610 align:middle line:84%
But we know what
vulnerable service

00:03:18.610 --> 00:03:19.700 align:middle line:90%
is running on the target.

00:03:19.700 --> 00:03:23.980 align:middle line:84%
So we can open up a terminal and
we can open up Msf console here

00:03:23.980 --> 00:03:28.420 align:middle line:84%
and load up the exploit module
for the Rejetto HTTP file

00:03:28.420 --> 00:03:30.820 align:middle line:84%
server that's running
on the target system.

00:03:30.820 --> 00:03:32.890 align:middle line:84%
And that will
consequently provide us

00:03:32.890 --> 00:03:34.150 align:middle line:90%
with a Meterpreter session.

00:03:34.150 --> 00:03:37.570 align:middle line:90%
So I'll say, search Rejetto.

00:03:37.570 --> 00:03:39.880 align:middle line:90%
And we can then say use 0.

00:03:39.880 --> 00:03:43.280 align:middle line:84%
Set the target
IP, so set RHOSTS.

00:03:43.280 --> 00:03:46.840 align:middle line:84%
And we can then type in exploit,
and that will provide us

00:03:46.840 --> 00:03:48.880 align:middle line:84%
with a Meterpreter
session that we

00:03:48.880 --> 00:03:53.390 align:middle line:90%
can use on the target system.

00:03:53.390 --> 00:03:57.320 align:middle line:84%
So we'll give this
a couple of seconds.

00:03:57.320 --> 00:03:58.730 align:middle line:90%
All right, fantastic.

00:03:58.730 --> 00:04:00.740 align:middle line:84%
Now that we've obtained
a Meterpreter session,

00:04:00.740 --> 00:04:03.290 align:middle line:84%
we can open up a
command shell session.

00:04:03.290 --> 00:04:05.780 align:middle line:90%
So I'll just open that up there.

00:04:05.780 --> 00:04:08.940 align:middle line:84%
And let me just zoom in, so
you can see what's going on.

00:04:08.940 --> 00:04:11.540 align:middle line:84%
So the first piece
of information

00:04:11.540 --> 00:04:13.340 align:middle line:90%
is, of course, going to do--

00:04:13.340 --> 00:04:16.279 align:middle line:84%
or going to be our
current IP address

00:04:16.279 --> 00:04:20.420 align:middle line:84%
and information pertinent to the
network adapter or the network

00:04:20.420 --> 00:04:22.940 align:middle line:84%
interface card that's been
configured on the target

00:04:22.940 --> 00:04:23.570 align:middle line:90%
system.

00:04:23.570 --> 00:04:25.640 align:middle line:84%
So in order to get
that information,

00:04:25.640 --> 00:04:28.550 align:middle line:90%
we can type in IP config.

00:04:28.550 --> 00:04:32.180 align:middle line:84%
So IP config will tell
us the current adapters

00:04:32.180 --> 00:04:33.740 align:middle line:90%
connected to this system.

00:04:33.740 --> 00:04:35.630 align:middle line:84%
In this case, there's
only one adapter,

00:04:35.630 --> 00:04:37.460 align:middle line:90%
and that's the ethernet adapter.

00:04:37.460 --> 00:04:40.910 align:middle line:84%
So it'll tell us the
DNS suffix, and then,

00:04:40.910 --> 00:04:45.080 align:middle line:84%
of course, the IPv6 address, the
IPv4 address, which we already

00:04:45.080 --> 00:04:48.050 align:middle line:90%
had right over here.

00:04:48.050 --> 00:04:49.730 align:middle line:84%
And then, of course,
the subnet mask,

00:04:49.730 --> 00:04:53.210 align:middle line:84%
which gives us an idea
of the network range

00:04:53.210 --> 00:04:57.590 align:middle line:84%
and the amount of devices or
hosts that are likely to be--

00:04:57.590 --> 00:05:00.620 align:middle line:84%
or rather, the maximum
amount of hosts that

00:05:00.620 --> 00:05:03.180 align:middle line:84%
can actually be on
this particular subnet.

00:05:03.180 --> 00:05:05.480 align:middle line:84%
And then, of course, we
have the default gateway.

00:05:05.480 --> 00:05:07.400 align:middle line:90%
So the gateway is essentially--

00:05:07.400 --> 00:05:10.370 align:middle line:84%
if you think of it from a
very basic point of view,

00:05:10.370 --> 00:05:14.030 align:middle line:84%
this is the system
or the router that's

00:05:14.030 --> 00:05:18.830 align:middle line:84%
responsible for routing all the
traffic to the various hosts

00:05:18.830 --> 00:05:22.408 align:middle line:84%
or devices that are on
this particular subnet.

00:05:22.408 --> 00:05:24.450 align:middle line:84%
And then, of course, you
have the tunnel adapter,

00:05:24.450 --> 00:05:27.560 align:middle line:90%
which is just specific to AWS.

00:05:27.560 --> 00:05:29.510 align:middle line:84%
Now, we can get
additional information

00:05:29.510 --> 00:05:34.710 align:middle line:84%
regarding the current adapters
by typing in IP config all--

00:05:34.710 --> 00:05:37.430 align:middle line:90%
so ipconfig/all.

00:05:37.430 --> 00:05:41.300 align:middle line:84%
And you can see that this will
provide us with the Windows IP

00:05:41.300 --> 00:05:42.050 align:middle line:90%
configuration.

00:05:42.050 --> 00:05:45.410 align:middle line:84%
So the Host Name, the
primary DNS suffix,

00:05:45.410 --> 00:05:50.330 align:middle line:84%
the IP routing functionality,
which is currently disabled.

00:05:50.330 --> 00:05:52.370 align:middle line:84%
And then, of course, for
the Ethernet adapter,

00:05:52.370 --> 00:05:54.840 align:middle line:84%
here, we also get
the Mac address,

00:05:54.840 --> 00:05:58.460 align:middle line:84%
which can be used for if you're
performing network pen testing

00:05:58.460 --> 00:06:01.790 align:middle line:84%
attacks that essentially
involve a Mac address

00:06:01.790 --> 00:06:04.080 align:middle line:84%
or trying to spoof
a Mac address.

00:06:04.080 --> 00:06:06.320 align:middle line:84%
We can see that DHCP
is enabled, which

00:06:06.320 --> 00:06:10.100 align:middle line:84%
means that on this network,
IP addresses are assigned

00:06:10.100 --> 00:06:13.070 align:middle line:84%
automatically by the
gateway or the device

00:06:13.070 --> 00:06:15.090 align:middle line:90%
responsible for that.

00:06:15.090 --> 00:06:17.690 align:middle line:84%
So if there is a DHCP
server, then it's,

00:06:17.690 --> 00:06:20.270 align:middle line:84%
again, responsible for
assigning IP addresses.

00:06:20.270 --> 00:06:22.640 align:middle line:84%
This is very important,
because it tells us

00:06:22.640 --> 00:06:26.420 align:middle line:84%
you know that hosts or
devices on this network

00:06:26.420 --> 00:06:29.520 align:middle line:84%
do not have static IPs
and are likely to change.

00:06:29.520 --> 00:06:31.770 align:middle line:90%
So do keep that in mind.

00:06:31.770 --> 00:06:34.130 align:middle line:84%
We get the IPv4
and IPv6 address.

00:06:34.130 --> 00:06:37.610 align:middle line:84%
And of course, we can see
that in the case of DHCP,

00:06:37.610 --> 00:06:40.950 align:middle line:84%
it tells us when the lease was
obtained and when it expires.

00:06:40.950 --> 00:06:45.590 align:middle line:84%
So whenever you connect
to a DHCP-enabled network,

00:06:45.590 --> 00:06:49.020 align:middle line:84%
you're provided with a lease
for a specific IP address.

00:06:49.020 --> 00:06:52.950 align:middle line:84%
In this case, the IP address,
as we know, is this one here.

00:06:52.950 --> 00:06:55.380 align:middle line:84%
So what's happened
is the DHCP server

00:06:55.380 --> 00:06:59.300 align:middle line:84%
has told this device that
you obtained the lease

00:06:59.300 --> 00:07:00.620 align:middle line:90%
on the following date.

00:07:00.620 --> 00:07:02.990 align:middle line:84%
It'll then expire on
the following date.

00:07:02.990 --> 00:07:06.650 align:middle line:84%
At that point, you will either
be assigned another IP address

00:07:06.650 --> 00:07:09.620 align:middle line:84%
on the network or on
the subnet, or you

00:07:09.620 --> 00:07:13.080 align:middle line:84%
can continue using this one
if there aren't any conflicts.

00:07:13.080 --> 00:07:17.000 align:middle line:84%
So we have the default
gateway and the DHCP server.

00:07:17.000 --> 00:07:20.180 align:middle line:84%
So you can see that the
DHCP server and the gateway

00:07:20.180 --> 00:07:25.040 align:middle line:84%
are the same, which is very
common in small networks.

00:07:25.040 --> 00:07:27.000 align:middle line:84%
And then, of course,
you have the DNS server,

00:07:27.000 --> 00:07:29.570 align:middle line:84%
which again, is something
that's very, very important.

00:07:29.570 --> 00:07:33.620 align:middle line:84%
So that tells you
what the DNS server--

00:07:33.620 --> 00:07:38.570 align:middle line:84%
this system-- is utilizing
for requests or DNS lookups.

00:07:38.570 --> 00:07:41.840 align:middle line:84%
And of course, right of
your NetBIOS over Tcpip

00:07:41.840 --> 00:07:44.300 align:middle line:84%
is set to enabled,
which in this case

00:07:44.300 --> 00:07:48.510 align:middle line:84%
is really pertinent to Windows
and how NetBIOS is configured.

00:07:48.510 --> 00:07:50.240 align:middle line:84%
You also get
additional information

00:07:50.240 --> 00:07:53.360 align:middle line:90%
regarding the other adapters.

00:07:53.360 --> 00:07:56.660 align:middle line:84%
Now, if this particular
system was connected

00:07:56.660 --> 00:07:59.960 align:middle line:84%
to another network or was
part of an internal network

00:07:59.960 --> 00:08:02.150 align:middle line:84%
that we could not
access publicly,

00:08:02.150 --> 00:08:05.930 align:middle line:84%
we would be able to get
that adapter information.

00:08:05.930 --> 00:08:08.330 align:middle line:84%
And we could, in the
case of pivoting,

00:08:08.330 --> 00:08:11.600 align:middle line:84%
we could add that route so
that we could essentially

00:08:11.600 --> 00:08:15.230 align:middle line:84%
gain access or scan
that internal network

00:08:15.230 --> 00:08:17.930 align:middle line:84%
through the system that
we've just exploited

00:08:17.930 --> 00:08:20.270 align:middle line:90%
as it is part of that network.

00:08:20.270 --> 00:08:23.720 align:middle line:84%
All right, so that is how to
display the current adapter

00:08:23.720 --> 00:08:26.890 align:middle line:84%
information or the network
interface card information.

00:08:26.890 --> 00:08:28.850 align:middle line:84%
And as I said, all
of this information

00:08:28.850 --> 00:08:30.620 align:middle line:84%
is really important
during pivoting.

00:08:30.620 --> 00:08:33.150 align:middle line:84%
And of course, we'll
be exploring that.

00:08:33.150 --> 00:08:36.690 align:middle line:84%
We can also display
the routing table.

00:08:36.690 --> 00:08:39.980 align:middle line:84%
So we can do that by
saying route print.

00:08:39.980 --> 00:08:41.750 align:middle line:84%
And in this case,
it'll not give us

00:08:41.750 --> 00:08:43.789 align:middle line:84%
any other additional
information apart

00:08:43.789 --> 00:08:45.310 align:middle line:90%
from what we already know.

00:08:45.310 --> 00:08:49.250 align:middle line:84%
So for example, the gateway
for this particular subnet

00:08:49.250 --> 00:08:50.730 align:middle line:90%
is set to the address.

00:08:50.730 --> 00:08:52.850 align:middle line:84%
And we were able to
get that earlier on.

00:08:52.850 --> 00:08:55.160 align:middle line:84%
There we are-- so
the default gateway.

00:08:55.160 --> 00:08:58.380 align:middle line:84%
And this will tell us whether
we have any other active routes

00:08:58.380 --> 00:08:59.520 align:middle line:90%
that might be interesting.

00:08:59.520 --> 00:09:03.090 align:middle line:84%
And in this case, there aren't
any interesting routes here.

00:09:03.090 --> 00:09:05.250 align:middle line:90%
Then, that makes sense.

00:09:05.250 --> 00:09:08.400 align:middle line:84%
And yeah, so if you
want to actually display

00:09:08.400 --> 00:09:14.730 align:middle line:84%
the routing table, you can do
that by typing in route print.

00:09:14.730 --> 00:09:16.530 align:middle line:84%
All right, now, if
I wanted to discover

00:09:16.530 --> 00:09:20.860 align:middle line:84%
other devices on the network,
which is very, very important--

00:09:20.860 --> 00:09:24.630 align:middle line:84%
so for example, if I exploited
this system, which we have,

00:09:24.630 --> 00:09:28.020 align:middle line:84%
and if I wanted to see
what other systems are

00:09:28.020 --> 00:09:32.340 align:middle line:84%
available on this network, I
could do that by saying arp a.

00:09:32.340 --> 00:09:35.790 align:middle line:84%
So arp-- we're using the arp
protocol, and we're saying a.

00:09:35.790 --> 00:09:39.330 align:middle line:84%
That'll display the
arp table, which

00:09:39.330 --> 00:09:42.610 align:middle line:84%
essentially has a list of
all devices on the network.

00:09:42.610 --> 00:09:45.690 align:middle line:84%
In this case, you can
see that we have the--

00:09:45.690 --> 00:09:48.330 align:middle line:84%
it has the address, as
well as the Mac address,

00:09:48.330 --> 00:09:52.540 align:middle line:84%
of the default gateway,
which is, again,

00:09:52.540 --> 00:09:56.140 align:middle line:84%
responsible in this
case for DHCP, as well.

00:09:56.140 --> 00:09:58.740 align:middle line:84%
We also have another
IP address, but this

00:09:58.740 --> 00:10:03.450 align:middle line:84%
is pertinent to the
actual subnet mask.

00:10:03.450 --> 00:10:05.550 align:middle line:84%
And we have a
couple of other ones

00:10:05.550 --> 00:10:08.830 align:middle line:84%
here, like this one here,
which is interesting.

00:10:08.830 --> 00:10:12.180 align:middle line:84%
You can see that that IP
address right over here

00:10:12.180 --> 00:10:15.270 align:middle line:84%
has the following Mac
address and is dynamic.

00:10:15.270 --> 00:10:18.990 align:middle line:84%
And the rest of them are
pertinent to the subnet mask

00:10:18.990 --> 00:10:19.700 align:middle line:90%
right over here.

00:10:19.700 --> 00:10:23.880 align:middle line:84%
So this would, again, give us an
idea of what other devices are

00:10:23.880 --> 00:10:27.070 align:middle line:90%
on this particular subnet here.

00:10:27.070 --> 00:10:29.100 align:middle line:84%
And in this case,
the only other device

00:10:29.100 --> 00:10:33.640 align:middle line:84%
that that's part of this subnet
is this one right over here.

00:10:33.640 --> 00:10:37.920 align:middle line:84%
This looks to be an
external IP address, which,

00:10:37.920 --> 00:10:39.270 align:middle line:90%
again, we can also target.

00:10:39.270 --> 00:10:41.350 align:middle line:84%
But again, this is
very, very important.

00:10:41.350 --> 00:10:43.680 align:middle line:84%
So this information,
again, will come in

00:10:43.680 --> 00:10:48.360 align:middle line:84%
handy during the pivoting
phase of post exploitation.

00:10:48.360 --> 00:10:50.880 align:middle line:84%
Right now, if we
wanted to display

00:10:50.880 --> 00:10:53.910 align:middle line:84%
a list of open connections or
the services that are currently

00:10:53.910 --> 00:10:56.010 align:middle line:84%
running and the ports
that they're running on

00:10:56.010 --> 00:11:02.600 align:middle line:84%
on the target system, we can
do that by saying netstat ano.

00:11:02.600 --> 00:11:06.680 align:middle line:84%
This will display a list of
services that are currently

00:11:06.680 --> 00:11:08.010 align:middle line:90%
running or listening.

00:11:08.010 --> 00:11:11.930 align:middle line:84%
So in this case, we can see
that we have Port 80 and then

00:11:11.930 --> 00:11:16.040 align:middle line:84%
the rest of the typical
Windows protocols

00:11:16.040 --> 00:11:17.930 align:middle line:84%
that are all
running here on TCP.

00:11:17.930 --> 00:11:20.390 align:middle line:84%
So the way the
information is sorted

00:11:20.390 --> 00:11:23.030 align:middle line:84%
is you have your protocol,
the local address,

00:11:23.030 --> 00:11:25.010 align:middle line:84%
the foreign address,
if a connection has

00:11:25.010 --> 00:11:29.100 align:middle line:84%
been established, the
state, and the process ID.

00:11:29.100 --> 00:11:32.090 align:middle line:84%
So this is very, very important,
because right over here,

00:11:32.090 --> 00:11:35.210 align:middle line:84%
starting off with these ones,
these are the services that

00:11:35.210 --> 00:11:36.330 align:middle line:90%
are running on the target.

00:11:36.330 --> 00:11:39.740 align:middle line:84%
So you can see there have been
binded to the target system's

00:11:39.740 --> 00:11:43.430 align:middle line:84%
IP address and can be
accessed from the local host

00:11:43.430 --> 00:11:47.450 align:middle line:84%
or the system's external
IP address or public IP

00:11:47.450 --> 00:11:48.780 align:middle line:90%
address, for that matter.

00:11:48.780 --> 00:11:51.320 align:middle line:84%
So we can see that this
will pretty much give us

00:11:51.320 --> 00:11:54.590 align:middle line:84%
the services that we would
have identified with Nmap.

00:11:54.590 --> 00:11:58.550 align:middle line:84%
So we have the HTTP file
server running on Port 80.

00:11:58.550 --> 00:12:02.210 align:middle line:90%
We also have NetBIOS and SMB.

00:12:02.210 --> 00:12:06.530 align:middle line:84%
And then, of course, all RDP
and a few other Windows Services

00:12:06.530 --> 00:12:09.080 align:middle line:84%
running and their
respective ports.

00:12:09.080 --> 00:12:12.500 align:middle line:84%
Now, one additional-- or
the additional information

00:12:12.500 --> 00:12:15.540 align:middle line:84%
that's really interesting
here is this right over here.

00:12:15.540 --> 00:12:20.300 align:middle line:84%
So in your case, you'll
be able to identify

00:12:20.300 --> 00:12:25.310 align:middle line:84%
a service that's currently
connected to Port 4444.

00:12:25.310 --> 00:12:26.760 align:middle line:90%
So that the foreign address.

00:12:26.760 --> 00:12:30.140 align:middle line:84%
So this is the system
that is connecting

00:12:30.140 --> 00:12:33.740 align:middle line:84%
to this particular
port on the target IP

00:12:33.740 --> 00:12:35.350 align:middle line:90%
or on the target system.

00:12:35.350 --> 00:12:37.850 align:middle line:84%
So you might be asking yourself,
why am I pointing this out?

00:12:37.850 --> 00:12:40.160 align:middle line:84%
Well, this is our
Meterpreter session.

00:12:40.160 --> 00:12:43.190 align:middle line:84%
You can see that the connection
or the state is established,

00:12:43.190 --> 00:12:46.820 align:middle line:84%
and the process ID of
this connection is 2540.

00:12:46.820 --> 00:12:49.970 align:middle line:84%
So you can see that this
is the actual listener

00:12:49.970 --> 00:12:55.580 align:middle line:84%
or the reverse handler
of our Kali Linux system,

00:12:55.580 --> 00:12:58.080 align:middle line:84%
and this is the IP of
the Kali Linux system.

00:12:58.080 --> 00:13:00.590 align:middle line:84%
So we can see that the
system right over here--

00:13:00.590 --> 00:13:02.240 align:middle line:84%
because this is
a reverse shell--

00:13:02.240 --> 00:13:06.320 align:middle line:84%
the target system has
connected to our Kali Linux

00:13:06.320 --> 00:13:09.290 align:middle line:90%
reverse handler on port 4444.

00:13:09.290 --> 00:13:11.510 align:middle line:90%
And the state is established.

00:13:11.510 --> 00:13:14.780 align:middle line:90%
So that gives you an idea--

00:13:14.780 --> 00:13:16.400 align:middle line:90%
that'll give you an idea of--

00:13:16.400 --> 00:13:19.460 align:middle line:84%
this will really
give you a good idea

00:13:19.460 --> 00:13:21.800 align:middle line:84%
of what services are
currently running

00:13:21.800 --> 00:13:23.760 align:middle line:90%
as well as established sessions.

00:13:23.760 --> 00:13:28.010 align:middle line:84%
So for example, if we connect
it to the target system via RDP,

00:13:28.010 --> 00:13:29.677 align:middle line:84%
that would actually
be displayed here.

00:13:29.677 --> 00:13:31.760 align:middle line:84%
And again, it gives you
an idea of what's running,

00:13:31.760 --> 00:13:36.000 align:middle line:84%
as well as what network sessions
may have been established.

00:13:36.000 --> 00:13:37.940 align:middle line:90%
So do keep an eye on that.

00:13:37.940 --> 00:13:40.700 align:middle line:90%


00:13:40.700 --> 00:13:43.060 align:middle line:84%
And if we take a look at
some of the other ones here,

00:13:43.060 --> 00:13:45.040 align:middle line:84%
you can see that,
again, this will just

00:13:45.040 --> 00:13:49.600 align:middle line:84%
display the services that are
currently blinded to the target

00:13:49.600 --> 00:13:50.380 align:middle line:90%
IP address.

00:13:50.380 --> 00:13:53.500 align:middle line:84%
And at the bottom, you
have the UDP ports.

00:13:53.500 --> 00:13:58.420 align:middle line:84%
So you can see that we have
UDP Port 135 running or open,

00:13:58.420 --> 00:14:00.910 align:middle line:90%
3389, et cetera, et cetera.

00:14:00.910 --> 00:14:04.270 align:middle line:84%
And right at the bottom,
for the case of UDP,

00:14:04.270 --> 00:14:07.870 align:middle line:84%
we also have the IPv6
address specified here.

00:14:07.870 --> 00:14:09.370 align:middle line:84%
So again, this gives
you a good idea

00:14:09.370 --> 00:14:13.270 align:middle line:84%
of what's running in regards
to network services as well

00:14:13.270 --> 00:14:14.200 align:middle line:90%
as their protocols.

00:14:14.200 --> 00:14:16.720 align:middle line:84%
And it also displays
important information

00:14:16.720 --> 00:14:19.360 align:middle line:84%
like established
network sessions

00:14:19.360 --> 00:14:23.590 align:middle line:84%
or the ports being utilized by
specific services or protocols.

00:14:23.590 --> 00:14:27.160 align:middle line:84%
And in this case, this
is a Meterpreter session.

00:14:27.160 --> 00:14:29.590 align:middle line:84%
Right now, the final
piece of information

00:14:29.590 --> 00:14:34.030 align:middle line:84%
that is very important is
the actual Windows Firewall

00:14:34.030 --> 00:14:35.590 align:middle line:90%
configuration and state.

00:14:35.590 --> 00:14:38.950 align:middle line:84%
This can be displayed
by saying netsh.

00:14:38.950 --> 00:14:43.600 align:middle line:84%
And let's start off by saying by
enumerating the firewall state.

00:14:43.600 --> 00:14:49.270 align:middle line:84%
So I can say netsh
firewall show state.

00:14:49.270 --> 00:14:50.770 align:middle line:84%
We'll give this a
couple of seconds.

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


00:14:57.440 --> 00:15:01.160 align:middle line:84%
Right over here, you can see
that in some cases on newer

00:15:01.160 --> 00:15:04.520 align:middle line:84%
version of Windows, it'll tell
you that netsh firewall is

00:15:04.520 --> 00:15:05.540 align:middle line:90%
deprecated.

00:15:05.540 --> 00:15:08.690 align:middle line:84%
So in that case, you
then want to utilize

00:15:08.690 --> 00:15:11.540 align:middle line:84%
the netsh advanced
firewall firewall.

00:15:11.540 --> 00:15:19.545 align:middle line:84%
So in this case, we can say
netsh, advfirewall, firewall

00:15:19.545 --> 00:15:20.045 align:middle line:90%
state.

00:15:20.045 --> 00:15:25.150 align:middle line:90%


00:15:25.150 --> 00:15:26.990 align:middle line:90%
And let me just modify that.

00:15:26.990 --> 00:15:31.240 align:middle line:84%
So we can say
netsh, advfirewall.

00:15:31.240 --> 00:15:32.830 align:middle line:84%
And let me just
display the commands

00:15:32.830 --> 00:15:34.730 align:middle line:90%
that you can run with this.

00:15:34.730 --> 00:15:37.440 align:middle line:90%
So I'll just type that in.

00:15:37.440 --> 00:15:40.600 align:middle line:84%
So we can specify
the firewall itself.

00:15:40.600 --> 00:15:45.420 align:middle line:84%
So I'll say netsh
advfirewall, firewall.

00:15:45.420 --> 00:15:47.460 align:middle line:84%
And let's see the
commands that we can type

00:15:47.460 --> 00:15:53.060 align:middle line:84%
or we can use in regards
to the actual firewall.

00:15:53.060 --> 00:15:58.400 align:middle line:84%
So in this case, we can actually
display the specified firewall

00:15:58.400 --> 00:15:58.940 align:middle line:90%
rule.

00:15:58.940 --> 00:16:01.400 align:middle line:84%
We can set new values
for properties,

00:16:01.400 --> 00:16:03.980 align:middle line:84%
or we can configure
new firewall rules.

00:16:03.980 --> 00:16:06.440 align:middle line:90%
And we can essentially display--

00:16:06.440 --> 00:16:08.780 align:middle line:84%
we can also open
up the Help command

00:16:08.780 --> 00:16:10.100 align:middle line:90%
or utilize the Help command.

00:16:10.100 --> 00:16:14.410 align:middle line:84%
So we'll say netsh
advfirewall, and we can then

00:16:14.410 --> 00:16:16.090 align:middle line:90%
say firewall help.

00:16:16.090 --> 00:16:19.257 align:middle line:90%


00:16:19.257 --> 00:16:21.090 align:middle line:84%
And that will display
the following command.

00:16:21.090 --> 00:16:22.700 align:middle line:90%
So let's just run this.

00:16:22.700 --> 00:16:26.150 align:middle line:90%
And I'll just copy that there.

00:16:26.150 --> 00:16:30.950 align:middle line:84%
And instead of saying help, we
can now say, for example, dump.

00:16:30.950 --> 00:16:36.350 align:middle line:84%
And in this case, we don't
have any configuration script.

00:16:36.350 --> 00:16:38.210 align:middle line:90%
So we can say, show.

00:16:38.210 --> 00:16:42.350 align:middle line:84%
And that'll require us to
specify a specific firewall

00:16:42.350 --> 00:16:42.990 align:middle line:90%
rule.

00:16:42.990 --> 00:16:48.290 align:middle line:84%
However, if we want
to display the state,

00:16:48.290 --> 00:16:50.060 align:middle line:84%
we can essentially
display the state

00:16:50.060 --> 00:16:54.740 align:middle line:84%
by saying netsh advfirewall,
and then we can say,

00:16:54.740 --> 00:16:58.300 align:middle line:90%
show all profiles.

00:16:58.300 --> 00:17:02.320 align:middle line:84%
And in this case, it looks like
the Windows Firewall service

00:17:02.320 --> 00:17:04.060 align:middle line:90%
is disabled and not running.

00:17:04.060 --> 00:17:07.839 align:middle line:84%
So that tells us whether
or not the Windows Firewall

00:17:07.839 --> 00:17:08.390 align:middle line:90%
is running.

00:17:08.390 --> 00:17:10.960 align:middle line:84%
And in this case, it looks
like it isn't running.

00:17:10.960 --> 00:17:14.530 align:middle line:84%
So again, we can utilize the
documentation or the Help menu

00:17:14.530 --> 00:17:16.670 align:middle line:90%
for adv firewall.

00:17:16.670 --> 00:17:18.280 align:middle line:90%
So I'll just hit Enter.

00:17:18.280 --> 00:17:21.260 align:middle line:84%
And you can see
that in this case,

00:17:21.260 --> 00:17:24.490 align:middle line:84%
we can, again, make changes
to the firewall using

00:17:24.490 --> 00:17:27.589 align:middle line:90%
netsh advfirewall, firewall.

00:17:27.589 --> 00:17:29.830 align:middle line:84%
And in this case,
what we did is we

00:17:29.830 --> 00:17:33.940 align:middle line:84%
essentially showed all profiles,
which would essentially

00:17:33.940 --> 00:17:35.930 align:middle line:90%
display all firewall rules.

00:17:35.930 --> 00:17:39.910 align:middle line:84%
But in this case, we can see
that the Windows Firewall

00:17:39.910 --> 00:17:40.790 align:middle line:90%
is disabled.

00:17:40.790 --> 00:17:44.170 align:middle line:84%
So again, that can be
very useful in trying

00:17:44.170 --> 00:17:49.690 align:middle line:84%
to identify whether specific
ports have been blocked.

00:17:49.690 --> 00:17:51.430 align:middle line:84%
And again, all of
this information

00:17:51.430 --> 00:17:54.220 align:middle line:84%
is useful if you're trying
to utilize a specific port

00:17:54.220 --> 00:17:57.730 align:middle line:84%
or you're trying to set up a
listener, et cetera, et cetera.

00:17:57.730 --> 00:17:59.560 align:middle line:84%
All right, so that
is going to conclude

00:17:59.560 --> 00:18:04.190 align:middle line:84%
the practical demonstration
side of this video.

00:18:04.190 --> 00:18:05.950 align:middle line:84%
All right, so now
that we've explored

00:18:05.950 --> 00:18:09.280 align:middle line:84%
the process of enumerating
system information, users,

00:18:09.280 --> 00:18:13.400 align:middle line:84%
and groups, as well as network
information, in the next video,

00:18:13.400 --> 00:18:16.750 align:middle line:84%
we'll be exploring the process
of enumerating service and task

00:18:16.750 --> 00:18:17.540 align:middle line:90%
information.

00:18:17.540 --> 00:18:20.620 align:middle line:84%
So we'll be trying to
identify a list of running

00:18:20.620 --> 00:18:23.590 align:middle line:84%
services on Windows, as
well as scheduled tasks,

00:18:23.590 --> 00:18:26.620 align:middle line:84%
and essentially, trying
to get an idea of what

00:18:26.620 --> 00:18:30.790 align:middle line:84%
is running on the target system
from the perspective of tasks.

00:18:30.790 --> 00:18:34.600 align:middle line:84%
And again, that is important
for its own reasons

00:18:34.600 --> 00:18:37.430 align:middle line:84%
that I'll be stating
in the next video.

00:18:37.430 --> 00:18:39.310 align:middle line:84%
So that's going to
be it for this video.

00:18:39.310 --> 00:18:43.260 align:middle line:84%
And I will be seeing
you in the next video.

00:18:43.260 --> 00:18:44.000 align:middle line:90%