SlideShare una empresa de Scribd logo
1 de 46
Descargar para leer sin conexión
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

Más contenido relacionado

La actualidad más candente

Dns protocol design attacks and security
Dns protocol design attacks and securityDns protocol design attacks and security
Dns protocol design attacks and securityMichael Earls
 
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 HTTPSAlex Mayrhofer
 
DNSSEC Tutorial; USENIX LISA 2013
DNSSEC Tutorial; USENIX LISA 2013DNSSEC Tutorial; USENIX LISA 2013
DNSSEC Tutorial; USENIX LISA 2013Shumon 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
 
Passive DNS Collection – Henry Stern, Cisco
Passive DNS Collection – Henry Stern, CiscoPassive DNS Collection – Henry Stern, Cisco
Passive DNS Collection – Henry Stern, CiscoHenry Stern
 
Introduction DNSSec
Introduction DNSSecIntroduction DNSSec
Introduction DNSSecAFRINIC
 

La actualidad más candente (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 a CNIT 40: 4: Monitoring and detecting security breaches

lecture5.pptx
lecture5.pptxlecture5.pptx
lecture5.pptxLlobarro2
 
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.pdfShanthalaKV
 
CNIT 121: 3 Pre-Incident Preparation
CNIT 121: 3 Pre-Incident PreparationCNIT 121: 3 Pre-Incident Preparation
CNIT 121: 3 Pre-Incident PreparationSam 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 SignaturesSam Bowne
 
DNS/DNSSEC by Nurul Islam
DNS/DNSSEC by Nurul IslamDNS/DNSSEC by Nurul Islam
DNS/DNSSEC by Nurul IslamMyNOG
 
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 GatheringSam Bowne
 
CNIT 121: 9 Network Evidence
CNIT 121: 9 Network EvidenceCNIT 121: 9 Network Evidence
CNIT 121: 9 Network EvidenceSam 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 toolsgocybersec
 
Dafgjgghhghfhjgghjhgy06-Footprinting.pptx
Dafgjgghhghfhjgghjhgy06-Footprinting.pptxDafgjgghhghfhjgghjhgy06-Footprinting.pptx
Dafgjgghhghfhjgghjhgy06-Footprinting.pptxAlfredObia1
 
Packet Analysis - Course Technology Computing Conference
Packet Analysis - Course Technology Computing ConferencePacket Analysis - Course Technology Computing Conference
Packet Analysis - Course Technology Computing ConferenceCengage Learning
 
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 EvasionsIxia
 
Malicious Domain Profiling
Malicious Domain Profiling Malicious Domain Profiling
Malicious Domain Profiling E Hacking
 
CNIT 121: 10 Enterprise Services
CNIT 121: 10 Enterprise ServicesCNIT 121: 10 Enterprise Services
CNIT 121: 10 Enterprise ServicesSam Bowne
 
DNS Security
DNS SecurityDNS Security
DNS Securityinbroker
 

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

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
 
DNS Security
DNS SecurityDNS Security
DNS Security
 

Más de Sam Bowne

8. Software Development Security
8. Software Development Security8. Software Development Security
8. Software Development SecuritySam Bowne
 
4 Mapping the Application
4 Mapping the Application4 Mapping the Application
4 Mapping the ApplicationSam 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 CurvesSam Bowne
 
11. Diffie-Hellman
11. Diffie-Hellman11. Diffie-Hellman
11. Diffie-HellmanSam Bowne
 
2a Analyzing iOS Apps Part 1
2a Analyzing iOS Apps Part 12a Analyzing iOS Apps Part 1
2a Analyzing iOS Apps Part 1Sam Bowne
 
9 Writing Secure Android Applications
9 Writing Secure Android Applications9 Writing Secure Android Applications
9 Writing Secure Android ApplicationsSam 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
 
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 3Sam Bowne
 
9. Hard Problems
9. Hard Problems9. Hard Problems
9. Hard ProblemsSam 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 MethodologySam Bowne
 
8. Authenticated Encryption
8. Authenticated Encryption8. Authenticated Encryption
8. Authenticated EncryptionSam 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 CiphersSam Bowne
 
6 Scope & 7 Live Data Collection
6 Scope & 7 Live Data Collection6 Scope & 7 Live Data Collection
6 Scope & 7 Live Data CollectionSam Bowne
 
4. Block Ciphers
4. Block Ciphers 4. Block Ciphers
4. Block Ciphers Sam Bowne
 

Más de 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
 

Último

Satirical Depths - A Study of Gabriel Okara's Poem - 'You Laughed and Laughed...
Satirical Depths - A Study of Gabriel Okara's Poem - 'You Laughed and Laughed...Satirical Depths - A Study of Gabriel Okara's Poem - 'You Laughed and Laughed...
Satirical Depths - A Study of Gabriel Okara's Poem - 'You Laughed and Laughed...HetalPathak10
 
Employablity presentation and Future Career Plan.pptx
Employablity presentation and Future Career Plan.pptxEmployablity presentation and Future Career Plan.pptx
Employablity presentation and Future Career Plan.pptxryandux83rd
 
ARTERIAL BLOOD GAS ANALYSIS........pptx
ARTERIAL BLOOD  GAS ANALYSIS........pptxARTERIAL BLOOD  GAS ANALYSIS........pptx
ARTERIAL BLOOD GAS ANALYSIS........pptxAneriPatwari
 
Scientific Writing :Research Discourse
Scientific  Writing :Research  DiscourseScientific  Writing :Research  Discourse
Scientific Writing :Research DiscourseAnita GoswamiGiri
 
Sulphonamides, mechanisms and their uses
Sulphonamides, mechanisms and their usesSulphonamides, mechanisms and their uses
Sulphonamides, mechanisms and their usesVijayaLaxmi84
 
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITW
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITWQ-Factor HISPOL Quiz-6th April 2024, Quiz Club NITW
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITWQuiz Club NITW
 
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptx
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptxDecoding the Tweet _ Practical Criticism in the Age of Hashtag.pptx
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptxDhatriParmar
 
Tree View Decoration Attribute in the Odoo 17
Tree View Decoration Attribute in the Odoo 17Tree View Decoration Attribute in the Odoo 17
Tree View Decoration Attribute in the Odoo 17Celine George
 
4.11.24 Poverty and Inequality in America.pptx
4.11.24 Poverty and Inequality in America.pptx4.11.24 Poverty and Inequality in America.pptx
4.11.24 Poverty and Inequality in America.pptxmary850239
 
Congestive Cardiac Failure..presentation
Congestive Cardiac Failure..presentationCongestive Cardiac Failure..presentation
Congestive Cardiac Failure..presentationdeepaannamalai16
 
How to Manage Buy 3 Get 1 Free in Odoo 17
How to Manage Buy 3 Get 1 Free in Odoo 17How to Manage Buy 3 Get 1 Free in Odoo 17
How to Manage Buy 3 Get 1 Free in Odoo 17Celine George
 
Mythology Quiz-4th April 2024, Quiz Club NITW
Mythology Quiz-4th April 2024, Quiz Club NITWMythology Quiz-4th April 2024, Quiz Club NITW
Mythology Quiz-4th April 2024, Quiz Club NITWQuiz Club NITW
 
ClimART Action | eTwinning Project
ClimART Action    |    eTwinning ProjectClimART Action    |    eTwinning Project
ClimART Action | eTwinning Projectjordimapav
 
6 ways Samsung’s Interactive Display powered by Android changes the classroom
6 ways Samsung’s Interactive Display powered by Android changes the classroom6 ways Samsung’s Interactive Display powered by Android changes the classroom
6 ways Samsung’s Interactive Display powered by Android changes the classroomSamsung Business USA
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (GLOB...
BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (GLOB...BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (GLOB...
BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (GLOB...Nguyen Thanh Tu Collection
 

Último (20)

Satirical Depths - A Study of Gabriel Okara's Poem - 'You Laughed and Laughed...
Satirical Depths - A Study of Gabriel Okara's Poem - 'You Laughed and Laughed...Satirical Depths - A Study of Gabriel Okara's Poem - 'You Laughed and Laughed...
Satirical Depths - A Study of Gabriel Okara's Poem - 'You Laughed and Laughed...
 
Employablity presentation and Future Career Plan.pptx
Employablity presentation and Future Career Plan.pptxEmployablity presentation and Future Career Plan.pptx
Employablity presentation and Future Career Plan.pptx
 
ARTERIAL BLOOD GAS ANALYSIS........pptx
ARTERIAL BLOOD  GAS ANALYSIS........pptxARTERIAL BLOOD  GAS ANALYSIS........pptx
ARTERIAL BLOOD GAS ANALYSIS........pptx
 
Paradigm shift in nursing research by RS MEHTA
Paradigm shift in nursing research by RS MEHTAParadigm shift in nursing research by RS MEHTA
Paradigm shift in nursing research by RS MEHTA
 
Scientific Writing :Research Discourse
Scientific  Writing :Research  DiscourseScientific  Writing :Research  Discourse
Scientific Writing :Research Discourse
 
Mattingly "AI & Prompt Design: Large Language Models"
Mattingly "AI & Prompt Design: Large Language Models"Mattingly "AI & Prompt Design: Large Language Models"
Mattingly "AI & Prompt Design: Large Language Models"
 
Sulphonamides, mechanisms and their uses
Sulphonamides, mechanisms and their usesSulphonamides, mechanisms and their uses
Sulphonamides, mechanisms and their uses
 
Faculty Profile prashantha K EEE dept Sri Sairam college of Engineering
Faculty Profile prashantha K EEE dept Sri Sairam college of EngineeringFaculty Profile prashantha K EEE dept Sri Sairam college of Engineering
Faculty Profile prashantha K EEE dept Sri Sairam college of Engineering
 
INCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptx
INCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptxINCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptx
INCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptx
 
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITW
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITWQ-Factor HISPOL Quiz-6th April 2024, Quiz Club NITW
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITW
 
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptx
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptxDecoding the Tweet _ Practical Criticism in the Age of Hashtag.pptx
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptx
 
Tree View Decoration Attribute in the Odoo 17
Tree View Decoration Attribute in the Odoo 17Tree View Decoration Attribute in the Odoo 17
Tree View Decoration Attribute in the Odoo 17
 
4.11.24 Poverty and Inequality in America.pptx
4.11.24 Poverty and Inequality in America.pptx4.11.24 Poverty and Inequality in America.pptx
4.11.24 Poverty and Inequality in America.pptx
 
Congestive Cardiac Failure..presentation
Congestive Cardiac Failure..presentationCongestive Cardiac Failure..presentation
Congestive Cardiac Failure..presentation
 
How to Manage Buy 3 Get 1 Free in Odoo 17
How to Manage Buy 3 Get 1 Free in Odoo 17How to Manage Buy 3 Get 1 Free in Odoo 17
How to Manage Buy 3 Get 1 Free in Odoo 17
 
Mythology Quiz-4th April 2024, Quiz Club NITW
Mythology Quiz-4th April 2024, Quiz Club NITWMythology Quiz-4th April 2024, Quiz Club NITW
Mythology Quiz-4th April 2024, Quiz Club NITW
 
ClimART Action | eTwinning Project
ClimART Action    |    eTwinning ProjectClimART Action    |    eTwinning Project
ClimART Action | eTwinning Project
 
6 ways Samsung’s Interactive Display powered by Android changes the classroom
6 ways Samsung’s Interactive Display powered by Android changes the classroom6 ways Samsung’s Interactive Display powered by Android changes the classroom
6 ways Samsung’s Interactive Display powered by Android changes the classroom
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (GLOB...
BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (GLOB...BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (GLOB...
BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (GLOB...
 
prashanth updated resume 2024 for Teaching Profession
prashanth updated resume 2024 for Teaching Professionprashanth updated resume 2024 for Teaching Profession
prashanth updated resume 2024 for Teaching Profession
 

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