Rank Software - Threat Hunting Playbook
Rank Software - Threat Hunting Playbook
Rank Software - Threat Hunting Playbook
6. HTML Response Sizes 9 6. Use Case: All Logins Since Last Boot 20
9. Suspicious Registry Or System File Changes 10 9. USE Case: User Activity from Clearing Event Logs 24
10. DNS Request Anomalies 11 10. USE Case: User Activity from Stopping Windows
Defensive Services 25
11. Unexpected Patching Of Systems 11
11. USE Case: Successful Local Account Login 26
12. Mobile Device Profile Changes 12
12. USE Case: Debuggers for Accessibility applications 27
13. Bundles Of Data In The Wrong Places 12
13. USE Case: User Logged in to Multiple Hosts 28
14. Web Traffic With Unhuman Behavior 13
14. USE Case: Service Search Path Interception 29
15. Signs Of DDoS Activity 13
Summary Chart 30
Learn More 31
2
INTRODUCTION:
BUILDING RESILIENCE
While we’re all familiar with the immune system, it’s less
well-known that its ability to build resilience against
attacks comes from two broad groups called the innate
and the acquired immune systems. Each plays a specific
role in building a robust security posture for the body.
Our bodies are constantly under attack from things that The story of the human immune system shares many
are trying to do it harm. These include toxins, bacteria, parallels with the challenges faced by today’s enterprises.
fungi, parasites and viruses. All of these can, under the right Just like the human body, enterprises are under constant
conditions, cause damage and destruction to parts of the attack with 230,000 new malware attacks launched every
body and if these were left unchecked, the human body day. And just as the human body has multiple layers of
would not be able to function. It is the purpose of the immune security, progressive organizations are building resilience
system to act as the body’s own army, in defence against this against these mounting threats by embracing a layered
constant stream of possible infections and toxins. approach to security.
3
Security leaders are beginning to understand, just like
the human body, that perimeter based defense systems
are not ironclad and that threat actors will, eventually,
get in. In response they’re developing ‘white blood cells’
of their own in the form of new capabilities that will
proactively hunt out threats and neutralize them.
4
INDICATORS OF THREAT ATTACKS
There are many indicators of compromise (IOC) and Here are some key indicators of compromise to monitor
indicators of attack (IOA) that threat hunters look (in no particular order)1:
for. These IOCs/IOAs are signals on the network,
that are forensic evidence of compromised activity, 1. Unusual Outbound Network Traffic
that could reveal a threat is imminent or has been 2. Anomalies In Privileged User Account Activity
successful. These IOCs, unusual activities, are 3. Geographical Irregularities
footprints, that a threat hunter is searching for to
4. Other Log-In Red Flags
prevent an imminent attack.
5. Swells In Database Read Volume
6. HTML Response Sizes
1
As reported by Dark Reading: https://www.darkreading.com/attacks-breaches/top-15-indicators-of-compromise/d/d-id/1140647?page_number=1 5
1.
UNUSUAL OUTBOUND NETWORK TRAFFIC
The threat hunter should look for suspicious traffic leaving • Successful connections to and from servers with bad
the network. reputation. The reputation intelligence comes from
multiple open source intelligence feeds - OSINT, OTX,
Watch for activity within the network and look for traffic MalwareDomainList.com, PhishTank. Paid intelligence
feeds like Kasperky, DGA Archive etc. are supported if
leaving your perimeter. Compromised systems will often
you have a license for the feeds.
call home to command-and-control servers, and this
traffic may be visible before any real damage is done. • Outgoing traffic to TOR exit nodes.
6
2. 3.
ANOMALIES IN PRIVILEGED GEOGRAPHICAL
USER ACCOUNT ACTIVITY IRREGULARITIES
A well-prepared attack is when attackers either escalate Geographical irregularities in log-ins and access patterns
privileges of accounts they’ve already compromised or can provide good evidence that attackers are pulling
use that compromise to leapfrog into other accounts strings from far away. For example, traffic between
with higher privileges. Keeping tabs on unusual account countries that a company doesn’t do business with offers
behavior from privileged accounts not only watches out reason for pause.
for insider attacks, but also account takeover. Watching for
changes — such as time of activity, systems accessed, type Similarly, when one account logs in within a short period
or volume of information accessed — will provide early of time from different IPs around the world, that’s a good
VASA Note: RANK’s VASA has built in support for VASA Note: By default, VASA creates a baseline
this scenario. With the assumption that End Point behaviour for clusters of users and machines.
Logs are being collected, upon privileges changes, When VASA detects geographical irregularities
VASA will trigger a High Risk Score Alert, indicating in log-ins, or from abnormal locations/IPs, or
a possible malware detection. timeframes, VASA will trigger Alerts to signal the
Anomaly detected.
7
4. 5.
OTHER LOG-IN SWELLS IN DATABASE
RED FLAGS READ VOLUME
Log-in irregularities and failures can provide excellent Once an attacker has made it into the network, they seek
clues of network and system probing by attackers. Check to exfiltrate information, there will be signs that someone
for failed logins using user accounts that don’t exist — has been mucking about data stores. One of them is a
these often indicate someone is trying to guess a user’s spike in database read volume.
account credentials and gain authorization Similarly,
attempted and successful log-in activity after hours
can provide clues that it isn’t really an employee who is
accessing data. VASA Note: VASA’s built in intelligence will sense
8
6. 7.
HTML RESPONSE SIZES LARGE NUMBERS OF
REQUESTS FOR THE
SAME FILE
If attackers use SQL injection to extract data through a It takes a lot of trial and error to compromise a site —
Web application, the requests issued by them will usually attackers have to keep trying different exploits to find
have a larger HTML response size than a normal request. ones that stick. And when they find signs that an exploit
might be successful, they’ll frequently use different
For example, if the attacker extracts the full credit card permutations to launch it.
database, then a single response for that attacker might be
20 to 50 MB, where a normal response is only 200 KB. So while the URL they are attacking will change on each
request, the actual filename portion will probably stay the
9
8. 9.
MISMATCHED SUSPICIOUS REGISTRY OR
PORT-APPLICATION SYSTEM FILE CHANGES
TRAFFIC
One of the ways malware writers establish persistence within an infected
host is through registry changes.
Attackers often take advantage of obscure
ports to get around more simple Web filtering Creating a baseline is the most important part when dealing with registry-
techniques. So if an application is using an based IOCs. Defining what a clean registry is supposed to contain
unusual port, it could be sign of command- essentially creates the filter against which you will compare your hosts.
and-control traffic masquerading as “normal” Monitoring and alerting on changes that deviate outside the bounds of the
application behavior. clean ‘template’ can drastically increase security team response time.
For example, if you notice several instances of Similarly, many attackers will leave behind signs that they’ve tampered with
a host in system files and configurations.
10
10. 11.
DNS REQUEST UNEXPECTED PATCHING
ANOMALIES OF SYSTEMS
According to experts, one of the most effective red flags Patching is generally a good thing, but if a system is
an organization can look for are tell-tale patterns left by inexplicably patched without reason, that could be the
malicious DNS queries. sign that an attacker is locking down a system so that
other bad guys can’t use it for other criminal activity.
Command-and-control traffic is often the most important
traffic to an attacker because it allows them ongoing
management of the attack and it needs to be secure so
that security professionals can’t easily take it over. The
unique patterns of this traffic can be recognized and is a
11
12. 13.
MOBILE DEVICE BUNDLES OF DATA IN
PROFILE CHANGES THE WRONG PLACES
As attackers migrate to mobile platforms, enterprises Attackers frequently aggregate data at collection
should keep an eye on unusual changes to mobile users’ points in a system before attempting exfiltration. If you
device settings. They also should watch for replacement suddenly see large gigabytes of information and data
of normal apps with hostile ones that can carry out man- where they should not exist, particularly compressed
in-the-middle attacks or trick users into giving up their in archive formats your company doesn’t’ use, this is a
enterprise credentials. telltale sign of an attack.
If a managed mobile device gains a new configuration In general, files sitting around in unusual locations
profile that was not provided by the enterprise, this may should be scrutinized because they can point to an
indicate a compromise of the user’s device and, from impending breach.
phishing attack. bin, are hard to find looking through Windows, but
easy and quick to find with a properly crafted Indicator
of Compromise. Executable files in the temp folder is
VASA Note: If an Enterprise, has an MDM another one, often used during privilege escalation,
Solution in place, VASA can be integrated with which rarely has a legitimate existence outside of
the any MDM solution to provide insights on attacker activity.
Mobile Devices.
12
14. 15.
WEB TRAFFIC WITH SIGNS OF DDOS
UNHUMAN BEHAVIOR ACTIVITY
Web traffic that doesn’t match up with normal human Distributed denial-of-service attacks (DDoS) are
behavior shouldn’t pass the sniff test. frequently used as smokescreens to camouflage other
more pernicious attacks. If an organization experiences
How often do you open 20 or 30 browser windows to signs of DDoS, such as slow network performance,
different sites simultaneously? Computers infected with unavailability of websites, firewall failover, or back-end
a number of different click-fraud malware families may systems working at max capacity for unknown reasons,
generate noisy volumes of Web traffic in short bursts. they shouldn’t just worry about those immediate
Or, for instance, on a corporate network with a locked- problems.
down software policy, where everyone is supposed to be
using one type of browser, an analyst might see a Web In addition to overloading mainstream services, it is
13
THREAT HUNTING SCENARIOS
Attacks on enterprise networks are coming from a growing The knowledge base is broken down into:
number of different threats, faster than previously thought
• a Use Case label and the Tactic that the
possible. Successful cyber attacks result in exposing sensitive
analytic detects
customer data, an immediate loss of revenue, and a long-lasting
damage to your brand. • a Hypothesis which explains the idea behind
the analytic
SIEMs, IPS, IDS are computer-based technologies that help • a VASA Note explaining relative feature in
protect your network infrastructure. But the reality is the amount RANK’s VASA
of data generated, across many sources, is very huge, and as it is • a SQL Query description of how the analytic
today, is dispersed across multiple areas. With Machine Learning might be implemented
& Artificial Intelligence, these data sources, can all be combined
14
1.
USE CASE: Reg.exe called from Command Shell
Tactic: TTP
MITRE Reference: CAR-2013-03-001: Reg.exe called from Command Shell
15
2.
USE CASE: Simultaneous Logins on a Host
SQL Query:
Tactic: TTP
MITRE Reference: CAR-2013-04-002: Quick execution of a series of suspicious commands
17
4.
USE CASE: Processes Spawning cmd.exe
18
5.
USE CASE: RDP Connection Detection
end-users may use RDP for day-to-day operations. From an where type = 'rdp'
19
6.
USE CASE: All Logins Since Last Boot
Tactic: Analytics
MITRE Reference: CAR-2015-07-001: https://car.mitre.org/wiki/CAR-2015-07-001
used in later events for additional logons. = 6005 AND source.name = 'enter your machine name here'
20
7.
USE CASE: RPC Activity
Hypothesis: Microsoft Windows uses its implementation of Distributed According to ATT&CK, adversaries frequently
Computing Environment/Remote Procedure Call (DCE/RPC), which it calls use RPC connections to remotely
Microsoft RPC, to call certain APIs remotely.
• Create, modify, and manipulate services
A Remote Procedure Call is initiated by communicating to the RPC • Schedule Tasks
Endpoint Mapper, which exists as the Windows service RpcEptMapper
• Query & Invoke Remote Launched
and listens on the port 135/tcp. The endpoint mapper resolves a Executables over RPC.
21
7.
USE CASE: RPC Activity (continued)
SQL Queries:
An equivalent method to the MITRE Framework would be too • Machines that make the most RPC calls:
look for: select source.name, count(*) from network-events where type = 'dce_
rpc' AND destination.port >= 49152 AND source.port >= 49152 AND
• All established RPC calls between internal machines
source.routingMode != 'LOOPBACK' AND source.internal = true AND
select * from network-events where type = 'dce_rpc' AND destination. destination.internal = true
port >= 49152 AND source.port >= 49152 AND source.routingMode !=
'LOOPBACK' AND source.internal = true AND destination.internal = true • RPC endpoints receiving the most calls:
22
8.
USE CASE: Remote Desktop Logon
Hypothesis: A remote desktop logon, through Note: Detection already exists in VASA as a rule.
RDP, may be typical of a system administrator
rdp:
or IT support, but only from select workstations. filters:
partition: source.name
Monitoring remote desktop logons and comparing category: suspicious-login
to known/approved originating systems can detect interesting: machine:source.name
expression: type = winevent AND data.winevent.EventID = [4624,
lateral movement of an adversary. 4634] AND data.winevent.LogonType = 10 AND source.name
23
9.
USE CASE: User Activity from Clearing Event Logs
24
10.
USE CASE: User Activity from Stopping Windows
Defensive Services
Tactic: Defense Evasion Note: Detection already exists in VASA as rules.
25
11.
USE CASE: Successful Local Account Login
Hypothesis: The successful use of Pass The Hash for lateral SQL Query:
movement between workstations would trigger event ID
4624, with an event level of Information, from the security
select * from network-events where type = 'winevent'
log. This behavior would be a LogonType of 3 using NTLM
AND data.winevent.EventID = 4624 AND data.winevent.
authentication where it is not a domain logon and not the
TargetUserName != 'ANONYMOUS LOGON' AND data.
ANONYMOUS LOGON account.
winevent.AuthenticationPackageName = 'NTLM'
27
13.
USE CASE: User Logged in to Multiple Hosts
Hypothesis: Most users use only one or two machines SQL Query:
during the normal course of business. User accounts that
log in to multiple machines, especially over a short period of
select timeInterval(date, '1h'), `data.login.user`,
time, may be compromised. Remote logins among multiple
count(distinct data.login.machine.name) as machinecount
machines may be an indicator of lateral movement.
from network-events where data.winevent.EventID = 4624
having machinecount > 1
Tactic:
MITRE Reference: CAR-2014-07-001: https://car.mitre.org/wiki/CAR-2014-07-001
be done when there are spaces in the binary path '\''.*') AND textMatches(data.process.cmd, '.* .*') AND NOT textMatches(data.
process.image.path, '.* .*')
and the path is unquoted. Search path interception
29
SUMMARY CHART
Indicators of Compromise
Unusual Outbound Network Traffic ü
Anomalies in Priviledged User Account Activity ü
Geographical Irregularities ü
Other Log-in Red Flags ü
Swells in Database Read Volume ü
HTML Response Sizes ü
30
LEARN MORE
31