WEBVTT

00:00:00.940 --> 00:00:02.910
All right, now let's jump into the CLI.

00:00:02.910 --> 00:00:06.770
So we're going to walk through a few of the configurations in here,

00:00:06.770 --> 00:00:10.620
and let's start out with our local.zeek file since that's

00:00:10.620 --> 00:00:13.910
going to give us some insight into how Zeek's actually

00:00:13.910 --> 00:00:15.660
functioning inside of this environment.

00:00:16.640 --> 00:00:17.910
And if we're looking through here,

00:00:17.910 --> 00:00:21.010
there's not much that's changed from a standard Zeek installation.

00:00:21.010 --> 00:00:24.160
We're still loading most of the normal frameworks that we do.

00:00:25.140 --> 00:00:27.650
A lot of the protocol analyzers are being loaded.

00:00:27.650 --> 00:00:30.120
Some of the file analyzers are being loaded,

00:00:30.120 --> 00:00:34.380
and some of the special package scripts or specific detection scripts.

00:00:34.390 --> 00:00:36.540
But if we look down here at the bottom,

00:00:36.550 --> 00:00:39.640
we have a couple additional scripts that are being

00:00:39.640 --> 00:00:41.410
loaded or sections that are being loaded.

00:00:41.410 --> 00:00:43.610
So based on the Rock framework,

00:00:43.620 --> 00:00:47.350
we have a Kafka plugin that we're using because we're shipping the logs

00:00:47.350 --> 00:00:50.220
over to Kafka before they get sent over to Logstash.

00:00:50.220 --> 00:00:54.630
And then we have some scripts in this scripts/rock folder that's

00:00:54.630 --> 00:00:58.230
giving us additional Rock customizations for Zeek.

00:00:58.230 --> 00:00:59.760
So let's go check out some of those.

00:00:59.760 --> 00:01:04.060
Before we do, we'll go look at the Kafka plugin to see what that's all about.

00:01:04.640 --> 00:01:07.430
And as you can see, this one's not very long.

00:01:07.430 --> 00:01:11.470
But what it's doing is it's enabling logging from Zeek

00:01:11.480 --> 00:01:13.360
over to Kafka for all of our logs.

00:01:13.360 --> 00:01:15.050
We're giving it a priority.

00:01:15.640 --> 00:01:19.190
We're sending logs for active streams using the Kafka

00:01:19.190 --> 00:01:21.960
function and the action to send logs over there.

00:01:22.540 --> 00:01:25.400
So this is a very basic configuration really just telling us,

00:01:25.400 --> 00:01:27.100
hey, add these logs,

00:01:27.110 --> 00:01:31.120
go send him over to Kafka using a custom writer that we have in this plugin,

00:01:31.120 --> 00:01:32.050
and we're good.

00:01:33.540 --> 00:01:35.060
Now let's take this one step back.

00:01:35.060 --> 00:01:38.780
And in this rock folder, we have a couple of different scripts.

00:01:38.780 --> 00:01:40.580
We have our typical load script.

00:01:40.580 --> 00:01:43.230
We have miscellaneous scripts in here.

00:01:43.230 --> 00:01:47.160
We have protocols and additional plugins and utilities.

00:01:47.540 --> 00:01:49.990
But what I want to check out is this rock.zeek one.

00:01:49.990 --> 00:01:53.790
And what this does is it gives us some additional capabilities.

00:01:53.790 --> 00:01:58.370
So if we wanted to log the VLANs or the MAC addresses and log

00:01:58.370 --> 00:02:01.270
all of the HTTP headers and stuff like that,

00:02:01.270 --> 00:02:03.840
so that's what this is actually doing for us.

00:02:03.840 --> 00:02:07.250
And I understand that some of this language is still Bro and not Zeek,

00:02:07.250 --> 00:02:09.889
and that's because the name change is still being

00:02:09.889 --> 00:02:11.540
filtered throughout the industry.

00:02:11.540 --> 00:02:15.090
But we have all of these additional frameworks and scripts that

00:02:15.090 --> 00:02:17.430
are being loaded for RockNSM specifically.

00:02:17.430 --> 00:02:20.310
And we can even turn on a couple more that are in here if we wanted

00:02:20.310 --> 00:02:22.810
additional information or additional context.

00:02:22.810 --> 00:02:27.900
We're even loading things like SSH fingerprinting and the JA3 fingerprinting.

00:02:27.900 --> 00:02:30.220
So there's a lot of capabilities that come with

00:02:30.220 --> 00:02:33.150
RockNSM's implementation of Zeek right here.

00:02:33.150 --> 00:02:34.710
And as you can see,

00:02:34.710 --> 00:02:38.130
there's a couple other plugins or a couple other scripts that are

00:02:38.130 --> 00:02:40.880
in here in the plugin folder that RockNSM uses.

00:02:40.880 --> 00:02:42.830
And in the miscellaneous folder too,

00:02:42.830 --> 00:02:45.360
we have some scripts to help add some intelligence,

00:02:45.360 --> 00:02:46.820
so like the GeoIP.

00:02:46.820 --> 00:02:49.860
We're adding that to the connection logs.

00:02:50.240 --> 00:02:51.760
Let's go check that one out real quick.

00:02:52.340 --> 00:02:53.370
And if you look at that,

00:02:53.370 --> 00:02:58.380
we are defining different fields for this GeoIP information,

00:02:58.380 --> 00:03:01.610
so the originating location, country code,

00:03:01.610 --> 00:03:02.660
so on and so forth.

00:03:03.340 --> 00:03:07.750
So I really encourage you to go check out RockNMS's build for

00:03:07.750 --> 00:03:10.310
Zeek and explore it a little bit more in detail.

00:03:10.420 --> 00:03:13.060
Look at the scripts and see how it interacts with the system.

00:03:13.840 --> 00:03:17.260
Let's go check out the pipelines and see what Logstash is doing with this too.

00:03:18.640 --> 00:03:19.810
And look at this.

00:03:19.820 --> 00:03:23.770
There's 109 possibilities in the conf.d folder with

00:03:23.780 --> 00:03:25.660
all of these different filters.

00:03:26.340 --> 00:03:29.120
So let's take a couple and see what's going on with them.

00:03:29.120 --> 00:03:33.050
To start with, let's look at the Logstash input filter for it.

00:03:33.740 --> 00:03:35.660
Looks like we need to go sudo on that one.

00:03:36.740 --> 00:03:42.270
And this is defining the simple input from Zeek or from Kafka because

00:03:42.270 --> 00:03:45.240
Zeek's sending to Kafka and then coming over to Logstash.

00:03:45.240 --> 00:03:50.100
And we're just defining the inputs, looking at the different fields that it has,

00:03:50.100 --> 00:03:51.950
and calling it a day on that one.

00:03:52.140 --> 00:03:52.830
But then,

00:03:52.840 --> 00:03:55.990
we have all of these filters here that are going to help us

00:03:56.000 --> 00:03:58.460
either parse and mutate the information,

00:03:58.640 --> 00:04:00.630
enrich the data that we have coming in,

00:04:00.640 --> 00:04:04.000
modify it based on how Rock wants to use the data.

00:04:04.000 --> 00:04:07.930
So let's take the DNS filter, for example, and see what's going on with that.

00:04:07.930 --> 00:04:11.920
And as I said, this filter, we have mutations in here,

00:04:11.920 --> 00:04:14.510
so we're converting some fields over to what the

00:04:14.510 --> 00:04:17.560
standard that Rock wants to use is, the ECS standard.

00:04:18.640 --> 00:04:22.460
We're making sure we tag the authoritative DNS servers in

00:04:22.460 --> 00:04:25.610
here or recursive DNS servers in here.

00:04:25.610 --> 00:04:29.120
And then we're translating some fields based on the

00:04:29.120 --> 00:04:31.890
outcomes of some of these if statements.

00:04:31.890 --> 00:04:36.030
And now before we put that down, let's just look at the output now.

00:04:36.040 --> 00:04:40.810
So we have this one Logstash output pipeline here.

00:04:40.810 --> 00:04:43.820
And if we're looking at that, really,

00:04:43.820 --> 00:04:48.960
it's just defining the output and defining the events and where to send them.

00:04:48.970 --> 00:04:52.590
So we're sending all of our stuff to Elasticsearch localhost.

00:04:52.600 --> 00:04:54.550
We're defining the indexes there.

00:04:54.550 --> 00:04:58.450
And essentially, what this one's doing is if we're able to parse the data,

00:04:58.450 --> 00:04:59.810
we're going to just send it to Elasticsearch.

00:04:59.810 --> 00:05:05.500
But if not, we're going to send it into a special parsing‑failures index instead.

00:05:05.510 --> 00:05:07.560
So we're going to send it to its normal index or its

00:05:07.560 --> 00:05:08.760
parsing‑values failures index.

00:05:09.140 --> 00:05:12.050
And so that's how RockNSM handles a lot of the Zeek data.

00:05:12.840 --> 00:05:13.880
Like I've been emphasizing,

00:05:13.880 --> 00:05:18.330
we're not going to go through every single script and identify every single

00:05:18.330 --> 00:05:22.030
possibility for how RockNSM uses Zeek with the other tools.

00:05:22.030 --> 00:05:24.660
But if you want to, you can download the ISO,

00:05:24.660 --> 00:05:27.130
install it on a virtual machine easily,

00:05:27.130 --> 00:05:31.160
and get up and running so you can explore it and modify it for your own needs.
