Threat Hunting (Video)
Presented by: Christopher Crowley
PresentationThreat hunting involves a continuous process of analyzing data, identifying patterns, and applying knowledge to detect and respond to threats. This process requires a structured approach, establishing clear processes, roles, and responsibilities, as well as setting standards and protocols for data analysis and response. Key technical concepts include network security monitoring, endpoint monitoring, threat intelligence, response and incident management, scripting and automation, historical analysis, and use cases and scenarios.
Featured Clips
"You need to think about being safe. I want you to think about doing things in a way that is not going to put the operations at risk."
"You can do this in the things that I'm going to advocate for you to do. You can cause so many problems for your organization that you will get yourself fired."
Full Transcript / Content
--- Page 1 ---
Let me give you a little story. I used to mountain bike before I started running around the world for sands all the time, and I basically was up mountain biking in the Frederick watershed. Frederick is, Frederick, Maryland is the one that I'm referring to. Fort Detrick's there, Camp David's a little north of there, amazing mountain bike trails. So we're up there, mountain biking along, my buddies and I, we're out there, there are about six or seven of us. Myself and this one other guy, we come into this clearing, and my buddy stops and he looks over, it's this area where there's, you know, some kind of a flat area, the trails going through it, and then there's this, there's sort of this, you know, pond, and there is this amazing turkey over on this other side of the clearing, and he's looking at that, and there, there are two, you know, there's the big tom, there are two hens too, and we're looking at it, he's like, is that real? Yeah. Is that real? I was like, I don't know, that, that doesn't really look real to me. He's like, he's getting his camera out of his bag, and he's getting off of his bike, pulling his camera off, because, you know, like these turkeys are going to fly away, and they're just not moving. I was like, there's something really weird about what's going on here, right? So he pulls his camera out, and I'm standing there, and this voice comes out of the woods, hey, can't you see I'm hunting here? And I, of course, because I'm not exactly the smartest person in the world, I say, well, no, I can't see you, because you must be wearing camouflage, right? And as I'm saying this, my other buddies are coming up behind us on their bikes, and one guy says to me, hey, hey, that guy has a gun, you shouldn't be yelling at him. Oh, right, I get it, I get it. So in terms of hunting, you actually need to be safe in the way that you do it, and if you set up a great hunting trap, and you set up your gun pointed across, a trail where a lot of people are commonly walking, that's actually going to ruin it for you. And so you need to think about how you're doing your hunting. Or you need to arrange things in a way so that your traps are realistic for the attackers, but at the same time, you're not trapping the people who are on your own team. Rob actually talked about this earlier where there were folks that knew about the place to hit, and they kept hitting it over and over and over again, and it spoiled the traps. And this is the reality of it. Another thing that I want you to think about is you're coming into your own environment to do hunting. If you haven't been doing it already,
--- Page 2 ---
that means that there is possibly an adversary present who is able to hunt you. So when you think about hunting, I want you to think about being safe. I want you to think about doing things in a way that is not going to put the operations at risk. And I'm going to get to the point of how to do all this. But I also want you to think about the fact that yelling at the person with the gun isn't really a smart thing to do. And that analogy applies in a lot of different circumstances, but for you and your environment where you're trying to establish threat hunting, these are the people who are running systems. These are the people who are trying to make your business work. These are the people who were there and set up and are resource-constrained already. And you're now trying to add additional things to make your job easier. But at the same time, you're creating friction for them. And you're creating a conflict by adding additional things into their environment. So everywhere possible that you can hunt, you should be thinking about using what you have at your disposal already and optimizing what you have at your disposal already before you start to add additional decoys, before you start to add additional things that they must do. I also want to warn you, right, that you are going to be implementing change. And there are a lot of things in our environment where when we change them, we end up causing problems. And I could have grabbed any given quote, but I love despair incorporated. How many of you have one of these posters on your wall or have the coffee mug, right? These are demotivators. It could be that the purpose of your life is only to serve as a warning to others, okay? The idea is to serve as a warning to others. The idea that what you do is so wrong that it ends up being a career-limiting move for you. And I really mean this. You can do this in the things that I'm going to advocate for you to do. You can cause so many problems for your organization that you will get yourself fired. Sad but true. Just be careful. I have extracted a few tidbits out of a five-day course that I wrote, Jennifer and Rob. Contacted me and basically said, hey, we had somebody not able to make it, can you do something, talk about the security operations stuff? Yes. I love talking about that, right? I love it so much, I wrote five days' worth of content on it. So these are just a few little extracted things. I think that most people that present at this event are going to tell you, you need to turn your hunting into an operational task, okay? So my intention. Is to try to explain to you how to make that happen, right?
--- Page 3 ---
How to lay the framework so that you have an opportunity to take the things that people are doing with their hunting and turn them into an operational task. This is important. This is necessary. If you're not doing this, then you're losing out on resources that you're developing. In order to do this, you need to have good structure. You need to have good discipline. You need to have good practice. So I describe the Security Operations Center in terms of functional areas, and these are the functional areas that I use in order to address this. First off, there is some structure that is the steering committee. And I don't care what you call these things, but all of these functions need to be in place in order to have good, effective security operations. Your steering committee is intended to bridge between the technical operations, both tactically and strategically, and the organization's progress. If you do not have this, the SOC will be going one way, the business will be going another way. The business will have acquired somebody. You don't know about it. The business will have strategic objectives. You're not aligned with them. Okay? And the steering committee is intended to have an ongoing coordinating task. Additionally, and someone asked the question about metrics, I'll try to talk about that a little bit. I'm not calling out specific metrics in here, but the steering committee is who the metrics would be reported to, and again, in 517, I go into a lot of detail about what metrics should be presented, but I think that there are some metrics that should be presented to the steering committee. And one of the things was the ability to sweep the enterprise, the time to sweep the enterprise, and what I mean by sweep the enterprise is to check the environment, every node, in order to assess if some problem is present on that node. And I kind of don't care if that takes you two weeks, but I want to have it quantified. Okay? Another capability is the control center. The control center is the communication vehicle for your security operations. Requests come into the control center. Information is disseminated out of the control center. This is your interrupt receiving layer. All right? And those of you who know, you know, Tom Limoncelli's Time Management for Systems Administrators, if you haven't read that book, you should read it. It's a short book, right? And one of the things that he says is that for all operations, you must establish an interrupt layer so the people who are actually doing stuff, the people who are actually working, don't get bothered and don't have to context switch out of the task that they're performing. You need to have network security monitoring, and in network security monitoring, I actually include endpoint monitoring. This is a nomenclature that's out there, but I think that network security monitoring is everything in your information systems.
--- Page 4 ---
You need the threat intelligence capability, and this is both digestion of external threat intelligence, right, the purchasing of feeds or the collection of open source information, as well as the creation of your own internal threat intelligence and tracking adversaries who are attacking you. You need a response function that can run out and do things, and I say that there are basically three modes that response functions operate in, and I don't want to get too far into this, but the first mode is janitorial services, okay? Janitorial services rolls in with a mop bucket after the problem has occurred and cleans up the mess. Firefighters who rush out to a burning building and try to save lives and rescue animals and prevent the spread of the fire to other nearby buildings. And eagles, the idea of having an eye in the sky that can take out an adversary before that adversary actually knows that the defense is present, okay? And I'd be happy to elaborate on this more, and those of you who, you know, are in class this week will hear me talk about this, but your response operates essentially in those three modes. And most of the incident response that I see in the world today is janitorial services. Like, people even are aspiring to be firefighters, but they're not there yet. Forensic capability is important. Forensic capability answers deep questions, specific questions about what's happening in the environment. And then finally, the notion of self-assessment, and this includes configuration monitoring. This includes change control. This includes vulnerability scanning. This includes pen testing. This includes red teaming, okay? All of these things are necessary in order to do security operations, and the question, well, where do we put hunting? And my answer is everywhere. Every single facet of your security operations can be doing hunting in their own way. And if you have a dedicated hunt team, that's great, right? That dedicated hunt team probably sits somewhere in between network security monitoring, threat intelligence, and incident response, right? But I think that each of these areas should have as a task the responsibility to express threat hunting. This is as much a cultural aspect of your security operations as it is a specific task. This is my basic diagram in terms of what security operations looks like, okay? And I know that you can't see it, right? I know that you can't understand it. This is a swim lane diagram depicting the enumerated processes for the functional areas that I've described, okay? And this is just the process. Okay? Okay. And this is just a swim lane diagram depicting the enumerated processes. When I actually talk about developing this, I identify five elements for every process, the input to the process, the people tasked with performing this, the process itself, the technology required to accomplish this process, and the artifacts or the outputs associated with that process. If you, in your organization, cannot articulate all
--- Page 5 ---
of the relationships between all of the people that are doing things, you have a serious problem in your security operations. This is a basic, I think, basic expression of security operations. If you want to download this, I'll actually, I have a bit.ly link at the end. I'll throw this diagram in there as well. I have a TIFF, a JPEG, and a Visio version of this that I'm happy to share. This is basic fundamental expression. If you do not have this, start here. Get with the people that you work with. I don't care if there are two more of you or it's you yourself, right? Or if you have a thousand people across your organization that are working in your security operations. Identify the relationships and the flow of information and who does it, what they're doing, what technology they use, and the output from each of those processes. And then it's really quite straightforward to say, okay, you, this functional area, you're going to incorporate this hunting task, right? And this is where we're actually going to perform it. Additionally, you must train people in what hunting is. And I thought about how I define hunting. And my explanation was knowing and applying the way, the weather, the terrain, leadership, and discipline. Okay? And so those of you keeping track, you know, for your slides to Sun Tzu, this is it, right? We finally made it to the Sun Tzu quote. What is the way? Well, the way is, huh? all of the things that we know in terms of the information systems that we're operating in and the notion of how adversaries behave. What is the weather? Weather is interesting in terms of cyber security, information assurance, whatever term you want to use. Weather is stuff like when the Mirai botnet ramps up and starts hitting a particular place. You know what else is the weather? Patch Tuesday. Why? Because Patch Tuesday constantly changes the environment and it's cyclical. It's cyclical. This comes through. This affects the adversary. This also affects the defense. What is the terrain? The terrain is both the topology of the information systems that you're tasked with protecting and all of the defensive layer that you have in place. You must know this. If you do not know this, it's very difficult to hunt. If you do know it, then it's easy to hunt because it's predictable. The lanes of travel for the adversary are predictable. What is leadership? Leadership is the ability for one person or a group of people to act in accordance with one another. My sort of prototypical structure of leadership is for every ten people there's one who's responsible for disseminating strategic and tactical view, as well as aggregating information from those other nine people and passing it up. Very straightforward. This also is cultural. If everybody on your team knows that part of what they do is to help to drive a concerted effort, leadership's easy. And this also blends into discipline. If I tell somebody
--- Page 6 ---
in the midst of incident response, don't touch that, and they're going to start arguing with me, there's probably not good discipline. If I know that I'm in charge, and that person knows that I'm in charge of an incident response task, and I say, leave that alone. Don't take that system down. If I express that, and the person knows that I'm serious, right, and actually does it, that's good discipline. If you start to get into the notions of, you know, targeted intrusions versus non-targeted intrusions, which I think is an incredibly tough thing to accomplish for most organizations, because how do you differentiate which is targeted and which isn't usually requires an abundance of threat intelligence and really rapid decisions about being able to say, here's what we know. Let's do this instead of that. Let's not take the system down. Let's monitor it. The idea with this is that you're in a place where you need to have discipline. If you're going to do watch and learn, you need to have really good discipline. You need to have procedures that you can execute flawlessly, as well as have the ability to improvise in a way that causes minimal damage. It's discipline. So my idea of what threat hunting looks like is for every staff member, they do two hours per week of threat hunting. This is structured in the sense that we have allocated time, we have specific artifacts that we want as output, but we do not necessarily have a specific process of what they do in terms of follow these steps. It's more a general concept of here's how you approach the problem. And here's what I want out of you. I want detections. Part of your hunting is I want you to detect problems that are in my environment. That's an artifact, right? We found something bad. Additionally, I want you to describe your method for hunting. Because if you happen to detect something and you can go back and express your methodology of how you accomplish that, that means that everybody else can now employ that same methodology. I want scripts. I want a script out of you. For two hours of time in any given week, I want you to either build a new script or enhance a script that exists. Or I want you to be developing your capabilities. I want you to be developing your capabilities. I want you to be developing your capability to do scripting. Two hours a week goes a long way. I want rules for detection systems. I want as an output a specific rule. And you know what? The first time most of your team members do this, it's going to be a terrible rule. And it's going to have loads of false positives. But who cares? Because if this is a known artifact from a hunt action, from a hunt process, I can take that and apply it. And finally, I want use cases. And use cases are scenarios
--- Page 7 ---
that are involved in the terrain of our environment and how an adversary will actually attack it. And use cases can be folded into any of our analytical platforms in order to be able to operationalize, if you'll forgive the non-word, operationalize the hunt. And this is what we really want to get to. Scripts are great for this, initially. But use cases are really what make it good. And so as an example, in a description of a section where I put out the seeds of a tree, I the idea of hunting, right, I have, you know, a picture of some sort of central analytical platform. And I'm calling it a sim, that's a good way. This might be a log correlation engine, it might be any technology that you employ in order to do this, but I have lots of data fed into this. And if you notice in the upper right-hand corner of this slide, I have this historical assessment with new IOCs. And the idea is, as I'm going and doing my aggregation and ongoing assessment, every once in a while, I take the opportunity to go back with the new things that I've learned, and reassess the information that I have available to me in order to determine if something that we found out is a problem, either internally or from the open-source collection or from the threat fields we're buying right or from some pew pew map of here are some bad ip addresses i go back and look for that stuff i go back and look for um techniques that are released on uh you know some dump site where someone says hey this is a nation state actor we broke into that nation state actor and discovered their techniques and now we're putting that stuff out there you know and this is apt-1 and this is shadow brokers and this is all the reports that we take and digest we go back historically and do an assessment this also is hunting this also is a technique of developing an awareness of our environment looking at the looking at the components of data that we have so how do we do this well there are a couple of things first of all we pick some ioc or some ttp and express the notion of what it is that we're actually doing and then we go back to our data and look for that and we have to build the capability in and again we might be buying this from a from a vendor in order to do it how frequently do we run this task my assertion is that the half-life of the data that you have stored so as an example if you have 30 days of full pcap i want you running this every two weeks and this isn't just to full pcap but this is a great place to apply it if you actually have that you could do this
--- Page 8 ---
in DNS logs you could do this in host based logs but anytime you come up with a new indicator you run it against the stored data at the half-life of the data's persistence so if you can only keep logs for three days because of some management restriction or because of some technical restriction every day you should be running on the last three days of data that you have a couple of you know other examples of this another historical assessment that I quite like is the idea of looking at all of the hosts that have been requested by DNS in your environment so all of your users every day are requesting hosts you however adversary technique is typically to at least on an initial entry to end up using new domain names you can actually track this over time of all the hosts that everybody has ever gone to and then every day on a daily basis look at your logs see anything that was new in the previous day what did you just do you just took unstructured data and found a bunch of leads that you're you staff can go and start to investigate what does this look at it looks at a specific adversary technique the adversary technique of generating new domains and so people will come up with all sorts of fancy domain generation algorithm decoding but at the same time at the same time you can just say well what is the characteristic of what the adversary is doing they're coming up with new stuff and if I can just look for new things then I can go and investigate that likewise all of your malware detonation devices right lots of different capability technical capability out there that pulls executables off of the network or off of emails you should be storing that executable for a long time doesn't take up a ton of space and every interval right however long you can store it whatever the half-life is for that every interval go back to that and apply your updated antivirus your updated tools against the executable and see what's there as an example there was a new tool that was announced last year there abouts called floss anyone hear about floss right floss is kind of like strings plus plus what floss does is it looks at an executable for loops which are doing decoding and then floss takes the executable itself and feeds it back into a recreation of any iterative loop inside of the executable in order to determine if that executable is decoding itself because an adversary technique is to apply encoding in order to hide from us new tool comes out later and now we're able to take our samples from the last couple of weeks years however long you've been collecting decades in some people's cases and go back and apply this new analytical technique to old samples don't throw this stuff away know that you can store important artifacts and
--- Page 9 ---
assess them historically ok so this is what I think about when I think about hunting example of a hunt is historical analysis. So, I think that hunting is not new. Rob mentioned this. We've been doing this for a massive amount of time, not just in information security, but for the existence of people. We hunt. This is what we do. This is how we cull resources from the environment that we're attacking. I'm sorry, that we're defending, right, that we're defending. We know that people are attacking it and we're looking for them, right. Our security operations requires incredibly complex interchange of information. We must establish a clearly articulated view of how we are doing this. If we cannot articulate how we're working, we can't articulate how we're working. We can't articulate how we're working. We can't articulate how we're working. We can't articulate how we're working. We have to do that first because the opportunity for us to assist our organization relies on our ability to actually say what we can and cannot do. And then we are working for improvement in the long term. And then I want you to think about carefully mixing hunting into your operations. Select specific things that are going to change the culture of your environment so that this is just an additional task of what everybody does. And not everybody is going to have a great idea every single time they set out to do hunting. But what's going to happen is over time with the practice of hunting, somebody one day is going to come up with something that's really quite valuable. And that valuable thing will allow for the application across a lot of other people to perform that hunting technique as well as for you to go back historically and look at your environment in order to understand what exactly has happened in the past. Because if you detect it, even if it's a year or two later, at least you eventually detected it. And as you change your behavior over time, you will eventually get faster at it.
Related Q&A
- Q: OverviewA: Presentation details for Threat Hunting