WEBVTT

00:00:01.240 --> 00:00:02.009
All right,

00:00:02.110 --> 00:00:04.710
now it's time to hop into the lab and configure some minor

00:00:04.710 --> 00:00:07.360
changes to demonstrate the Salt configurations.

00:00:07.840 --> 00:00:09.770
We'll start out by looking at our default

00:00:09.770 --> 00:00:12.160
configurations for Zeek with Security Onion.

00:00:12.640 --> 00:00:16.280
Then, we'll dive into the local Salt script for Zeek.

00:00:16.280 --> 00:00:20.750
Then we'll make some modifications and see that it's working as expected.

00:00:21.340 --> 00:00:22.660
Let's get it going.

00:00:24.540 --> 00:00:28.760
All right, and here I am in my Security Onion box.

00:00:29.340 --> 00:00:33.560
Now remember, Zeek comes packaged as a container within Security Onion.

00:00:33.570 --> 00:00:36.240
So a lot of the commands that we're going to be running here and

00:00:36.240 --> 00:00:38.340
a lot of things that were going to be doing are different from a

00:00:38.340 --> 00:00:40.260
traditional Zeek implementation.

00:00:41.040 --> 00:00:45.080
So before we do anything, I want to go ahead and stop Zeek,

00:00:45.090 --> 00:00:46.650
and this is the command to do so.

00:00:49.140 --> 00:00:51.510
All right, and now that Zeek is stopped,

00:00:51.510 --> 00:00:54.120
the first thing that I want to do is go ahead and

00:00:54.120 --> 00:00:56.250
look at that default Salt file.

00:00:58.140 --> 00:01:01.950
All right, and as you can see, we have quite a few configurations within this.

00:01:03.340 --> 00:01:04.379
Looking at the file,

00:01:04.390 --> 00:01:08.760
it seems like it's structured similarly to how the Zeek local

00:01:08.770 --> 00:01:12.250
script is structured in a typical Zeek installation.

00:01:12.740 --> 00:01:16.570
So we have our Zeek control configurations here where we're

00:01:16.570 --> 00:01:20.390
defining the MailTo servers and where the logs are going to be

00:01:20.390 --> 00:01:23.710
stored and what the local site policy script is.

00:01:23.710 --> 00:01:26.830
So we have our local.zeek script here as well.

00:01:26.830 --> 00:01:32.050
And then it comes into the local area where it's defining our

00:01:32.050 --> 00:01:35.050
loads and what scripts that we want to use,

00:01:35.050 --> 00:01:36.790
what frameworks we want to use.

00:01:36.800 --> 00:01:39.200
So when Security Onion was building this,

00:01:39.200 --> 00:01:42.720
they included a lot of the stuff out of the box that Zeek

00:01:42.720 --> 00:01:46.690
traditionally has turned on as well, but they tuned it a little bit differently.

00:01:46.690 --> 00:01:49.780
So as you can see, we're using a couple of different frameworks.

00:01:49.780 --> 00:01:52.850
We have our protocol inspections turned on,

00:01:52.850 --> 00:01:56.470
and we're using one custom signature file as well.

00:01:56.480 --> 00:02:00.690
We also are automatically redefining those logs into JSON format

00:02:00.690 --> 00:02:04.080
because that's what Security Onion uses for this.

00:02:04.080 --> 00:02:08.960
And as you can see, it's in YAML format, so the readability is there.

00:02:10.139 --> 00:02:12.280
We have the different sections for the loads,

00:02:12.280 --> 00:02:14.880
we have the redefinitions, so on and so forth.

00:02:14.880 --> 00:02:17.380
So with each of these sections that are here,

00:02:17.390 --> 00:02:21.260
we're essentially modifying just a different piece of the Zeek configuration.

00:02:22.340 --> 00:02:25.090
All right, now before we do anything,

00:02:25.090 --> 00:02:29.340
what we need to do is we need to copy this default Salt configuration

00:02:29.350 --> 00:02:32.530
over to our local Salt folder just to make sure that it doesn't get

00:02:32.540 --> 00:02:36.610
overridden if we get an update from Security Onion or anything like that

00:02:36.610 --> 00:02:38.560
because this default Salt file will.

00:02:40.140 --> 00:02:42.960
Oops, looks like I forgot the sls at the end.

00:02:43.440 --> 00:02:44.190
Oh, there it is.

00:02:44.190 --> 00:02:45.150
Okay, good.

00:02:46.640 --> 00:02:49.340
And since I already have the local file copied over there,

00:02:49.340 --> 00:02:51.540
I'm just going to go ahead and override it with this fresh one

00:02:51.540 --> 00:02:55.560
from the default configuration, and now let's go hop over there

00:02:55.570 --> 00:02:57.660
and nano it so we can edit it.

00:03:00.340 --> 00:03:01.950
All right, and now that we're in here,

00:03:01.950 --> 00:03:04.600
there's two things that I want to specifically change

00:03:04.600 --> 00:03:07.520
just to test out the functionality of the Salt

00:03:07.520 --> 00:03:09.500
configurations and everything like that.

00:03:09.510 --> 00:03:12.670
So what I'm going to change is I'm going to change the log

00:03:12.670 --> 00:03:18.030
directory real quick from nsm/zeek/logs to just my home

00:03:18.030 --> 00:03:20.350
folder as the joeabrah user.

00:03:21.640 --> 00:03:25.570
And then the second thing I'm going to do is just load a simple Telnet script

00:03:25.570 --> 00:03:30.210
so we can see if we can generate some alerts and just validate that everything

00:03:30.210 --> 00:03:35.950
is working and the logs are going into our home directory. Now keep in mind,

00:03:35.950 --> 00:03:40.990
the Security Onion workflows and the processes do depend on a lot of these

00:03:40.990 --> 00:03:42.830
logs and the locations of them.

00:03:42.840 --> 00:03:45.590
So if you're going to change this information,

00:03:45.590 --> 00:03:49.670
just make sure that you understand how Security Onion is using the

00:03:49.670 --> 00:03:53.660
data and map it to the new location correctly.

00:03:54.840 --> 00:03:58.830
And then the other thing is going to be in the load‑sigs section, we're going

00:03:58.830 --> 00:04:04.120
to add another signature in here, and the signature is just going to be a

00:04:04.120 --> 00:04:06.950
simple Telnet script to detect Telnet activity.

00:04:08.840 --> 00:04:10.360
And just for your awareness,

00:04:10.360 --> 00:04:14.940
here's that Telnet sig. It's the same Telnet signature that we used in

00:04:14.950 --> 00:04:19.940
my previous course, Writing Zeek Rules and Scripts. And with that

00:04:19.940 --> 00:04:22.860
completed, we can go ahead and start Zeek again.

00:04:25.740 --> 00:04:29.210
All right, and as you can see, Zeek started successfully.

00:04:29.220 --> 00:04:32.380
It shows that we changed our configuration.

00:04:32.390 --> 00:04:36.660
It did a little diff for us so we can tell us what the new configuration

00:04:36.660 --> 00:04:41.880
contained. And as you can see right here, we have that we subtracted the log

00:04:41.890 --> 00:04:47.000
directory being nsm/zeek/logs, and we added our home directory as the new

00:04:47.000 --> 00:04:52.350
logging location. And then scrolling down a little bit more in the local.zeek

00:04:52.740 --> 00:04:59.600
file, we have our loaded telnet.sig file as well for the signature. And if

00:04:59.600 --> 00:05:03.720
you look right here, it shows the location of the local.zeek file.

00:05:03.730 --> 00:05:06.440
Let's hop in there and see if we can actually see it in

00:05:06.440 --> 00:05:10.750
the container itself. And look at that.

00:05:11.140 --> 00:05:15.930
We have our actual local.zeek file with all of the traditional load

00:05:15.930 --> 00:05:17.760
statements and everything like that in there.

00:05:19.640 --> 00:05:23.960
And as you can see, our telnet.sig was added to it right here.
