WEBVTT

00:00:00.330 --> 00:00:03.900
And so when I take a look at that, and I'll show you here, if we take a

00:00:03.900 --> 00:00:07.939
look at some of those files, so you gave me this pcap.ng file, right?

00:00:07.939 --> 00:00:11.300
And pcapng, for those that aren't familiar,

00:00:11.300 --> 00:00:15.840
is just a newer version of pcap. Pcap has been the standard format used for

00:00:15.840 --> 00:00:18.400
network captures forever, for years and years and years.

00:00:18.530 --> 00:00:22.390
Pcapng is just a newer format, and it just adds a couple things.

00:00:22.390 --> 00:00:25.590
You can annotate packets within pcapng files and share

00:00:25.590 --> 00:00:27.200
them with people and things like that.

00:00:27.200 --> 00:00:28.910
So it does add a couple things,

00:00:28.910 --> 00:00:32.850
but it's still just all the network traffic that was captured. Absolutely.

00:00:33.740 --> 00:00:36.040
And I was a little worried when you first gave it to me. I'm like, oh man,

00:00:36.040 --> 00:00:38.380
I don't want to have to go use edit pcap or whatever and remember how to

00:00:38.540 --> 00:00:40.900
translate that back into just pcap, which you can do.

00:00:40.900 --> 00:00:44.180
It's actually super easy to do if you're using a legacy program that won't

00:00:44.180 --> 00:00:48.840
accept pcapng. I didn't have to do that with the newer Bro, so that's that's

00:00:48.840 --> 00:00:51.660
good news. It ran no problem. So I ran that, and we have these logs here, and

00:00:51.660 --> 00:00:53.970
you also see some of my models and stuff.

00:00:53.980 --> 00:00:57.150
But here's all these logs that are kind of general Bro logs, right?

00:00:58.000 --> 00:00:59.510
What I also did is I downloaded.

00:00:59.510 --> 00:01:03.900
I went to Salesforce, and they have a JA3 module.

00:01:03.910 --> 00:01:07.480
So JA3 hashes, if you're not familiar, it takes the cipher suites and

00:01:07.490 --> 00:01:10.910
other cipher information that's available in TLS handshake, and it

00:01:10.910 --> 00:01:13.370
generates an MD5 hash of that information.

00:01:13.760 --> 00:01:17.300
So there's going to be a unique MD5 hash for which cipher suites

00:01:17.310 --> 00:01:20.530
and capabilities were presented in that TLS handshake for the

00:01:20.530 --> 00:01:21.910
client, as well as for the server.

00:01:22.410 --> 00:01:25.585
And so we'll see those. When you add that module in, you can actually use

00:01:25.585 --> 00:01:27.830
Bro packages, and you just do Bro package install JA3.

00:01:27.990 --> 00:01:28.940
That's one way of doing it.

00:01:29.310 --> 00:01:30.130
Or you can go download it.

00:01:30.130 --> 00:01:34.530
So I'll show you that here. If you can go to Salesforce GitHub,

00:01:34.740 --> 00:01:37.860
and they have the JA3 packages here, you can go into bro,

00:01:38.410 --> 00:01:41.300
and you can actually download this information and they just

00:01:41.300 --> 00:01:43.259
add that into your local.bro config file.

00:01:44.540 --> 00:01:47.780
We'll come back to this because they actually use this in some examples for

00:01:47.790 --> 00:01:50.620
Emotet and TrickBot, so that gets kind of interesting too.

00:01:50.630 --> 00:01:51.110
But first,

00:01:51.340 --> 00:01:54.380
let's take a look at how we would kind of identify this in the first

00:01:54.380 --> 00:01:56.210
place. And I'm using Windows Subsystem for Linux.

00:01:56.390 --> 00:01:58.630
So, actually, I have Ubuntu loaded on Windows Subsystem for

00:01:58.630 --> 00:02:01.050
Linux 1.0 . So 2.0 is coming out really soon.

00:02:01.050 --> 00:02:03.715
I'm very excited about it because you can run Docker for Linux on Windows,

00:02:03.715 --> 00:02:06.280
which just starts going a couple layers of inception.

00:02:06.290 --> 00:02:09.250
But either way, that's what we're using here.

00:02:09.250 --> 00:02:12.620
And I use Bro, and I've generated these logs. And so, kind of when

00:02:12.620 --> 00:02:14.720
you come at this from like a session perspective,

00:02:14.730 --> 00:02:18.447
if we just look at the conn.log, it's the first thing, is the IP 5

00:02:18.447 --> 00:02:20.310
tuples, everybody talking, there's a ton of stuff in here.

00:02:20.700 --> 00:02:22.850
And not all of this is going to be TrickBot, right?

00:02:22.940 --> 00:02:25.690
Right. Because there's other stuff going on and advice. Even

00:02:25.710 --> 00:02:28.970
even on your sandbox network it's not, there's still a lot

00:02:28.970 --> 00:02:30.330
of Microsoft traffic as well, right?

00:02:30.340 --> 00:02:34.490
Yeah, the thing you have to remember is that with any version of Windows,

00:02:34.490 --> 00:02:37.550
really any operating system or any device that's on the internet

00:02:37.550 --> 00:02:41.270
or network, it's going to be pinging out to other systems, it's

00:02:41.270 --> 00:02:44.630
going to be communicating, and there's a lot of legitimate

00:02:44.630 --> 00:02:45.770
traffic that's going to be on.

00:02:45.770 --> 00:02:48.690
And so we talked a little bit at one point about baselineing your

00:02:48.690 --> 00:02:51.680
system. This is definitely one area you want to baseline. You want to

00:02:51.680 --> 00:02:56.090
know what is Windows going to go out and do a DNS lookup for? Where is

00:02:56.090 --> 00:02:59.580
it going to communicate with in order to download updates or just do

00:02:59.580 --> 00:03:00.890
whatever Windows is doing?

00:03:01.150 --> 00:03:02.900
And so there's a lot of that traffic in here.

00:03:03.240 --> 00:03:04.040
Yeah, absolutely.

00:03:04.040 --> 00:03:06.650
So what I end up trying to do is we know that when

00:03:06.650 --> 00:03:10.070
connections are made from a box, right? So you were infected on the box.

00:03:10.280 --> 00:03:13.850
That connection is going to be made out to some IP and port.

00:03:14.620 --> 00:03:17.400
And so generally, if we were talking about 80 and 443 traffic,

00:03:17.400 --> 00:03:20.350
that port will be unique in that those connections will

00:03:20.350 --> 00:03:21.810
be the only ones made out to that.

00:03:21.810 --> 00:03:23.820
If there's other connections, that's kind of interesting.

00:03:23.830 --> 00:03:26.810
So we're going to use bro‑cut. Bro‑cut can be loaded as well.

00:03:26.820 --> 00:03:29.040
It's just going to allow us to look at those specific fields.

00:03:29.040 --> 00:03:37.440
So I'm going to attempt to look at very specific columns,

00:03:37.440 --> 00:03:39.040
if I can remember the names, right?

00:03:39.040 --> 00:03:40.560
So with some luck here,

00:03:40.560 --> 00:03:42.800
we're looking at response host, right? They don't use IP because

00:03:42.800 --> 00:03:44.910
that'd be too easy, and then p is for port.

00:03:44.940 --> 00:03:47.490
Okay. So when we do this, now we get a list of all the

00:03:47.620 --> 00:03:49.640
IPs and ports. So that really good.

00:03:49.640 --> 00:03:52.180
And now I'm just going to use some Linux commands. So I'm going

00:03:52.180 --> 00:03:54.150
to look for a unique ones and give me a count.

00:03:55.250 --> 00:03:57.840
And of course, that didn't work because I didn't use a dash.

00:03:57.880 --> 00:03:58.400
There we go.

00:03:58.750 --> 00:03:59.040
Cool.

00:03:59.040 --> 00:04:00.280
So that's all the unique ones.

00:04:00.430 --> 00:04:01.030
But first,

00:04:01.040 --> 00:04:04.580
I'm actually going to sort those by number, which will be that last port number.

00:04:04.730 --> 00:04:11.835
So I'm sorting by unique port and, oh, IP. I see. So let's take out the IP

00:04:11.835 --> 00:04:16.127
that's reaching out to, and let's look at just that port that was going to look

00:04:16.127 --> 00:04:19.130
at. So now the list here, these are just all the different ports that were

00:04:19.130 --> 00:04:23.450
communicated as the destination. Absolutely, as a destination outside of the

00:04:23.450 --> 00:04:27.020
box. So if were looking at TrickBot on the device reaching out, it's going to

00:04:27.030 --> 00:04:30.725
reach to likely one of these lower ports, except for these high ephemerals I've

00:04:30.725 --> 00:04:31.450
generated back to it.

00:04:31.450 --> 00:04:33.830
So we can look at that later and see what ports are

00:04:33.840 --> 00:04:35.300
open and available on your device.

00:04:35.300 --> 00:04:38.080
That's kind of a different discussion. But for indicators for

00:04:38.080 --> 00:04:40.240
reaching out, we kind of get some of the common ones.

00:04:40.550 --> 00:04:42.530
And so, just so I'm clear,

00:04:42.530 --> 00:04:45.450
we're going to ignore the ones that are like the 49,000s and the

00:04:45.450 --> 00:04:50.539
63000s, and the ones kind of that are lower numbers on that, those

00:04:50.539 --> 00:04:51.580
are the ones that we're going to focus on.

00:04:51.710 --> 00:04:52.350
Absolutely.

00:04:52.350 --> 00:04:53.520
And then here is where we're going to have to use a

00:04:53.520 --> 00:04:55.240
little bit of our internal knowledge, right?

00:04:55.250 --> 00:04:58.210
So this is baselining, as well as just having some experience,

00:04:58.210 --> 00:05:01.615
and hopefully watching these kind of courses can help with some

00:05:01.615 --> 00:05:03.630
of that experience as well. We go over these in some of our

00:05:03.640 --> 00:05:04.960
network analysis courses, right?

00:05:05.180 --> 00:05:09.780
Fifty‑three. Got it. That's DNS. Sixty‑seven, it's DHCP.

00:05:09.780 --> 00:05:13.300
Eighty, okay. So maybe there's some 80 stuff because we know

00:05:13.300 --> 00:05:14.550
that's kind of a common malware thing.

00:05:14.550 --> 00:05:17.670
There's nothing weird about it per se. It doesn't _____. You would

00:05:17.670 --> 00:05:22.985
expect to see HTTP port 80 traffic on a on a network. Right. One

00:05:22.985 --> 00:05:26.784
thirty five and 136, 137, 138, most of these, one of them's not,

00:05:26.784 --> 00:05:31.095
but this is all NetBIOS stuff. Right. Right. Okay, and then 443, so

00:05:31.095 --> 00:05:32.440
that's SSL again.

00:05:32.450 --> 00:05:35.160
Could be associated with TrickBot, could not be. Could just

00:05:35.170 --> 00:05:37.270
be you're browsing the Bank of America, right?

00:05:39.330 --> 00:05:42.070
Right, exactly. And 447, to me and my experience, that's weird.

00:05:42.440 --> 00:05:43.690
Yeah, me too.

00:05:43.700 --> 00:05:47.790
You know, 447 and the one below it, 449, those are definitely ports that you

00:05:47.790 --> 00:05:50.840
normally don't see when you're doing network monitoring.

00:05:50.930 --> 00:05:51.550
Absolutely.

00:05:51.550 --> 00:05:54.180
And when, another thing that's interesting about it, and there's some other

00:05:54.180 --> 00:05:56.610
interesting ones here is they're fine, maybe this doesn't stand out for all

00:05:56.610 --> 00:05:59.540
them, and we have some prior knowledge, so we've realized that we've seen

00:05:59.540 --> 00:06:01.280
some of these in Process Explorer,

00:06:01.280 --> 00:06:03.100
and we've also seen it in the config files. That's kind of

00:06:03.100 --> 00:06:06.580
interesting. But another thing that I like to do is the least

00:06:06.590 --> 00:06:08.340
frequent case is often interesting.

00:06:08.340 --> 00:06:11.980
So, yes, we're looking at the sandbox, so maybe it's a tad different.

00:06:11.980 --> 00:06:13.820
We'd normally see a bunch of different stuff, right?

00:06:13.830 --> 00:06:16.100
But if you're in an enterprise doing incident response, when you look

00:06:16.100 --> 00:06:19.440
at the least frequent thing happening on the box, that can likely be

00:06:19.440 --> 00:06:22.780
an indicator. So if we see something that has two connections as

00:06:22.780 --> 00:06:24.200
opposed to thousands of connections,

00:06:24.200 --> 00:06:26.250
that's a little weird and something we can look into.

00:06:26.440 --> 00:06:27.770
Something unique on your network then.

00:06:27.840 --> 00:06:28.660
Yeah, absolutely.

00:06:28.670 --> 00:06:30.470
So that's something I usually look at.

00:06:30.680 --> 00:06:31.780
Yes, there's other ones.

00:06:31.790 --> 00:06:34.270
We also know that 8082 is going to be interesting.

00:06:34.510 --> 00:06:34.940
Yeah,

00:06:34.940 --> 00:06:37.550
we did see that in the configuration file for TrickBot, so

00:06:37.640 --> 00:06:39.870
that kind of stands out regardless. For sure.

00:06:39.880 --> 00:06:42.550
And then some of these other ones. I'm actually not really sure what

00:06:42.550 --> 00:06:46.990
547 is. But knowing that, now we have multiple things pointing at

00:06:47.000 --> 00:06:51.120
447, 449, and 8082, that's something interesting that we can look

00:06:51.120 --> 00:06:55.680
at. Yeah, and I think you kind of pointed this out too, we're only

00:06:55.680 --> 00:06:56.580
looking at the ports.

00:06:56.970 --> 00:06:58.880
Once we kind of add in those IP addresses,

00:06:58.880 --> 00:07:01.330
we could find out that port 1900, that could be going to a

00:07:01.330 --> 00:07:03.580
broadcast address, which would be normal traffic.

00:07:03.590 --> 00:07:05.210
We could immediately ignore that.

00:07:05.220 --> 00:07:06.840
Yeah, it could be local as well.

00:07:06.840 --> 00:07:08.390
I didn't do the other side of this connection.

00:07:08.390 --> 00:07:11.380
The other side of the connection could be like IPv6 or something like that.

00:07:11.390 --> 00:07:12.450
Right, okay, that makes sense.
