WEBVTT

00:00:00.440 --> 00:00:02.440
(Aaron) So TrickBot malware doesn't really discriminate, right?

00:00:02.440 --> 00:00:06.439
And once on your system, it's then going to download modules.

00:00:06.440 --> 00:00:09.439
And we had discussed, too, that to get this analysis to work properly,

00:00:09.440 --> 00:00:12.106
you had to like let your system dwell for awhile because it takes a

00:00:12.106 --> 00:00:13.439
little time to download these different modules?

00:00:13.440 --> 00:00:14.440
(Tyler) Yeah, yeah.

00:00:14.440 --> 00:00:16.440
TrickBot, when it first runs, it's going to get in there,

00:00:16.440 --> 00:00:21.439
it's going to do some things, but it's going to sleep for a little bit.

00:00:21.440 --> 00:00:25.439
It's going to wait for awhile before it actually starts really doing anything.

00:00:25.440 --> 00:00:26.439
So most malware, when you're running it,

00:00:26.440 --> 00:00:27.640
when you're analyzing it,

00:00:27.640 --> 00:00:31.939
you'll get to a point where you'll maybe run it for 2 or 3 minutes,

00:00:31.939 --> 00:00:32.439
maybe 5 minutes.

00:00:32.439 --> 00:00:34.868
TrickBot, you kind of have to let it run for 10,

00:00:34.868 --> 00:00:38.440
15, 20 minutes at least in order to let it kind of start really,

00:00:38.440 --> 00:00:40.440
really doing its stuff.

00:00:40.440 --> 00:00:43.440
And the way that it works is it will go out to a

00:00:43.440 --> 00:00:47.440
number of command and control channels, servers on the internet,

00:00:47.440 --> 00:00:49.440
and it will start downloading modules.

00:00:49.440 --> 00:00:52.440
And these modules are encrypted per machine,

00:00:52.440 --> 00:00:55.725
so in other words if my system were to get infected and

00:00:55.725 --> 00:00:59.440
your system were to get infected, and they downloaded the same modules,

00:00:59.440 --> 00:01:04.839
the modules would actually look different because each module is

00:01:04.839 --> 00:01:08.439
encrypted based on a key that's generated per each machine.

00:01:08.440 --> 00:01:09.440
(Aaron) The key is generated on the machine?

00:01:09.440 --> 00:01:10.440
(Tyler) On the machine itself, yes.

00:01:10.440 --> 00:01:12.440
(Aaron) Wow, okay.

00:01:12.440 --> 00:01:13.440
That's interesting.

00:01:13.440 --> 00:01:16.565
Is modularized malware and kind of encrypted per machine

00:01:16.565 --> 00:01:19.440
malware more of a trend that we're seeing now?

00:01:19.440 --> 00:01:22.439
(Tyler) Modularized malware has been around for a while.

00:01:22.440 --> 00:01:26.440
It's definitely something that has gone on for a time.

00:01:26.440 --> 00:01:29.440
The encrypted per machine though, that's definitely a trend.

00:01:29.440 --> 00:01:33.439
Before TrickBot, I think there were some malware that did it,

00:01:33.440 --> 00:01:35.440
but it was really rare.

00:01:35.440 --> 00:01:39.440
The fact that TrickBot does this and is so prevalent in the industry,

00:01:39.440 --> 00:01:43.440
it's so popular with malware authors or attackers,

00:01:43.440 --> 00:01:46.439
I think we're going to start seeing this trend as we move forward.

00:01:46.440 --> 00:01:47.995
(Aaron) This isn't necessarily my specific area of expertise,

00:01:47.995 --> 00:01:51.440
especially when we get into like reversing and debugging stuff,

00:01:51.440 --> 00:01:54.439
but I tried ahead of this to impress you,

00:01:54.440 --> 00:01:58.884
and failed miserably, but downloaded a sample TrickBot,

00:01:58.884 --> 00:01:59.440
right?

00:01:59.440 --> 00:02:03.439
And it was interesting, we can talk about how it didn't get to the point,

00:02:03.440 --> 00:02:06.439
because TrickBot takes a while to do its thing.

00:02:06.440 --> 00:02:08.440
Nothing in the name like hybrid analysis or VirusTotal,

00:02:08.440 --> 00:02:09.440
or ANY.RUN,

00:02:09.440 --> 00:02:13.440
got to a point where it actually downloaded anything or even completed anything.

00:02:13.440 --> 00:02:15.530
So that kind of speaks to why we're here needing to do

00:02:15.530 --> 00:02:18.076
this dynamic analysis on our own devices,

00:02:18.076 --> 00:02:18.440
right?

00:02:18.440 --> 00:02:22.440
But I did actually debug some of this and got to look through everything.

00:02:22.440 --> 00:02:24.440
It turns out like every single function is encrypted,

00:02:24.440 --> 00:02:27.439
just like we expected it to be.

00:02:27.440 --> 00:02:29.439
So it wasn't really, even after unpacking,

00:02:29.440 --> 00:02:31.440
there wasn't a lot of information to be gained from this.

00:02:31.440 --> 00:02:32.258
I did identify,

00:02:32.258 --> 00:02:38.439
and we talked about this in setting up our virtual machine malware analysis lab,

00:02:38.440 --> 00:02:40.940
I did identify that it nearly was one of the only functions I

00:02:40.940 --> 00:02:43.440
could properly identify is DebuggerPresent.

00:02:43.440 --> 00:02:47.440
So I got that, here's a little IDA Pro snapshot,

00:02:47.440 --> 00:02:49.439
hopefully I get some kudos, we'll see.

00:02:49.440 --> 00:02:50.440
(Tyler) Oh yeah, absolutely.

00:02:50.440 --> 00:02:52.439
(Aaron) That only took me 5 hours.

00:02:52.440 --> 00:02:56.440
(Tyler) And TrickBot does have a lot of protections in place,

00:02:56.440 --> 00:02:58.440
and unless you're a, I think,

00:02:58.440 --> 00:03:03.440
a dedicated reverse engineer and you have time and experience on your side,

00:03:03.440 --> 00:03:06.258
TrickBot is one of those which it might be a bit more

00:03:06.258 --> 00:03:08.440
difficult to look at it from that perspective.

00:03:08.440 --> 00:03:08.940
Now fortunately,

00:03:08.940 --> 00:03:12.258
there are a lot of ways that we can still analyze

00:03:12.258 --> 00:03:15.440
TrickBot and see what it's doing, where it's contacting,

00:03:15.440 --> 00:03:19.439
and even decrypting its configuration files,

00:03:19.440 --> 00:03:21.773
and its modules that it's downloading so we can see

00:03:21.773 --> 00:03:24.439
at least where on the network, on the internet,

00:03:24.440 --> 00:03:26.440
that it's communicating with.

00:03:26.440 --> 00:03:27.440
(Aaron) Yeah, that's awesome.

00:03:27.440 --> 00:03:28.439
I'm super excited to get into that.

00:03:28.440 --> 00:03:31.440
If we pop up ANY.RUN here,

00:03:31.440 --> 00:03:35.440
and here is one of the hashes that was a TrickBot sample,

00:03:35.440 --> 00:03:38.440
and we take a look at what it did.

00:03:38.440 --> 00:03:40.439
It essentially tried to disable Windows Defender,

00:03:40.440 --> 00:03:42.439
which we have talked about, we've seen it doing that.

00:03:42.440 --> 00:03:45.440
(Tyler) Yeah, TrickBot does not like Windows Defender.

00:03:45.440 --> 00:03:46.167
In fact,

00:03:46.167 --> 00:03:50.940
one of the recent analysis I read about it said that TrickBot has just

00:03:50.940 --> 00:03:54.440
added a dozen new ways to disable Windows Defender.

00:03:54.440 --> 00:03:58.440
So it's definitely trying to get rid of that anti-virus

00:03:58.440 --> 00:04:00.439
that comes with all Windows systems now.

00:04:00.440 --> 00:04:02.440
(Aaron) Who knew there were so many ways to disable Windows Defender.

00:04:02.440 --> 00:04:04.440
(Tyler) Oh yeah, yeah.

00:04:04.440 --> 00:04:08.440
(Aaron) But yeah, and then from this I really got not much else.

00:04:08.440 --> 00:04:12.076
Because it knew it was on an environment that was

00:04:12.076 --> 00:04:15.440
meant for analyzing its behavior, there's no packet traffic,

00:04:15.440 --> 00:04:18.440
it essentially attempts to disable Windows Defender,

00:04:18.440 --> 00:04:20.440
and then I'm pretty sure we time out on any runs,

00:04:20.440 --> 00:04:22.440
like back end, so it's not going to download any modules,

00:04:22.440 --> 00:04:24.440
we don't really get much else out of this.

00:04:24.440 --> 00:04:26.440
(Tyler) Yeah, the thing you have to remember about online sandboxes,

00:04:26.440 --> 00:04:29.440
like ANY.RUN or even VirusTotal,

00:04:29.440 --> 00:04:32.440
because VirusTotal will do some behavioral analysis now,

00:04:32.440 --> 00:04:36.190
is that it's very easy for attackers to go in and kind of

00:04:36.190 --> 00:04:38.803
fingerprint them to figure out what it looks like when

00:04:38.803 --> 00:04:40.439
they're in one of these sandboxes,

00:04:40.440 --> 00:04:44.340
so there's definitely these anti-sandbox techniques in malware,

00:04:44.340 --> 00:04:46.440
and I'm sure TrickBot is using them.

00:04:46.440 --> 00:04:49.439
And like you said, ANY.RUN is only going to run it,

00:04:49.440 --> 00:04:52.440
it says there, for 60 seconds.

00:04:52.440 --> 00:04:52.582
So,

00:04:52.582 --> 00:04:56.106
that is definitely not long enough for even TrickBot to kind of

00:04:56.106 --> 00:04:59.439
get to its full installation on the system.

00:04:59.440 --> 00:05:02.439
It usually takes you 2 or 3 minutes for it to do that.

00:05:02.440 --> 00:05:04.439
(Aaron) That was actually one of the only other functions

00:05:04.440 --> 00:05:07.440
to be able to identify is that it actually uses the wait

00:05:07.440 --> 00:05:12.440
function quite a bit to wait, probably to time out on things like this.

00:05:12.440 --> 00:05:13.440
Once we're 60 seconds,

00:05:13.440 --> 00:05:17.190
nothing happens and any automated malware analysis is probably going to say oh,

00:05:17.190 --> 00:05:17.440
we're done.

00:05:17.440 --> 00:05:18.440
(Tyler) That's exactly it.

00:05:18.440 --> 00:05:20.439
You know, if you use an automated malware analysis system,

00:05:20.440 --> 00:05:23.440
even something like Cuckoo Sandbox that you would set up,

00:05:23.440 --> 00:05:25.439
you have timeouts in there.

00:05:25.440 --> 00:05:27.440
Maybe it's 5 minutes, maybe it's 10 minutes,

00:05:27.440 --> 00:05:33.440
but it's definitely going to be shorter than what TrickBot is willing to wait.

00:05:33.440 --> 00:05:35.439
It knows that if it gets on a real system,

00:05:35.440 --> 00:05:37.440
if it wastes 20 minutes that's no big deal to it,

00:05:37.440 --> 00:05:38.582
20 minutes from now,

00:05:38.582 --> 00:05:42.439
it's going to still be able to do its stuff if it's a real system.

00:05:42.440 --> 00:05:44.439
(Aaron) So, ANY.RUN is using Windows 7,

00:05:44.440 --> 00:05:47.440
and we talked about it's important to figure out what OS we want to use,

00:05:47.440 --> 00:05:50.439
so as we get into this analysis in the upcoming modules,

00:05:50.440 --> 00:05:52.440
what OS did you decide to use for this?

00:05:52.440 --> 00:05:56.440
(Tyler) So, I'm using Windows 7, and there's a very specific reason for that.

00:05:56.440 --> 00:06:00.439
So, TrickBot will run on Windows 7 or Windows 10,

00:06:00.440 --> 00:06:03.815
but there's been a recent change in TrickBot to

00:06:03.815 --> 00:06:07.440
where if it's running on Windows 10, it will still download the modules,

00:06:07.440 --> 00:06:09.439
but it keeps them in memory.

00:06:09.440 --> 00:06:11.439
Those modules never touch disk.

00:06:11.440 --> 00:06:12.440
(Aaron) Seriously?

00:06:12.440 --> 00:06:12.840
(Tyler) So,

00:06:12.840 --> 00:06:14.773
it then becomes very difficult for an analyst to

00:06:14.773 --> 00:06:20.440
see what modules were downloaded, what the configurations for them were,

00:06:20.440 --> 00:06:23.940
really the only way to do that at that point is to either have network

00:06:23.940 --> 00:06:28.440
monitoring set up in place or to do memory analysis.

00:06:28.440 --> 00:06:28.690
So,

00:06:28.690 --> 00:06:32.840
instead what we're going to do is we're going to use Windows 7 because on

00:06:32.840 --> 00:06:35.440
Windows 7 TrickBot still goes and downloads the modules to disk,

00:06:35.440 --> 00:06:38.690
just so we can see what they look like, how we can decode them,

00:06:38.690 --> 00:06:39.440
and so on.

00:06:39.440 --> 00:06:39.884
(Aaron) Yeah,

00:06:39.884 --> 00:06:42.725
they're going to be the same modules that are in there on

00:06:42.725 --> 00:06:44.439
Windows 10 with the same functions.

00:06:44.440 --> 00:06:44.995
(Tyler) Yeah, exact same ones.

00:06:44.995 --> 00:06:46.011
(Aaron) So it's behaviorally no different,

00:06:46.011 --> 00:06:48.439
the indicators that we're getting are no different.

00:06:48.440 --> 00:06:51.440
So there's no reason to be like a malware reversing purist.

00:06:51.440 --> 00:06:52.363
Our whole goal is to get to where we can just detect

00:06:52.363 --> 00:06:53.440
it on the rest of the network.

00:06:53.440 --> 00:06:53.803
(Tyler) Exactly.

00:06:53.803 --> 00:06:55.440
We're just going to make it easy for us.

00:06:55.440 --> 00:06:55.840
(Aaron) Awesome.

00:06:55.840 --> 00:06:57.439
I'm really looking forward to getting into that,

00:06:57.440 --> 00:07:00.190
and if you missed how to set up the malware analysis

00:07:00.190 --> 00:07:01.440
sandbox that we're going to be using,

00:07:01.440 --> 00:07:04.106
go ahead and check out a Play by Play for setting up

00:07:04.106 --> 00:07:05.440
the malware analysis sandbox lab, right?

00:07:05.440 --> 00:07:07.440
(Tyler) Right.
