WEBVTT

00:00:01.340 --> 00:00:04.220
First thing I'm going to do is change over to my Zeek user.

00:00:04.220 --> 00:00:06.960
As you can see, I have the man page come up here,

00:00:07.340 --> 00:00:09.490
and that help command just prompted an error to

00:00:09.500 --> 00:00:11.830
give me some of the usage options.

00:00:11.840 --> 00:00:13.130
What we can do is,

00:00:13.140 --> 00:00:17.980
to install that package we can just hit zkg install and then

00:00:17.990 --> 00:00:21.390
type in the path of the actual package.

00:00:21.390 --> 00:00:23.630
So if we hop back over to our browser,

00:00:23.640 --> 00:00:31.550
we can see that the package is the 0xxon and then the /tls‑log‑alternative.

00:00:31.940 --> 00:00:35.410
In reality, we have to look at the GitHub address up here,

00:00:35.430 --> 00:00:38.060
so it's going to be zeek‑tls‑log‑alternative.

00:00:38.840 --> 00:00:41.660
So let's type that in and watch it install.

00:00:45.940 --> 00:00:48.340
All right, and as you can see, the package installed successfully,

00:00:48.340 --> 00:00:49.750
so we're good to go there.

00:00:49.760 --> 00:00:51.930
We'll go check out that script in a second.

00:00:51.930 --> 00:00:55.900
Before we go look and see how the script's going to interact with the system,

00:00:55.900 --> 00:00:59.130
we're going to go ahead and modify our local script so we

00:00:59.130 --> 00:01:02.070
can make sure that the packages are going to be used when

00:01:02.070 --> 00:01:03.360
we hit the deploy command.

00:01:04.040 --> 00:01:06.590
So let's go ahead and modify the local script,

00:01:06.590 --> 00:01:11.890
mine's in the usr local directory, and scroll all the way down at the bottom.

00:01:11.890 --> 00:01:16.300
And your local Zeek script should have this load packages command

00:01:16.300 --> 00:01:18.770
in here that you just have to uncomment out.

00:01:18.770 --> 00:01:21.270
If you already have packages in your environment then you

00:01:21.270 --> 00:01:23.640
should already have this uncommented or you have your own

00:01:23.650 --> 00:01:25.790
custom way of getting the packages active.

00:01:25.800 --> 00:01:27.630
So I'm just going to uncomment that so we can use

00:01:27.630 --> 00:01:29.360
the packages that we downloaded.

00:01:29.940 --> 00:01:32.520
Let's save it and then exit.

00:01:32.530 --> 00:01:35.640
And then I'm going to use the zeekctl deploy command to

00:01:35.640 --> 00:01:38.060
deploy our new configuration and get it going.

00:01:39.940 --> 00:01:45.160
So now that that's running, our new TLS package that we downloaded is active,

00:01:45.160 --> 00:01:47.420
and it's looking for additional information.

00:01:47.420 --> 00:01:50.890
And if we hop over to the browser and look at it,

00:01:50.900 --> 00:01:53.540
it's showing us that there's going to be a log file called

00:01:53.540 --> 00:01:57.070
tls.log now that contains a lot of that low‑level

00:01:57.080 --> 00:01:59.350
information about the TLS handshake.

00:02:00.040 --> 00:02:02.630
So let's see if we have that log yet.

00:02:02.640 --> 00:02:04.150
We're going to use the cat command,

00:02:05.440 --> 00:02:08.110
and the logs are going to be in your zeek home folder in the

00:02:08.110 --> 00:02:10.949
logs directory and likely under current,

00:02:10.960 --> 00:02:12.980
if it's the current deployment.

00:02:12.980 --> 00:02:17.150
And as you can see, we don't have a tls.log yet.

00:02:18.440 --> 00:02:22.560
So I'm going to hop over to my main controller and just try to connect

00:02:22.560 --> 00:02:26.330
to Microsoft to generate some sort of TLS handshake.

00:02:26.340 --> 00:02:28.160
And let's hop back over to Zeek and see.

00:02:29.640 --> 00:02:31.720
And as you can see, now we have that tls.log,

00:02:31.720 --> 00:02:37.310
so let's look at that and see what kind of information we have.

00:02:37.310 --> 00:02:41.440
It formatted in JSON, but I did not do the print pretty command,

00:02:41.440 --> 00:02:44.520
so let's just go ahead and jq that so we can look at it

00:02:44.530 --> 00:02:46.740
a little bit more nicely formatted.

00:02:46.740 --> 00:02:50.530
And so we have the hash algorithms and the supported versions,

00:02:50.530 --> 00:02:53.070
the key exchange modes, the server certs,

00:02:53.080 --> 00:02:54.160
so on and so forth.

00:02:54.160 --> 00:02:55.460
So as you can see,

00:02:55.470 --> 00:02:59.560
this is a lot more granular information about the actual TLS handshake.

00:03:01.440 --> 00:03:05.150
Now if I was to look at the same information with the SSL log,

00:03:05.640 --> 00:03:08.310
you see we don't quite get that much information about it,

00:03:08.310 --> 00:03:11.350
so each one of these gives us some information about the cipher and

00:03:11.350 --> 00:03:13.790
the curve and the server name and stuff like that,

00:03:13.790 --> 00:03:17.460
but it wasn't as granular as that TLS handshake information that we got.

00:03:18.440 --> 00:03:22.360
So let's check out that script real quick and see how it operates.

00:03:23.840 --> 00:03:25.050
So as you can see,

00:03:25.060 --> 00:03:28.680
the packages that are downloaded are downloaded in a site folder,

00:03:28.690 --> 00:03:34.160
so your local Zeek folder, and, oops, might help if I had the actual script here,

00:03:34.160 --> 00:03:39.040
so the tls.zeek script is where it is. And it's just a

00:03:39.050 --> 00:03:40.810
script that's calling some web hooks,

00:03:40.810 --> 00:03:43.630
scraping some information off of what it detects in the

00:03:43.630 --> 00:03:48.990
packets, it's creating SSL extensions, events, and stuff like that as well.

00:03:49.000 --> 00:03:53.350
So we have session established events and so on and so forth so it can use it.

00:03:53.740 --> 00:03:56.800
I'd encourage you to check out the scripts that you're downloading with the

00:03:56.800 --> 00:04:00.660
packages as you're downloading the packages. That way if you need to modify them

00:04:00.660 --> 00:04:04.860
for any reason or so you can fully understand what they're doing with the Zeek

00:04:04.860 --> 00:04:09.210
environment and ensure that it's both configured correctly and it'll operate

00:04:09.210 --> 00:04:10.960
correctly in your own environment.
