CTI Indicator Hunting Framework
CTI Indicator Hunting Framework
Accepted: 11/1/2023
Abstract
Cyber threat intelligence (CTI) has many standards and models to define it. However,
very few of these standards reach a technical level of implementation and instead leave it
to the interpretation of organizations. Hunting for CTI indicators itself needs to be a well-
defined process. Most organizations receive a list of indicators of compromise (IOCs)
and conduct ad-hoc retroactive hunts for them within their environment for any historical
hits. IOC hits are then proactively searched for in newly ingested data. The results should
be saved to a dataset separate from the original data to avoid rerunning these hunts,
allowing for a quicker review and longer retention, whereas the original data could age
out. A standard hunt framework that accounts for retroactive and proactive hunts while
integrating a separate dataset for IOC hits addresses the ad-hoc nature of these hunts.
On The Hunt: The Retroactive and Proactive Hunt for CTI Indicators 2
1. Introduction
With the rise of cybercrime services becoming more easily accessible, cyber-attacks
ranging from phishing campaigns to ransomware attacks have become more prevalent
impacting nearly one-third of companies (Huang, 2018). To combat these cyber-attacks,
cyber threat intelligence (CTI) enables security teams and practitioners to identify
indicators of potentially malicious activity occurring on their systems and networks.
Some organizations may have a dedicated threat intelligence team. In contrast, others
may rely on open or closed-source CTI feeds to obtain these indicators of compromise
(IOCs), but what do security teams do when they receive a list of new IOCs?
Conducting a retroactive hunt for these IOCs can be tedious and time-consuming,
especially when searching large sets of heterogeneous data. Upon completion, the results
of any IOC hits may be exported (such as to a CSV) and shared with stakeholders. In
addition, going forward, newly ingested data must be proactively searched for IOC hits to
respond quickly to potential threat actor activity. If the IOC hits need to be revisited or
searched for again, the original data may have aged out, depending on the retention
policy. The lack of a standard for conducting retroactive and proactive hunts, in
conjunction with different operational environments and logging capabilities, results in
various implementations and methodologies to address this hunting problem.
The requirements dictate the goal of integrating CTI into current processes and
influence subsequent steps in achieving it. The collection step varies for organizations
depending on their resources, such as open or closed-source CTI feeds or a dedicated
threat intelligence team to collect intelligence. This intelligence then needs to be
processed so that it is in a more readily consumable format either by another human or a
tool such as a Security Information and Event Management (SIEM) system. The analysis
step takes the processed data and produces a product that meets the requirements from the
initial step. The product is then disseminated to the relevant stakeholders, such as the
system owners or business leadership, where feedback is gathered and fed back into the
CTI lifecycle. The hunt framework described in this research sits between the processing
and analysis steps, taking in a collection of IOCs as an input and producing a product as
an output that can then be disseminated.
This feedback cycle enables organizations to follow a process to start integrating CTI
into their workflows. The vagueness of this loopback cycle results in various
interpretations and implementations, which is part of a more significant problem with
CTI, as identified in the following research.
but focused on lower-level IOCs. Mapping to one of these standards can make the hunt
framework more robust and capable of sharing any IOC hits. The following research
presents an entirely new model to address their identified shortcomings.
2. Research Method
The hunt framework was developed with retroactive and proactive hunt capabilities
and an IOC hit dataset that is quickly reviewable, updateable with new indicator hits, and
maintained beyond the retention of the original data. This hunt framework lives in the
processing and analysis steps of the CTI lifecycle and builds upon the search step from
Amaro’s CTI model. It assumes that an organization already has a list of IOCs that acts
as an input for the hunt framework, which can then be used in a query to build an IOC hit
dataset. This dataset is the framework’s output, which can then be used for any further
analysis or investigation and shared with organizations. The following is a breakdown of
the hunt framework methodology:
1. A new IOC is added to the list of IOCs to be searched and marked as new.
2. A search is run conducting a lookback search for the indicator over a
specified timeframe (i.e., last 30 days).
3. Any IOC hits are saved to an IOC hit dataset, and the IOC is no longer
marked as new.
4. Another search is then run hourly to search for any IOC hits in the last hour.
5. Any new IOC hits are then saved to the IOC hit dataset until they are
removed from the IOC list.
Step two addresses the retroactive hunt for an indicator, whereas step four addresses
the proactive hunt for an indicator. The timeframes and frequency of these searches
should be adjusted to enable a quicker response to any hits but are dependent on the
organization’s preferences and capabilities (Oasis, 2022). Steps three and five address the
generation of a smaller dataset that can be used to track IOC hits and retained longer than
the original data. The dataset can then be used to validate and tune the IOCs that are
being hunted. To test this framework, Splunk was used as the platform to conduct both
the retroactive and proactive hunts while also providing a place to log any IOC hits. To
simplify this research, the types of IOCs were limited to IPv4 addresses.
The Docker container acted as both the search head and indexer, as well as other
tertiary roles that are usually hosted in separate Splunk instances. A search head is where
a user interacts with the data via search queries, reports, or dashboards. An indexer is
where data is indexed and logs are forwarded. Three critical features of Splunk that will
be heavily utilized are the summary index, key-value (KV) store, and automatic lookups.
index is built via a scheduled search, and it contains the statistical results rather than the
raw event where the indicator hit was observed. This makes it an ideal place to log any
IOC hits seen across the larger dataset and will be used for steps three and five of the
hunt framework.
2.1.2. KV Store
A KV store is a collection of key-value pairs where individual records can have
Create-Read-Update-Delete (CRUD) operations performed against them. These actions
can be accomplished via the Splunk REST API or lookups within the Splunk search
language. The flexibility to interact with and manipulate a KV store makes it ideal for
maintaining a list of IOCs addressing step one of the hunt framework.
protocol, action, and bytes. None of the logs represented actual traffic, as all the fields
were randomly generated. Any event with an IOC would have an IPv4 IOC within the
destination IP address field. These logs were stored in the firewall index.
2.3. Variables
The creation of a new dataset warrants a comparison with the original data to
evaluate the efficacy of this new framework. The search query used, and the time range
set were independent variables, whereas the search completion time and event volume
were dependent variables. The dependent variables acted as metrics that would be used
for the comparison.
more straightforward as the data in the summary index comprises the statistical results
from the original search query.
Implementing the hunt framework within Splunk takes advantage of Splunk features
such as the summary index, KV store, and automatic lookups to implement the various
steps. The metrics used to compare raw data and IOC hit dataset searches not only
revealed some of the benefits of the framework but also highlighted some of the
shortcomings of the test environment.
Figure 6. Query used to view IOC hits within the intel index
Over a seven-day timeframe, the retroactive hunt query took slightly longer than the
baseline query, but the intel query saw a significant improvement in search time. While
the retroactive hunt query was like the baseline search, the added actions of writing to the
intel summary index and updating the IOC KV store may lend to the additional search
time.
7 Day Runtimes
0.6
0.5
Time (seconds)
0.4
0.3
0.2
0.1
0
Normal Retroactive Intel
Run 1 0.49 0.55 0.124
Run 2 0.504 0.551 0.093
Run 3 0.484 0.548 0.091
Average 0.49 0.55 0.1
60 Minute Runtimes
0.14
0.12
Time (seconds)
0.1
0.08
0.06
0.04
0.02
0
Normal Proactive Intel
Run 1 0.115 0.115 0.097
Run 2 0.115 0.111 0.085
Run 3 0.112 0.115 0.088
Average 0.11 0.11 0.09
Figure 9. Number of events scanned for each search over seven days
The 60-minute timeframe saw more variety due to the randomness of the generated
data, but whenever there were hits, the intel query was more performant.
200
150
100
50
0
Normal Proactive Intel
Run 1 0 0 0
Run 2 206 0 16
Run 3 0 189 16
Average 69 63 11
Figure 10. Number of events scanned for each search over 60 minutes
3.5. Shortcomings
Testing the hunt framework within a Splunk environment relied on taking advantage
of the native features of the platform. Implementation of the framework could vary wildly
depending on the organization and the capabilities of the selected platform. Due to the
constraints of the test environment, a more extensive test dataset could not be generated.
The smaller dataset had more to do with the limitation of the Eventgen app used to
generate the random data, as it would not generate the expected amount of data or would
occasionally need to be restarted to start generating more events. Enterprise environments
usually have a more robust platform for ingesting data.
The retroactive and proactive hunt queries are automated for this framework to work,
so an analyst doesn’t have to run them. They would run a search against the intel index
when analyzing IOC hits. This means analysts no longer have to run these longer
lookbacks manually. The impact of these searches is acceptable if the Splunk license that
was used was based on data ingest. However, for organizations that rely on Splunk’s
infrastructure licensing, which is based on vCPU utilization, the performance of the
searches will have a more significant impact. This may impact both the frequency and
timeframe in which the searches are run. This is more of a shortcoming to Splunk rather
than the hunt framework itself.
Another potential shortcoming with the automated hunt queries is that because these
queries run hourly, there can be up to an hour delay before an IOC hit is written to the
intel summary index. This could be remediated by increasing the frequency of the queries
to every 15 or 30 minutes to reduce the delay, but this could add more strain to the
environment with the increased number of queries being run. For time-sensitive IOCs,
ad-hoc searches can still be run.
The IOC type was limited to IPv4 addresses. Searching for different types of IOCs,
such as IPv6 addresses, hashes, and domains, could result in less performant searches.
The search would have to account for the various IOC types, or separate searches would
have to be run for each type. The hunt framework calls for a method to search IOCs, so
the capability would be dependent upon the platform on which it was implemented.
addressing a small portion of the CTI lifecycle. The input to the framework is a database
containing any IOCs that an organization would want to hunt for, which assumes that the
data is already centralized and unified. The framework’s output is any hits identified
during the hunt, which can be used for further analysis or dissemination to any relevant
stakeholders. The automated nature of the framework provides timely and targeted data,
as each hit also shows a risk item that was seen communicating with an IOC. To
implement this framework, there are other considerations, especially regarding a larger,
more varied dataset, to ensure that these design principles are met. Additional research
needs to be done to expand and define this hunt framework further to make it more easily
accessible to different organizations.
The IOC hit dataset likely contains a much smaller dataset than any other data source
an organization may collect. This means that the retention period for this data can be set
where it would outlive the original data where it was found. In this research, the intel
summary index would have a more extended retention period than the firewall and DNS
indexes. This allows an organization to identify any CTI trends without having to
maintain multiple years of all the original data. It would also be inefficient to run a query
going back over a year.
While Splunk was used as the SIEM of choice for this experiment, any solution
could have been used if it met the criteria for the framework. The criteria include the
capability to read an IOC list, search across a large dataset, and write the results back to
separate storage. The intent of using Splunk was to have a simpler technology stack that
relied on a single tool rather than using multiple to address the different criteria.
Organizations already using Splunk would not have to procure a separate tool to meet
their CTI needs.
The hunt framework needs to be flexible to take in IOCs of various formats and
produce a product that can be easily shared. STIX was identified as a format that allows
organizations to exchange CTI easily. STIX has the concept of STIX domain objects
(SDOs) and STIX cyber-observable objects (SCOs) that are used to describe concepts
within CTI. SDOs represent behaviors and constructs such as indicators or attack
patterns, whereas SCOs represent observed facts that provide more context around an
SDO (Oasis, 2021). SDOs are the IOCs fed into the hunt framework and encompass the
various IOC types.
SDOs also contain various properties that can be implemented into the hunt
framework. The retroactive hunt would look back at an arbitrary timeframe, seven days
in this experiment, and the proactive hunt would continue to search for IOC hits until the
indicator was removed. Two properties of an SDO are the “valid from” and “valid until”
properties, which indicate when an SDO is considered valid. This can limit the timeframe
for which an indicator is searched, and the IOC no longer needs to be deleted to prevent it
from being searched for. Each of the IOC types can also be represented by the “pattern”
and “pattern type” properties, including a regular expression (PCRE), SIGMA, Snort,
Suricata, or YARA (Oasis, 2021). This versatility allows IOCs to be represented in
various ways as SDOs.
STIX also has the concept of a sighting STIX relationship object (SRO), which
indicates that something in CTI was observed (Oasis, 2021). This aligns with the output
of the hunt framework, which produces any IOC hits that were sighted within the
environment. The SRO only requires what was sighted to be specified, but it does not
require who sighted it or where. The hunt framework not only answers what was sighted
but also identifies who sighted it (the organization itself) and where (the original data
source and the risk item that interacted with the IOC).
Another benefit of using STIX over other standards is the accompanying protocol for
sharing STIX data. While STIX is used for representational use, the trusted automated
exchange of indicator information (TAXII) format is for operational use and supports
CTI sharing using a client-server model (Schlette, 2021). Utilizing both STIX and
TAXII, the hunt framework can be further improved to use a common standard and allow
for easier dissemination via TAXII.
5. Conclusion
Hunting for IOC hits needs to be better documented in CTI literature. High-level
processes and lifecycles do not get into the technical details that organizations need to
implement them. The proposed hunt framework aims to aid organizations by providing a
standard process to identify any IOC hits within their environment. When an organization
receives a new IOC, it is added to the database of IOCs. Every hour, any new IOC is
searched for in historical data, and subsequently, any identified hits are written to the IOC
hit dataset. Any existing IOC is also searched hourly so that IOC hits are identified in
recently ingested data, ensuring complete coverage of their data. An analyst can then
review the IOC hit dataset for anything notable without running any ad-hoc queries
against the original data, thus reducing the time the analyst spends gathering any of the
IOC hits.
References
Amaro, L. C., Azevedo, B. W. P., De Mendonça, F. L. L., Giozza, W. F., De Oliveira
Albuquerque, R., & Villalba, L. J. G. (2022). Methodological Framework to
Collect, Process, Analyze and Visualize Cyber Threat Intelligence Data. Applied
Sciences, 12(3), 1205. [Link]
Baker, K. (2023). What is Cyber Threat Intelligence? Crowdstrike.
[Link]
Bianco, D. J. (2014). The Pyramid of Pain. Enterprise Detection & Response.
[Link]
Huang, K., Siegel, M., Madnick, S.(2018). Systematically Understanding the Cyber
Attack Business: A Survey. ACM Computing Surveys.
[Link]
Kotsias, J., Ahmad, A., & Scheepers, R. (2022). Adopting and integrating cyber-threat
intelligence in a commercial organisation. European Journal of Information
Systems, 32(1), 35–51. [Link]
Oasis Open. (2021, June 10). STIX Version 2.1. [Link]
[Link]/cti/stix/v2.1/[Link]
Oasis Open. (2022, September 15). STIX Best Practices Guide Version 1.0.0.
[Link]
Schlette, D., Caselli, M., & Pernul, G. (2021). A Comparative Study on Cyber Threat
Intelligence: The Security Incident Response Perspective. IEEE Communications
Surveys and Tutorials, 23(4), 2525–2556.
[Link]
Splunk (n.d.). Use CASE() and TERM() to match phrases.
[Link]
Mtomatchphrases
Splunk (n.d.). Use summary indexing for increased search efficiency.
[Link]
dexing
Appendix A
Replicating this Research
The materials needed to replicate this research are provided in a GitHub repository.
The Splunk container is launched via the docker-compose file, which specifies the
necessary apps. The apps that are included in the repository are the Eventgen app and the
custom sans-research-app app, which contains all the configuration files and searches
needed to replicate this research. Once the container is launched, the following steps will
generate the KV store and intel summary index:
1. Use the username “admin” and the password “sans-research2023” to log in. This
will then take you to the first page titled “Fill CTI Indicator KV Store” where the
KV store is first populated with the test IOCs. Click on the red box on the top-
right corner of the box and select “Run Query” to bypass the warning.
2. Once it is populated, navigate to the second page titled “Retroactive Hunt” where
the retroactive hunt query is run. This manual run prevents having to wait for the
query to run at the hour mark. This won’t show any of the IOC hits, but rather, it
will show the updated IOC table that is outputted to the KV store.
3. Once completed, navigate to the third page titled “Intel Search” to search the
intel summary index and see all the identified IOC hits.
4. Under the search tab, ad-hoc searches can be run against the firewall, DNS, and
intel index to compare the different datasets both in format and quantity.
To view the metrics of any of the underlying searches from the dashboards above,
hover over the table and click the magnifying glass on the bottom right. If a warning
appears, select “Run Query Anyway.” Once the search completes, select “Inspect Job” in
the job dropdown underneath the search window. This will return the metrics that were
used for this research such as how many hits were seen and how long the search took.
The container can be taken down and brought back up, resulting in a new dataset.
Link: [Link]