Threat Hunting 101
Threat Hunting 101
Threat Hunting
101
Introduction Where We’re Headed:
In a threat landscape overrun with increasingly sophisticated
1 Threat Hunting: Art, Science, and Mindset
and successful threat actors, the need for proactive
cybersecurity has never been more imperative. 2 Threat Hunting Is Critical to Modern
Cybersecurity
Welcome to Threat Hunting 101: Your Guide to Outsmarting
Adversaries. This ebook serves as your roadmap to the dynamic 3 Your 7-Step Threat Hunting Process
world of threat hunting, a practice that empowers organizations
to anticipate and thwart security threats before they escalate 4 Threat Hunting in the Wild: A Citizen Lab
into potentially catastrophic incidents.
Case Study
2
Yet, unlike detectives, who are hot on the trails of criminals in
Threat Hunting: An Art, a flight, threat hunters hope to track down bad actors before they
Science, and a Mindset get away with the crime. Which brings us to why threat hunters
leveraging the right resources. For even with all of the necessary
tools and data sources in hand, doing the job well still requires
3
TH E N EED FO R A PROACTIVE S ECU RIT Y P OSTU RE
Threat Hunting Is Critical to
Organizations can no longer rely on traditional threat detection
Modern Cybersecurity methods alone to prevent cyber attacks. That’s because
Ask any CISO about what would happen if their organization adversaries are constantly thinking of new ways to launch attacks,
fell victim to a successful cyber attack, and you’ll get a list and are increasingly sophisticated in their approaches.
These are the makings of CISO nightmares – and unfortunately, tools, which the Censys Research Team investigated, are further
most security leaders can probably speak to these nightmares examples of this new focus on supply chain targets.
4
Organizations’ rapidly-expanding digital footprints also opportunity to sharpen their skills. And as a largely self-taught
warrant the kind of proactive security posture that threat endeavor, many practitioners are left to cobble together tips
hunting can provide. A study from JupiterOne finds that and tricks as they go along. This can make it challenging for
organizations’ external attack surfaces are growing at a rate threat hunters to feel confident that the threats they uncover
of approximately 133% per year. More assets can mean more are truly credible and worth taking action against.
Censys research finds that 50% of surveyed companies say shared below, but the art and mindset guide the details – and
that the ability to proactively hunt for threats is one of their those are up to you!
5
STEP 1:
How to Prepare
for a Hunt
Any good investigative work requires proper preparation, Techniques
so before you start your sleuthing, consider the following
Techniques are the specific methods and approaches that
groundwork.
adversaries employ to accomplish their tactical objectives. If
or system.
7
Indicators of Compromise:
IOCs are critical pieces of information or characteristics that
8
Four Ways to Prepare 2 Establish Baseline Activity
for a Threat Hunt After you’ve achieved an understanding of your attack surface,
1 Understand Your Attack Surface your organization. Doing so will make it easier to spot those
Threat hunting to defend an organization’s security perimeter IOCs. To understand baseline activity, you might:
requires that hunters first understand what the organization • Determine which activity is most relevant to understand.
owns. What might adversaries look to compromise? This means This could include network traffic, user behavior, system
threat hunters need full visibility into their attack surface. Attack activity, or any other relevant aspect of your environment.
surfaces are made up of all external-facing, internet-connected
• Identify the data sources you need to collect and analyze
assets that could be subject to an attack.
for baselining. Common sources include logs from network
a fair amount of manual effort. Organizations with External • Gather historical data for a sufficient period, typically at
Attack Surface Management (EASM) solutions, like Censys, least several weeks. The longer the historical data, the more
however, can gain visibility into their attack surface while accurate your baseline will be.
organization.
9
3 Become Familiar with Adversary Tactics 4 Know Thy Enemy
Though adversaries are continuously evolving their approaches, Are there cyber attack techniques that have been frequently
threat hunters can use what they know about current tactics to used on other companies in your industry, or against other
anticipate how attackers might adapt and evolve them going companies who use similar technologies? As you conduct your
forward. You can dive deeper into the techniques hackers are research, think about how an adversary is most likely to take
using to deploy common attacks, including malware, phishing, action against your specific organization.
and ransomware attacks, by referencing the MITRE ATT&CK
10
STEP 2:
your hunt.
12
Consider the following questions, inspired by a threat As ideas for your threat hypothesis percolate, keep in mind that
• Past Action: How have attackers successfully breached direction, but not too specific so as to lead you down a
your organization in the past? Is there a chance you’re still rabbit hole.
• Known Weak Spots: Does your attack surface have A Hypothesis That's Just Right
any vulnerabilities or exposures we know we haven’t
We think we could be subject to a targeted phishing
remediated? Are there risky user behaviors across our
campaign that’s attempting to exploit a recently
workforce that an attacker could exploit?
disclosed vulnerability in our email system. We’ll begin
• Industry Trends: As mentioned above, give thought to by evaluating emails with suspicious attachments
what’s happening to other organizations in your space. How and hyperlinks.
are attackers targeting other companies in our industry?
factors.
13
STEP 3:
15
W H E R E C A N T H R E AT H U N T E R S F I N D S U P E R I O R Threat hunters can access Censys Internet Map data using
I NTEL? Censys Search, which is available for use as a free community
There are many different internet intelligence sources available tool. Advanced Search capabilities (like access to more
to threat hunters, but not all offer the same quality of data. Only historical data, regular expression queries, and matched
the Censys Internet Map, which powers the Censys Internet services) are available to threat hunters with an upgraded
65,000 ports
host intent
16
RO U N D I N G O UT YO U R TO O L B OX
External Attack Surface Management
In addition to a leading internet intelligence source, threat
EASM solutions provide a comprehensive view of an
hunters will likely rely on a number of other tools to carry out
organization’s internet-facing assets and vulnerabilities.
their hunt. You can find examples of a few below.
Threat hunters can leverage this solution to proactively identify
Security Information and Event Management (SIEM) potential weak points and misconfigurations, helping them stay
of compromise. Internet intelligence vendors, like Censys, can Network Traffic Analysis
integrate with SIEM solutions to enrich SIEM data logs. These tools capture and analyze network traffic to identify
17
Open-Source Intelligence (OSINT) Tools
procedures (TTPs).
organization’s environment.
18
STEP 4:
20
Discover Rogue Assets O T H E R F I R S T S T E P S T O I N V E S T I G AT E T H R E AT S
Identify Malicious Infrastructure groups. To start a search for indicators of APT activity, you
CN=P18055077”
21
Zero-Day Exploits Phishing & Social Engineering
Zero-day exploits are vulnerabilities in software or hardware You might start by reviewing email traffic for suspicious
that are unknown to the vendor. These threats can be attachments or links, monitoring user behavior for signs of
challenging to detect using traditional security tools, which compromised credentials, and identifying phishing domains or
makes threat hunting efforts crucial for early detection. You fake login pages.
articles.
Ransomware
When looking for signs of ransomware activity, you might
22
STEP 5:
It’s Time to
P - I- V - O - T!!
Unless luck is on your side, you’re unlikely to find a proverbial Examples of ways you can pivot your threat hunting
iterative process, requiring a healthy dose of patience, curiosity, Uncovering Historical Data
and a willingness to go where the evidence leads you. If you come across a suspicious domain or IP address, you
hunting. Pivoting is important because threats are rarely Tracking Certificate Information
isolated; they often have multiple points of entry, lateral
If you come across a malicious SSL certificate during your
movement paths, or associated indicators. By pivoting
investigation, you can pivot to explore all certificates issued by
effectively, threat hunters can uncover hidden relationships,
the same entity or used across multiple domains, potentially
patterns, and attack paths, allowing them to trace the entire
identifying a larger attack infrastructure. Censys has the world’s
attack chain and gain a holistic view of the threat landscape.
largest repository of x.509 certificates.
This approach not only helps in identifying the root cause and
24
Exploring Autonomous Systems
threats.
Pro Tip:
Use the “Explore” feature in Censys Search to quickly pivot
25
Threat Hunting in the Wild: Attacker Profile
A Case Study Citizen Lab set its sights on Candiru, a private sector offensive
How Citizen Lab Exposed Mercenary Spyware actor already known for selling malware to governments.
using Censys Candiru’s core product offering is spyware that can be installed
Before we continue on with our Threat Hunting 101 framework, let's through a number of infection vectors on a target’s Apple,
take a detour to see how threat hunting principles were applied to an Windows, or Android device. Candiru claims their products are
actual threat hunting investigation conducted by Citizen Lab. “untraceable,” which makes finding domains, certificates,
Citizen Lab is a research institute at the intersection of human Understand Candiru’s global footprint by mapping out
rights and information technology that focuses on research, command and control infrastructure, including IPs,
policy, and advocacy. One unique aspect of Citizen Lab’s domains, certificates.
26
The Investigation Self-signed TLS Certificate
amitn@candirusecurity[.]com
Citizen Lab used Censys Internet Map data, which details IPv4
and IPv6 hosts and services and provides the world’s largest
Citizen Lab then queried the Censys IPv4 dataset to locate the
IP addresses that were serving the certificate and potentially 6 IP Addresses 42 Certificates
Matched Fingerprint CF1 Matched Fingerprint CF1
affiliated with Candiru. The team iterated between IPv4 hosts
27
The Outcome
28
STEP 6:
Identifying Threats
That Are Critically
Understood
You’ve been deep in the weeds of your threat hunting Critically understanding threats is crucial for informed decision-
investigation, sussed out IOCs, pivoted where the data has making. It allows organizations to accurately assess the level
taken you, and accumulated a trail of evidence that seems to of risk and prioritize the response, and helps teams craft an
point to a threat. Is it time to alert the team? effective and tailored mitigation strategy, whether it involves
that activity poses a credible threat to the organization. about earlier? If a threat is critically understood, a threat
30
STEP 7:
Taking Action:
Escalation, Remediation,
and Analysis
Once your threat is critically understood, prompt escalation and
2 Remediation
remediation should occur, followed by analysis that should be
Once a threat has been escalated to the right parties, it’s
used to operationalize your findings.
time to collaborate closely with incident responders in the
communicating the technical and business implications of the After conducting remediation activities, verify that the threat
threat to ensure that decision-makers understand the urgency is no longer present. You could do this by running queries
and severity of the situation. again, re-checking logs, or using your External Attack Surface
32
3 Analysis
Conduct a thorough post-incident analysis to assess the root
Documentation:
Good post-incident analysis and operationalization will involve
location serviced by the asset. Tags also let you quickly return
to hosts and track your progress. Additionally, you can use the
33
Threat Hunters Are
Needed. Fight the
Good Fight!
And there you have it – we’ve come to the conclusion of our
3 Build Your Toolbox
Threat Hunting 101 framework. Though there is no exact “threat
Build out your threat hunting toolbox with a wide variety of
hunting formula,” for threat hunters to follow, we hope that with
resources, including access to superior internet intelligence.
insights from our 101 framework, you’ll be able to approach your
next investigation with the clarity and confidence you need to 4 Test Your Hypothesis
go toe-to-toe with adversaries.
Set out to prove or disprove your hypothesis by looking for
Threat Hunting 101 IOCs. Review data sources and other tools to identify suspicious
2 Establish a Hypothesis
Use what you know about your attack surface, TTPs, and
35
6 Ensure Critical Understanding
Once you’ve built a trail of evidence, check to ensure that your
know that your work matters. It may be the only thing standing
Happy hunting!
36
G E T T I N G S TA R T E D W I T H C E N S Y S S E A R C H
Threat Hunting with Censys
Censys Internet Map data is available to threat hunters through
Threat hunters can accelerate their investigations into
our query-based Censys Search tool. Censys Search allows
advanced threats with leading internet intelligence from
threat hunters to run search queries against our database of
Censys. Censys provides the most comprehensive, accurate,
leading internet intelligence, so that they can more successfully
and up-to-date view of global internet infrastructure available.
pursue tasks like identifying malicious command and
supports multiple use cases. We don’t just collect banners or You can see Censys Internet Map data in action by visiting our
detect service presence, we create a structured snapshot of Censys Search tool at http://search.censys.io! For access to
every host and running service down to the protocol level. We enhanced Censys Search features, check out our self-service
enrich the dataset with running software, TLS configurations, packages for individuals and small teams.
and so much more. Threat hunters can easily make sense of
their findings and pivot as needed thanks to the robust context Interested in learning more about how Censys can support your
the Censys provides. threat hunting efforts? We’d love to talk. Reach out to us today
37
Censys is the leading Internet Intelligence Platform for Threat Hunting
map of the internet to defend attack surfaces and hunt for threats.
Censys scans 63% more services than the nearest competitor across
a breach by 50%.
over 50% of the Fortune 500, Censys’ mission is to be the one place to
www.censys.com