WEBVTT

00:00:02.040 --> 00:00:04.860
Let's check out the victim's Wazuh configuration file.

00:00:10.340 --> 00:00:15.500
Let's scroll down to syscheck. Syscheck houses the

00:00:15.500 --> 00:00:18.650
configurations for Wazuh's file integrity monitoring.

00:00:19.040 --> 00:00:23.470
Here, we see the default FIM rules with two slight modifications.

00:00:23.840 --> 00:00:28.070
Report_changes allows us to see the actual text in the file that changes.

00:00:29.240 --> 00:00:32.960
This allowed us to see the foothold script being injected in the Kibana UI.

00:00:33.540 --> 00:00:37.030
Realtime allows us to see the alerts in real time.

00:00:37.040 --> 00:00:38.370
Makes sense, right?

00:00:39.040 --> 00:00:40.660
Let's check out the netstat command.

00:00:42.940 --> 00:00:46.180
The netstat alerts we saw in the Kibana UI correlate to the

00:00:46.180 --> 00:00:50.960
setting. By default, Wazuh runs netstat every 360 seconds and will

00:00:50.970 --> 00:00:53.260
alert if the output of the command changes.

00:00:53.640 --> 00:00:56.850
In other words, it will alert if the listening ports change.

00:00:57.540 --> 00:01:01.210
While netstat found signs that malware was present, it's best for us

00:01:01.210 --> 00:01:03.750
to focus our main efforts on the source of truth,

00:01:04.140 --> 00:01:06.960
which, in our foothold example is the file system.

00:01:07.640 --> 00:01:09.580
When we previously looked at Kibana,

00:01:09.590 --> 00:01:13.250
we saw two file system alerts that had to do with the foothold script.

00:01:13.840 --> 00:01:15.670
While generating alerts is good,

00:01:16.040 --> 00:01:19.270
automatic remediation is even better. If evidence

00:01:19.270 --> 00:01:21.160
of an invisible process exists,

00:01:21.330 --> 00:01:24.380
we should have a script that automatically kills that process.

00:01:24.480 --> 00:01:28.310
Luckily for us, Wazuh has an active response feature that allows

00:01:28.310 --> 00:01:30.850
us to trigger scripts when an alert occurs.

00:01:31.540 --> 00:01:33.400
First, to implement active response,

00:01:33.490 --> 00:01:36.770
we need to create a granular rule that only triggers when

00:01:36.780 --> 00:01:38.770
evidence of a hidden process exists.

00:01:39.340 --> 00:01:43.060
Let's go back into Kibana so we can dive a little deeper into this.
