SlideShare une entreprise Scribd logo
1  sur  42
DNS cache poisoning
  Christiaan Ottow, christiaan.ottow@pine.nl
Contents

•   Overview of DNS

•   About cache poisoning

•   Timeline of vulnerabilities

•   Counter-measures
Overview of DNS
DNS overview
•   Name to IP and IP to name translation

•   1983 by IETF

•   114 RFCs

•   TCP & UDP port 53

•   Key concept: authoritative and recursive (caching) DNS
    servers
DNS - servers
•   Authoritative server

    •   Responsible for one or more zones

    •   Answers queries based on its zones

•   Recursing server (resolver, recursor, cache)

    •   No records of its own, just cache

    •   Queries authoritative servers for the answer
DNS - zones
•   Zone

    •   Domain name, e.g. pine.nl

    •   Contains resource records (RRs)

    •   Stored on authoritative servers

        •   Usually master and slave(s)

    •   SOA record

        •   E-mail, serial, refresh, retry, expire, minTTL
DNS - records
•   Records are the actual mappings of hostnames to IP addresses

•   Different types, not all give an IP address

    •   Common: A, AAAA, NS, CNAME, MX

•   Examples
    • pine.nl.     86400           IN A           213.156.1.80
    • www.pine.nl. 86400           IN CNAME sechost.pine.nl.
    • pine.nl.     86400           IN MX          1 mx.pine.nl.
DNS - Wire format
•   Server on UDP/TCP port 53 (TCP for large query/response)

•   Transaction ID

•   Flags

    •   e.g. recursion desired, authoritative, is-response, truncated

•   Sections

    •   Question, Answer, Authority, Additional
DNS - Wire format
DNS - operation
                                                               Root server
                                         pine.nl A ?        k.root-servers.net


                                                       nl. NS ns1.nic.nl
                                                       ns1.nic.nl A 193.176.144.2


                pine.nl A ?
                                                              pine.nl A ?
                                                        pine.nl NS ns1.pine.nl
Client                        Resolver                 ns1.pine.nl A 213.156.2.1 ccTLD server
         pine.nl A 213.156.1.80                                                    ns1.nic.nl



                                    pine.nl A?         pine.nl A 213.156.1.80



                                                           Authoritative server
                                                               ns1.pine.nl
DNS - operation
•   Every server is asked the same question

•   Every server responds with what it knows towards the
    answer

•   Only the definitive answer is given in the “answer” section

•   A server may give additional info with its response

    •   auth section: “NS for nl. is ns1.nic.nl.”

    •   additional section: “ns1.nic.nl is at 193.176.144.2”
DNS - operation
              Authority section
                                                               Root server
                                         pine.nl A ?        k.root-servers.net
  Additional section
                                                       nl. NS ns1.nic.nl
                                                       ns1.nic.nl A 193.176.144.2


                pine.nl A ?
                                                              pine.nl A ?
                                                        pine.nl NS ns1.pine.nl
Client                        Resolver                 ns1.pine.nl A 213.156.2.1 ccTLD server
         pine.nl A 213.156.1.80                                                    ns1.nic.nl



                                    pine.nl A?         pine.nl A 213.156.1.80



                                                           Authoritative server
                                                               ns1.pine.nl
               Answer section
DNS - operation
DNS - operation

•   What if nameserver voor pine.nl is ns1.pine.nl?
DNS - operation

•   What if nameserver voor pine.nl is ns1.pine.nl?

•   Glue records
DNS - operation

•   What if nameserver voor pine.nl is ns1.pine.nl?

•   Glue records

•   Additional section
DNS - operation

•   What if nameserver voor pine.nl is ns1.pine.nl?

•   Glue records

•   Additional section

    •   Extra info the server has that you will probably need
DNS - operation

•   What if nameserver voor pine.nl is ns1.pine.nl?

•   Glue records

•   Additional section

    •   Extra info the server has that you will probably need

    •   Prevents an endless loop
On cache poisoning
Poisoning - what?

•   Entering specific (non-authoritative) RRs into a resolver
    cache

•   Resolver will provide this information to all clients that query
    it
Poisoning - why?

•   Suppose Alice wants to login to secure.bank.net

•   Eve has poisoned her resolver’s cache

•   secure.bank.net may now resolve to the address of Eves
    computer

•   DNS cache poisoning results in MITM attacks or excellent
    phishing
Poisoning - how?
•   Faulty protocol implementations

    •   Send unauthoritative additional RRs

•   Reply before authoritative answer

    •   Brute force - for n replies, n/65535 success rate for static
        port

    •   Birthday attack

    •   Weak PRNG exploitation
Poisoning - brute force
Poisoning - brute force

•   Resolver uses UDP, thus stateless
Poisoning - brute force

•   Resolver uses UDP, thus stateless

•   Reply as the authoritative server would but with different
    answer
Poisoning - brute force

•   Resolver uses UDP, thus stateless

•   Reply as the authoritative server would but with different
    answer

•   Need to guess the source port of the resolver (sometimes
    static)
Poisoning - brute force

•   Resolver uses UDP, thus stateless

•   Reply as the authoritative server would but with different
    answer

•   Need to guess the source port of the resolver (sometimes
    static)

•   Need to guess transaction ID
Poisoning - birthday attack

•   Resolver sends multiple
    outbound queries for one
    record

•   Birthday paradox:
    increased collision rate

•   near 100% success rate for
    700 queries
Poisoning - weak PRNG
Poisoning - weak PRNG

•   2007/2008 BIND bugs: weak transaction ID randomization
    (simple LFSR)
Poisoning - weak PRNG

•   2007/2008 BIND bugs: weak transaction ID randomization
    (simple LFSR)

•   Static source port (53) up to BIND 9.4.1, so just 16 bits poor
    entropy
Poisoning - weak PRNG

•   2007/2008 BIND bugs: weak transaction ID randomization
    (simple LFSR)

•   Static source port (53) up to BIND 9.4.1, so just 16 bits poor
    entropy

•   Need up to 10 transaction IDs to predict the next
Poisoning - weak PRNG

•   2007/2008 BIND bugs: weak transaction ID randomization
    (simple LFSR)

•   Static source port (53) up to BIND 9.4.1, so just 16 bits poor
    entropy

•   Need up to 10 transaction IDs to predict the next

•   How can we do this?
Poisoning - Example BIND
                                           pine.nl A?

                                        CNAME c1.pine.nl
                                          c1.pine.nl A?            2

                                        CNAME c2.pine.nl

                                         c2.pine.nl A?
                 1
                                         A 213.156.1.80
            pine.nl A?


Attacker bank.com A? Resolver       bank.com A 213.156.1.80
                                                                  5          Evil server
             3
                         6
         bank.com A?                     bank.com A?


          bank.com A 213.156.1.80         4                 A 1.2.3.4         bank.com
Victim                                                    Lost in teh mail   auth server
                       7
Timeline of vulnerabilities
Vulnerabilities
•   1993: ‘additional’ section information accepted (Schuba)

•   1997: BIND has sequential transaction IDs (CERT)

•   2002: BIND multiple requests - birthday attack (Sacramento)

•   2007: BIND 8 & 9 weak ID randomization (Klein)

•   2008: Most resolvers use static source port and/or weak
    randomization (Kaminsky)

•   2010: pdns accepts malicious info in zones (anonymous)
Counter-measures
Counter-measures

•   Proper randomization of source port and transaction ID

    •   Temporary fix, protocol is still weak (32 bits entropy)

    •   A man-in-the-middle (or even just passive sniffer) can
        always poison the cache, regardless of entropy
DNSSEC


•   Message authentication

•   Message integrity

•   Authenticated denial of existence
DNSSEC
•   New record types: DNSKEY, RRSIG, DS, NSEC3

•   Public key cryptography

•   RRSIG contains signature for requested data

•   DNSKEY contains public key of a zone

•   Upstream DNS server has hash of key in DS record

•   NSEC3 for denial of existence
DNSSEC

•   Mostly backwards compatible with DNS

    •   requires EDNS extension and larger packets

•   .org and some ccTLDs are signed

    •   dig -t DNSKEY org @B2.ORG.AFILIAS-NST.org

    •   dig axfr . @k.root-servers.net | grep -w DS

•   .nl signed but not in root yet
References
•   http://www.secureworks.com/research/articles/dns-cache-poisoning

•   http://en.wikipedia.org/wiki/Domain_Name_System

•   http://www.trusteer.com/list-context/publications/bind-9-dns-cache-poisoning

•   http://code.google.com/p/nschaind/

•   http://www.firewall.cx/dns-query-format.php

•   https://www.dns-oarc.net/oarc/services/dnsentropy

•   http://tools.ietf.org/html/rfc3755

•   http://ds9a.nl/dnssec/

Contenu connexe

Tendances

DNS & DNSSEC
DNS & DNSSECDNS & DNSSEC
DNS & DNSSECAPNIC
 
DDoS - Distributed Denial of Service
DDoS - Distributed Denial of ServiceDDoS - Distributed Denial of Service
DDoS - Distributed Denial of ServiceEr. Shiva K. Shrestha
 
The rise of malware(ransomware)
The rise of malware(ransomware)The rise of malware(ransomware)
The rise of malware(ransomware)phexcom1
 
Presentation on Domain Name System
Presentation on Domain Name SystemPresentation on Domain Name System
Presentation on Domain Name SystemChinmay Joshi
 
Intrusion Detection Systems and Intrusion Prevention Systems
Intrusion Detection Systems  and Intrusion Prevention Systems Intrusion Detection Systems  and Intrusion Prevention Systems
Intrusion Detection Systems and Intrusion Prevention Systems Cleverence Kombe
 
Ceh v5 module 19 evading ids firewall and honeypot
Ceh v5 module 19 evading ids firewall and honeypotCeh v5 module 19 evading ids firewall and honeypot
Ceh v5 module 19 evading ids firewall and honeypotVi Tính Hoàng Nam
 
IP__ Address__Subnetting.pdf
IP__ Address__Subnetting.pdfIP__ Address__Subnetting.pdf
IP__ Address__Subnetting.pdffanuel22
 
Chapter 29 Domain Name System.ppt
Chapter 29 Domain Name System.pptChapter 29 Domain Name System.ppt
Chapter 29 Domain Name System.pptwebhostingguy
 
Network tunneling techniques
Network tunneling techniquesNetwork tunneling techniques
Network tunneling techniquesinbroker
 
Intrusion prevention systems
Intrusion prevention systemsIntrusion prevention systems
Intrusion prevention systemssamis
 
FireSIGHT Management Center (FMC) slides
FireSIGHT Management Center (FMC) slidesFireSIGHT Management Center (FMC) slides
FireSIGHT Management Center (FMC) slidesAmy Gerrie
 
Cybersecurity Attack Vectors: How to Protect Your Organization
Cybersecurity Attack Vectors: How to Protect Your OrganizationCybersecurity Attack Vectors: How to Protect Your Organization
Cybersecurity Attack Vectors: How to Protect Your OrganizationTriCorps Technologies
 
Carlos García - Pentesting Active Directory Forests [rooted2019]
Carlos García - Pentesting Active Directory Forests [rooted2019]Carlos García - Pentesting Active Directory Forests [rooted2019]
Carlos García - Pentesting Active Directory Forests [rooted2019]RootedCON
 

Tendances (20)

DNS Security
DNS SecurityDNS Security
DNS Security
 
Firewall presentation
Firewall presentationFirewall presentation
Firewall presentation
 
Ransomware
RansomwareRansomware
Ransomware
 
DNS & DNSSEC
DNS & DNSSECDNS & DNSSEC
DNS & DNSSEC
 
DDoS - Distributed Denial of Service
DDoS - Distributed Denial of ServiceDDoS - Distributed Denial of Service
DDoS - Distributed Denial of Service
 
The rise of malware(ransomware)
The rise of malware(ransomware)The rise of malware(ransomware)
The rise of malware(ransomware)
 
Network security
Network securityNetwork security
Network security
 
Presentation on Domain Name System
Presentation on Domain Name SystemPresentation on Domain Name System
Presentation on Domain Name System
 
Intrusion Detection Systems and Intrusion Prevention Systems
Intrusion Detection Systems  and Intrusion Prevention Systems Intrusion Detection Systems  and Intrusion Prevention Systems
Intrusion Detection Systems and Intrusion Prevention Systems
 
Ceh v5 module 19 evading ids firewall and honeypot
Ceh v5 module 19 evading ids firewall and honeypotCeh v5 module 19 evading ids firewall and honeypot
Ceh v5 module 19 evading ids firewall and honeypot
 
DHCP
DHCPDHCP
DHCP
 
IP__ Address__Subnetting.pdf
IP__ Address__Subnetting.pdfIP__ Address__Subnetting.pdf
IP__ Address__Subnetting.pdf
 
Chapter 29 Domain Name System.ppt
Chapter 29 Domain Name System.pptChapter 29 Domain Name System.ppt
Chapter 29 Domain Name System.ppt
 
Dns ppt
Dns pptDns ppt
Dns ppt
 
Network tunneling techniques
Network tunneling techniquesNetwork tunneling techniques
Network tunneling techniques
 
Intrusion prevention systems
Intrusion prevention systemsIntrusion prevention systems
Intrusion prevention systems
 
FireSIGHT Management Center (FMC) slides
FireSIGHT Management Center (FMC) slidesFireSIGHT Management Center (FMC) slides
FireSIGHT Management Center (FMC) slides
 
Intro to DNS
Intro to DNSIntro to DNS
Intro to DNS
 
Cybersecurity Attack Vectors: How to Protect Your Organization
Cybersecurity Attack Vectors: How to Protect Your OrganizationCybersecurity Attack Vectors: How to Protect Your Organization
Cybersecurity Attack Vectors: How to Protect Your Organization
 
Carlos García - Pentesting Active Directory Forests [rooted2019]
Carlos García - Pentesting Active Directory Forests [rooted2019]Carlos García - Pentesting Active Directory Forests [rooted2019]
Carlos García - Pentesting Active Directory Forests [rooted2019]
 

En vedette

The internet has trust issues - about StartCom and WoSign
The internet has trust issues - about StartCom and WoSignThe internet has trust issues - about StartCom and WoSign
The internet has trust issues - about StartCom and WoSignChristiaan Ottow
 
DNS/DNSSEC by Nurul Islam
DNS/DNSSEC by Nurul IslamDNS/DNSSEC by Nurul Islam
DNS/DNSSEC by Nurul IslamMyNOG
 
Module 5 Sniffers
Module 5  SniffersModule 5  Sniffers
Module 5 Sniffersleminhvuong
 
The Top Skills That Can Get You Hired in 2017
The Top Skills That Can Get You Hired in 2017The Top Skills That Can Get You Hired in 2017
The Top Skills That Can Get You Hired in 2017LinkedIn
 

En vedette (9)

Grey H@t - DNS Cache Poisoning
Grey H@t - DNS Cache PoisoningGrey H@t - DNS Cache Poisoning
Grey H@t - DNS Cache Poisoning
 
DNS Cache White Paper
DNS Cache White PaperDNS Cache White Paper
DNS Cache White Paper
 
The internet has trust issues - about StartCom and WoSign
The internet has trust issues - about StartCom and WoSignThe internet has trust issues - about StartCom and WoSign
The internet has trust issues - about StartCom and WoSign
 
DNS/DNSSEC by Nurul Islam
DNS/DNSSEC by Nurul IslamDNS/DNSSEC by Nurul Islam
DNS/DNSSEC by Nurul Islam
 
Final White Paper_
Final White Paper_Final White Paper_
Final White Paper_
 
Module 5 Sniffers
Module 5  SniffersModule 5  Sniffers
Module 5 Sniffers
 
Arp Cache Poisoning
Arp Cache PoisoningArp Cache Poisoning
Arp Cache Poisoning
 
Introduction to DNS
Introduction to DNSIntroduction to DNS
Introduction to DNS
 
The Top Skills That Can Get You Hired in 2017
The Top Skills That Can Get You Hired in 2017The Top Skills That Can Get You Hired in 2017
The Top Skills That Can Get You Hired in 2017
 

Similaire à DNS Cache Poisoning

DNS in IR: Collection, Analysis and Response
DNS in IR: Collection, Analysis and ResponseDNS in IR: Collection, Analysis and Response
DNS in IR: Collection, Analysis and Responsepm123008
 
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 Survival Guide.
DNS Survival Guide.DNS Survival Guide.
DNS Survival Guide.Qrator Labs
 
DNS Survival Guide
DNS Survival GuideDNS Survival Guide
DNS Survival GuideAPNIC
 
Day 2 Dns Cert 4a Cache Poisoning
Day 2   Dns Cert 4a Cache PoisoningDay 2   Dns Cert 4a Cache Poisoning
Day 2 Dns Cert 4a Cache Poisoningvngundi
 
Advanced DNS/DHCP for Novell eDirectory Environments
Advanced DNS/DHCP for Novell eDirectory EnvironmentsAdvanced DNS/DHCP for Novell eDirectory Environments
Advanced DNS/DHCP for Novell eDirectory EnvironmentsNovell
 
Whalebone-UKNOF44security992_new_impl.pptx
Whalebone-UKNOF44security992_new_impl.pptxWhalebone-UKNOF44security992_new_impl.pptx
Whalebone-UKNOF44security992_new_impl.pptxAns Sembiring
 
Implementing Domain Name
Implementing Domain NameImplementing Domain Name
Implementing Domain NameNapoleon NV
 
The latest news in the DNS resolution: DNSSEC
The latest news in the DNS resolution: DNSSECThe latest news in the DNS resolution: DNSSEC
The latest news in the DNS resolution: DNSSECWhalebone, s.r.o.
 
CNIT 40: 4: Monitoring and detecting security breaches
CNIT 40: 4: Monitoring and detecting security breachesCNIT 40: 4: Monitoring and detecting security breaches
CNIT 40: 4: Monitoring and detecting security breachesSam Bowne
 
NZNOG 2013 - Experiments in DNSSEC
NZNOG 2013 - Experiments in DNSSECNZNOG 2013 - Experiments in DNSSEC
NZNOG 2013 - Experiments in DNSSECAPNIC
 
DNS_Tutorial 2.pptx
DNS_Tutorial 2.pptxDNS_Tutorial 2.pptx
DNS_Tutorial 2.pptxviditsir
 

Similaire à DNS Cache Poisoning (20)

DNS in IR: Collection, Analysis and Response
DNS in IR: Collection, Analysis and ResponseDNS in IR: Collection, Analysis and Response
DNS in IR: Collection, Analysis and Response
 
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 Survival Guide.
DNS Survival Guide.DNS Survival Guide.
DNS Survival Guide.
 
DNS Survival Guide
DNS Survival GuideDNS Survival Guide
DNS Survival Guide
 
2_Chapter 2_DNS.pptx
2_Chapter 2_DNS.pptx2_Chapter 2_DNS.pptx
2_Chapter 2_DNS.pptx
 
Day 2 Dns Cert 4a Cache Poisoning
Day 2   Dns Cert 4a Cache PoisoningDay 2   Dns Cert 4a Cache Poisoning
Day 2 Dns Cert 4a Cache Poisoning
 
Advanced DNS/DHCP for Novell eDirectory Environments
Advanced DNS/DHCP for Novell eDirectory EnvironmentsAdvanced DNS/DHCP for Novell eDirectory Environments
Advanced DNS/DHCP for Novell eDirectory Environments
 
ION Islamabad - Deploying DNSSEC
ION Islamabad - Deploying DNSSECION Islamabad - Deploying DNSSEC
ION Islamabad - Deploying DNSSEC
 
Whalebone-UKNOF44security992_new_impl.pptx
Whalebone-UKNOF44security992_new_impl.pptxWhalebone-UKNOF44security992_new_impl.pptx
Whalebone-UKNOF44security992_new_impl.pptx
 
Implementing Domain Name
Implementing Domain NameImplementing Domain Name
Implementing Domain Name
 
Hands-on DNSSEC Deployment
Hands-on DNSSEC DeploymentHands-on DNSSEC Deployment
Hands-on DNSSEC Deployment
 
Dns security
Dns securityDns security
Dns security
 
The latest news in the DNS resolution: DNSSEC
The latest news in the DNS resolution: DNSSECThe latest news in the DNS resolution: DNSSEC
The latest news in the DNS resolution: DNSSEC
 
6421 b Module-03
6421 b Module-036421 b Module-03
6421 b Module-03
 
CNIT 40: 4: Monitoring and detecting security breaches
CNIT 40: 4: Monitoring and detecting security breachesCNIT 40: 4: Monitoring and detecting security breaches
CNIT 40: 4: Monitoring and detecting security breaches
 
1 technical-dns-workshop-day1
1 technical-dns-workshop-day11 technical-dns-workshop-day1
1 technical-dns-workshop-day1
 
NZNOG 2013 - Experiments in DNSSEC
NZNOG 2013 - Experiments in DNSSECNZNOG 2013 - Experiments in DNSSEC
NZNOG 2013 - Experiments in DNSSEC
 
Extended DNS Errors
Extended DNS ErrorsExtended DNS Errors
Extended DNS Errors
 
DNS_Tutorial 2.pptx
DNS_Tutorial 2.pptxDNS_Tutorial 2.pptx
DNS_Tutorial 2.pptx
 
2 technical-dns-workshop-day1
2 technical-dns-workshop-day12 technical-dns-workshop-day1
2 technical-dns-workshop-day1
 

Dernier

The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 

Dernier (20)

The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 

DNS Cache Poisoning

  • 1. DNS cache poisoning Christiaan Ottow, christiaan.ottow@pine.nl
  • 2. Contents • Overview of DNS • About cache poisoning • Timeline of vulnerabilities • Counter-measures
  • 4. DNS overview • Name to IP and IP to name translation • 1983 by IETF • 114 RFCs • TCP & UDP port 53 • Key concept: authoritative and recursive (caching) DNS servers
  • 5. DNS - servers • Authoritative server • Responsible for one or more zones • Answers queries based on its zones • Recursing server (resolver, recursor, cache) • No records of its own, just cache • Queries authoritative servers for the answer
  • 6. DNS - zones • Zone • Domain name, e.g. pine.nl • Contains resource records (RRs) • Stored on authoritative servers • Usually master and slave(s) • SOA record • E-mail, serial, refresh, retry, expire, minTTL
  • 7. DNS - records • Records are the actual mappings of hostnames to IP addresses • Different types, not all give an IP address • Common: A, AAAA, NS, CNAME, MX • Examples • pine.nl. 86400 IN A 213.156.1.80 • www.pine.nl. 86400 IN CNAME sechost.pine.nl. • pine.nl. 86400 IN MX 1 mx.pine.nl.
  • 8. DNS - Wire format • Server on UDP/TCP port 53 (TCP for large query/response) • Transaction ID • Flags • e.g. recursion desired, authoritative, is-response, truncated • Sections • Question, Answer, Authority, Additional
  • 9. DNS - Wire format
  • 10. DNS - operation Root server pine.nl A ? k.root-servers.net nl. NS ns1.nic.nl ns1.nic.nl A 193.176.144.2 pine.nl A ? pine.nl A ? pine.nl NS ns1.pine.nl Client Resolver ns1.pine.nl A 213.156.2.1 ccTLD server pine.nl A 213.156.1.80 ns1.nic.nl pine.nl A? pine.nl A 213.156.1.80 Authoritative server ns1.pine.nl
  • 11. DNS - operation • Every server is asked the same question • Every server responds with what it knows towards the answer • Only the definitive answer is given in the “answer” section • A server may give additional info with its response • auth section: “NS for nl. is ns1.nic.nl.” • additional section: “ns1.nic.nl is at 193.176.144.2”
  • 12. DNS - operation Authority section Root server pine.nl A ? k.root-servers.net Additional section nl. NS ns1.nic.nl ns1.nic.nl A 193.176.144.2 pine.nl A ? pine.nl A ? pine.nl NS ns1.pine.nl Client Resolver ns1.pine.nl A 213.156.2.1 ccTLD server pine.nl A 213.156.1.80 ns1.nic.nl pine.nl A? pine.nl A 213.156.1.80 Authoritative server ns1.pine.nl Answer section
  • 14. DNS - operation • What if nameserver voor pine.nl is ns1.pine.nl?
  • 15. DNS - operation • What if nameserver voor pine.nl is ns1.pine.nl? • Glue records
  • 16. DNS - operation • What if nameserver voor pine.nl is ns1.pine.nl? • Glue records • Additional section
  • 17. DNS - operation • What if nameserver voor pine.nl is ns1.pine.nl? • Glue records • Additional section • Extra info the server has that you will probably need
  • 18. DNS - operation • What if nameserver voor pine.nl is ns1.pine.nl? • Glue records • Additional section • Extra info the server has that you will probably need • Prevents an endless loop
  • 20. Poisoning - what? • Entering specific (non-authoritative) RRs into a resolver cache • Resolver will provide this information to all clients that query it
  • 21. Poisoning - why? • Suppose Alice wants to login to secure.bank.net • Eve has poisoned her resolver’s cache • secure.bank.net may now resolve to the address of Eves computer • DNS cache poisoning results in MITM attacks or excellent phishing
  • 22. Poisoning - how? • Faulty protocol implementations • Send unauthoritative additional RRs • Reply before authoritative answer • Brute force - for n replies, n/65535 success rate for static port • Birthday attack • Weak PRNG exploitation
  • 24. Poisoning - brute force • Resolver uses UDP, thus stateless
  • 25. Poisoning - brute force • Resolver uses UDP, thus stateless • Reply as the authoritative server would but with different answer
  • 26. Poisoning - brute force • Resolver uses UDP, thus stateless • Reply as the authoritative server would but with different answer • Need to guess the source port of the resolver (sometimes static)
  • 27. Poisoning - brute force • Resolver uses UDP, thus stateless • Reply as the authoritative server would but with different answer • Need to guess the source port of the resolver (sometimes static) • Need to guess transaction ID
  • 28. Poisoning - birthday attack • Resolver sends multiple outbound queries for one record • Birthday paradox: increased collision rate • near 100% success rate for 700 queries
  • 30. Poisoning - weak PRNG • 2007/2008 BIND bugs: weak transaction ID randomization (simple LFSR)
  • 31. Poisoning - weak PRNG • 2007/2008 BIND bugs: weak transaction ID randomization (simple LFSR) • Static source port (53) up to BIND 9.4.1, so just 16 bits poor entropy
  • 32. Poisoning - weak PRNG • 2007/2008 BIND bugs: weak transaction ID randomization (simple LFSR) • Static source port (53) up to BIND 9.4.1, so just 16 bits poor entropy • Need up to 10 transaction IDs to predict the next
  • 33. Poisoning - weak PRNG • 2007/2008 BIND bugs: weak transaction ID randomization (simple LFSR) • Static source port (53) up to BIND 9.4.1, so just 16 bits poor entropy • Need up to 10 transaction IDs to predict the next • How can we do this?
  • 34. Poisoning - Example BIND pine.nl A? CNAME c1.pine.nl c1.pine.nl A? 2 CNAME c2.pine.nl c2.pine.nl A? 1 A 213.156.1.80 pine.nl A? Attacker bank.com A? Resolver bank.com A 213.156.1.80 5 Evil server 3 6 bank.com A? bank.com A? bank.com A 213.156.1.80 4 A 1.2.3.4 bank.com Victim Lost in teh mail auth server 7
  • 36. Vulnerabilities • 1993: ‘additional’ section information accepted (Schuba) • 1997: BIND has sequential transaction IDs (CERT) • 2002: BIND multiple requests - birthday attack (Sacramento) • 2007: BIND 8 & 9 weak ID randomization (Klein) • 2008: Most resolvers use static source port and/or weak randomization (Kaminsky) • 2010: pdns accepts malicious info in zones (anonymous)
  • 38. Counter-measures • Proper randomization of source port and transaction ID • Temporary fix, protocol is still weak (32 bits entropy) • A man-in-the-middle (or even just passive sniffer) can always poison the cache, regardless of entropy
  • 39. DNSSEC • Message authentication • Message integrity • Authenticated denial of existence
  • 40. DNSSEC • New record types: DNSKEY, RRSIG, DS, NSEC3 • Public key cryptography • RRSIG contains signature for requested data • DNSKEY contains public key of a zone • Upstream DNS server has hash of key in DS record • NSEC3 for denial of existence
  • 41. DNSSEC • Mostly backwards compatible with DNS • requires EDNS extension and larger packets • .org and some ccTLDs are signed • dig -t DNSKEY org @B2.ORG.AFILIAS-NST.org • dig axfr . @k.root-servers.net | grep -w DS • .nl signed but not in root yet
  • 42. References • http://www.secureworks.com/research/articles/dns-cache-poisoning • http://en.wikipedia.org/wiki/Domain_Name_System • http://www.trusteer.com/list-context/publications/bind-9-dns-cache-poisoning • http://code.google.com/p/nschaind/ • http://www.firewall.cx/dns-query-format.php • https://www.dns-oarc.net/oarc/services/dnsentropy • http://tools.ietf.org/html/rfc3755 • http://ds9a.nl/dnssec/

Notes de l'éditeur