Threat Hunting Part 1 - The Basics
This will be the first of many posts I will be making with a focus on Threat Hunting and Detection Engineering for SOC Analysts and any other Blue Team or Blue Team-adjacent security professionals. My goal is to assist analysts and their own efforts within their organization to engage in proactive security measures via any and all avenues of Threat Hunting.
So...What is Threat Hunting?
For everyone reading this it is likely that you already have a general idea of what Threat Hunting is, but I think that it is always important for any analyst or security professional to thoroughly understand what we're trying to accomplish when Threat Hunting is discussed and performed.
There are a few different definitions but the core of Threat Hunting is that it is a form of proactive security, meaning that instead of what we typically imagine the average security analyst's job to look like (I.E. surviving as semi-alive barely human alert jockey), Threat Hunting allows us to act off of our own ambitions and imaginations and take a deep-dive into our organization's network with the ultimate goal of ensuring that despite all of our existing security solutions and practices, nothing has slipped by us.
This of course means that in most instances, we are taking on an "assumed breach" mindset, wherein you, the analyst, has decided that your organization is already compromised in some way, but your organization and the SOC has not yet confirmed this. Therefore it is your duty as the Threat Hunter to confirm this for them by taking it upon yourself to proactively explore your organization far and wide looking for the most common, or the most relevant forms of threat actor activity.
This means that you will be taking full advantage of not only your organization's security stack and SIEM, but also all of the widely available resources online and your own knowledge of security to conduct the most precise and the most efficient hunts possible. Unfortunately, or rather fortunately, hunts will almost always result in little to no true positive findings on your organization's network. This isn't a bad thing (although a true positive finding is exhilarating) as a true positive would essentially mean your organization was compromised in some manner, but the lack of any findings whatsoever can be somewhat discouraging to the aspiring hunter.
Do not be pessimistic however, as although true positives are few and far between (if your organization is in any way competent) that does not mean your efforts are in vain. Not only does Threat Hunting teach you an immeasurable amount about how protocols, computers, networks, OSes, etc. work and interact with one another on a deep level, but they also allow you to understand your organization's environment on an even deeper level. You may not find Fancy Bear/APT 28 skulking around your organization's network, but maybe you'll find a misconfiguration that was missed by the IT and Workspace team that could lead to potential privilege escalation by an attacker. Maybe you'll discover a server with a broken EDR install that was never fixed and that is essentially without any protection.
Although there will rarely be opportunities to catch an actual attacker in real-time, there will ALWAYS be opportunities to discover new things about your organization's network and ensure that any future attacker will be turned away.
But, Where Do We Start?
As someone who has been an analyst for 5+ years now, this is probably the most common question I'm asked by those new to Threat Hunting or security in general. It was a question I myself struggled with for a time whenever I first became an analyst just due to the fact that Threat Hunting by itself can be genuinely intimidating. With an infinitely vast array of wildly different avenues and approaches, it takes time and experience to fully understand the ways in which the proverbial playing field can be shrunk down and narrowed so that only the most relevant and the most critically important (often times specific to YOUR organization) approaches are taken, saving time, effort, and possibly even your organization from a potential breach. Therefore, it is crucial that you understand the reasoning and motivation behind selecting a specific Threat Hunting approach, and the most efficient ways to carry-out the hunt once you've chosen it.
There are a variety of different starting points to choose from and some may be more beneficial to you than others depending on what your end goal is and what you are trying to accomplish. For example, if you are attempting to perform a specialized threat hunt that emulates a specific threat actor's TTPs, it will obviously be better to perform in-depth research on that threat actor and determine which TTPs you intend to look for. If your goal is to adapt as many different generic TTPs into queries that can then be displayed on a custom monitoring dashboard or emailed out in weekly reports for analysis, utilizing rule databases like the Sigma project to modify and convert the chosen TTPs into your SIEM's specific query language will of course be better.
#1: Trending Threat Actor TTPs
Examining the most frequently observed and the most relevant trending threat actor TTPs (Tactics, Techniques, and Procedures) within the past 6 months to a year would be where many if not most analysts and aspiring threat hunters would start looking for potential hunting approaches to choose from. This is simply because these TTPs are most likely going to be those that, if you organization is breached, the attackers will be more likely employ at some point during the cyber kill chain.
TTPs are always changing in the world of security, as patches are applied, signatures are updated, heuristics are enhanced, EDRs are improved, etc. attackers have to constantly modify (with varying degrees) their TTPs to evade detection by defenders. That being said, certain TTPs will never disappear simply due to the fact that they take advantage of the built-in features of specific Operating Systems, like Windows. For example, Pass-the-Hash is a technique that has been around for decades and it will likely never die because it takes advantage of the way that Windows handles credentials. Windows can't patch a feature in their Operating System that they intended to exist in the first place. This is also LOLBIN (Living Off the Land Binaries) abuse has become so prevalent within the past 5 or so years. Attackers have started to give up on building their own custom malware toolkits due to the improvements of AV & EDR technologies and instead have started to rely more on abusing the legitimately signed Microsoft utilities (I.E. wmic.exe, schtasks.exe, mshta.exe, etc.) installed by default on most Windows OS versions because of the fact that they are less likely to be flagged by security tools.
What this means is that there are two ways of going about this. You could choose to examine all of the new and exciting TTPs that the most sophisticated APT groups and Cybercrime outfits are adopting, and narrow down which of those threat actors are most relevant to your organization and go from there. Or you could pick out which TTPs over a specific time frame seem to be the most consistently employed by threat actors, regardless of the threat actor themselves or their relevance to your organization.
From there, you can make a decision as to what phase of the cyber kill chain you want to focus your hunting efforts on. For most if not all threat actors, their TTPs are observed at every step of the cyber kill chain, therefore depending on the amount of data that exists on the selected threat actor, it may be more efficient and a better use of your time and focus to chose narrow down the hunt even further by choosing one phase of the cyber kill chain (Ex. Installation or Initial Access) and hunting for those related TTPs specifically.
Keep in mind that the Lockheed Martin cyber kill chain is just one framework that assists security professionals with understanding and categorizing the steps that attackers take to compromise their victims. The MITRE ATT&CK Framework Enterprise Tactics and Techniques also provides a similar list of steps that correlate to the cyber kill chain and other existing frameworks.
#2: Relevant Threat Actors
Comments
Post a Comment