Network Cyber Threat Hunting August Slides
Network Cyber Threat Hunting August Slides
Network Cyber Threat Hunting August Slides
Hunter Training
Level 1
Thanks to our sponsors!
Want to level up?
▷ Advanced threat hunting class
▷ Builds on what you learn in this class
▷ Mostly hands on labs
▷ Practice on multiple C2 variations
▷ Next class offering is Aug 17th - 20th
○ 4 hours each day
▷ Class is $395 US
https://wildwesthackinfest.com/online-training/advanced-network-threat-hunting/
Before we get started
▷ You'll need the class VM to do the labs
https://www.activecountermeasures.com/threat-hunt-training-august/
Password: ThreathunT32
▷ VMWare (preferred) or VirtualBox version
▷ Login info:
○ Name: thunt
○ Pass: aybab2u
▷ This should have been done before class :-)
▷ Slides are now available here as well
Logistics
▷ 15 minute break at the top of each hour
▷ Questions in Discord Threat Hunter
Community channels
○ #acm-webcast-chat
○ #coffee-shop
▷ The team is monitoring for your questions
In this webcast
▷ I'm going to question some industry
accepted standard practices
○ Because what we are doing is broken
○ And it's not getting any better
▷ Please keep an open mind
▷ Prime cognitive bias fodder
6
How we (try to) catch the bad guys
▷ Centralized log collection
▷ Write "signatures" to identify patterns that
may indicate an attack
○ Patterns in the log messages
○ Matches against intel feeds
▷ Alert on signature matches
▷ Follow up on alerts
7
Anatomy of a Syslog message
Header Part 1 Part 2
8
Limitations of system logging
▷ Syslog was not designed for security
○ Facility 13 is "security/log audit"
○ But rarely used in a general security context
○ More appropriate as a severity level
○ But there is no "security" severity level
▷ No standard for message context
○ Different platforms log events differently
○ Different applications log events differently
▷ Decoder ring not included
9
Limitations of deployment
▷ Every device and system?
▷ Are you sure?
▷ Are you REALLY sure?
○ I have yet to see an environment that can
accurately make this claim
▷ Adversaries can disable logging
▷ "Fail open" system
○ Can access Internet without logging and no alert
○ Can you detect disabled logging? 10
What are signatures?
▷ Basically regex for logs
▷ Sometimes with pretty graphics
▷ Match known bad patterns
▷ Because adversaries have stopped
innovating and we now know all of the
possible bad patterns they can use
▷ Oh wait…
▷ This is the 1990's anti-virus model
11
Lack of innovation
▷ Log review to detect attacks is old
○ Older than IDS
○ Older than firewalls
▷ First SANS logging course early 2000's
▷ Not much has changed
OK to still wear
parachute pants?
12
Is there data showing its broken?
▷ Out of 1,200 orgs surveyed, 71% breached
○ 451 Group 2018 Global Threat Report
▷ Less than 50% of breaches get detected internally
○ 2019 Verizon Breach Report
▷ 40% of orgs that think they are threat hunting, are not
○ SANS 2019 Threat Hunting Survey
▷ On average, 191-197 days to ID a breach & 66-69
days to contain it
○ Ponemon Institute 2017 study
○ 2018 IBM Global Breach Study
13
2019 Verizon Breach Report
But we review
our SIEM logs!
17
Sample threat feed
18
Can I threat hunt with my NIDS?
24 Hours
SYN FIN
SYN FIN SYN FIN SYN FIN SYN FIN SYN FIN
Long connections challenges
▷ TCP
○ Time between first SYN and last FYN/ACK
▷ UDP
○ Stateless so no flags to work with
○ Identify a timeout for session reset
○ Most firewalls <=30 seconds same "session"
▷ Other transports
○ Similar to UDP
○ ICMP can be extra problematic
Wireshark-Statistics-Conversations
Heartbeat Activation
(check in, nothing to do)
Tshark timing & size
Extended Validation (EV) certs are more trusted and can assign negative threat points
Check destination IP address
▷ Start simple
○ Who manages ASN?
○ Geolocation info?
○ IP delegation
○ PTR records
▷ Do you recognize the target organization?
○ Business partner or field office
○ Current vendor (active status)
▷ Other internal IP's connecting?
Check threat intel on target IP
▷ Need to understand:
○ When was the record first created?
○ Why was the record created?
https://www.abuseipdb.com/check/<ip address>
https://dnslytics.com/ip/<IP address>
https://transparencyreport.google.com/safe-browsing/search?url=<IP, FQDN or URL>
Internal system
▷ Info available varies greatly between orgs
▷ Inventory management systems
▷ Security tools like Carbon Black
▷ Internal security scans
▷ DHCP logs
▷ Login events
▷ Passive fingerprinting
Leverage internal host logging
▷ Network shows suspicious traffic patterns
▷ Use this data to pivot to host logs
▷ Filter your logs based on:
○ Suspect internal host
○ Timeframe being analyzed
▷ Anything stand out as unique or odd?
Sysmon Event ID Type 3's
6dde0175375169c68f.dnsc.r-1x.com
6dde0175375169c68f.dnsc.r-1x.com
0b320175375169c68f.dnsc.r-1x.com
0b320175375169c68f.dnsc.r-1x.com
344b0175375169c68f.dnsc.r-1x.com
344b0175375169c68f.dnsc.r-1x.com
0f370175375169c68f.dnsc.r-1x.com
0f370175375169c68f.dnsc.r-1x.com
251e0175375169c68f.dnsc.r-1x.com
251e0175375169c68f.dnsc.r-1x.com
Tshark example - user agents
http://downloads.majesticseo.com/majestic_million.csv
Open source threat feeds
▷ What's it good for?
○ Identifying reputation of external IPs
○ Can assist with attribution
○ Need to qualify any matches
■ How old is the entry?
■ Why was it flagged?
■ Is it within dynamic space?
▷ When to use it
○ Minor modifier only
Threat feeds
Spamhaus & DShield
http://rules.emergingthreats.net/fwrules/emerging-Block-IPs.txt
Known C2 servers
http://osint.bambenekconsulting.com/feeds/c2-ipmasterlist.txt
https://www.abuseipdb.com/check/65.52.108.225
https://www.abuseipdb.com/check/111.221.29.113
https://www.abuseipdb.com/check/40.77.229.82
Research - Answers
Other names associated with IP
Known IP addresses
Domain
Known FQDNs
Missing entry?
RITA does not report connections shorter than 125 seconds in long connections
This data processed on 'show-beacons'
Answers - Beacons