Threat Hunting 101
Threat Hunting 101
Threat Hunting 101
TABLE OF CONTENTS
Threat Hunting 101 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
8 Threat Hunts You Can Do with Available Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Leveraging the Right Log Data for Threat Hunting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2. Behavior Changes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
LogRhythm Insights: Processes and Network Traffic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
3. Scripting Abuse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
LogRhythm Insights: Monitoring PowerShell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
4. Antivirus Follow-Up . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
LogRhythm Insights: Spotting Threat Activity from Antivirus Logs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
5. Persistence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
LogRhythm Insight: Do Users Have Admin Authority to Workstations? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
6. Lateral Movement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
7. DNS Abuse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
LogRhythm Insights: DNS Rebinding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Bottom Line . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Threat Hunting 101
A hunter wishing to bring food home for his or her family first needs to decide
what type of animal he or she is going to target. Every quarry requires its own
unique methods that dictate when the hunter goes out, where he or she goes,
what kind of weapon to carry, and a host of other considerations.
In the world of cybersecurity, it’s no different. You don’t just “go threat
hunting.” You need to have a target in mind, you need to look in the right places,
and you need the right weapons.
In this white paper, we will discuss the minimum toolset and data requirements
you need for successful threat hunting. We will take into account that, while
some readers can devote most of their time to threat hunting, like most, you
have limited time and resources for this activity. The good news is that threat
hunting is flexible, and anyone can do it, regardless if you are spending just a
few hours a week to full time.
The challenge with threat hunting is knowing what to look for. So, this white
paper explores eight types of threat hunts that you can use to spot suspicious
abnormalities that might be a leading or active indicator of threat activity.
First, make sure you know the kinds of log data that are necessary to
threat hunts.
Introduction | 3
Threat Hunting 101
Once you are centrally collecting the proper log data in your SIEM, you can
begin the process of threat hunting. Start with one of the easiest and more
telling indicators of threat activity: suspicious software.
4 | Introduction
Threat Hunting 101
As shown in Figure 1, there are two basic ways to identify suspicious software: by
process name or by process hash. If you have an endpoint detection and response
(EDR) solution in place on your endpoints, it might be able to port its log data to
your SIEM solution, providing additional ways to spot suspicious software.
Figure 1. You can identify suspicious software by using either the process name or hash.
Hunting by process name is a much easier task; all that’s needed is to match the
name in a log to the name of a malicious process you’re looking for. But many
attacks involve a spoofed process name, simply renaming the malicious executable
to something known to the operating system (e.g., NOTEPAD.EXE).
a. If this data is incorporated into your LogRhythm SIEM, you can use
LogRhythm’s WebUI Lucene query to list unique processes running across
a single, or multiple systems:
b. You can also perform the same query within the LogRhythm WebUI search window:
c. If you only have access to the windows hosts themselves, you can use a SQL
statement like the following to extract a deduplicated list of process names
for your baseline:
3. Compare new processes against the baseline. Once you have a sufficiently
accurate baseline, compare incoming 4688 or 1 events against that baseline.
You can use these values to create a list of process names which can then
be used to notify SIEM operators in the event a new process is identified.
The comparison SQL statement could look something like the following:
If the process is already on the baseline, ignore the event. But if the
process is new to the baseline, add it and have a notification sent to
someone to investigate.
b. Next, the investigator should review each process and determine whether
it appears to be a program trying to look like a common program. For
example, the filenames C:\Windows\System32\d11host.exe and C:\Windows\
System32\srvchost.exe look very close to the real thing, but they definitely
are not part of the OS.
d. Check the full filename and path on the VirusTotal website, looking
for how long the file has been on the site and whether it’s been
reported as malicious.
It’s important that you think about this process beyond just one global baseline.
What runs on computers in the Sales department is very different from in
Finance. Consider grouping computers based on departmental use within the
organization to derive use-case-based baselines that accurately depict normal
processes for that group.
Once a baseline is established, you can use the same process list across multiple
endpoints, with the rule modified to alert the appropriate staff when a new
process is spotted.
Using a Hash
This method uses an investigation and procedure similar to those for process
names. To gather process hashes, you need to install Sysmon on each system
that will be baselined or continually monitored.
If you tackle these challenges and build a hash whitelist, you will know within
minutes whenever a new binary file executes in your environment. Keep in mind,
there are two scenarios when using hashes won’t work:
• Scripting abuse. Attackers that are “living off the land” might use
PowerShell, WSH, or JavaScript to act. While the script executables will
be evident, their intent and actions won’t be.
Figure 2. By adding either the parent process or the username, processes begin to take on context useful for hunting.
Behavior Changes | 11
Threat Hunting 101
As shown in this figure, LogRhythm analyzes outbound connections with the process
name to help spot potentially dangerous rogue applications. Notice in the example that
powershell.exe is making an outbound connection, raising suspicion of its intent.
12 | Behavior Changes
Threat Hunting 101
Because IT is known to use scripting, you should avoid creating alert fatigue
with too many false positives. As with processes in Hunt No. 1, monitoring the
use of encoded scripts (a common tactic of attackers), specific script filenames,
which parent process spawned the scripting engine — even adding in the dimen-
sion of the involved endpoint name or username involved — can all help to home
in only on instances of scripting that indicate a potential threat.
Scripting Abuse | 13
Threat Hunting 101
As shown in this view, LogRhythm can easily monitor the use of encoded PowerShell
scripts (which obfuscate the actions that the script will perform), showing the users
utilizing encoded scripts, the command lines used, and how often the script has been used.
These details can help provide context to determine whether the running of a script
is suspect.
14 | Scripting Abuse
Threat Hunting 101
Take the simple question: From where was the malware cleaned? In an expected
folder like C:\Users\<User>\Downloads, it’s a simple scenario of a user down-
loading a malicious file from the internet. But if the malware is cleaned from a
folder like C:\Windows\System32, you have a potential elevated privilege issue,
as administrative rights are needed to write to that folder.
In addition, antivirus data can also be used collectively across your enterprise
to better understand if and where malware is moving across your environment.
So, consider antivirus log data as a viable source of post-threat intel that can
help point out where network segmentation or elevated privilege issues might
exist within your environment.
Threat Hunting 101
LogRhythm Insights:
Spotting Threat Activity from Antivirus Logs
Investigations often use forensic tools to dig into the current state of an endpoint
and look for digital artifacts that indicate specific activity. But if your antivirus
solution spots malware and cleans it from the endpoint, no markers
are left behind.
LogRhythm takes log data from the industry’s leading antivirus and EDR solutions,
empowering the customization of monitoring, alerting, displaying, and reviewing
of solution activity as part of your threat hunting. As shown in this view, data as
simple as the file path where malware once existed (and is now cleaned or quaran-
tined) can provide insight into specific threat activity.
As seen here, paths that include such known hacking terms as metasploit and
mimikatz likely indicate that malicious tools were installed on the now-clean
endpoint — and possibly used by a malicious threat actor.
16 | Antivirus Follow-Up
Threat Hunting 101
Persistence | 17
Threat Hunting 101
LogRhythm Insight:
Do Users Have Admin Authority to Workstations?
One of the easiest ways to thwart attackers establishing persistence is to limit
administrative access to endpoints. Whether a formal implementation of Least
Privilege or simply an organizational policy that users have low-level access,
this first step limits the persistence attack surface to only those users with
elevated credentials.
18 | Persistence
Threat Hunting 101
Figure 5. New combinations of users and endpoints might be leading indicators of a forthcoming threat action.
Note that this method of threat hunting isn’t without its challenges. Assuming your
organization uses DHCP, using IP addresses as the basis for monitoring, ensuring
which host is involved with a logon or connection is going to be tough. The Security
Log does not provide hostname as part of event 5156, and Sysmon only captures the
hostname of an endpoint if that hostname was used as part of the initial connection.
What you can do is to filter on endpoints using your DHCP range that attempt to
connect with other endpoints in the same range. Generally, only systems manage-
ment applications need to establish connections with endpoints, making this one
way to spot suspicious movement when DHCP is in place.
Lateral Movement | 19
Threat Hunting 101
Under normal circumstances, your endpoints should talk only to the configured
DNS servers with DNS request-appropriately sized communications. From a
network traffic perspective, you should see only normal TCP port 53 traffic to
your internal DNS servers.
As shown in Figure 6, you can monitor for DNS abuse in a number of ways.
These include monitoring for DNS traffic from endpoints directly to external
servers, massive amounts of DNS traffic from a single endpoint (denoting data
being exfiltrated over port 53), changes made to either the DNS configuration
or the hosts file, and DNS rebinding requests.
Figure 6. Changes in DNS traffic and configuration settings can indicate the beginning steps of a larger attack.
20 | DNS Abuse
Threat Hunting 101
LogRhythm can easily identify DNS rebinding attacks based on their typical
reliance on the REST API, which includes the presence of filetype, username, and
method parameters, JavaScript filename (.JS), and as part of the URL string.
Threat Hunting 101
In concept, you decide which aspects of the environment you want to mimic,
craft a virtual environment to act as the honeypot, and make that environment
accessible: open vulnerable ports, weak passwords, and so on, making it more
desirable to an attacker because it appears easier to crack.
The last step is to leverage nearly all the threat-hunting methods in this paper,
monitoring the honeypot environment to identify attacks before the production
environment is affected.
These bait environments take quite a bit of effort to implement and maintain.
And you need to make substantial effort to monitor and alert attempted attacks
on the environment. Why do it, then? To keep attackers from focusing on your
production environment.
BOTTOM LINE
Threat hunting allows you to spot both leading and active indicators
of attacks, empowering quick responses to identified threats. By
engaging in threat hunting, you can better understand where your
defenses are weak, how attacks are occurring, and how to properly
remediate gaps in security — thereby reducing your threat surface.
Bottom Line | 23
About LogRhythm
LogRhythm is a world leader in NextGen SIEM, empowering organiza-
tions on six continents to successfully reduce risk by rapidly detecting,
responding to, and neutralizing damaging cyberthreats. The LogRhythm
NextGen SIEM Platform combines enterprise log management, user and
entity behavior analytics (UEBA), network detection and response (NDR)
and security orchestration, automation, and response (SOAR) in a single
end-to-end solution. The LogRhythm platform is powered by AI and our
patented Machine Data Intelligence Fabric. Its seamlessly integrated solu-
tion set is designed to deliver enterprises highest-efficacy Threat Lifecycle
Management (TLM) at lowest total cost of ownership (TCO). A LogRhythm-
powered security operations center (SOC) helps customers measurably
secure their cloud, physical, and virtual infrastructures for both IT and OT
environments. Built for security professionals by security professionals,
the LogRhythm NextGen SIEM Platform has won many accolades,
including being positioned as a Leader in Gartner’s SIEM Magic Quadrant.
www.logrhythm.com
24
1.866.384.0713 // info@logrhythm.com // 4780 Pearl East Circle, Boulder CO, 80301