SlideShare a Scribd company logo
Ch 4: Monitoring and
Detecting Security Breaches
Updated 10-24-17
Monitoring
• Four useful types of data
– Log data
– Network flow data
– Packet data
– Application level metadata
Log data
Types of Log Data
• Format errors in queries
• Lame delegations
– Referral from a parent zone to an invalid
name server for the child zone
• Queries for nonexistent domains
BIND's Logging in named.conf
Clauses
• Channel
– Defines output medium, such as files, syslog,
stderr, or null to eliminate output
• Versions
– Max. number of files that can be used
– Files are rolled when "size" is reached
• Severity
– "critical" logs only critical events
– "info" stores much more
• Print
– print-time, print-severity, print-category
– Controls what is printed (link Ch 4a)
Categories
• queries
– Logs client IP & port, question name, type
and class of query
– Useful to record which hosts are querying for
what domains
– + indicates recursive query
– S indicates signed query
– E indicates Extended DNS (EDNS)
Categories
• security
– Requests that were denied
– Rejected by access control lists (ACLS) that
define which hosts are allowed to send
queries, zone transfers, etc.
– ACLs are set using these options statements
• allow-query
• allow-recursion
• allow-transfer
Categories
• update-security
– Denied requests to update DNS zone data
dynamically, because of ACLs or policies
– ACLs and policies defined with
• allow-update
• allow-update-forwarding
• update-policy
– BIND tool "nsupdate" generates dynamic
updates
Categories
• dnssec
– Only works if DNS server supports DNSSEC and
is configured to perform record validation
– DNSSEC statements
• dnssec-enable
• dnssec-validation
DNSSEC Example
• Line prefix omitted in figure below
– Date dnssec: debug 3:
Categories
• xfer-in
• xfer-out
– Report zone transfers
Packet Data
SPAN Port
• Capture packets with tcpdump or Wireshark
• From a SPAN port on a router or switch
– Provides a copy of every packet
• Or use an optical or electronic splitter
– Or a hub
• Data sent to a server that captures and
stores all the packets
• Usually uses libpcap or WinPcap with
standard pcap format
Network Flow Data
Flow Data
• Summarized record of a network traffic
session
• Packets with common characteristics
– Source and destination IP, Port, and Protocol
• Each flow typically goes in only one direction
• NetFlow
– Originally developed by Cisco
– Standardized by IETF as IP Flow Information
Export (IPFIX)
Packet Grouping
• TCP sessions
– Export flow as soon as session ends with FIN
or RST
• UDP traffic
– Must guess when flow ends
– Activity timer expiration exports after a
period of time, even if flow is still in progress
– Inactivity times generates a flow record when
there is inactivity for a period of time
Flow Records
• Don't contain a complete summary of a session
between two hosts
• Very long sessions, or sessions with periods of
inactivity, may appear in multiple flow records
Application-Level Metadata
Metadata
• Flow records provide very little
information
• Packet data are overwhelming, containing
too much data
– Also raise privacy concerns
• Application layer metadata
– Keeps some packet fields from application
and other layers
Detection
Cache Poisoning Attack Detection
• Brute force attempts to guess Transaction
ID and Source Port
• Of a query from a recursive DNS server
to an authoritative server
• First, attacker makes a request for a
record that is not cached
• Then blasts server with spoofed
responses with many Transaction ID and
Source Port values
Flow Records
• Keep flows with source or destination port
53 (TCP or UDP) and source or destination
IP of the DNS server
Limitations of Flow Records
• No Layer 7 data
– Such as the DNS request
• Cannot pinpoint the domains being
targeted
• Or the addresses being injected
Selecting Relevant Data
• DNS requests are irrelevant
• Poisoning is performed by replies
• Data needed
– Source & destination IP
– Domain name in the question section
– Answer, authority, and additional sections
– Transaction ID
– Timestamp
– Only include authoritative replies (AA set)
Transient Domains
• Resolve to a small number of IP addresses
• Change over hours or days
• IP addresses are not owned by the same
autonomous system (AS)
• Typically they are botnet controllers,
malware downloads, or file drop sites
• Could be an innocent software bug, or a
security research site
Identifying Transient Domains
• Collect DNS traffic with
– Small TTLs
– Collect at peering links to other AS networks
• Record
– Domain that was queried
– Answer given
– Timestamp
– Exclude client IP address for privacy
Round-Robin DNS
• If there's more than one A record
– The order changes for each request
• Link Ch 4b
• This is the default for most DNS servers
• Demo:
– dig a microsoft.com
– Repeat a few times
Fast Fluxing Domains
• TTLs set to a few seconds
• IP changes rapidly
• Purposes
• Evade detection
• Resilience: maintain control of a botnet
despite attempts to block malicious
traffic
Example from Conficker
Answer at time 0
• www.refaourma.info. 60 IN A  65.54.40.75
• www.refaourma.info. 60 IN A 65.118.223.203
• www.refaourma.info. 60 IN A  65.130.228.46
Answer 28 sec. later
• www.refaourma.info. 32 IN A 65.130.228.46
• www.refaourma.info. 32 IN A 65.54.40.75
• www.refaourma.info. 32 IN A 65.118.223.203
Example from Conficker
Answer at 56 sec.
• www.refaourma.info. 4 IN A 65.118.223.203
• www.refaourma.info. 4 IN A  65.130.228.46
• www.refaourma.info. 4 IN A  65.54.40.75
Answer at 83 sec.
• www.refaourma.info. 32 IN A 209.17.184.203
• www.refaourma.info. 32 IN A 209.228.250.75
• www.refaourma.info. 32 IN A 209.229.142.35
• When cache expires, IP addresses are all new
Detecting Fast-Flux Domains
Phantom Domains
• Register a domain
• Use it for only a few hours or days
• Defends malware against sinkholing
– Resolving to an address that offers no service
• Works best with domain registrars who
offer a free trial period
Detecting Phantom Domains
• Find domains that have been active
recently
• Find current addresses
• Find domains with no matching historical
IP addresses
• Find records with very different IP
addresses for the same domain
Wannacry Ransomware
• Caused hospitals across
England to divert
emergency patients in
May 2017
• Used NSA-developed
attacks leaked by
"Shadow
Brokers" (Russians)
• Microsoft released a
patch but hospital
systems didn't install it in
time
– Link Ch 1y
• Link Ch 1z1
Conficker Worm Domains
• Algorithm made
50,000 new
domains per day
• Registrars tried
to block them all
– Links Ch 1u, 1v
Corrupted Local DNS Server Settings

(DNS Changer)
• Redirect victims to evil DNS server
• Most resolutions are correct
• Some lead to fake websites
– Such as banking sites, antivirus sites, etc.
Detecting DNS Changers
• Recursive DNS requests to suspicious
remote addresses
– Not in ISP's address range
– Not a known public DNS server
– Are in an IP address blacklist
– Associated with transient, fast-flux, phantom,
sinkholed or blacklisted domain
– Located more than 1000 miles away
– Have no forward DNS domains
Tunneling
• Firewalls allow port 53 through
• Malware can phone home via port 53
• Covert channels via DNS traffic
– Even embedded in fields of legitimate-looking
DNS packets, such as DNSSEC keys or
signatures
Detecting Tunneling
• Large UDP Request packets (>300bytes)
DoS Attacks
• Attacks against the DNS server
– TCP or UDP flood
– SYN flood
– Spoofed source addresses or botnets
DoS Attack Detection
• Watch for these to be different from
baseline
– Incoming bits/sec and outgoing bits/sec
• Imbalance indicates an attack
– DNS requests/sec (TCP and UDP)
– TCP SYN/sec
– Incoming TCP and UDP packets/sec
– ICMP incoming and outgoing packets/sec and
bits/sec
CNIT 40: 4: Monitoring and detecting security breaches

More Related Content

What's hot

8 technical-dns-workshop-day4
8 technical-dns-workshop-day48 technical-dns-workshop-day4
8 technical-dns-workshop-day4
DNS Entrepreneurship Center
 
Understanding DNS Security
Understanding DNS SecurityUnderstanding DNS Security
Understanding DNS Security
Nihal Pasham, CISSP
 
7 technical-dns-workshop-day3
7 technical-dns-workshop-day37 technical-dns-workshop-day3
7 technical-dns-workshop-day3
DNS Entrepreneurship Center
 
Domain Name System (DNS)
Domain Name System (DNS)Domain Name System (DNS)
Domain Name System (DNS)
Venkatesh Jambulingam
 
2 technical-dns-workshop-day1
2 technical-dns-workshop-day12 technical-dns-workshop-day1
2 technical-dns-workshop-day1
DNS Entrepreneurship Center
 
DNS Attacks
DNS AttacksDNS Attacks
DNS Attacks
Himanshu Prabhakar
 
DNS Security
DNS SecurityDNS Security
DNS Security
johnmcclure00
 
Dns protocol design attacks and security
Dns protocol design attacks and securityDns protocol design attacks and security
Dns protocol design attacks and security
Michael Earls
 
1 technical-dns-workshop-day1
1 technical-dns-workshop-day11 technical-dns-workshop-day1
1 technical-dns-workshop-day1
DNS Entrepreneurship Center
 
4 technical-dns-workshop-day2
4 technical-dns-workshop-day24 technical-dns-workshop-day2
4 technical-dns-workshop-day2
DNS Entrepreneurship Center
 
Session 4.1 Roy Arends
Session 4.1 Roy ArendsSession 4.1 Roy Arends
Encrypted DNS - DNS over TLS / DNS over HTTPS
Encrypted DNS - DNS over TLS / DNS over HTTPSEncrypted DNS - DNS over TLS / DNS over HTTPS
Encrypted DNS - DNS over TLS / DNS over HTTPS
Alex Mayrhofer
 
6 technical-dns-workshop-day3
6 technical-dns-workshop-day36 technical-dns-workshop-day3
6 technical-dns-workshop-day3
DNS Entrepreneurship Center
 
Lets talk dns
Lets talk dnsLets talk dns
Lets talk dns
Abhinav Mehta
 
DNSSEC Tutorial; USENIX LISA 2013
DNSSEC Tutorial; USENIX LISA 2013DNSSEC Tutorial; USENIX LISA 2013
DNSSEC Tutorial; USENIX LISA 2013
Shumon Huque
 
23rd PITA AGM and Conference: DNS Security - A holistic view
23rd PITA AGM and Conference: DNS Security - A holistic view 23rd PITA AGM and Conference: DNS Security - A holistic view
23rd PITA AGM and Conference: DNS Security - A holistic view
APNIC
 
DNS Cache Poisoning
DNS Cache PoisoningDNS Cache Poisoning
DNS Cache Poisoning
Christiaan Ottow
 
Grey H@t - DNS Cache Poisoning
Grey H@t - DNS Cache PoisoningGrey H@t - DNS Cache Poisoning
Grey H@t - DNS Cache Poisoning
Christopher Grayson
 
Passive DNS Collection – Henry Stern, Cisco
Passive DNS Collection – Henry Stern, CiscoPassive DNS Collection – Henry Stern, Cisco
Passive DNS Collection – Henry Stern, Cisco
Henry Stern
 
Introduction DNSSec
Introduction DNSSecIntroduction DNSSec
Introduction DNSSec
AFRINIC
 

What's hot (20)

8 technical-dns-workshop-day4
8 technical-dns-workshop-day48 technical-dns-workshop-day4
8 technical-dns-workshop-day4
 
Understanding DNS Security
Understanding DNS SecurityUnderstanding DNS Security
Understanding DNS Security
 
7 technical-dns-workshop-day3
7 technical-dns-workshop-day37 technical-dns-workshop-day3
7 technical-dns-workshop-day3
 
Domain Name System (DNS)
Domain Name System (DNS)Domain Name System (DNS)
Domain Name System (DNS)
 
2 technical-dns-workshop-day1
2 technical-dns-workshop-day12 technical-dns-workshop-day1
2 technical-dns-workshop-day1
 
DNS Attacks
DNS AttacksDNS Attacks
DNS Attacks
 
DNS Security
DNS SecurityDNS Security
DNS Security
 
Dns protocol design attacks and security
Dns protocol design attacks and securityDns protocol design attacks and security
Dns protocol design attacks and security
 
1 technical-dns-workshop-day1
1 technical-dns-workshop-day11 technical-dns-workshop-day1
1 technical-dns-workshop-day1
 
4 technical-dns-workshop-day2
4 technical-dns-workshop-day24 technical-dns-workshop-day2
4 technical-dns-workshop-day2
 
Session 4.1 Roy Arends
Session 4.1 Roy ArendsSession 4.1 Roy Arends
Session 4.1 Roy Arends
 
Encrypted DNS - DNS over TLS / DNS over HTTPS
Encrypted DNS - DNS over TLS / DNS over HTTPSEncrypted DNS - DNS over TLS / DNS over HTTPS
Encrypted DNS - DNS over TLS / DNS over HTTPS
 
6 technical-dns-workshop-day3
6 technical-dns-workshop-day36 technical-dns-workshop-day3
6 technical-dns-workshop-day3
 
Lets talk dns
Lets talk dnsLets talk dns
Lets talk dns
 
DNSSEC Tutorial; USENIX LISA 2013
DNSSEC Tutorial; USENIX LISA 2013DNSSEC Tutorial; USENIX LISA 2013
DNSSEC Tutorial; USENIX LISA 2013
 
23rd PITA AGM and Conference: DNS Security - A holistic view
23rd PITA AGM and Conference: DNS Security - A holistic view 23rd PITA AGM and Conference: DNS Security - A holistic view
23rd PITA AGM and Conference: DNS Security - A holistic view
 
DNS Cache Poisoning
DNS Cache PoisoningDNS Cache Poisoning
DNS Cache Poisoning
 
Grey H@t - DNS Cache Poisoning
Grey H@t - DNS Cache PoisoningGrey H@t - DNS Cache Poisoning
Grey H@t - DNS Cache Poisoning
 
Passive DNS Collection – Henry Stern, Cisco
Passive DNS Collection – Henry Stern, CiscoPassive DNS Collection – Henry Stern, Cisco
Passive DNS Collection – Henry Stern, Cisco
 
Introduction DNSSec
Introduction DNSSecIntroduction DNSSec
Introduction DNSSec
 

Similar to CNIT 40: 4: Monitoring and detecting security breaches

Foot printing as phase of Hacking in cybersecurity
Foot printing as phase of Hacking in cybersecurityFoot printing as phase of Hacking in cybersecurity
Foot printing as phase of Hacking in cybersecurity
AliAlwesabi
 
lecture5.pptx
lecture5.pptxlecture5.pptx
lecture5.pptx
Llobarro2
 
Computer Networks Module 1 - part 2.pdf
Computer Networks Module 1 - part 2.pdfComputer Networks Module 1 - part 2.pdf
Computer Networks Module 1 - part 2.pdf
ShanthalaKV
 
CNIT 121: 3 Pre-Incident Preparation
CNIT 121: 3 Pre-Incident PreparationCNIT 121: 3 Pre-Incident Preparation
CNIT 121: 3 Pre-Incident Preparation
Sam Bowne
 
3: DNS vulnerabilities
3: DNS vulnerabilities 3: DNS vulnerabilities
3: DNS vulnerabilities
Sam Bowne
 
Practical Malware Analysis Ch 14: Malware-Focused Network Signatures
Practical Malware Analysis Ch 14: Malware-Focused Network SignaturesPractical Malware Analysis Ch 14: Malware-Focused Network Signatures
Practical Malware Analysis Ch 14: Malware-Focused Network Signatures
Sam Bowne
 
DNS/DNSSEC by Nurul Islam
DNS/DNSSEC by Nurul IslamDNS/DNSSEC by Nurul Islam
DNS/DNSSEC by Nurul Islam
MyNOG
 
CNIT 152: 9 Network Evidence
CNIT 152: 9 Network Evidence CNIT 152: 9 Network Evidence
CNIT 152: 9 Network Evidence
Sam Bowne
 
CNIT 124: Ch 5: Information Gathering
CNIT 124: Ch 5: Information GatheringCNIT 124: Ch 5: Information Gathering
CNIT 124: Ch 5: Information Gathering
Sam Bowne
 
CNIT 121: 9 Network Evidence
CNIT 121: 9 Network EvidenceCNIT 121: 9 Network Evidence
CNIT 121: 9 Network Evidence
Sam Bowne
 
CNIT 152: 9 Network Evidence
CNIT 152: 9 Network Evidence CNIT 152: 9 Network Evidence
CNIT 152: 9 Network Evidence
Sam Bowne
 
501 ch 3 network technologies tools
501 ch 3 network technologies tools501 ch 3 network technologies tools
501 ch 3 network technologies tools
gocybersec
 
Dafgjgghhghfhjgghjhgy06-Footprinting.pptx
Dafgjgghhghfhjgghjhgy06-Footprinting.pptxDafgjgghhghfhjgghjhgy06-Footprinting.pptx
Dafgjgghhghfhjgghjhgy06-Footprinting.pptx
AlfredObia1
 
08Mapping.ppt
08Mapping.ppt08Mapping.ppt
08Mapping.ppt
MalikNuman8
 
Packet Analysis - Course Technology Computing Conference
Packet Analysis - Course Technology Computing ConferencePacket Analysis - Course Technology Computing Conference
Packet Analysis - Course Technology Computing Conference
Cengage Learning
 
Dns
DnsDns
Harden Security Devices Against Increasingly Sophisticated Evasions
Harden Security Devices Against Increasingly Sophisticated EvasionsHarden Security Devices Against Increasingly Sophisticated Evasions
Harden Security Devices Against Increasingly Sophisticated Evasions
Ixia
 
Malicious Domain Profiling
Malicious Domain Profiling Malicious Domain Profiling
Malicious Domain Profiling
E Hacking
 
Introduction to DNS
Introduction to DNSIntroduction to DNS
Introduction to DNS
MifrazMurthaja
 
CNIT 121: 10 Enterprise Services
CNIT 121: 10 Enterprise ServicesCNIT 121: 10 Enterprise Services
CNIT 121: 10 Enterprise Services
Sam Bowne
 

Similar to CNIT 40: 4: Monitoring and detecting security breaches (20)

Foot printing as phase of Hacking in cybersecurity
Foot printing as phase of Hacking in cybersecurityFoot printing as phase of Hacking in cybersecurity
Foot printing as phase of Hacking in cybersecurity
 
lecture5.pptx
lecture5.pptxlecture5.pptx
lecture5.pptx
 
Computer Networks Module 1 - part 2.pdf
Computer Networks Module 1 - part 2.pdfComputer Networks Module 1 - part 2.pdf
Computer Networks Module 1 - part 2.pdf
 
CNIT 121: 3 Pre-Incident Preparation
CNIT 121: 3 Pre-Incident PreparationCNIT 121: 3 Pre-Incident Preparation
CNIT 121: 3 Pre-Incident Preparation
 
3: DNS vulnerabilities
3: DNS vulnerabilities 3: DNS vulnerabilities
3: DNS vulnerabilities
 
Practical Malware Analysis Ch 14: Malware-Focused Network Signatures
Practical Malware Analysis Ch 14: Malware-Focused Network SignaturesPractical Malware Analysis Ch 14: Malware-Focused Network Signatures
Practical Malware Analysis Ch 14: Malware-Focused Network Signatures
 
DNS/DNSSEC by Nurul Islam
DNS/DNSSEC by Nurul IslamDNS/DNSSEC by Nurul Islam
DNS/DNSSEC by Nurul Islam
 
CNIT 152: 9 Network Evidence
CNIT 152: 9 Network Evidence CNIT 152: 9 Network Evidence
CNIT 152: 9 Network Evidence
 
CNIT 124: Ch 5: Information Gathering
CNIT 124: Ch 5: Information GatheringCNIT 124: Ch 5: Information Gathering
CNIT 124: Ch 5: Information Gathering
 
CNIT 121: 9 Network Evidence
CNIT 121: 9 Network EvidenceCNIT 121: 9 Network Evidence
CNIT 121: 9 Network Evidence
 
CNIT 152: 9 Network Evidence
CNIT 152: 9 Network Evidence CNIT 152: 9 Network Evidence
CNIT 152: 9 Network Evidence
 
501 ch 3 network technologies tools
501 ch 3 network technologies tools501 ch 3 network technologies tools
501 ch 3 network technologies tools
 
Dafgjgghhghfhjgghjhgy06-Footprinting.pptx
Dafgjgghhghfhjgghjhgy06-Footprinting.pptxDafgjgghhghfhjgghjhgy06-Footprinting.pptx
Dafgjgghhghfhjgghjhgy06-Footprinting.pptx
 
08Mapping.ppt
08Mapping.ppt08Mapping.ppt
08Mapping.ppt
 
Packet Analysis - Course Technology Computing Conference
Packet Analysis - Course Technology Computing ConferencePacket Analysis - Course Technology Computing Conference
Packet Analysis - Course Technology Computing Conference
 
Dns
DnsDns
Dns
 
Harden Security Devices Against Increasingly Sophisticated Evasions
Harden Security Devices Against Increasingly Sophisticated EvasionsHarden Security Devices Against Increasingly Sophisticated Evasions
Harden Security Devices Against Increasingly Sophisticated Evasions
 
Malicious Domain Profiling
Malicious Domain Profiling Malicious Domain Profiling
Malicious Domain Profiling
 
Introduction to DNS
Introduction to DNSIntroduction to DNS
Introduction to DNS
 
CNIT 121: 10 Enterprise Services
CNIT 121: 10 Enterprise ServicesCNIT 121: 10 Enterprise Services
CNIT 121: 10 Enterprise Services
 

More from Sam Bowne

Cyberwar
CyberwarCyberwar
Cyberwar
Sam Bowne
 
8. Software Development Security
8. Software Development Security8. Software Development Security
8. Software Development Security
Sam Bowne
 
4 Mapping the Application
4 Mapping the Application4 Mapping the Application
4 Mapping the Application
Sam Bowne
 
3. Attacking iOS Applications (Part 2)
 3. Attacking iOS Applications (Part 2) 3. Attacking iOS Applications (Part 2)
3. Attacking iOS Applications (Part 2)
Sam Bowne
 
12 Elliptic Curves
12 Elliptic Curves12 Elliptic Curves
12 Elliptic Curves
Sam Bowne
 
11. Diffie-Hellman
11. Diffie-Hellman11. Diffie-Hellman
11. Diffie-Hellman
Sam Bowne
 
2a Analyzing iOS Apps Part 1
2a Analyzing iOS Apps Part 12a Analyzing iOS Apps Part 1
2a Analyzing iOS Apps Part 1
Sam Bowne
 
9 Writing Secure Android Applications
9 Writing Secure Android Applications9 Writing Secure Android Applications
9 Writing Secure Android Applications
Sam Bowne
 
12 Investigating Windows Systems (Part 2 of 3)
12 Investigating Windows Systems (Part 2 of 3)12 Investigating Windows Systems (Part 2 of 3)
12 Investigating Windows Systems (Part 2 of 3)
Sam Bowne
 
10 RSA
10 RSA10 RSA
10 RSA
Sam Bowne
 
12 Investigating Windows Systems (Part 1 of 3
12 Investigating Windows Systems (Part 1 of 312 Investigating Windows Systems (Part 1 of 3
12 Investigating Windows Systems (Part 1 of 3
Sam Bowne
 
9. Hard Problems
9. Hard Problems9. Hard Problems
9. Hard Problems
Sam Bowne
 
8 Android Implementation Issues (Part 1)
8 Android Implementation Issues (Part 1)8 Android Implementation Issues (Part 1)
8 Android Implementation Issues (Part 1)
Sam Bowne
 
11 Analysis Methodology
11 Analysis Methodology11 Analysis Methodology
11 Analysis Methodology
Sam Bowne
 
8. Authenticated Encryption
8. Authenticated Encryption8. Authenticated Encryption
8. Authenticated Encryption
Sam Bowne
 
7. Attacking Android Applications (Part 2)
7. Attacking Android Applications (Part 2)7. Attacking Android Applications (Part 2)
7. Attacking Android Applications (Part 2)
Sam Bowne
 
7. Attacking Android Applications (Part 1)
7. Attacking Android Applications (Part 1)7. Attacking Android Applications (Part 1)
7. Attacking Android Applications (Part 1)
Sam Bowne
 
5. Stream Ciphers
5. Stream Ciphers5. Stream Ciphers
5. Stream Ciphers
Sam Bowne
 
6 Scope & 7 Live Data Collection
6 Scope & 7 Live Data Collection6 Scope & 7 Live Data Collection
6 Scope & 7 Live Data Collection
Sam Bowne
 
4. Block Ciphers
4. Block Ciphers 4. Block Ciphers
4. Block Ciphers
Sam Bowne
 

More from Sam Bowne (20)

Cyberwar
CyberwarCyberwar
Cyberwar
 
8. Software Development Security
8. Software Development Security8. Software Development Security
8. Software Development Security
 
4 Mapping the Application
4 Mapping the Application4 Mapping the Application
4 Mapping the Application
 
3. Attacking iOS Applications (Part 2)
 3. Attacking iOS Applications (Part 2) 3. Attacking iOS Applications (Part 2)
3. Attacking iOS Applications (Part 2)
 
12 Elliptic Curves
12 Elliptic Curves12 Elliptic Curves
12 Elliptic Curves
 
11. Diffie-Hellman
11. Diffie-Hellman11. Diffie-Hellman
11. Diffie-Hellman
 
2a Analyzing iOS Apps Part 1
2a Analyzing iOS Apps Part 12a Analyzing iOS Apps Part 1
2a Analyzing iOS Apps Part 1
 
9 Writing Secure Android Applications
9 Writing Secure Android Applications9 Writing Secure Android Applications
9 Writing Secure Android Applications
 
12 Investigating Windows Systems (Part 2 of 3)
12 Investigating Windows Systems (Part 2 of 3)12 Investigating Windows Systems (Part 2 of 3)
12 Investigating Windows Systems (Part 2 of 3)
 
10 RSA
10 RSA10 RSA
10 RSA
 
12 Investigating Windows Systems (Part 1 of 3
12 Investigating Windows Systems (Part 1 of 312 Investigating Windows Systems (Part 1 of 3
12 Investigating Windows Systems (Part 1 of 3
 
9. Hard Problems
9. Hard Problems9. Hard Problems
9. Hard Problems
 
8 Android Implementation Issues (Part 1)
8 Android Implementation Issues (Part 1)8 Android Implementation Issues (Part 1)
8 Android Implementation Issues (Part 1)
 
11 Analysis Methodology
11 Analysis Methodology11 Analysis Methodology
11 Analysis Methodology
 
8. Authenticated Encryption
8. Authenticated Encryption8. Authenticated Encryption
8. Authenticated Encryption
 
7. Attacking Android Applications (Part 2)
7. Attacking Android Applications (Part 2)7. Attacking Android Applications (Part 2)
7. Attacking Android Applications (Part 2)
 
7. Attacking Android Applications (Part 1)
7. Attacking Android Applications (Part 1)7. Attacking Android Applications (Part 1)
7. Attacking Android Applications (Part 1)
 
5. Stream Ciphers
5. Stream Ciphers5. Stream Ciphers
5. Stream Ciphers
 
6 Scope & 7 Live Data Collection
6 Scope & 7 Live Data Collection6 Scope & 7 Live Data Collection
6 Scope & 7 Live Data Collection
 
4. Block Ciphers
4. Block Ciphers 4. Block Ciphers
4. Block Ciphers
 

Recently uploaded

220711130088 Sumi Basak Virtual University EPC 3.pptx
220711130088 Sumi Basak Virtual University EPC 3.pptx220711130088 Sumi Basak Virtual University EPC 3.pptx
220711130088 Sumi Basak Virtual University EPC 3.pptx
Kalna College
 
RESULTS OF THE EVALUATION QUESTIONNAIRE.pptx
RESULTS OF THE EVALUATION QUESTIONNAIRE.pptxRESULTS OF THE EVALUATION QUESTIONNAIRE.pptx
RESULTS OF THE EVALUATION QUESTIONNAIRE.pptx
zuzanka
 
Level 3 NCEA - NZ: A Nation In the Making 1872 - 1900 SML.ppt
Level 3 NCEA - NZ: A  Nation In the Making 1872 - 1900 SML.pptLevel 3 NCEA - NZ: A  Nation In the Making 1872 - 1900 SML.ppt
Level 3 NCEA - NZ: A Nation In the Making 1872 - 1900 SML.ppt
Henry Hollis
 
Educational Technology in the Health Sciences
Educational Technology in the Health SciencesEducational Technology in the Health Sciences
Educational Technology in the Health Sciences
Iris Thiele Isip-Tan
 
A Visual Guide to 1 Samuel | A Tale of Two Hearts
A Visual Guide to 1 Samuel | A Tale of Two HeartsA Visual Guide to 1 Samuel | A Tale of Two Hearts
A Visual Guide to 1 Samuel | A Tale of Two Hearts
Steve Thomason
 
Accounting for Restricted Grants When and How To Record Properly
Accounting for Restricted Grants  When and How To Record ProperlyAccounting for Restricted Grants  When and How To Record Properly
Accounting for Restricted Grants When and How To Record Properly
TechSoup
 
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdfREASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
giancarloi8888
 
78 Microsoft-Publisher - Sirin Sultana Bora.pptx
78 Microsoft-Publisher - Sirin Sultana Bora.pptx78 Microsoft-Publisher - Sirin Sultana Bora.pptx
78 Microsoft-Publisher - Sirin Sultana Bora.pptx
Kalna College
 
How to Fix [Errno 98] address already in use
How to Fix [Errno 98] address already in useHow to Fix [Errno 98] address already in use
How to Fix [Errno 98] address already in use
Celine George
 
NIPER 2024 MEMORY BASED QUESTIONS.ANSWERS TO NIPER 2024 QUESTIONS.NIPER JEE 2...
NIPER 2024 MEMORY BASED QUESTIONS.ANSWERS TO NIPER 2024 QUESTIONS.NIPER JEE 2...NIPER 2024 MEMORY BASED QUESTIONS.ANSWERS TO NIPER 2024 QUESTIONS.NIPER JEE 2...
NIPER 2024 MEMORY BASED QUESTIONS.ANSWERS TO NIPER 2024 QUESTIONS.NIPER JEE 2...
Payaamvohra1
 
CHUYÊN ĐỀ ÔN TẬP VÀ PHÁT TRIỂN CÂU HỎI TRONG ĐỀ MINH HỌA THI TỐT NGHIỆP THPT ...
CHUYÊN ĐỀ ÔN TẬP VÀ PHÁT TRIỂN CÂU HỎI TRONG ĐỀ MINH HỌA THI TỐT NGHIỆP THPT ...CHUYÊN ĐỀ ÔN TẬP VÀ PHÁT TRIỂN CÂU HỎI TRONG ĐỀ MINH HỌA THI TỐT NGHIỆP THPT ...
CHUYÊN ĐỀ ÔN TẬP VÀ PHÁT TRIỂN CÂU HỎI TRONG ĐỀ MINH HỌA THI TỐT NGHIỆP THPT ...
Nguyen Thanh Tu Collection
 
Gender and Mental Health - Counselling and Family Therapy Applications and In...
Gender and Mental Health - Counselling and Family Therapy Applications and In...Gender and Mental Health - Counselling and Family Therapy Applications and In...
Gender and Mental Health - Counselling and Family Therapy Applications and In...
PsychoTech Services
 
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 8 - CẢ NĂM - FRIENDS PLUS - NĂM HỌC 2023-2024 (B...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 8 - CẢ NĂM - FRIENDS PLUS - NĂM HỌC 2023-2024 (B...BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 8 - CẢ NĂM - FRIENDS PLUS - NĂM HỌC 2023-2024 (B...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 8 - CẢ NĂM - FRIENDS PLUS - NĂM HỌC 2023-2024 (B...
Nguyen Thanh Tu Collection
 
CapTechTalks Webinar Slides June 2024 Donovan Wright.pptx
CapTechTalks Webinar Slides June 2024 Donovan Wright.pptxCapTechTalks Webinar Slides June 2024 Donovan Wright.pptx
CapTechTalks Webinar Slides June 2024 Donovan Wright.pptx
CapitolTechU
 
Juneteenth Freedom Day 2024 David Douglas School District
Juneteenth Freedom Day 2024 David Douglas School DistrictJuneteenth Freedom Day 2024 David Douglas School District
Juneteenth Freedom Day 2024 David Douglas School District
David Douglas School District
 
HYPERTENSION - SLIDE SHARE PRESENTATION.
HYPERTENSION - SLIDE SHARE PRESENTATION.HYPERTENSION - SLIDE SHARE PRESENTATION.
HYPERTENSION - SLIDE SHARE PRESENTATION.
deepaannamalai16
 
THE SACRIFICE HOW PRO-PALESTINE PROTESTS STUDENTS ARE SACRIFICING TO CHANGE T...
THE SACRIFICE HOW PRO-PALESTINE PROTESTS STUDENTS ARE SACRIFICING TO CHANGE T...THE SACRIFICE HOW PRO-PALESTINE PROTESTS STUDENTS ARE SACRIFICING TO CHANGE T...
THE SACRIFICE HOW PRO-PALESTINE PROTESTS STUDENTS ARE SACRIFICING TO CHANGE T...
indexPub
 
spot a liar (Haiqa 146).pptx Technical writhing and presentation skills
spot a liar (Haiqa 146).pptx Technical writhing and presentation skillsspot a liar (Haiqa 146).pptx Technical writhing and presentation skills
spot a liar (Haiqa 146).pptx Technical writhing and presentation skills
haiqairshad
 
Skimbleshanks-The-Railway-Cat by T S Eliot
Skimbleshanks-The-Railway-Cat by T S EliotSkimbleshanks-The-Railway-Cat by T S Eliot
Skimbleshanks-The-Railway-Cat by T S Eliot
nitinpv4ai
 
Elevate Your Nonprofit's Online Presence_ A Guide to Effective SEO Strategies...
Elevate Your Nonprofit's Online Presence_ A Guide to Effective SEO Strategies...Elevate Your Nonprofit's Online Presence_ A Guide to Effective SEO Strategies...
Elevate Your Nonprofit's Online Presence_ A Guide to Effective SEO Strategies...
TechSoup
 

Recently uploaded (20)

220711130088 Sumi Basak Virtual University EPC 3.pptx
220711130088 Sumi Basak Virtual University EPC 3.pptx220711130088 Sumi Basak Virtual University EPC 3.pptx
220711130088 Sumi Basak Virtual University EPC 3.pptx
 
RESULTS OF THE EVALUATION QUESTIONNAIRE.pptx
RESULTS OF THE EVALUATION QUESTIONNAIRE.pptxRESULTS OF THE EVALUATION QUESTIONNAIRE.pptx
RESULTS OF THE EVALUATION QUESTIONNAIRE.pptx
 
Level 3 NCEA - NZ: A Nation In the Making 1872 - 1900 SML.ppt
Level 3 NCEA - NZ: A  Nation In the Making 1872 - 1900 SML.pptLevel 3 NCEA - NZ: A  Nation In the Making 1872 - 1900 SML.ppt
Level 3 NCEA - NZ: A Nation In the Making 1872 - 1900 SML.ppt
 
Educational Technology in the Health Sciences
Educational Technology in the Health SciencesEducational Technology in the Health Sciences
Educational Technology in the Health Sciences
 
A Visual Guide to 1 Samuel | A Tale of Two Hearts
A Visual Guide to 1 Samuel | A Tale of Two HeartsA Visual Guide to 1 Samuel | A Tale of Two Hearts
A Visual Guide to 1 Samuel | A Tale of Two Hearts
 
Accounting for Restricted Grants When and How To Record Properly
Accounting for Restricted Grants  When and How To Record ProperlyAccounting for Restricted Grants  When and How To Record Properly
Accounting for Restricted Grants When and How To Record Properly
 
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdfREASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
 
78 Microsoft-Publisher - Sirin Sultana Bora.pptx
78 Microsoft-Publisher - Sirin Sultana Bora.pptx78 Microsoft-Publisher - Sirin Sultana Bora.pptx
78 Microsoft-Publisher - Sirin Sultana Bora.pptx
 
How to Fix [Errno 98] address already in use
How to Fix [Errno 98] address already in useHow to Fix [Errno 98] address already in use
How to Fix [Errno 98] address already in use
 
NIPER 2024 MEMORY BASED QUESTIONS.ANSWERS TO NIPER 2024 QUESTIONS.NIPER JEE 2...
NIPER 2024 MEMORY BASED QUESTIONS.ANSWERS TO NIPER 2024 QUESTIONS.NIPER JEE 2...NIPER 2024 MEMORY BASED QUESTIONS.ANSWERS TO NIPER 2024 QUESTIONS.NIPER JEE 2...
NIPER 2024 MEMORY BASED QUESTIONS.ANSWERS TO NIPER 2024 QUESTIONS.NIPER JEE 2...
 
CHUYÊN ĐỀ ÔN TẬP VÀ PHÁT TRIỂN CÂU HỎI TRONG ĐỀ MINH HỌA THI TỐT NGHIỆP THPT ...
CHUYÊN ĐỀ ÔN TẬP VÀ PHÁT TRIỂN CÂU HỎI TRONG ĐỀ MINH HỌA THI TỐT NGHIỆP THPT ...CHUYÊN ĐỀ ÔN TẬP VÀ PHÁT TRIỂN CÂU HỎI TRONG ĐỀ MINH HỌA THI TỐT NGHIỆP THPT ...
CHUYÊN ĐỀ ÔN TẬP VÀ PHÁT TRIỂN CÂU HỎI TRONG ĐỀ MINH HỌA THI TỐT NGHIỆP THPT ...
 
Gender and Mental Health - Counselling and Family Therapy Applications and In...
Gender and Mental Health - Counselling and Family Therapy Applications and In...Gender and Mental Health - Counselling and Family Therapy Applications and In...
Gender and Mental Health - Counselling and Family Therapy Applications and In...
 
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 8 - CẢ NĂM - FRIENDS PLUS - NĂM HỌC 2023-2024 (B...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 8 - CẢ NĂM - FRIENDS PLUS - NĂM HỌC 2023-2024 (B...BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 8 - CẢ NĂM - FRIENDS PLUS - NĂM HỌC 2023-2024 (B...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 8 - CẢ NĂM - FRIENDS PLUS - NĂM HỌC 2023-2024 (B...
 
CapTechTalks Webinar Slides June 2024 Donovan Wright.pptx
CapTechTalks Webinar Slides June 2024 Donovan Wright.pptxCapTechTalks Webinar Slides June 2024 Donovan Wright.pptx
CapTechTalks Webinar Slides June 2024 Donovan Wright.pptx
 
Juneteenth Freedom Day 2024 David Douglas School District
Juneteenth Freedom Day 2024 David Douglas School DistrictJuneteenth Freedom Day 2024 David Douglas School District
Juneteenth Freedom Day 2024 David Douglas School District
 
HYPERTENSION - SLIDE SHARE PRESENTATION.
HYPERTENSION - SLIDE SHARE PRESENTATION.HYPERTENSION - SLIDE SHARE PRESENTATION.
HYPERTENSION - SLIDE SHARE PRESENTATION.
 
THE SACRIFICE HOW PRO-PALESTINE PROTESTS STUDENTS ARE SACRIFICING TO CHANGE T...
THE SACRIFICE HOW PRO-PALESTINE PROTESTS STUDENTS ARE SACRIFICING TO CHANGE T...THE SACRIFICE HOW PRO-PALESTINE PROTESTS STUDENTS ARE SACRIFICING TO CHANGE T...
THE SACRIFICE HOW PRO-PALESTINE PROTESTS STUDENTS ARE SACRIFICING TO CHANGE T...
 
spot a liar (Haiqa 146).pptx Technical writhing and presentation skills
spot a liar (Haiqa 146).pptx Technical writhing and presentation skillsspot a liar (Haiqa 146).pptx Technical writhing and presentation skills
spot a liar (Haiqa 146).pptx Technical writhing and presentation skills
 
Skimbleshanks-The-Railway-Cat by T S Eliot
Skimbleshanks-The-Railway-Cat by T S EliotSkimbleshanks-The-Railway-Cat by T S Eliot
Skimbleshanks-The-Railway-Cat by T S Eliot
 
Elevate Your Nonprofit's Online Presence_ A Guide to Effective SEO Strategies...
Elevate Your Nonprofit's Online Presence_ A Guide to Effective SEO Strategies...Elevate Your Nonprofit's Online Presence_ A Guide to Effective SEO Strategies...
Elevate Your Nonprofit's Online Presence_ A Guide to Effective SEO Strategies...
 

CNIT 40: 4: Monitoring and detecting security breaches

  • 1. Ch 4: Monitoring and Detecting Security Breaches Updated 10-24-17
  • 2. Monitoring • Four useful types of data – Log data – Network flow data – Packet data – Application level metadata
  • 4. Types of Log Data • Format errors in queries • Lame delegations – Referral from a parent zone to an invalid name server for the child zone • Queries for nonexistent domains
  • 5. BIND's Logging in named.conf
  • 6. Clauses • Channel – Defines output medium, such as files, syslog, stderr, or null to eliminate output • Versions – Max. number of files that can be used – Files are rolled when "size" is reached • Severity – "critical" logs only critical events – "info" stores much more • Print – print-time, print-severity, print-category – Controls what is printed (link Ch 4a)
  • 7. Categories • queries – Logs client IP & port, question name, type and class of query – Useful to record which hosts are querying for what domains – + indicates recursive query – S indicates signed query – E indicates Extended DNS (EDNS)
  • 8. Categories • security – Requests that were denied – Rejected by access control lists (ACLS) that define which hosts are allowed to send queries, zone transfers, etc. – ACLs are set using these options statements • allow-query • allow-recursion • allow-transfer
  • 9. Categories • update-security – Denied requests to update DNS zone data dynamically, because of ACLs or policies – ACLs and policies defined with • allow-update • allow-update-forwarding • update-policy – BIND tool "nsupdate" generates dynamic updates
  • 10. Categories • dnssec – Only works if DNS server supports DNSSEC and is configured to perform record validation – DNSSEC statements • dnssec-enable • dnssec-validation
  • 11. DNSSEC Example • Line prefix omitted in figure below – Date dnssec: debug 3:
  • 14. SPAN Port • Capture packets with tcpdump or Wireshark • From a SPAN port on a router or switch – Provides a copy of every packet • Or use an optical or electronic splitter – Or a hub • Data sent to a server that captures and stores all the packets • Usually uses libpcap or WinPcap with standard pcap format
  • 16. Flow Data • Summarized record of a network traffic session • Packets with common characteristics – Source and destination IP, Port, and Protocol • Each flow typically goes in only one direction • NetFlow – Originally developed by Cisco – Standardized by IETF as IP Flow Information Export (IPFIX)
  • 17. Packet Grouping • TCP sessions – Export flow as soon as session ends with FIN or RST • UDP traffic – Must guess when flow ends – Activity timer expiration exports after a period of time, even if flow is still in progress – Inactivity times generates a flow record when there is inactivity for a period of time
  • 18. Flow Records • Don't contain a complete summary of a session between two hosts • Very long sessions, or sessions with periods of inactivity, may appear in multiple flow records
  • 20. Metadata • Flow records provide very little information • Packet data are overwhelming, containing too much data – Also raise privacy concerns • Application layer metadata – Keeps some packet fields from application and other layers
  • 21.
  • 23. Cache Poisoning Attack Detection • Brute force attempts to guess Transaction ID and Source Port • Of a query from a recursive DNS server to an authoritative server • First, attacker makes a request for a record that is not cached • Then blasts server with spoofed responses with many Transaction ID and Source Port values
  • 24. Flow Records • Keep flows with source or destination port 53 (TCP or UDP) and source or destination IP of the DNS server
  • 25. Limitations of Flow Records • No Layer 7 data – Such as the DNS request • Cannot pinpoint the domains being targeted • Or the addresses being injected
  • 26. Selecting Relevant Data • DNS requests are irrelevant • Poisoning is performed by replies • Data needed – Source & destination IP – Domain name in the question section – Answer, authority, and additional sections – Transaction ID – Timestamp – Only include authoritative replies (AA set)
  • 27. Transient Domains • Resolve to a small number of IP addresses • Change over hours or days • IP addresses are not owned by the same autonomous system (AS) • Typically they are botnet controllers, malware downloads, or file drop sites • Could be an innocent software bug, or a security research site
  • 28. Identifying Transient Domains • Collect DNS traffic with – Small TTLs – Collect at peering links to other AS networks • Record – Domain that was queried – Answer given – Timestamp – Exclude client IP address for privacy
  • 29. Round-Robin DNS • If there's more than one A record – The order changes for each request • Link Ch 4b • This is the default for most DNS servers • Demo: – dig a microsoft.com – Repeat a few times
  • 30.
  • 31. Fast Fluxing Domains • TTLs set to a few seconds • IP changes rapidly • Purposes • Evade detection • Resilience: maintain control of a botnet despite attempts to block malicious traffic
  • 32. Example from Conficker Answer at time 0 • www.refaourma.info. 60 IN A  65.54.40.75 • www.refaourma.info. 60 IN A 65.118.223.203 • www.refaourma.info. 60 IN A  65.130.228.46 Answer 28 sec. later • www.refaourma.info. 32 IN A 65.130.228.46 • www.refaourma.info. 32 IN A 65.54.40.75 • www.refaourma.info. 32 IN A 65.118.223.203
  • 33. Example from Conficker Answer at 56 sec. • www.refaourma.info. 4 IN A 65.118.223.203 • www.refaourma.info. 4 IN A  65.130.228.46 • www.refaourma.info. 4 IN A  65.54.40.75 Answer at 83 sec. • www.refaourma.info. 32 IN A 209.17.184.203 • www.refaourma.info. 32 IN A 209.228.250.75 • www.refaourma.info. 32 IN A 209.229.142.35 • When cache expires, IP addresses are all new
  • 35. Phantom Domains • Register a domain • Use it for only a few hours or days • Defends malware against sinkholing – Resolving to an address that offers no service • Works best with domain registrars who offer a free trial period
  • 36. Detecting Phantom Domains • Find domains that have been active recently • Find current addresses • Find domains with no matching historical IP addresses • Find records with very different IP addresses for the same domain
  • 37. Wannacry Ransomware • Caused hospitals across England to divert emergency patients in May 2017 • Used NSA-developed attacks leaked by "Shadow Brokers" (Russians) • Microsoft released a patch but hospital systems didn't install it in time – Link Ch 1y
  • 38. • Link Ch 1z1
  • 39. Conficker Worm Domains • Algorithm made 50,000 new domains per day • Registrars tried to block them all – Links Ch 1u, 1v
  • 40. Corrupted Local DNS Server Settings
 (DNS Changer) • Redirect victims to evil DNS server • Most resolutions are correct • Some lead to fake websites – Such as banking sites, antivirus sites, etc.
  • 41. Detecting DNS Changers • Recursive DNS requests to suspicious remote addresses – Not in ISP's address range – Not a known public DNS server – Are in an IP address blacklist – Associated with transient, fast-flux, phantom, sinkholed or blacklisted domain – Located more than 1000 miles away – Have no forward DNS domains
  • 42. Tunneling • Firewalls allow port 53 through • Malware can phone home via port 53 • Covert channels via DNS traffic – Even embedded in fields of legitimate-looking DNS packets, such as DNSSEC keys or signatures
  • 43. Detecting Tunneling • Large UDP Request packets (>300bytes)
  • 44. DoS Attacks • Attacks against the DNS server – TCP or UDP flood – SYN flood – Spoofed source addresses or botnets
  • 45. DoS Attack Detection • Watch for these to be different from baseline – Incoming bits/sec and outgoing bits/sec • Imbalance indicates an attack – DNS requests/sec (TCP and UDP) – TCP SYN/sec – Incoming TCP and UDP packets/sec – ICMP incoming and outgoing packets/sec and bits/sec