WEBVTT

00:00:00.500 --> 00:00:02.410
again, and welcome back.

00:00:02.420 --> 00:00:04.440
So as a security professional now,

00:00:04.450 --> 00:00:08.610
you may find extreme value in being able to quickly view flow and

00:00:08.610 --> 00:00:12.380
DNS‑related traffic as it pertains to your network connectivity.

00:00:12.390 --> 00:00:17.520
So what we're going to do now is take a quick deep dive overview into how you

00:00:17.520 --> 00:00:22.360
can quickly see that pairing of your Winlogbeat with your Packetbeat to

00:00:22.360 --> 00:00:25.410
provide further security insights into your network.

00:00:25.420 --> 00:00:28.520
So the first thing we're going to look at is the Hosts tab.

00:00:28.720 --> 00:00:30.670
So we're going to go ahead and navigate to that now.

00:00:30.670 --> 00:00:33.610
It's under Security and then Hosts.

00:00:34.830 --> 00:00:35.290
Now,

00:00:35.300 --> 00:00:39.320
the first items we'll see is just an overview of different events in

00:00:39.320 --> 00:00:43.370
relation between our Win event logs and our Packetbeat logs.

00:00:43.370 --> 00:00:47.090
We can verify this really by checking the activity data sources

00:00:47.090 --> 00:00:49.200
that are being used in these graphs below.

00:00:49.200 --> 00:00:53.430
To do that, we'll navigate over to the Data sources drop‑down,

00:00:53.440 --> 00:00:58.760
and you can verify here that we have the following data source

00:00:58.770 --> 00:01:02.880
indexes being used in a wildcard manner on this page.

00:01:03.120 --> 00:01:04.170
So overall,

00:01:04.180 --> 00:01:06.790
this first page just kind of gives us a bird's eye view

00:01:06.790 --> 00:01:10.780
into source and destination type activity,

00:01:10.790 --> 00:01:15.520
as well as activity on host in relation to user authentication events.

00:01:15.520 --> 00:01:19.620
Now scrolling down, we'll see another tab called All hosts,

00:01:19.630 --> 00:01:22.950
and that gives us more information around connected hosts,

00:01:22.960 --> 00:01:26.550
the last time that they were seen, different OS version,

00:01:26.550 --> 00:01:28.160
their names, their versioning,

00:01:28.170 --> 00:01:33.060
just another quick look into what is communicating throughout your network.

00:01:33.070 --> 00:01:36.330
So the next part of importance here that we may need to dig into

00:01:36.330 --> 00:01:38.940
from a security perspective is authentications.

00:01:38.950 --> 00:01:44.477
So this provides us with a high‑level overview graph of successful and failed.

00:01:44.487 --> 00:01:48.220
Also they're not shown, but there are failed authentications that could occur.

00:01:48.220 --> 00:01:53.870
If we scroll down, we see a more in‑depth look of these types of activities,

00:01:53.957 --> 00:01:57.387
including last failed source destination,

00:01:57.387 --> 00:02:00.050
the failure reason, timestamps, etc,

00:02:00.067 --> 00:02:04.764
all helpful when performing investigations on different hosts.

00:02:04.924 --> 00:02:08.150
The next tab we have here is Uncommon processes,

00:02:08.163 --> 00:02:11.454
which highlights suspicious processes running that are not

00:02:11.464 --> 00:02:15.380
common to the OS or are just not run very often.

00:02:15.380 --> 00:02:20.054
We can quickly get a sense for what commands were run and the different

00:02:20.054 --> 00:02:23.814
users that may be attempting to run these commands as well.

00:02:24.084 --> 00:02:26.804
Next we have the Events tab.

00:02:26.814 --> 00:02:29.841
Now the Events tab is a summarized view of what you

00:02:29.841 --> 00:02:32.001
can also see in the Discover tab.

00:02:32.011 --> 00:02:36.461
It provides a sequential look into the raw events as they occur and it

00:02:36.461 --> 00:02:41.171
can be helpful to quickly see within a certain time period what might be

00:02:41.171 --> 00:02:43.780
occurring on a system or between systems.

00:02:43.780 --> 00:02:46.201
By looking at the event.action field,

00:02:46.201 --> 00:02:49.530
you can actually see what type of event is in question,

00:02:49.530 --> 00:02:53.100
whether it's an off event, a network or security event,

00:02:53.110 --> 00:02:56.090
and then we can also observe the type of messages that

00:02:56.090 --> 00:02:58.340
are being relayed in the raw format.

00:02:58.350 --> 00:03:00.550
So this is just a quick way to see like,

00:03:00.550 --> 00:03:05.500
okay, here's an overview, there's registry actions that were created,

00:03:05.510 --> 00:03:08.940
registry values that were set, there's different files that were created.

00:03:08.940 --> 00:03:14.840
And if we scroll down, we can get a sense more in depth of this type of activity.

00:03:14.850 --> 00:03:18.670
If we expand this message field out a little bit and we hover over it,

00:03:18.680 --> 00:03:22.130
it will actually provide us with the raw message or raw log

00:03:22.140 --> 00:03:26.060
that came with that specific type of event,

00:03:26.070 --> 00:03:28.910
which makes investigations quite simple.

00:03:28.920 --> 00:03:31.890
Tie this into a specific security use case.

00:03:31.900 --> 00:03:33.680
As a security professional,

00:03:33.690 --> 00:03:38.040
you may be presented with threat hunting exercises or actual

00:03:38.040 --> 00:03:41.790
investigations on alerts that you've created to better understand

00:03:41.790 --> 00:03:44.390
maybe what's happening around a specific host.

00:03:44.750 --> 00:03:47.840
This Hosts section in general can easily provide you with

00:03:47.840 --> 00:03:49.540
a quick look into your environment.

00:03:49.540 --> 00:03:51.380
Let's say, for example,

00:03:51.390 --> 00:03:55.130
you know there was a phishing email that was going around and part

00:03:55.130 --> 00:03:58.400
of this email was if you clicked on the link or interacted with

00:03:58.410 --> 00:04:00.120
maybe a document that was attached,

00:04:00.130 --> 00:04:02.820
it would attempt to set a registry value or make a

00:04:02.830 --> 00:04:05.820
registry change on that user's local system.

00:04:05.820 --> 00:04:07.240
With the Events tab,

00:04:07.240 --> 00:04:11.340
we can quickly filter for registry events and get a list of all

00:04:11.340 --> 00:04:14.270
hosts that had corresponding registry changes,

00:04:14.280 --> 00:04:18.110
as well as any potential outbound connections established within the

00:04:18.110 --> 00:04:21.329
given timeframe of the phishing email campaign.

00:04:21.700 --> 00:04:24.130
Now as you can see that we looked at before,

00:04:24.140 --> 00:04:28.280
this high‑level overview chart did give us a quick breakdown that there

00:04:28.280 --> 00:04:32.280
was some registry value changes that attempted to load.

00:04:32.290 --> 00:04:34.660
And then also if we were to just, let's say,

00:04:34.670 --> 00:04:38.010
create a filter for just registry changes in general,

00:04:38.010 --> 00:04:41.200
and then we looked and also looked for any outbound

00:04:41.200 --> 00:04:43.650
external connections via Packetbeat,

00:04:43.650 --> 00:04:47.790
we could further solidify a specific type of activity that could be

00:04:47.790 --> 00:04:51.320
occurring and narrow our focus on any investigations.

00:04:51.330 --> 00:04:53.090
So with that data in mind,

00:04:53.100 --> 00:04:56.320
now that we have a solid understanding and an idea of how to

00:04:56.320 --> 00:04:59.270
identify this activity that we've deemed important,

00:04:59.270 --> 00:05:04.100
let's dive into how we can enable or create a custom alert around this data.

00:05:04.110 --> 00:05:05.910
So the first thing we're going to do is we're going to

00:05:05.910 --> 00:05:08.930
navigate to the Alerts section under Security and we're

00:05:08.930 --> 00:05:11.310
going to click on Manage rules.

00:05:11.320 --> 00:05:15.140
We're going to go down to Security, click on Alerts,

00:05:15.150 --> 00:05:20.400
and then the right side of the screen here you'll see this Manage rules.

00:05:20.400 --> 00:05:22.010
Out of the gate,

00:05:22.010 --> 00:05:25.440
you'll see that ELK does come prebuilt with quite a few different rules.

00:05:25.440 --> 00:05:29.860
You'll see there's around 600 or so prebuilt and included rules that are

00:05:29.870 --> 00:05:34.300
activated or that you can activate upon creating your ELK instance.

00:05:34.310 --> 00:05:35.320
So,

00:05:35.330 --> 00:05:37.550
we're going to go ahead and just take a look at a couple of

00:05:37.550 --> 00:05:40.550
these just to see kind of what they're made of in terms of

00:05:40.560 --> 00:05:42.660
what Packetbeat maybe populating.

00:05:42.670 --> 00:05:46.320
So I'm going to go ahead and just click on this Unusual DNS Activity alert.

00:05:46.330 --> 00:05:47.520
Let's take a look at this.

00:05:47.530 --> 00:05:51.700
So out of the gate, I mean, these are pretty straightforward rules.

00:05:51.700 --> 00:05:55.810
They give you an example of what this alert or this rule is

00:05:55.820 --> 00:05:57.900
generally looking for and will detect on.

00:05:57.900 --> 00:05:58.920
It gives you the severity.

00:05:58.920 --> 00:06:02.060
It gives you the link of how they actually created it.

00:06:02.070 --> 00:06:03.550
And then also actually it's pretty nice,

00:06:03.550 --> 00:06:06.090
they give you false positive examples,

00:06:06.100 --> 00:06:09.580
which is really nice when doing investigations and you want to reference like,

00:06:09.580 --> 00:06:12.920
okay, is this a legitimate detection or is it not?

00:06:12.930 --> 00:06:18.410
And then on this right side they provide you with the makeup of the alert,

00:06:18.410 --> 00:06:20.760
and this is an anomaly type alert.

00:06:20.770 --> 00:06:25.930
So anything that reaches that score of 50 or more will trigger this rule.

00:06:25.940 --> 00:06:28.570
But there are other types of alerts as well that we can

00:06:28.580 --> 00:06:31.910
kind of dive into in and further refine.

00:06:31.920 --> 00:06:35.360
So we're going to click back on the Rules section and we're

00:06:35.360 --> 00:06:38.430
going to just do a quick little search on DNS and see what other

00:06:38.440 --> 00:06:41.620
prebuilt DNS rules are included here.

00:06:41.630 --> 00:06:43.970
Let's go ahead and click on this DNS Tunneling.

00:06:43.970 --> 00:06:46.340
Another low‑‑‑ or actually better yet,

00:06:46.340 --> 00:06:48.480
let's click on this DNS Activity to the Internet.

00:06:48.480 --> 00:06:49.290
It's a medium.

00:06:49.750 --> 00:06:54.040
So as you can see the left side, the About section has the same type of makeup.

00:06:54.040 --> 00:06:59.320
It gives you the risk score, severity, the links of how they created the alert,

00:06:59.320 --> 00:07:04.120
but then on the right side it's a little bit more specific as it tells you

00:07:04.120 --> 00:07:08.150
the specific type of index patterns that are being used,

00:07:08.160 --> 00:07:09.720
Packetbeat being one of them,

00:07:09.720 --> 00:07:14.810
and then also it lists out the exact query of what it's looking for

00:07:14.820 --> 00:07:19.030
for this type of DNS activity to the internet.

00:07:19.040 --> 00:07:25.050
It's listing out all possible internal network subnets and looking

00:07:25.050 --> 00:07:28.200
for anything that is communicating outbound.

00:07:28.410 --> 00:07:32.050
And the best part about this is if you wanted to tweet this,

00:07:32.050 --> 00:07:33.840
maybe remove some of them because, hey,

00:07:33.840 --> 00:07:37.870
maybe you only have a 172 network and you can get rid of the rest of them,

00:07:37.870 --> 00:07:39.890
in ELK you are able to do that.

00:07:39.900 --> 00:07:43.980
So now that we've looked at a couple of good examples of DNS prebuilt rules,

00:07:43.990 --> 00:07:48.050
let's go ahead and look into what it would look like to create our own type of

00:07:48.050 --> 00:07:51.760
networking or Packetbeat‑related alert within the ELK system.

00:07:51.770 --> 00:07:55.360
So what we're going to go ahead and do is click on the,

00:07:55.360 --> 00:07:57.420
we're going to go back on Rules,

00:07:57.980 --> 00:07:59.660
and we're going to click this button in the top

00:07:59.660 --> 00:08:02.360
right corner called Create new rule.

00:08:02.370 --> 00:08:05.990
Now, here we're going to choose the type of alert that we want to create.

00:08:05.990 --> 00:08:09.540
For the purposes of this demo, we're just going to do a custom query,

00:08:09.540 --> 00:08:10.640
which is already selected.

00:08:10.650 --> 00:08:14.500
But depending on your fancy, you can go ahead and create a machine learning rule,

00:08:14.510 --> 00:08:18.630
a threshold type rule, indicator match or even an event correlation.

00:08:18.640 --> 00:08:20.240
Now by scrolling down,

00:08:20.250 --> 00:08:24.460
you will see the index patterns that are being used in the current logic.

00:08:24.460 --> 00:08:28.400
As you can see, both Packetbeat and Winlogbeat are being considered.

00:08:28.400 --> 00:08:29.530
If you wanted to,

00:08:29.530 --> 00:08:32.159
you could go through and exclude any of the other ones

00:08:32.169 --> 00:08:34.080
that were not relevant to the search.

00:08:34.090 --> 00:08:38.400
So in the Custom query section, this little search bar looking thing right here,

00:08:38.409 --> 00:08:40.909
you'll go ahead and paste in your query that you would want

00:08:40.909 --> 00:08:44.120
to change or start creating from scratch.

00:08:44.130 --> 00:08:48.550
So as you can see, the text box is enabled with auto fill,

00:08:48.550 --> 00:08:51.580
so as I click on it, this pop‑up just happened.

00:08:51.590 --> 00:08:55.800
So if I just started typing in Win log, as you can see,

00:08:55.810 --> 00:08:58.660
it fills in with all the possible indexes and data

00:08:58.660 --> 00:09:00.240
sources that I can search from.

00:09:00.250 --> 00:09:02.040
Now once you have determined your search,

00:09:02.040 --> 00:09:06.030
you can actually test the search live against your dataset to

00:09:06.030 --> 00:09:08.780
ensure it's triggering against live results.

00:09:08.790 --> 00:09:11.400
So if I went in, and let's just try this,

00:09:11.410 --> 00:09:15.970
just for purposes of the demo here, we're going to type in event,

00:09:15.980 --> 00:09:19.540
let's see here, event, let's go event log.

00:09:19.550 --> 00:09:21.820
We're just going to click that in there,

00:09:21.830 --> 00:09:23.780
and we'll go ahead and put the wildcard in,

00:09:24.630 --> 00:09:28.180
and then we'll scroll down here and we click this Preview results button.

00:09:28.180 --> 00:09:31.880
And as you can see, it prepopulates, okay,

00:09:31.890 --> 00:09:34.400
obviously that's a broad scoping search,

00:09:34.410 --> 00:09:37.480
but it's looking at that specific data source for Win log events

00:09:37.490 --> 00:09:41.100
and it's populating everything that it can see. That way you know

00:09:41.100 --> 00:09:42.660
when you're creating your custom alerts,

00:09:42.670 --> 00:09:46.060
okay, I'm working with the right dataset and it's actually getting data.

00:09:46.060 --> 00:09:50.380
As you create your alerts and they get more specific, you can continue

00:09:50.380 --> 00:09:53.630
to do this check if you know that there should be results there to

00:09:53.630 --> 00:09:58.470
verify that you're narrowing your focus down based on timeframe of your

00:09:58.470 --> 00:09:59.960
alert that's in question.

00:09:59.970 --> 00:10:02.080
Okay, now that we've verified our data,

00:10:02.090 --> 00:10:04.110
we're going to go ahead and click Continue.

00:10:04.120 --> 00:10:07.130
We're just assuming that our prebuilt search that we put in there is

00:10:07.130 --> 00:10:10.640
going to be the one that we're going with, so we click Continue, and

00:10:10.640 --> 00:10:13.320
this will bring up the next section that we need to fill out, which

00:10:13.320 --> 00:10:14.910
is the the Rules section.

00:10:15.620 --> 00:10:18.610
Now in this section, this is where we'll put the name of our

00:10:18.610 --> 00:10:21.740
rule, we'll just call it test, any description,

00:10:21.740 --> 00:10:24.660
we can put any type of response notes we want in there or just

00:10:24.660 --> 00:10:27.770
high level metrics around what to expect.

00:10:27.780 --> 00:10:31.670
We can set our severity, as well as define the risk score that we

00:10:31.670 --> 00:10:36.060
wanted to trigger on, as well as any tagging that may be needed in

00:10:36.060 --> 00:10:40.340
order to further define what this rule is triggering against. Next we

00:10:40.340 --> 00:10:42.450
have the Schedule rule section.

00:10:42.460 --> 00:10:45.620
This is where we'll actually set the threshold of when this rule

00:10:45.630 --> 00:10:49.690
will look at the logs and the specific log types and check for the

00:10:49.690 --> 00:10:51.990
specific criteria that you've laid out.

00:10:52.000 --> 00:10:57.050
Now I recommend anything from additional lookback time of 3 to 5

00:10:57.050 --> 00:11:00.400
minutes or more and then have it run every 5 minutes.

00:11:00.610 --> 00:11:08.420
This will ensure that you're checking it every 3 to 5 minutes or so and that

00:11:08.430 --> 00:11:11.110
the rule is also running in that same timeframe as well.

00:11:11.120 --> 00:11:15.250
That way there's no lag or you're not missing any gapage in your

00:11:15.250 --> 00:11:17.970
data and you're getting a clean, concise look.

00:11:17.980 --> 00:11:21.270
Okay, last but not least we have the Rule Actions section.

00:11:21.450 --> 00:11:25.730
This is the section where we define what action we want the rule to

00:11:25.730 --> 00:11:29.130
take when it triggers. We can have it do nothing and we just have to

00:11:29.130 --> 00:11:31.730
look it up, we can have it set an email alert,

00:11:31.740 --> 00:11:36.680
maybe a Slack alert, maybe just a notification within the console. All

00:11:36.680 --> 00:11:39.170
these actions can be defined and performed here.

00:11:39.180 --> 00:11:40.730
And once you have that done,

00:11:40.740 --> 00:11:44.210
you just click Create and activate this rule in order for it

00:11:44.210 --> 00:11:46.100
to be active and live in your environment.

00:11:46.760 --> 00:11:47.740
And that's it.

00:11:47.760 --> 00:11:50.490
At this point you're well equipped to be able to identify

00:11:50.490 --> 00:11:53.370
both security and network‑related events,

00:11:53.380 --> 00:11:56.980
as well as create meaningful custom alerts surrounding this data.
