WEBVTT

00:00:03.040 --> 00:00:03.340
Well,

00:00:03.340 --> 00:00:07.700
we've reached our final demonstration. In this demo, we're going to look at how

00:00:07.700 --> 00:00:13.340
malware can use TLS for secure communications. We'll discuss how to view TLS

00:00:13.340 --> 00:00:18.690
information in Arkime, as well as explore the use of JA3 hashes to help us to

00:00:18.690 --> 00:00:21.210
detect additional command and control nodes.

00:00:22.140 --> 00:00:27.000
It's important to understand how to observe and analyze encrypted traffic. Due

00:00:27.000 --> 00:00:30.900
to the encryption, many of the information that we'd really like to be able to

00:00:30.900 --> 00:00:33.600
see is now not visible since it's encrypted.

00:00:33.700 --> 00:00:37.340
However, that doesn't mean, as defenders, we aren't without our options.

00:00:37.370 --> 00:00:40.040
So that's what we're going to focus on in this demonstration, so

00:00:40.050 --> 00:00:44.290
let's get started. Now for our last traffic analysis exercise,

00:00:44.290 --> 00:00:46.980
we're going to actually look at a pcap that we started this whole

00:00:46.980 --> 00:00:50.970
course off with, but instead of just focusing on the payload drop

00:00:50.970 --> 00:00:52.390
that is these executable,

00:00:52.400 --> 00:00:55.770
we're going to focus on some of that post infection traffic,

00:00:55.780 --> 00:00:58.770
particularly traffic that uses TLS encryption.

00:00:59.240 --> 00:01:01.520
So let's start with the Connections tab.

00:01:01.530 --> 00:01:02.900
We haven't used this one yet.

00:01:03.110 --> 00:01:06.750
The Connection tab allows you to see graphs between nodes.

00:01:06.970 --> 00:01:10.680
So here we can see very prominently that we have one node

00:01:10.770 --> 00:01:12.050
that's doing most of our talking.

00:01:12.440 --> 00:01:15.840
This happens to be our internal host. Now, we certainly

00:01:15.840 --> 00:01:18.360
could look at all of the different hosts that it has

00:01:18.360 --> 00:01:20.370
connected to and how it's connected.

00:01:20.520 --> 00:01:23.300
You have IP address information, as well as ports.

00:01:23.530 --> 00:01:24.970
Sometimes things will stand out,

00:01:25.340 --> 00:01:27.810
but I certainly don't think everyone is going to have all

00:01:27.810 --> 00:01:31.160
of the good and bad IPs memorized so let's filter this

00:01:31.160 --> 00:01:32.450
content a little bit further.

00:01:33.240 --> 00:01:37.230
I've decided that I want to focus on just the HTTP protocol, as

00:01:37.230 --> 00:01:40.480
you can see with my filter, and we'll limit the bytes in the

00:01:40.480 --> 00:01:42.570
session to greater than 500,000.

00:01:42.940 --> 00:01:44.260
Let's take a step back,

00:01:44.270 --> 00:01:49.360
identify where that trojan was dropped, and then expand our timeline from there.

00:01:49.740 --> 00:01:51.370
This certainly looks like it's the case,

00:01:51.370 --> 00:01:54.250
but we don't know for sure until we move over to the Sessions tab.

00:01:56.740 --> 00:01:58.010
Hopefully, this looks familiar.

00:01:58.230 --> 00:02:01.710
You can see our trojan, our executable that is masquerading as a PDF.

00:02:02.440 --> 00:02:02.860
However,

00:02:02.860 --> 00:02:05.940
that's all we see right now because we have our filters

00:02:05.940 --> 00:02:08.259
providing us with a fairly narrow view.

00:02:09.039 --> 00:02:09.400
Well,

00:02:09.400 --> 00:02:11.810
let's look at another way in which we can adjust our

00:02:11.810 --> 00:02:14.850
timeframe. If you look at the graph above,

00:02:14.860 --> 00:02:18.350
you'll see a spike, a bar that represents that session traffic.

00:02:18.840 --> 00:02:22.410
We can now just simply drag and drop, select an area,

00:02:22.420 --> 00:02:25.650
and use that in order to help us narrow our timeline.

00:02:26.140 --> 00:02:31.190
You'll notice that as we drag the box around the area that we want to inspect,

00:02:31.200 --> 00:02:33.160
our timeline narrows, it gets smaller.

00:02:33.540 --> 00:02:36.430
We can continue to do this, and for this example,

00:02:36.440 --> 00:02:38.810
were interested in that post infection traffic.

00:02:39.010 --> 00:02:43.010
So let's just highlight a timeline that comes after the

00:02:43.010 --> 00:02:45.750
session, after when that pdf was dropped,

00:02:46.740 --> 00:02:51.000
I'm going to continue to narrow this until we get to a point where we're about

00:02:51.000 --> 00:02:54.360
30 minutes after the payload has entered the environment.

00:02:55.240 --> 00:02:56.480
Now that we focused in,

00:02:56.490 --> 00:03:00.140
let's back some of our filters off. In particular, let's get

00:03:00.140 --> 00:03:03.910
rid of the bytes filter. You can see in doing this, we have

00:03:03.910 --> 00:03:05.320
now generated more sessions.

00:03:05.320 --> 00:03:06.960
Instead of having one, we have five.

00:03:07.570 --> 00:03:09.450
As we investigate those sessions, though,

00:03:09.460 --> 00:03:11.820
they appear to be legitimate traffic from the host,

00:03:11.830 --> 00:03:14.070
which is going to blend in with the malicious traffic.

00:03:14.440 --> 00:03:16.910
We have request the digicert, Windows update,

00:03:16.910 --> 00:03:21.020
Microsoft, and all of these are really things we don't care about. What

00:03:21.020 --> 00:03:25.650
if the sample is using TLS? So let's make a couple of modifications.

00:03:25.660 --> 00:03:28.780
We'll change the protocol from HTTP to TLS,

00:03:28.820 --> 00:03:32.870
and we'll add a filter so that we keep our IP source to

00:03:32.870 --> 00:03:34.260
the host that we're investigating.

00:03:35.040 --> 00:03:36.880
Okay, we have some good results here.

00:03:37.100 --> 00:03:39.610
We have certainly some TLS traffic.

00:03:39.620 --> 00:03:41.760
We have seven sessions that we can now investigate.

00:03:42.140 --> 00:03:45.400
Much like the previous, some of this traffic is going to be legitimate.

00:03:45.410 --> 00:03:47.660
For example, these requests to oracle.com.

00:03:48.540 --> 00:03:49.770
The second session, though,

00:03:49.770 --> 00:03:53.930
stands out as an anomaly mainly because the destination port

00:03:53.940 --> 00:03:56.970
is a nonstandard port used for TLS traffic.

00:03:57.340 --> 00:04:04.920
The standard port is 443, but in this case we see 4443. We can expand that

00:04:04.920 --> 00:04:09.500
session and get information about the TLS certificate and the handshake

00:04:09.500 --> 00:04:11.970
that took place as that session was established.

00:04:12.740 --> 00:04:14.700
Let's first take a look at the cert information,

00:04:14.900 --> 00:04:17.820
and you'll see there is some concerning information here,

00:04:17.950 --> 00:04:21.470
such as the subject common value, as well as the Subject Org.

00:04:22.540 --> 00:04:25.620
The other area that I want to point out is under the TLS section,

00:04:25.630 --> 00:04:28.370
we have JA3 and JA3s values.

00:04:28.390 --> 00:04:30.680
These are hashes that are calculated based off the

00:04:30.680 --> 00:04:33.760
information provided in the initial TLS handshake.

00:04:34.240 --> 00:04:37.470
How this is done is beyond the scope of what I want to cover, but this

00:04:37.470 --> 00:04:40.700
is an open source technology that was introduced by Salesforce and they

00:04:40.700 --> 00:04:42.760
have great documentation on their GitHub.

00:04:44.540 --> 00:04:48.310
What we care about right now is that we can use the JA3 hash in order to

00:04:48.310 --> 00:04:53.150
identify this certificate and its use with potentially other hosts.

00:04:53.840 --> 00:04:56.960
If we go back to our Sessions view and eliminate all of

00:04:56.960 --> 00:04:59.180
the filters, except this JA3 hash,

00:04:59.370 --> 00:05:02.150
it does identify another session, in this case,

00:05:02.160 --> 00:05:08.050
not to a destination port of 4443, but to 9443. So now we've

00:05:08.050 --> 00:05:11.200
discovered another important IOC. Great work.

00:05:11.290 --> 00:05:13.910
Well, unfortunately, we've come to the end of this course.

00:05:13.920 --> 00:05:16.600
We have one module left in which I'll wrap things up and

00:05:16.600 --> 00:05:18.300
provide some additional recommendations.
