WEBVTT

00:00:01.540 --> 00:00:02.800
As I mentioned earlier,

00:00:02.870 --> 00:00:06.100
there are also bigger packages or add‑ons that you can install

00:00:06.100 --> 00:00:09.230
to help add even more capabilities to Zeek.

00:00:09.230 --> 00:00:12.340
There are things that greatly expand the capabilities by

00:00:12.340 --> 00:00:14.950
integrating Zeek with additional technologies.

00:00:15.540 --> 00:00:21.040
We're going to focus on Spicy here, but we'll talk briefly about some others.

00:00:21.040 --> 00:00:26.030
Things like the message broker and additional analyzers

00:00:26.030 --> 00:00:28.160
can be included in this category.

00:00:29.340 --> 00:00:30.130
In reality,

00:00:30.140 --> 00:00:33.700
all of the add‑ons and integrations that we've talked about so far

00:00:33.700 --> 00:00:38.230
in this module are all additional scripts or extensions, and the

00:00:38.230 --> 00:00:41.060
words we're using are just logical labels.

00:00:41.740 --> 00:00:43.750
They're all add‑ons in some sense.

00:00:44.540 --> 00:00:49.330
I'm referring to these larger ones as projects so I can separate the logic

00:00:49.340 --> 00:00:53.260
behind some simple scripts and larger packaged add‑ons.

00:00:55.140 --> 00:00:57.660
The Zeek Agent is another one that comes to mind.

00:00:58.040 --> 00:01:00.460
I know I mentioned it just a little bit earlier.

00:01:00.460 --> 00:01:04.170
This awesome tool gives us endpoint monitoring to

00:01:04.170 --> 00:01:07.230
provide us with host activity within Zeek.

00:01:07.230 --> 00:01:11.070
It'll report things like file, socket,

00:01:11.070 --> 00:01:14.150
and process events to the Zeek application.

00:01:16.040 --> 00:01:20.410
What's really cool is that this can interface with OS query and allow us to

00:01:20.410 --> 00:01:23.640
gain a lot more endpoint information than just the file,

00:01:23.650 --> 00:01:25.360
socket, and process events.

00:01:25.940 --> 00:01:31.610
Remember, this is an open‑source tool, so the deployment costs are minimal.

00:01:31.610 --> 00:01:36.300
And now for the focus of this clip: Spicy.

00:01:36.300 --> 00:01:40.640
We'll be installing and demonstrating Spicy in the following demo.

00:01:40.640 --> 00:01:44.760
What Spicy is, though, is a parser generator.

00:01:45.640 --> 00:01:50.190
We can use it to create parsers using C++ to help us

00:01:50.190 --> 00:01:51.960
expand the capabilities of Zeek.

00:01:52.840 --> 00:01:57.230
So this gives us new protocol and file analyzers within the Zeek tool

00:01:57.240 --> 00:02:00.640
so that we can make sure that we keep up with the latest trends for

00:02:00.640 --> 00:02:03.360
analyzing our data and detecting threats.

00:02:04.640 --> 00:02:07.580
What I really like about this is that it comes with a Zeek

00:02:07.580 --> 00:02:11.310
plugin that allows us to add these additional analyzers

00:02:11.320 --> 00:02:13.850
without having to know C++.

00:02:14.540 --> 00:02:15.880
I think that's great,

00:02:15.890 --> 00:02:19.000
especially for those like myself that may not be as great at

00:02:19.010 --> 00:02:21.160
programming as many others in the industry.

00:02:22.440 --> 00:02:25.750
There's even a package for additional Zeek analyzers that we

00:02:25.750 --> 00:02:29.700
can use the package manager to install that gives us new

00:02:29.700 --> 00:02:31.860
analyzers that are Spicy based.

00:02:34.340 --> 00:02:38.860
Let's not waste any more time, and let's see what the Spicy project can give us.

00:02:38.860 --> 00:02:44.000
We'll check out Spicy and make sure it's installed and explore the capabilities.

00:02:44.000 --> 00:02:49.460
Then we'll dive in and build a really simple analyzer based on the Zeek

00:02:49.460 --> 00:02:52.650
documentation and show how easy it is to add them.

00:02:53.240 --> 00:02:55.530
Let's hop back into that lab.

00:02:55.530 --> 00:02:58.050
And here we are back in that lab.

00:02:58.050 --> 00:03:02.840
Real quick, before we go ahead and install Spicy and see what it can do,

00:03:02.840 --> 00:03:06.760
we're going to go ahead and look at the Spicy documentation.

00:03:10.640 --> 00:03:15.050
So this is Spicy's documentation right inside the Zeek documentation page.

00:03:15.050 --> 00:03:21.110
And what it does is it gives us a really good overview of what the tool does,

00:03:21.120 --> 00:03:25.230
how we can install it, and how we can get started in building our own analyzers.

00:03:25.230 --> 00:03:28.210
It talks about the Spicy programming language and

00:03:28.210 --> 00:03:30.050
how to integrate Spicy with Zeek.

00:03:30.740 --> 00:03:33.650
So what we're going to do in this demo real quick

00:03:33.650 --> 00:03:36.400
after we install Spicy itself is,

00:03:36.400 --> 00:03:40.610
we're just going to use this basic HTTP parser that's here

00:03:40.620 --> 00:03:43.240
and show how Spicy can work with that.

00:03:43.250 --> 00:03:47.510
And as you can see here, we have the script already built for us,

00:03:47.510 --> 00:03:51.350
so what this is going to do is it's going to analyze an HTTP

00:03:51.350 --> 00:03:54.560
header and give us some basic information about it.

00:03:56.040 --> 00:03:58.600
And now this is just to demonstrate the capabilities of

00:03:58.610 --> 00:04:02.190
building your own projects or packages and using Spicy to

00:04:02.200 --> 00:04:04.390
build your own analyzers if needed.

00:04:04.400 --> 00:04:06.640
If you'd like to learn more about how to do it,

00:04:06.640 --> 00:04:09.910
there's this awesome tool that shows you how to program inside of

00:04:09.910 --> 00:04:12.560
Spicy if you need to create your own analyzers,

00:04:13.040 --> 00:04:13.960
and like I said,

00:04:14.340 --> 00:04:17.339
it'll give you also a tutorial on how to build an even bigger

00:04:17.339 --> 00:04:20.660
analyzer instead of just a simple HTTP header analyzer.

00:04:21.940 --> 00:04:24.460
All right, so let's hop over to the CLI real quick,

00:04:25.240 --> 00:04:29.560
and now that we're here, we're going to install Spicy.

00:04:30.340 --> 00:04:33.360
I need to get over to my home directory real quick to be able to do that.

00:04:35.340 --> 00:04:38.860
And as you can see here, I have the Spicy installation file there,

00:04:38.860 --> 00:04:44.160
so all I'm going to do is use the package to install it. And you can

00:04:44.160 --> 00:04:48.370
download this straight from the GitHub repo and compile it or Zeek's

00:04:48.370 --> 00:04:53.990
hosted repository that has Spicy in there. And we're going to let this run

00:04:53.990 --> 00:04:55.720
through the installation setup real quick.

00:04:55.720 --> 00:04:58.660
I'm going to speed up the video so we can get straight back into it.

00:05:01.240 --> 00:05:03.440
All right, now that the installation's finished,

00:05:03.450 --> 00:05:08.520
we're going to look and see where it's installed, and it is in the opt

00:05:08.520 --> 00:05:11.760
folder, so you can see that Spicy is installed right there.

00:05:12.640 --> 00:05:16.120
And so we're going to just change the ownership of it real quick to my Zeek

00:05:16.120 --> 00:05:19.060
user since that's what I'm going to be running it from.

00:05:21.140 --> 00:05:23.260
Might help if I use sudo for that one.

00:05:24.240 --> 00:05:26.250
All right, so now let's change over to the Zeek

00:05:26.250 --> 00:05:29.460
user, and now that I'm a Zeek user,

00:05:30.440 --> 00:05:33.760
I'm going to go ahead and build my environment variables real quick.

00:05:35.740 --> 00:05:37.100
All right, now that that's done,

00:05:37.120 --> 00:05:40.910
let's hop over to the Zeek user directory, and look at this.

00:05:40.910 --> 00:05:46.420
So we have a pcap file that we're going to use to run this Spicy analyzer.

00:05:46.430 --> 00:05:48.470
We have my actual analyzer,

00:05:48.470 --> 00:05:53.170
we have the event setup and then the script for Spicy itself, and we'll

00:05:53.170 --> 00:05:57.890
check out all these in a second. And before we go check those out, what

00:05:57.890 --> 00:06:01.280
we're going to do real quick is install the Spicy plugin just like we

00:06:01.280 --> 00:06:03.160
installed that TLS plugin earlier.

00:06:04.740 --> 00:06:07.670
While this is installing, what's really cool about Spicy is it has

00:06:07.670 --> 00:06:11.310
the ability to compile code on the fly, and we'll show that in a

00:06:11.310 --> 00:06:14.780
minute, as soon as this is installed. We'll create our own quick

00:06:14.780 --> 00:06:17.260
Spicy module just printing Hi, I'm Joe.

00:06:18.140 --> 00:06:20.950
Even though we got those errors after running the unit tests,

00:06:20.950 --> 00:06:22.650
which could take 10‑20 minutes,

00:06:22.830 --> 00:06:24.950
it's still going to work for the script that we're going to use.
