WEBVTT

00:00:01.440 --> 00:00:03.840
There are some tuning scripts that we can just use

00:00:03.840 --> 00:00:06.070
to help us optimize the system,

00:00:06.210 --> 00:00:09.450
although they don't provide too much granular control of the environment.

00:00:10.640 --> 00:00:13.160
I really briefly mentioned them in the previous demo,

00:00:13.840 --> 00:00:16.660
but we'll check out some of these and explain what they are,

00:00:16.670 --> 00:00:19.270
as well as highlight some best practices to use when

00:00:19.270 --> 00:00:21.160
working with Zeek and trying to optimize it.

00:00:23.240 --> 00:00:26.400
So, the first one is definitely going to be one that I

00:00:26.400 --> 00:00:29.960
personally like using since I'm a fan of JSON logs.

00:00:29.960 --> 00:00:32.049
It's appropriately named too.

00:00:33.240 --> 00:00:35.650
We saw this in the logging framework module,

00:00:35.660 --> 00:00:39.170
but what this one does is it changes all of the logging formatting

00:00:39.170 --> 00:00:42.560
that uses the logging framework into the JSON format.

00:00:43.640 --> 00:00:47.310
This affects the system globally and only if we're using the

00:00:47.310 --> 00:00:49.160
defaults instead of running in bare mode.

00:00:49.840 --> 00:00:53.560
It's super helpful in having all of your logs in the format that you want.

00:00:54.340 --> 00:00:58.870
All it is is this redefinition of the ASCII writer.

00:00:58.870 --> 00:01:04.340
Then we have the track‑all‑assets script that does just what it sounds like and

00:01:04.340 --> 00:01:07.350
loads a few scripts by default to help with its processes.

00:01:08.140 --> 00:01:11.030
This one is looking for our known‑hosts, services, and certs.

00:01:11.940 --> 00:01:16.510
We also have a default folder within the policy/tuning directory that

00:01:16.510 --> 00:01:19.420
we should consider as part of the loads for tuning,

00:01:19.430 --> 00:01:21.660
and we highlighted those in the previous demo.

00:01:22.640 --> 00:01:23.900
Three scripts are here,

00:01:23.910 --> 00:01:27.460
and the first one is going to be about extracted file limits.

00:01:27.940 --> 00:01:30.060
So this first one does just what it sounds like.

00:01:30.440 --> 00:01:34.160
It defines the limits for any extracted files that Zeek processes.

00:01:34.840 --> 00:01:36.560
The default for this is 100 MB.

00:01:36.830 --> 00:01:38.850
So if you need to adjust these numbers,

00:01:38.860 --> 00:01:41.950
you can do so here and load this script if you want.

00:01:43.640 --> 00:01:46.180
The second one of these in the default tuning folder

00:01:46.460 --> 00:01:48.350
is the packet‑fragments script.

00:01:49.040 --> 00:01:51.890
This one allows us to customize the capture filters for the

00:01:51.890 --> 00:01:54.860
fragmented packets and the timeout for them.

00:01:55.740 --> 00:01:58.730
The first function of defining the fragmentation

00:01:58.730 --> 00:02:01.260
filters isn't really used any longer,

00:02:01.640 --> 00:02:04.760
but it's still there in case you have a use case that requires it.

00:02:05.540 --> 00:02:09.050
By default though, the packet filter is wide open.

00:02:10.139 --> 00:02:11.850
Finally, we have the warning script.

00:02:12.740 --> 00:02:16.100
This one prints messages to the stdout for good

00:02:16.100 --> 00:02:18.260
settings that can be used in many cases.

00:02:18.740 --> 00:02:23.690
For example, this one is telling us that we don't have any local_nets defined,

00:02:23.950 --> 00:02:26.090
which is very important when we're talking about a

00:02:26.090 --> 00:02:27.650
network security monitoring tool.

00:02:28.840 --> 00:02:33.670
Those tuning scripts are mostly loaded via the local.zeek script by default.

00:02:33.670 --> 00:02:37.860
And if we wanted to create additional tuning scripts and load them, we can.

00:02:38.740 --> 00:02:42.390
There are other ways to optimize Zeek though in order to gain the

00:02:42.390 --> 00:02:44.650
required functionality for your organization.

00:02:45.540 --> 00:02:46.380
For example,

00:02:46.630 --> 00:02:50.180
we might want to tie the Zeek processes to certain CPUs if we

00:02:50.180 --> 00:02:52.520
have multiple tools built on the same system,

00:02:52.660 --> 00:02:54.730
like Security Onion, for example.

00:02:54.730 --> 00:02:59.760
This will allow Zeek to have a consistent performance within the system.

00:03:00.540 --> 00:03:03.280
We can also customize or forward the logs,

00:03:03.520 --> 00:03:05.550
which we mentioned a lot earlier in the course.

00:03:06.340 --> 00:03:08.350
If we're cyber operations professionals,

00:03:08.740 --> 00:03:12.800
we probably don't want to go fishing for logs within the Zeek system itself.

00:03:12.800 --> 00:03:15.760
We'd want to ship them to a SIEM or another tool.

00:03:16.540 --> 00:03:20.140
We can do this through additional tools that can help parse the logs

00:03:20.140 --> 00:03:22.830
before getting to the centralized Syslog server.

00:03:22.830 --> 00:03:25.690
Tools like syslog‑ng can help with this,

00:03:25.750 --> 00:03:29.310
as well as the Splunk Universal Forwarder and other ones

00:03:29.310 --> 00:03:31.620
built for tools like the ELK Stack.

00:03:31.620 --> 00:03:35.730
Adding additional information to Zeek in order to use the system

00:03:35.730 --> 00:03:38.760
effectively is an extremely large use case.

00:03:39.640 --> 00:03:42.490
This extra information can be through integrations

00:03:42.490 --> 00:03:45.600
like full packet capture tools, ticketing systems,

00:03:45.600 --> 00:03:46.260
and more.

00:03:47.240 --> 00:03:50.770
It can also be through things like threat intelligence downloads and tying

00:03:50.770 --> 00:03:54.050
specific context information to the alerts that we receive.

00:03:54.940 --> 00:03:57.670
These integrations are outside the scope of this course,

00:03:57.950 --> 00:04:01.260
but are addressed in another course in the same skill path at Pluralsight.

00:04:02.640 --> 00:04:05.990
One thing to keep in mind as we're talking about tuning and

00:04:06.000 --> 00:04:10.400
optimizing Zeek is that you have to know what you want to know

00:04:10.590 --> 00:04:12.160
in order to be able to tune it.

00:04:13.340 --> 00:04:15.470
It's useful to optimize the system,

00:04:15.480 --> 00:04:18.480
and it comes pretty well built out of the box.

00:04:18.480 --> 00:04:19.529
Again,

00:04:19.540 --> 00:04:22.060
commenting and uncommenting the different scripts that are

00:04:22.060 --> 00:04:25.190
loaded is a great way to modify the system,

00:04:25.190 --> 00:04:28.630
and customize the system, and also, creating those tuning scripts,

00:04:28.640 --> 00:04:32.360
like changing the JSON format or the file ingestion size.

00:04:32.370 --> 00:04:35.210
Those are really great in helping to customize and tune

00:04:35.210 --> 00:04:37.150
the system to your specific environment.
