WEBVTT

00:00:01.740 --> 00:00:05.600
All right, now that we were able to see another Zeek integration with a

00:00:05.600 --> 00:00:09.650
great network security monitoring platform, let's move on and focus

00:00:09.660 --> 00:00:14.130
almost entirely on Zeek for the remainder of the course. In this clip,

00:00:14.270 --> 00:00:17.570
and for the remainder of the module, we're going to be talking about

00:00:17.570 --> 00:00:19.660
using Zeek for file carving.

00:00:20.640 --> 00:00:24.380
If you're working in cyber operations or security engineering,

00:00:24.630 --> 00:00:28.460
you may already know what file carving is. But if you don't,

00:00:28.840 --> 00:00:32.980
here's the definition from Techopedia, although most other sources have

00:00:32.980 --> 00:00:38.170
very similar definitions. Essentially, it's the process of reassembling

00:00:38.170 --> 00:00:41.550
files from the data stream or a storage device.

00:00:42.440 --> 00:00:47.220
The key for this though is that file carving is doing so without

00:00:47.220 --> 00:00:51.290
the assistance of a file system giving us things like metadata

00:00:51.300 --> 00:00:53.060
and other attributes for the file.

00:00:53.940 --> 00:00:56.520
But why would we want to do something like this?

00:00:57.540 --> 00:00:59.830
There's a few reasons as to why we would want to carve

00:00:59.830 --> 00:01:02.460
files, especially from the network streams.

00:01:03.240 --> 00:01:07.020
The first and possibly the most important is to be able to

00:01:07.020 --> 00:01:09.660
conduct additional analysis on the file itself.

00:01:10.640 --> 00:01:13.910
If we're sniffing a network stream and trying to detect malicious

00:01:13.910 --> 00:01:17.860
files in the payloads, we could use file carving to save it

00:01:17.860 --> 00:01:19.950
somewhere and send it off for analysis.

00:01:20.940 --> 00:01:24.900
We also might want to just keep a record of the files for record

00:01:24.900 --> 00:01:29.070
keeping or forensic purposes, which could prove beneficial in

00:01:29.070 --> 00:01:34.240
investigations. When carving, we're making structured data out of

00:01:34.250 --> 00:01:36.160
unstructured data or raw data.

00:01:37.140 --> 00:01:38.960
In our use case in this module,

00:01:39.340 --> 00:01:42.460
we're going to be carving a file from an actual network stream.

00:01:42.840 --> 00:01:46.790
But others use this ability with other tools to also recover

00:01:46.790 --> 00:01:50.140
files and fragments when our file systems are failing,

00:01:50.150 --> 00:01:52.650
corrupt, or the directory is missing.

00:01:53.340 --> 00:01:56.960
So there's a few good use cases for this capability, and our

00:01:56.960 --> 00:02:00.550
favorite tool, Zeek, is able to do this for us as well.

00:02:01.440 --> 00:02:04.860
Zeek uses the File Analysis Framework in order to present

00:02:04.870 --> 00:02:08.750
and use file‑related information and actually carve the

00:02:08.750 --> 00:02:10.860
files for us and save them to disk.

00:02:11.640 --> 00:02:15.240
This is a big improvement over previous versions of Zeek that

00:02:15.240 --> 00:02:18.420
required very detailed scripts in order to perform the same

00:02:18.420 --> 00:02:23.250
capabilities. Using the File Analysis Framework along with other

00:02:23.250 --> 00:02:24.860
Zeek frameworks and integrations,

00:02:25.440 --> 00:02:29.350
we can define what to do after a file is detected and where to

00:02:29.350 --> 00:02:32.060
send it or put the data extracted from it.

00:02:33.140 --> 00:02:35.450
If you're familiar with Zeek packages that are

00:02:35.450 --> 00:02:38.060
available, then this one might seem familiar.

00:02:38.440 --> 00:02:42.960
It's by Stephen Hosom, and it's an easy way to get started carving your files.

00:02:43.540 --> 00:02:44.300
Of course,

00:02:44.540 --> 00:02:48.710
you can always create your own scripts to be able to specify exactly how you

00:02:48.710 --> 00:02:52.060
want Zeek to behave with the files and their analysis.

00:02:52.640 --> 00:02:56.050
You can also just use these packages as a baseline and

00:02:56.050 --> 00:02:58.720
modify the configurations to ensure that you're getting out

00:02:58.720 --> 00:03:01.060
of them what you need specifically.

00:03:02.140 --> 00:03:05.330
You can download this package at the link here if you want to play around

00:03:05.330 --> 00:03:08.660
with it in your own Zeek instance. In the next demo,

00:03:09.040 --> 00:03:13.920
we'll go and look at the configurations and see what the important areas are.

00:03:13.920 --> 00:03:17.400
Then we'll test it out to make sure that we can extract and,

00:03:17.400 --> 00:03:21.050
if needed, export our files from the live network stream.
