WEBVTT

00:00:01.140 --> 00:00:01.930
Hello again.

00:00:01.930 --> 00:00:03.460
It's time for another demo.

00:00:04.140 --> 00:00:04.810
This time,

00:00:04.820 --> 00:00:08.119
we'll be looking at Winlogbeat and its ability to facilitate

00:00:08.119 --> 00:00:10.350
detection of Living off the Land attacks.

00:00:11.140 --> 00:00:15.660
I'll start by verifying the Winlogbeat configuration as the required event ID.

00:00:16.239 --> 00:00:16.850
Next,

00:00:16.860 --> 00:00:20.050
we will look at the LOLBAS project and I will talk about some

00:00:20.050 --> 00:00:22.450
ways to develop a scoped binary baseline.

00:00:23.540 --> 00:00:24.930
Once the baseline is developed,

00:00:25.100 --> 00:00:27.910
I will simulate a few Living off the Land techniques.

00:00:27.910 --> 00:00:30.310
Then, last but not least,

00:00:30.460 --> 00:00:34.660
we will head over to the Kibana web UI to observe what events were generated.

00:00:36.640 --> 00:00:40.110
This is a domain‑joined workstation in the Globomantics environment.

00:00:40.110 --> 00:00:43.360
Process creation events and command line login are enabled.

00:00:44.040 --> 00:00:46.350
Now, let's look at the Winlogbeat configuration.

00:00:47.140 --> 00:00:52.260
Event ID 4688 is already configured, so our first task is complete.

00:00:53.140 --> 00:00:55.840
I mentioned the LOLBAS project in the last clip.

00:00:55.840 --> 00:00:59.500
Let's visit the site and see what resources are available.

00:00:59.500 --> 00:01:00.950
Here we are.

00:01:01.540 --> 00:01:04.769
We can use this site to identify the LOLBAS functions

00:01:04.830 --> 00:01:06.550
that can be used to support an attack.

00:01:07.540 --> 00:01:10.440
A security team can use the information here to build

00:01:10.440 --> 00:01:12.460
different baselines and detections.

00:01:13.340 --> 00:01:15.060
Let's head over to Kibana.

00:01:15.060 --> 00:01:19.500
This is the Dev Tools section of the Kibana web UI.

00:01:19.500 --> 00:01:21.860
When you have Winlogbeat installed across your fleet,

00:01:22.240 --> 00:01:25.090
you can observe trends and outliers in your data.

00:01:25.090 --> 00:01:28.450
So when you want to see which Living off the Land binaries and

00:01:28.450 --> 00:01:30.460
scripts have been executed in your environment,

00:01:30.840 --> 00:01:33.260
you can use a search query like the one on the screen.

00:01:34.240 --> 00:01:38.610
This query asks if my aggregated Winlogbeat dataset has

00:01:38.620 --> 00:01:40.860
any of the Living off the Land binaries,

00:01:41.240 --> 00:01:45.160
and if it does, to aggregate them and show me the number of times seen.

00:01:46.240 --> 00:01:49.560
The first section should eliminate case sensitivity issues.

00:01:51.140 --> 00:01:53.620
I know a lot is going on here; however,

00:01:53.620 --> 00:01:58.500
the takeaway is that Winlogbeat can help you aggregate event

00:01:58.500 --> 00:02:03.680
ID 4688 and allow you to develop anomaly detections. How you

00:02:03.680 --> 00:02:05.760
develop your detections will vary.

00:02:06.840 --> 00:02:11.460
If we scan the output from the search, we can see that bitsadmin is not present.

00:02:12.440 --> 00:02:14.260
Let's take a look at an example attack.

00:02:15.140 --> 00:02:18.420
I will use the bitsadmin binary to simulate the download of

00:02:18.420 --> 00:02:22.450
a malicious DLL. Let's list the directory contents, and we

00:02:22.450 --> 00:02:24.260
can see no existing files.

00:02:25.340 --> 00:02:29.130
The first step is to create a bitsadmin job. Then, I will add

00:02:29.130 --> 00:02:31.900
the file I want to download to that job, including the

00:02:31.900 --> 00:02:37.430
destination. Next, bitsadmin automatically suspends jobs, so we

00:02:37.430 --> 00:02:39.360
must activate it using a resume.

00:02:40.340 --> 00:02:43.520
I will show you the job status for this demo because the next step

00:02:43.520 --> 00:02:46.480
should be performed when the status changes to transferring.

00:02:46.480 --> 00:02:50.680
Notice it's currently in progress, and if we wait a few seconds

00:02:50.680 --> 00:02:52.760
and check again, there we go.

00:02:53.440 --> 00:02:56.860
Now we release the file by telling bitsadmin to complete the job.

00:02:57.640 --> 00:03:01.450
If we list the directory's contents again, we can see that we have our payload.

00:03:02.140 --> 00:03:05.760
If we head over to Kibana and rerun our search, we can see that

00:03:05.760 --> 00:03:10.140
bitsadmin now shows up. How this information is used will vary

00:03:10.140 --> 00:03:13.500
for each organization, but generally, some follow‑up

00:03:13.500 --> 00:03:15.250
investigation should be conducted.

00:03:16.640 --> 00:03:20.920
Let's look at a follow‑up example where we use rundll32 to

00:03:20.920 --> 00:03:23.960
perform proxy execution of the downloaded payload.

00:03:24.940 --> 00:03:29.360
Notice it has over 100 individual log events in total

00:03:29.450 --> 00:03:31.560
across five systems in this lab.

00:03:32.540 --> 00:03:35.060
Real‑world environments could have several thousand.

00:03:35.440 --> 00:03:40.620
Keep this in mind as I perform the next simulation. The adversary has renamed

00:03:40.620 --> 00:03:46.260
rundll32.exe to smurf.exe as an additional evasion technique.

00:03:47.240 --> 00:03:53.020
Remember, renaming this binary does not affect the cryptographic hash. So

00:03:53.020 --> 00:03:57.690
now, we can execute our payload from the previous bitsadmin download. The

00:03:57.690 --> 00:04:01.810
command line syntax I'm going to use requires the name of the DLL and

00:04:01.810 --> 00:04:07.040
what's called an entry point. We will tell rundll32 that the entry point to

00:04:07.040 --> 00:04:12.320
our DLL is Globomantics. The LOLBAS project has a few examples of how

00:04:12.320 --> 00:04:15.960
rundll32 can be used, including the example I provided.

00:04:17.339 --> 00:04:21.140
If we head back to Kibana, we need to run a different search across the

00:04:21.140 --> 00:04:24.660
process command line field instead of the process name field.

00:04:25.340 --> 00:04:29.360
Smurf is not in the LOLBAS database, so our previous approach won't work.

00:04:30.140 --> 00:04:36.170
Using our knowledge of attacker TTPs and how rundll32 can be abused allows us

00:04:36.170 --> 00:04:39.560
to arrive at a search for dll followed by a comma.

00:04:40.040 --> 00:04:41.290
For this example,

00:04:41.300 --> 00:04:44.460
I will use Globomantics because it simulates one particular

00:04:44.460 --> 00:04:47.260
DLL entry point seen in threat research.

00:04:47.340 --> 00:04:49.760
If we use a wildcard prefix in the query,

00:04:50.140 --> 00:04:53.650
we can ignore the file name and instead focus on the command line usage.

00:04:54.840 --> 00:04:57.030
Our results show us the command line, and I've

00:04:57.030 --> 00:04:58.660
filtered out some of the other fields,

00:04:59.040 --> 00:05:01.350
but we also have the entire contents of the event,

00:05:01.840 --> 00:05:06.360
including the computer hostname, the user account that ran the command, and more.

00:05:07.140 --> 00:05:09.460
That's all for this clip Thanks for watching.
