WEBVTT

00:00:00.000 --> 00:00:03.157
So we've talked a lot about fileless malware,

00:00:03.157 --> 00:00:03.854
how it works,

00:00:03.854 --> 00:00:07.102
and then quite a bit about how it's kind of the next level of

00:00:07.103 --> 00:00:08.506
detection to be able to find this stuff.

00:00:08.506 --> 00:00:11.477
It's not just simply drop an appliance on the rack and plugging it in.

00:00:11.477 --> 00:00:15.149
It doesn't just show up like oh yeah, you've got PowerShell running in-memory,

00:00:15.149 --> 00:00:16.303
by the way.

00:00:16.303 --> 00:00:17.841
It's not a thing.

00:00:17.842 --> 00:00:20.739
So at the end of that, every time it comes up is like well,

00:00:20.739 --> 00:00:21.594
it's actually logging.

00:00:21.595 --> 00:00:23.852
You have to enable this logging that's not enabled by default,

00:00:23.852 --> 00:00:26.298
and then you have to monitor that.

00:00:26.298 --> 00:00:27.124
Surprise!

00:00:27.124 --> 00:00:30.468
So I think we're going to talk a little more about that is what do we

00:00:30.468 --> 00:00:34.543
need to be logging to be able to find this stuff?

00:00:34.543 --> 00:00:37.175
And I think a lot of people, or a lot of organizations,

00:00:37.175 --> 00:00:38.171
or administrators,

00:00:38.171 --> 00:00:41.556
they think that the default logging that occurs within Windows is sufficient,

00:00:41.556 --> 00:00:43.576
and it's really not.

00:00:43.576 --> 00:00:48.206
There is a lot of extra logging that you can turn on that would give you just

00:00:48.206 --> 00:00:52.069
so much information about what's going on in the system.

00:00:52.069 --> 00:00:52.816
In fact,

00:00:52.816 --> 00:00:57.938
you could even do a full malware analysis on what malware is

00:00:57.938 --> 00:01:00.356
doing if you have proper logging set up.

00:01:00.356 --> 00:01:02.616
You wouldn't need to any extra tools or anything like that.

00:01:02.616 --> 00:01:06.969
Just by focusing in on the logs, you can do this.

00:01:06.969 --> 00:01:09.035
And again, a lot of them are not turned on by default,

00:01:09.035 --> 00:01:11.668
and nobody turns them on, and even those that are turned on by default,

00:01:11.668 --> 00:01:16.647
for example, like the WMI logs, they don't give you enough information.

00:01:16.647 --> 00:01:19.747
WMI, I think, by default, just only logs error messages.

00:01:19.747 --> 00:01:22.460
And so if an attacker is good and they've practiced,

00:01:22.460 --> 00:01:26.791
then they don't generate errors, and so nothing ever gets logged.

00:01:26.792 --> 00:01:31.058
And so what we'll look at is what you need to do in order to turn

00:01:31.058 --> 00:01:33.927
these logs on and which logs you need to turn on.

00:01:33.927 --> 00:01:35.720
Yeah, the attacker's stuff only has to work one time,

00:01:35.720 --> 00:01:38.183
and then we have to be perfect every time.

00:01:38.183 --> 00:01:40.191
It's the blue team fun.

00:01:40.191 --> 00:01:43.275
And there are a lot of different logs that you can turn on.

00:01:43.275 --> 00:01:47.226
When we look at the Windows, and we'll look at the interface here in a minute,

00:01:47.226 --> 00:01:50.286
there are just all of these different options that you can turn on,

00:01:50.286 --> 00:01:52.894
and you may not know what you need to turn on and where,

00:01:52.894 --> 00:01:57.782
and so there are some really great resources out online of what you,

00:01:57.782 --> 00:02:00.980
that will tell you what you need to turn on.

00:02:00.980 --> 00:02:07.603
So probably the best one that I know if is if you go to malwarearchaeology.

00:02:07.603 --> 00:02:08.245
com.

00:02:08.245 --> 00:02:08.778
Malwarearchaeology.

00:02:08.778 --> 00:02:13.259
com has a number of cheat sheets related to logging.

00:02:13.260 --> 00:02:14.048
I love cheat sheets.

00:02:14.049 --> 00:02:14.314
Yeah,

00:02:14.314 --> 00:02:19.026
and these cheat sheets are for Windows; Windows Advanced; for if you use Splunk,

00:02:19.026 --> 00:02:23.436
it tells you what you need to do in order to get Splunk in; it even,

00:02:23.436 --> 00:02:26.247
down here at the bottom, it even has PowerShell Logging.

00:02:26.247 --> 00:02:30.699
So in order to turn on PowerShell Logging there's its own cheat sheet there.

00:02:30.699 --> 00:02:31.869
Specific stuff just for PowerShell.

00:02:31.870 --> 00:02:32.518
Specific to there.

00:02:32.518 --> 00:02:33.906
And they've even come out with,

00:02:33.906 --> 00:02:38.169
a lot of people are using the MITRE ATT&CK framework now in order to

00:02:38.169 --> 00:02:40.528
kind of correlate what their tools can do all that.

00:02:40.529 --> 00:02:43.704
They've even gone in and shown,

00:02:43.704 --> 00:02:47.651
mapped every single log within Windows to the MITRE ATT&CK framework.

00:02:47.651 --> 00:02:51.514
So if you want to pick a specific attack in MITRE,

00:02:51.514 --> 00:02:52.489
in MITRE ATT&CK framework,

00:02:52.489 --> 00:02:56.316
it will tell you which logs you need to turn on in order to detect that.

00:02:56.316 --> 00:02:57.900
So these cheat sheets are unbelievable.

00:02:57.901 --> 00:02:59.516
I highly recommend using them.

00:02:59.517 --> 00:03:01.291
They're going to tell you exactly what you need to

00:03:01.291 --> 00:03:02.841
do and what you need to turn on.

00:03:02.841 --> 00:03:03.154
Yeah.

00:03:03.154 --> 00:03:06.497
And then not only how to detect that something is happening in general,

00:03:06.497 --> 00:03:07.854
but like you said with the MITRE ATT&CK,

00:03:07.855 --> 00:03:12.425
you can look at the pattern of behavior and match that to APTs

00:03:12.425 --> 00:03:13.796
because that's kind of what an attacker is going to do.

00:03:13.796 --> 00:03:14.198
Exactly.

00:03:14.198 --> 00:03:16.212
That's exactly how it works.

00:03:16.212 --> 00:03:19.149
In addition to Malware Archaeology,

00:03:19.149 --> 00:03:23.967
one of the other tools that you want to use to enhance your logging is Sysmon.

00:03:23.967 --> 00:03:25.606
Sysmon is from Microsoft.

00:03:25.606 --> 00:03:27.467
It's a service that you can install.

00:03:27.467 --> 00:03:28.042
It's free.

00:03:28.042 --> 00:03:30.943
You install it, you use a configuration file for it,

00:03:30.943 --> 00:03:34.501
and it just enhancing the logging that's on your system.

00:03:34.502 --> 00:03:34.689
Yeah.

00:03:34.689 --> 00:03:35.629
It's part of the Sysinternals.

00:03:35.629 --> 00:03:37.872
It's part of the Sysinternals, Mark Russinovich stuff.

00:03:37.872 --> 00:03:41.173
He has some amazing, yeah, he has some amazing tools out there.

00:03:41.173 --> 00:03:42.995
This is just one of them,

00:03:42.995 --> 00:03:45.887
and it really picks up Windows logging where the

00:03:45.887 --> 00:03:47.674
normal Windows logging leaves off.

00:03:47.674 --> 00:03:50.181
It has some enhancements for WMI logging.

00:03:50.181 --> 00:03:55.308
It kind of, it will complement a lot of the Windows logging,

00:03:55.308 --> 00:03:59.653
and so we're going to talk about how to turn on process creation logging.

00:03:59.654 --> 00:04:01.532
It will do that as well.

00:04:01.533 --> 00:04:04.963
And some people may think well, why should I turn on both?

00:04:04.963 --> 00:04:07.996
Well, it's not a bad thing to turn on both.

00:04:07.996 --> 00:04:10.938
So let's take the situation an attacker gets on a system.

00:04:10.938 --> 00:04:15.600
One of the first things that they might do is clear your security logs.

00:04:15.601 --> 00:04:17.362
So if you do have this logging turned on and you're

00:04:17.362 --> 00:04:20.364
not sending it to someplace central, they've just cleared your logs,

00:04:20.365 --> 00:04:22.036
your logs are gone.

00:04:22.036 --> 00:04:25.112
Well, they may think to only clear the security logs.

00:04:25.112 --> 00:04:26.473
If you also have Sysmon logging,

00:04:26.474 --> 00:04:28.014
then you have a second place where this is going,

00:04:28.014 --> 00:04:29.568
and you can start correlating information,

00:04:29.568 --> 00:04:30.932
and you have a backup.

00:04:30.932 --> 00:04:33.751
And the Sysmon logs sit in the event log structure,

00:04:33.751 --> 00:04:35.886
but not inside the main ones.

00:04:35.887 --> 00:04:38.888
So it's not the big five that include forwarded events.

00:04:38.888 --> 00:04:41.029
You'd have to kind of dig down in there in order to find it.

00:04:41.029 --> 00:04:44.197
Now, yeah, you can go and you can script it out and all that,

00:04:44.197 --> 00:04:45.631
but--- Like anything else.

00:04:45.631 --> 00:04:49.339
---but it's at least a backup, and it's going to be doing more things for you.

00:04:49.340 --> 00:04:52.793
And the more you can do, the better off you're going to be in the long run.

00:04:52.794 --> 00:04:55.853
So if you paired that with remote logging,

00:04:55.853 --> 00:04:58.661
like you're forwarding your Windows event logs to a centralized source,

00:04:58.661 --> 00:05:01.805
now you not only have a location on the endpoint,

00:05:01.806 --> 00:05:04.641
you also have a centralized location with archived backups of everything,

00:05:04.641 --> 00:05:07.916
so it's more unlikely that they'll be able to get to all the logs.

00:05:07.916 --> 00:05:10.569
And then it becomes much more difficult for an attacker

00:05:10.569 --> 00:05:12.820
to kind of wipe away their footprints.

00:05:12.821 --> 00:05:14.496
They may be able to do it on the local system,

00:05:14.496 --> 00:05:17.588
but as you're sending those logs to that central system,

00:05:17.588 --> 00:05:20.535
now they would have to figure out how can they compromise the

00:05:20.535 --> 00:05:22.279
central system and wipe the logs there,

00:05:22.280 --> 00:05:24.644
which hopefully your central system is a bit more defended,

00:05:24.644 --> 00:05:27.581
and it's going to be much more difficult for them to do that.

00:05:27.581 --> 00:05:30.907
And when they do, the more that they have to pivot in the environment,

00:05:30.907 --> 00:05:33.378
the more likely they are going to be to get caught.

00:05:33.379 --> 00:05:34.211
This is a good business case.

00:05:34.211 --> 00:05:38.047
It's not only good to centralize those logs for things like web servers so

00:05:38.047 --> 00:05:42.509
that you can kind of look at your usage and plan out whether you need to

00:05:42.509 --> 00:05:44.181
expand your data center and that kind of thing.

00:05:44.181 --> 00:05:48.472
So this kind of also ties into a DevOps use case and a

00:05:48.472 --> 00:05:54.140
business use case that security can also use.

00:05:54.140 --> 00:05:56.540
Right, exactly.
