Sei sulla pagina 1di 6

Corelight’s introductory guide to

threat hunting with Zeek (Bro) logs.


Contents Introduction
Introduction........................................................................... 1
If you’re considering or new to Corelight and Zeek
Network egress...................................................................... 1 (formerly known as Bro), this guide will help you as part
Observations................................................................. 1 of a proof of concept for an initial deployment. The guide
consists of analysts questions that help demonstrate
Prohibited protocols.................................................... 1
usage of the data Zeek provides, and the value of a
HTTP.............................................................................. 2 data-centric approach for Network Security Monitoring
DNS................................................................................ 2 (NSM). Questions are organized by the location of
instrumentation in the network. Additionally, several
Encrypted sessions....................................................... 2 threat hunting concepts are described to help deepen
Hunting theories........................................................... 2 knowledge, especially for teams new to the practice.
Server farm egress................................................................ 3
Network egress
Observations................................................................. 3
Instrumenting the enterprise to monitor at network egress
Volume.......................................................................... 3
points provides enhanced visibility for all communications
Suspect encrypted traffic............................................. 3 with external networks.
Files................................................................................ 3
Observations
DCOM............................................................................ 3
The following questions can lead to theories for hunting in
MS protocols................................................................. 3 network egress data:
Hunting theories........................................................... 3 •• Are any prohibited protocols traversing the network?
Intra data center.................................................................... 4 This question can be used to verify existing perimeter
and host-based preventions.
Observations................................................................. 4
•• Is there anything interesting in the HTTP transactions
Prohibited protocols.................................................... 4
traversing the network?
Authentication.............................................................. 4
•• Which DNS servers are being, and have been, used?
File.................................................................................. 4
•• What insight do you have into encrypted sessions
Misc................................................................................ 4 entering/leaving the network?
Hunting theories........................................................... 4
Prohibited protocols:
Intra workstation................................................................... 5
1. Are there, or have there been, any traditionally LAN-only
Prohibited protocols:................................................... 5 protocols traversing the egress? Are they using
Authentication.............................................................. 5 non-standard ports?
a. SMB, DCE_RPC, SSH, RDP, kerberos, VNC
File.................................................................................. 6
2. Are any file transfer protocols permitted or in use?
Misc................................................................................ 6
a. FTP, SCP, TFTP
3. Do any TLS transactions implement TLS v1.0
or 1.1? Which applications break if this is blocked?
4. Are there any SSL transactions (e.g., SSL v1, v2, or v3)?
Corelight’s introductory guide to threat hunting with Zeek (Bro) logs.

What applications break if this is blocked? DNS


5. Are there any new SSH sessions that do not match Do you have visibility into your enterprise DNS?
existing HASSH fingerprints? DNS traffic is often unfiltered. These queries will go
unchecked, bypassing all network security.
6. What volume of data is transferred via SSH?
1. What resolvers are in use at your network?
7. Are any common protocols using a non-standard port?
2. Does your network policy permit external DNS
8. Does prohibited software exist?
resolution? If so, does it restrict the servers available?
9. Are any industrial control system (ICS) devices
3. Are there any DNS queries not on port 53 or 5353?
communicating via the Internet?1
(DNS over TCP is becoming increasingly common and
General will be explicitly encouraged when the DNS over TCP
flag day occurs in 2020.)
1. Does the software visible on the network agree with
agent-based inventory? 4. Which types of DNS queries are being transmitted?
Are any of them exceedingly long?
2. Which host is most active on the network, with
which IP(s)? 5. Who are the top talkers? Are there any DNS
transactions that are long in duration?
3. What are the most commonly generated Zeek logs?
6. What are the top queries? What are the rare queries?
4. What is network utilization from midnight until 3 am?
7. How do you discover, or troubleshoot,
HTTP misconfigured host DNS?
1. What type of HTTP methods traverse the egress?
Encrypted sessions
a. Get, Post, Connect, Subscribe, Head, Notify, Put,
Pri, Options…. 1. Which TLS versions are in use?

2. What are the user_agents being used for HTTP 2. Are there any sessions with self-signed certificates or
transactions? Are any being spoofed? sessions that do not have a validation status of OK?

3. Do all HTTP transactions use DNS (i.e., are there any 3. Which ciphers are used for key exchanges?
HTTP connections to IP addresses as the URL?) 4. Are there known-bad JA3 or JA3S fingerprints?
4. Are any HTTP connections proxied? 5. Are there sessions with certificates issued by suspect CAs?
5. Is there any HTTP traffic not on port 80? Is there any 6. Are there any server names that are suspect,
traffic on port 80 that is not HTTP? or weak signing algorithms used?
6. Are any files exchanged with HTTP that have a 7. Are there certificates set to expire or that use
potentially dangerous mime_type? keys that are short?
7. What is the most commonly visited site or user agent?
Hunting theories
What is the most rarely visited?
1. A wave of DNS hijacking has affected dozens of
8. What can be learned from the HTTP session?
domains belonging to government, telecommunications,
a. 404 status returned with a large response_body_length
and internet infrastructure entities across the Middle
b. 500 status messages
East, North Africa, Europe, and North America.
This was identified by FireEye’s Mandiant IR and
Intelligence teams.2

1 ICS is a general term that includes: supervisory control and data acquisition (SCADA) and distributed control systems (DCS), industrial automation and control
systems (IACS), and programmable logic controllers (PLCs).
2 https://www.fireeye.com/blog/threat-research/2019/01/global-dns-hijacking-campaign-dns-record-manipulation-at-scale.html
2
Corelight’s introductory guide to threat hunting with Zeek (Bro) logs.

a. An emergency directive was issued by DHS CISA in 3. Are unknown protocols in use?
January 2019 for organizations hosting DNS (https://cyber. 4. Are any hosts starving servers for resources?
dhs.gov/ed/19-01/) to mitigate this type of vulnerability.
Use this report as a guide to develop searches to look Suspect encrypted traffic
historically through logs to determine if anyone in your
1. Is there traffic to/from the server farm that does
enterprise was affected by this attack.
not belong?
2. Is any DNS tunneling present? Bad actors can exfiltrate all a. SSH, TLS using a certificate issued by an outside CA?
types of sensitive data including financial records, social
security numbers, and intellectual property. The data Files
can be obfuscated using various techniques and then 1. Which files have been up/downloaded between servers
transmitted to avoid detection (i.e., slow drip, IP spoofing, and clients?
domain generation algorithms (DGAs), and fast flux).
2. Has the same file been transferred multiple times?
a. Exfiltration Over Alternative Protocol (T1048)
3. Is there a method to check all files against a watch list?
Server farm egress
DCOM
Server farms are often where the most valuable data in 1. Is there any DCE_RPC traffic between servers and
an organization resides. Instrumenting the enterprise to external devices?
have NSM at server farm egress points provides visibility
2. Is there any suspect DCE_RPC traffic between servers
for internal and external network communications.
and internal devices?
Observations a. Scheduled Tasks, PSExec, WMI

The following questions, plus those identified for 3. Are any shares being created and/or removed remotely?
network egress, can lead to theories for hunting in
MS protocols
server farm egress data:
1. Is there SMB traffic between servers and
•• What volume of data is being transferred between
external devices?
individual servers and client(s)?
2. Is SMB traffic permitted between servers and
•• Are any hosts starving servers for resources?
internal devices?
•• Is there any encrypted traffic that does not belong? a. Which shares are accessed?
•• Is there a history of files transferred? b. Who is performing the access, and when?

•• Is there any suspect DCOM or RPC traffic 3. Are any hidden shares accessed by internal devices?
between servers and hosts? 4. Are all shares actively used?
•• Which MS protocols are being used between 5. Is share enumeration occurring from internal or
servers and internal hosts? external devices?
•• Are any prohibited protocols traversing the network? 6. Is any Kerberos being used between internal or
•• What insight do you have into encrypted sessions external devices and servers?
entering/leaving the network?
Hunting theories
Volume 1. Look for odd Kerberos ticket traffic with the additional
1. Which internal or external clients communicate Zeek package that extends the kerberos.log with auth_
with servers most often? ticket, new_ticket, client_cert, client_cert_sub, client_
a. Do communications happen at odd hours? cert_fuid, server_cert, server_cert_sub, server_cert_fuid.
a. Lateral Movement Pass the Ticket (T1097)
2. Which internal or external clients transfer
b. Credential Access Kerberoasting (T1208)
the most data to/from servers?
a. Which protocols are used? 2. RDP sessions with odd keyboard layouts
b. Do communications happen at odd hours? a. Lateral Movement RDP (T1076)
3
Corelight’s introductory guide to threat hunting with Zeek (Bro) logs.

3. File analysis of type != extension Prohibited protocols


a. Defense Evasion, Execution Space after 1. Are there, or have there been any protocols being used
Filename (T1151) within the data center that are prohibited? Are they
4. High volume of data transfer using non-standard ports?
a. Collection Data Staged (T1074) a. SMB, HTTP, SSH, RDP, NTLM, FTP, VNC
2. Are there any TLS transactions that implement TLS v1.0
Intra data center or 1.1? Which applications break if this is blocked?
Communication between devices within a data center 3. Are there any SSL transactions (e.g., SSL v1, v2, or v3)?
is often a security blind-spot. Data centers have a Which applications break if this is blocked?
heterogeneous mix of applications and operating systems
4. Are there any common protocols using a
that are vulnerable to enumeration by adversaries
non-standard port?
looking to discover devices and services to exploit. While
it is unlikely NSM will be present within a server rack, 5. Is there prohibited software? Does the software visible
it should be placed at demarcation points (i.e., switches on the network agree with agent-based inventory?
that aggregate top of rack traffic).
Authentication
Observations 1. Which authentication methods are used?
The following questions, plus earlier questions, can 2. Are there high numbers of failures?
lead to theories for intra data center hunting:
3. SSH failures (see “How Zeek can provide insights despite
•• Are any prohibited protocols traversing the network? encrypted communications” for additional questions)
•• Which users/hosts are authenticating? 4. Do you see oddities in the Kerberos authentication?
•• Are there hosts that switch from producing data to a. Ciphers used, keys reused on different client
consuming it? 5. Are there any new SSH sessions that do not match
•• Are any unknown protocols in use? existing HASSH fingerprints?

•• Are you performing file extraction and analysis? Volume


•• Why are two end points communicating? 1. What volume of data is transferred via SSH and
•• Are any endpoints performing reconnaissance? among which workstations?

•• Which software applications are installed? 2. Are there hosts with a changing producer to consumer
Is this in agreement with the enterprise inventory? ratio (PCR)?

•• Are administrative tasks occurring from the user 3. Are there unknown protocols?
area of the network? 4. Are there hosts communicating to new hosts
•• Are any users connecting to hidden or within the data center?
administrative shares? 5. Why are hosts communicating?
•• Which user agents are in use? 6. Are one or more workstations probing,
looking for services?

File
1. Which files have been uploaded/downloaded
between servers?
2. Has the same file been transferred multiple times?

4
Corelight’s introductory guide to threat hunting with Zeek (Bro) logs.

Misc. Prohibited protocols


1. Are shares being created and/or removed remotely? 1. Are there, or have there been any protocols being used
within the data center that are prohibited? Are they
2. Are all shares actively being used?
using non-standard ports?
3. Are there new hidden shares? a. SMB, HTTP, SSH, RDP, NTLM, FTP
4. Is remote administration occuring? 2. Are there any TLS transactions that implement TLS v1.0 or
If so, from which workstations? v1.1? Which applications break if this is blocked?
5. Is there another data center egress? 3. Are there any SSL transactions (e.g., SSL v1, v2, or v3)?
6. What user agents are being used? Which applications break if this is blocked?
Are any being spoofed? 4. Are any common protocols using a non-standard port?

Intra workstation 5. Is there prohibited software? Does the software visible on


the network agree with agent-based inventory?
A second blind spot is communication among host device
workstations within an enterprise. Enterprises often have Authentication
a heterogeneous mix of devices and operating systems 1. Which authentication methods are being used?
that are vulnerable to reconnaissance by adversaries
2. Do you see a high number of failures?
looking for users, devices, and services to exploit. While
it is unlikely NSM will be present between all host devices, 3. SSH failures (see “How Zeek can provide insights despite
it should be placed at demarcation points (NSM installed encrypted communications” for additional questions)
at distribution switches for each floor of a building or at 4. Do you see oddities in the Kerberos authentication?
the entire building). a. Ciphers used, keys reused on different client

Observations 5. Are there any new SSH sessions that do not match
existing HASSH fingerprints?
The following questions, plus earlier questions, can lead
to theories for intra workstation hunting: Volume
•• Are any prohibited protocols traversing the network? 1. What volume of data is transferred via SSH
•• Which users/hosts are authenticating? Among which workstations?

•• Are there hosts that switch from producing data to 2. Are there hosts that have the PCR changing?
consuming it? 3. Are there unknown protocols?
•• Are any unknown protocols in use? 4. Are there hosts communicating to new hosts
•• Are you performing file extraction and analysis? within the data center?

•• Why are two end points communicating? 5. Why are hosts communicating?

•• Are any endpoints performing reconnaissance? 6. Are one or more workstations probing,
looking for services?
•• Which software applications are installed?
Is this in agreement with the enterprise inventory?
•• Are administrative tasks occurring from the user area of
the network?
•• Are any users connecting to hidden or
administrative shares?
•• Which user agents are in use?

5
Files
1. Which files have been up/downloaded between servers?
2. Has the same file been transferred multiple times?

Misc.
1. Are shares being created and/or removed remotely?
2. Are all shares actively being used?
3. Are there new hidden shares?
4. Is remote administration occurring?
From which workstations?
5. Is there another data center egress?
6. What user agents are being used?
Are any being spoofed?

Corelight delivers the most powerful network security monitoring


(NSM) solutions that help large organizations defend themselves by Contact us
transforming network traffic into rich logs, extracted files, and security
insights. Corelight makes a family of virtual, cloud and physical sensors
For more information or
that take the pain out of deploying open-source Zeek and make it
to schedule an evaluation:
faster and enterprise-ready. Corelight’s customers include Fortune
500 companies, government agencies, and research universities.
info@corelight.com
888-547-9497
We make the world’s networks safer.
510-281-0760

CORELIGHT, INC. | INFO@CORELIGHT.COM | WP008-HUNTINTRO-V1.0-US


corelight.com
All rights reserved. © Copyright 2019 Corelight, Inc.

Potrebbero piacerti anche