SlideShare a Scribd company logo
DNS Security for CERTs
- Attack Scenarios & Demonstrations –
           Cache Poisoning


              Chris Evans
              Delta Risk, LLC

               7 March 2010


                                        1
What You Will Need for the Exercise

• Your Ubuntu VM
   – VMWare Web Console Access
   – SSH with X11 Forwarding (for Advanced Users)


• Do a query for www.tld1 and verify its IP address
  before the attack is launched:
   – 192.168.101.50




                                                      2
Description

• A Change in Recursive DNS Server Causes Spoofed or
  Incorrect Resolutions
   – Attack Doesn’t Target Registry Architecture


                         DNS




      Google.com
                     ISP 1




                         DNS
      Fake Google
                     ISP 2
                                  Resolves Differently Than



                                                              3
Description

• Cache poisoning attacks target a specific DNS server, and
  therefore, only the users which use that DNS server
   – This doesn’t fit the “get most bang for the buck” of typical
     hackers out for fame and glory
   – BUT, the attack can be very insidious, difficult to detect and
     completely transparent to the victim

• These attacks occur infrequently, or, are just not being
  detected and reported.




                                                                      4
Case Study – External Poisoning

• Unverified report of a Brazilian
  bank victimized by cache
  poisoning attack.
• Attack targeted local ISP DNS
  server
• ISP reported only “1%” of its
  users were affected



                                     Eweek.com 4/22/09




                                                         5
Case Study – External Poisoning

• Hackers poisoned local ISP DNS server and
  redirected users to a login page that looked just like
  the Bank’s login page
• Solicited usernames, passwords, and other
  information not normally asked for by the Bank at
  login




                         Actual Bradesco Login Page

                                                           6
Case Study – Internal Poisoning

 • Partido Colorado – political statement made by one
   organization against another during an election




Attacker Modifies Upstream DNS Records
www.partidocolorado.org.   3600  IN      A   66.249.01.121




                                                             7
Case Study – Internal Poisoning

 • The local ISP (Copaco) modified its own recursive name
   servers to redirect users looking for partidocolorado.org to
   a state-run news service




                                                        201.217.51.114


Attacker Modified Upstream DNS Records
www.partidocolorado.org.   3600  IN      A    66.249.01.121
                                                                  8
Attack Demonstration
                                   External Poisoning


              DNS Cache                  Web Server
                           DNS
                          Server




                                             Hacker
 Normal
 Request

                                                      Poisoned
                                                      Request
     Victim



                                   Web Server


                                                             9
Demonstration – Attacker View
                                  _       _
               _                 | |     (_)_
  ____    ____| |_ ____ ___ ____ | | ___ _| |_
|       / _ ) _)/ _ |/___) _ | |/ _ | | _)
| | | ( (/ /| |_( ( | |___ | | | | | |_| | | |__
|_|_|_|____)___)_||_(___/| ||_/|_|___/|_|___)
                           |_|


       =[   msf v3.2-release
+ -- --=[   320 exploits - 217 payloads
+ -- --=[   20 encoders - 6 nops
       =[   99 aux

msf auxiliary(bailiwicked_host) >            Name: DNS BailiWicked Host Attack
                                          Version: 5794

                                    Provided by:
                                      I)ruid <druid@caughq.org>
                                      hdm <hdm@metasploit.com>

                                    Basic options:
                                      Name      Current Setting   Required   Description
                                      ----      ---------------   --------   -----------
                                      HOSTNAME www.tld1           yes        Hostname to hijack
                                      NEWADDR   192.168.85.5      yes        New address for hostname
                                      RECONS    192.168.101.10    yes        The nameserver used for recon
                                      RHOST     192.168.80.10     yes        The target address
                                      SRCADDR   Real              yes        The source address to use for
                                      SRCPORT   53                yes        The target server's source
                                      TTL       37620             yes        The TTL for the malicious host
                                      XIDS      0                 yes        The number of XIDs to try for



                                                                                                     10
Demonstration – Attacker View (cont.)


[*]   Targeting nameserver 192.168.80.10 for injection of www.tld1. as 192.168.85.5
[*]   Querying recon nameserver for tld1.'s nameservers...
[*]    Got an NS record: tld1.                   180     IN      NS      ns1.tld1.
[*]     Querying recon nameserver for address of ns1.tld1....
[*]      Got an A record: ns1.tld1.               180     IN      A        192.168.101.10
[*]       Checking Authoritativeness: Querying 192.168.101.10 for tld1....
[*]       ns1.tld1. is authoritative for tld1., adding to list of nameservers to spoof as
[*]   Calculating the number of spoofed replies to send per query...
[*]     race calc: 100 queries | min/max/avg time: 0.0/0.06/0.0 | min/max/avg replies: 0/6/3
[*]   Sending 4 spoofed replies from each nameserver (1) for each query
[*]   Attempting to inject a poison record for www.tld1. into 192.168.80.10:53...
...
...
...
...
[*]   Poisoning successful after 61000 queries and 250000 responses: www.tld1 == 192.168.85.5
[*]   TTL: 37619 DATA: #<Resolv::DNS::Resource::IN::A:0xb6b28688>
[*]   Auxiliary module execution completed




                                                                        Attack
                                                                     Successful!!!!!

                                                                                                11
Demonstration – Server View

• Wireshark Capture
  – Note the queries like “031PtyJamG6o.tld1”




                                                12
Demonstration – User View

• Please open a browser and connect to the webmail
  server: http://192.168.101.50/squirrelmail
   – Login as: studentX
   – Password: password
• Examine the message in your inbox
   – Looks realistic? ( Use your imagination  )
   – The URL certainly does – it matches the web registry
     system URL.
• Click on the link (it won’t hurt you!)
   – Does this look like the login page of the web registry
     system?


                                                              13
Demonstration – User View

        1

                            3

2
                                 May look legit
                                   but is the
                                hacker’s IP and
                                 webserver!!!!!




                                             14
Impact

• Users are dependent on the answers from the DNS
  being accurate and legitimate

• Cache Poisoning can be used to create very realistic
  phishing attacks, that are more likely to succeed,
  because they appear to use real URLs.
   – Users are more attune to “strange” URLs now than
     several years ago, but cache poisoning allows an
     attacker to use a “normal” URL




                                                         15
Mitigation & Response Strategies

• DNSSEC – will mitigate effect of external poisoning
  attacks, but will not address content “issues” at the
  authoritative server
• SSL-Based Logins – but subject to user participation!
• Server validation techniques like “site keys” – but
  again, subject to user participation!
• Proactive monitoring of recursive servers – not
  necessarily tractable – but maybe useful for High
  Value Domains



                                                          16
Mitigation & Response Strategies

• Know WHO to contact at the ISPs within your span
  of control
• Know the procedures for flushing the DNS cache –
  you may have to instruct operators how to do this!
• Information Sharing – if you’re the victim of an
  attack – share the details of the attack within the
  community – you may prevent someone else from
  becoming a victim




                                                        17
Questions?




             ?
                 18

More Related Content

PPTX
Grey H@t - DNS Cache Poisoning
PDF
There's no place like 127.0.0.1 - Achieving "reliable" DNS rebinding in moder...
PDF
Namespaces for Local Networks
PDF
DNS/DNSSEC by Nurul Islam
PDF
Part 2 - Local Name Resolution in Windows Networks
PDF
Part 3 - Local Name Resolution in Linux, FreeBSD and macOS/iOS
PDF
Windows 2012 and DNSSEC
PDF
DNSSEC Tutorial, by Champika Wijayatunga [APNIC 38]
Grey H@t - DNS Cache Poisoning
There's no place like 127.0.0.1 - Achieving "reliable" DNS rebinding in moder...
Namespaces for Local Networks
DNS/DNSSEC by Nurul Islam
Part 2 - Local Name Resolution in Windows Networks
Part 3 - Local Name Resolution in Linux, FreeBSD and macOS/iOS
Windows 2012 and DNSSEC
DNSSEC Tutorial, by Champika Wijayatunga [APNIC 38]

What's hot (20)

PDF
Understanding and Deploying DNSSEC, by Champika Wijayatunga [APRICOT 2015]
ODT
RHCE FINAL Questions and Answers
PDF
[India Merge World Tour] Meru Networks
PPTX
HKNOG 5.0 - NSEC caching
PDF
Troubleshooting Tips from a Docker Support Engineer
PDF
Yeti DNS - Experimenting at the root
PPTX
Cloudstone - Sharpening Your Weapons Through Big Data
PDF
2016 JavaOne Deconstructing REST Security
PDF
How to send DNS over anything encrypted
PDF
Red vs Blue- Modern Atice Directory Attacks, Detection & Protection by Sean M...
PDF
2017 dev nexus_deconstructing_rest_security
PDF
Keeping DNS server up-and-running with “runit
PDF
Windows Server 2016 Webinar
PDF
Mens jan piet_dnssec-in-practice
PDF
Database Hardware Benchmarking
PPTX
Putting Wings on the Elephant
PPTX
Collaborate instant cloning_kyle
KEY
Apache Wizardry - Ohio Linux 2011
PDF
End-to-End Analysis of a Domain Generating Algorithm Malware Family
PDF
Using Algorithms to Brute Force Algorithms...A Journey Through Time and Names...
Understanding and Deploying DNSSEC, by Champika Wijayatunga [APRICOT 2015]
RHCE FINAL Questions and Answers
[India Merge World Tour] Meru Networks
HKNOG 5.0 - NSEC caching
Troubleshooting Tips from a Docker Support Engineer
Yeti DNS - Experimenting at the root
Cloudstone - Sharpening Your Weapons Through Big Data
2016 JavaOne Deconstructing REST Security
How to send DNS over anything encrypted
Red vs Blue- Modern Atice Directory Attacks, Detection & Protection by Sean M...
2017 dev nexus_deconstructing_rest_security
Keeping DNS server up-and-running with “runit
Windows Server 2016 Webinar
Mens jan piet_dnssec-in-practice
Database Hardware Benchmarking
Putting Wings on the Elephant
Collaborate instant cloning_kyle
Apache Wizardry - Ohio Linux 2011
End-to-End Analysis of a Domain Generating Algorithm Malware Family
Using Algorithms to Brute Force Algorithms...A Journey Through Time and Names...
Ad

Similar to Day 2 Dns Cert 4a Cache Poisoning (20)

PDF
Day 2 Dns Cert 4c Malicious Use
PPTX
IT Infrastrucutre Security
PDF
Dns Hardening Linux Os
PDF
Day 2 Dns Cert 4b Name Server Redirection
PPTX
lecture5.pptxJHKGJFHDGTFGYIUOIUIPIOIPUOHIYGUYFGIH
PPTX
lecture5.pptx
PDF
Hitbkl 2012
 
PDF
SANS xmas 2011 Hacking Submission
PPT
Bsides-Philly-2016-Finding-A-Companys-BreakPoint
PDF
The Dirty Little Secrets They Didn’t Teach You In Pentesting Class
PDF
DNS Attacks
PPT
Security & ethical hacking
PDF
Handle Explotion of Remote System Without Being Online (Merchant Bhaumik)
PDF
Day 2 Dns Cert 4 Scenarios
PDF
DNS Cache Poisoning
PDF
business
PPT
Dns protocol design attacks and security
PDF
Penetration Testing is the Art of the Manipulation
PPTX
Network And Application Layer Attacks
PDF
DNSSEC: The Antidote to DNS Cache Poisoning and Other DNS Attacks
Day 2 Dns Cert 4c Malicious Use
IT Infrastrucutre Security
Dns Hardening Linux Os
Day 2 Dns Cert 4b Name Server Redirection
lecture5.pptxJHKGJFHDGTFGYIUOIUIPIOIPUOHIYGUYFGIH
lecture5.pptx
Hitbkl 2012
 
SANS xmas 2011 Hacking Submission
Bsides-Philly-2016-Finding-A-Companys-BreakPoint
The Dirty Little Secrets They Didn’t Teach You In Pentesting Class
DNS Attacks
Security & ethical hacking
Handle Explotion of Remote System Without Being Online (Merchant Bhaumik)
Day 2 Dns Cert 4 Scenarios
DNS Cache Poisoning
business
Dns protocol design attacks and security
Penetration Testing is the Art of the Manipulation
Network And Application Layer Attacks
DNSSEC: The Antidote to DNS Cache Poisoning and Other DNS Attacks
Ad

More from vngundi (8)

PDF
Anatomy of a CERT - Gordon Love, Symantec
PDF
Dealing With Security Threats
PDF
Cyber Security Strategies and Approaches
PDF
Day 2 Dns Cert 3 Dns Organizations
PDF
Day 1 Large Scale Attacks
PDF
Day 1 From CERT To NCSC
PDF
Day 1 Enisa Setting Up A Csirt
PDF
Day 1 Coop Banks
Anatomy of a CERT - Gordon Love, Symantec
Dealing With Security Threats
Cyber Security Strategies and Approaches
Day 2 Dns Cert 3 Dns Organizations
Day 1 Large Scale Attacks
Day 1 From CERT To NCSC
Day 1 Enisa Setting Up A Csirt
Day 1 Coop Banks

Recently uploaded (20)

PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Microsoft Solutions Partner Drive Digital Transformation with D365.pdf
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
Transform Your ITIL® 4 & ITSM Strategy with AI in 2025.pdf
PDF
Univ-Connecticut-ChatGPT-Presentaion.pdf
PDF
Assigned Numbers - 2025 - Bluetooth® Document
PDF
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
PDF
Approach and Philosophy of On baking technology
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
NewMind AI Weekly Chronicles - August'25-Week II
PDF
Encapsulation theory and applications.pdf
PDF
Accuracy of neural networks in brain wave diagnosis of schizophrenia
PDF
project resource management chapter-09.pdf
PDF
A comparative study of natural language inference in Swahili using monolingua...
PDF
Mushroom cultivation and it's methods.pdf
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PPTX
Tartificialntelligence_presentation.pptx
PDF
gpt5_lecture_notes_comprehensive_20250812015547.pdf
PPTX
1. Introduction to Computer Programming.pptx
PDF
A comparative analysis of optical character recognition models for extracting...
MIND Revenue Release Quarter 2 2025 Press Release
Microsoft Solutions Partner Drive Digital Transformation with D365.pdf
Programs and apps: productivity, graphics, security and other tools
Transform Your ITIL® 4 & ITSM Strategy with AI in 2025.pdf
Univ-Connecticut-ChatGPT-Presentaion.pdf
Assigned Numbers - 2025 - Bluetooth® Document
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
Approach and Philosophy of On baking technology
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
NewMind AI Weekly Chronicles - August'25-Week II
Encapsulation theory and applications.pdf
Accuracy of neural networks in brain wave diagnosis of schizophrenia
project resource management chapter-09.pdf
A comparative study of natural language inference in Swahili using monolingua...
Mushroom cultivation and it's methods.pdf
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Tartificialntelligence_presentation.pptx
gpt5_lecture_notes_comprehensive_20250812015547.pdf
1. Introduction to Computer Programming.pptx
A comparative analysis of optical character recognition models for extracting...

Day 2 Dns Cert 4a Cache Poisoning

  • 1. DNS Security for CERTs - Attack Scenarios & Demonstrations – Cache Poisoning Chris Evans Delta Risk, LLC 7 March 2010 1
  • 2. What You Will Need for the Exercise • Your Ubuntu VM – VMWare Web Console Access – SSH with X11 Forwarding (for Advanced Users) • Do a query for www.tld1 and verify its IP address before the attack is launched: – 192.168.101.50 2
  • 3. Description • A Change in Recursive DNS Server Causes Spoofed or Incorrect Resolutions – Attack Doesn’t Target Registry Architecture DNS Google.com ISP 1 DNS Fake Google ISP 2 Resolves Differently Than 3
  • 4. Description • Cache poisoning attacks target a specific DNS server, and therefore, only the users which use that DNS server – This doesn’t fit the “get most bang for the buck” of typical hackers out for fame and glory – BUT, the attack can be very insidious, difficult to detect and completely transparent to the victim • These attacks occur infrequently, or, are just not being detected and reported. 4
  • 5. Case Study – External Poisoning • Unverified report of a Brazilian bank victimized by cache poisoning attack. • Attack targeted local ISP DNS server • ISP reported only “1%” of its users were affected Eweek.com 4/22/09 5
  • 6. Case Study – External Poisoning • Hackers poisoned local ISP DNS server and redirected users to a login page that looked just like the Bank’s login page • Solicited usernames, passwords, and other information not normally asked for by the Bank at login Actual Bradesco Login Page 6
  • 7. Case Study – Internal Poisoning • Partido Colorado – political statement made by one organization against another during an election Attacker Modifies Upstream DNS Records www.partidocolorado.org. 3600 IN A 66.249.01.121 7
  • 8. Case Study – Internal Poisoning • The local ISP (Copaco) modified its own recursive name servers to redirect users looking for partidocolorado.org to a state-run news service 201.217.51.114 Attacker Modified Upstream DNS Records www.partidocolorado.org. 3600 IN A 66.249.01.121 8
  • 9. Attack Demonstration External Poisoning DNS Cache Web Server DNS Server Hacker Normal Request Poisoned Request Victim Web Server 9
  • 10. Demonstration – Attacker View _ _ _ | | (_)_ ____ ____| |_ ____ ___ ____ | | ___ _| |_ | / _ ) _)/ _ |/___) _ | |/ _ | | _) | | | ( (/ /| |_( ( | |___ | | | | | |_| | | |__ |_|_|_|____)___)_||_(___/| ||_/|_|___/|_|___) |_| =[ msf v3.2-release + -- --=[ 320 exploits - 217 payloads + -- --=[ 20 encoders - 6 nops =[ 99 aux msf auxiliary(bailiwicked_host) > Name: DNS BailiWicked Host Attack Version: 5794 Provided by: I)ruid <druid@caughq.org> hdm <hdm@metasploit.com> Basic options: Name Current Setting Required Description ---- --------------- -------- ----------- HOSTNAME www.tld1 yes Hostname to hijack NEWADDR 192.168.85.5 yes New address for hostname RECONS 192.168.101.10 yes The nameserver used for recon RHOST 192.168.80.10 yes The target address SRCADDR Real yes The source address to use for SRCPORT 53 yes The target server's source TTL 37620 yes The TTL for the malicious host XIDS 0 yes The number of XIDs to try for 10
  • 11. Demonstration – Attacker View (cont.) [*] Targeting nameserver 192.168.80.10 for injection of www.tld1. as 192.168.85.5 [*] Querying recon nameserver for tld1.'s nameservers... [*] Got an NS record: tld1. 180 IN NS ns1.tld1. [*] Querying recon nameserver for address of ns1.tld1.... [*] Got an A record: ns1.tld1. 180 IN A 192.168.101.10 [*] Checking Authoritativeness: Querying 192.168.101.10 for tld1.... [*] ns1.tld1. is authoritative for tld1., adding to list of nameservers to spoof as [*] Calculating the number of spoofed replies to send per query... [*] race calc: 100 queries | min/max/avg time: 0.0/0.06/0.0 | min/max/avg replies: 0/6/3 [*] Sending 4 spoofed replies from each nameserver (1) for each query [*] Attempting to inject a poison record for www.tld1. into 192.168.80.10:53... ... ... ... ... [*] Poisoning successful after 61000 queries and 250000 responses: www.tld1 == 192.168.85.5 [*] TTL: 37619 DATA: #<Resolv::DNS::Resource::IN::A:0xb6b28688> [*] Auxiliary module execution completed Attack Successful!!!!! 11
  • 12. Demonstration – Server View • Wireshark Capture – Note the queries like “031PtyJamG6o.tld1” 12
  • 13. Demonstration – User View • Please open a browser and connect to the webmail server: http://192.168.101.50/squirrelmail – Login as: studentX – Password: password • Examine the message in your inbox – Looks realistic? ( Use your imagination  ) – The URL certainly does – it matches the web registry system URL. • Click on the link (it won’t hurt you!) – Does this look like the login page of the web registry system? 13
  • 14. Demonstration – User View 1 3 2 May look legit but is the hacker’s IP and webserver!!!!! 14
  • 15. Impact • Users are dependent on the answers from the DNS being accurate and legitimate • Cache Poisoning can be used to create very realistic phishing attacks, that are more likely to succeed, because they appear to use real URLs. – Users are more attune to “strange” URLs now than several years ago, but cache poisoning allows an attacker to use a “normal” URL 15
  • 16. Mitigation & Response Strategies • DNSSEC – will mitigate effect of external poisoning attacks, but will not address content “issues” at the authoritative server • SSL-Based Logins – but subject to user participation! • Server validation techniques like “site keys” – but again, subject to user participation! • Proactive monitoring of recursive servers – not necessarily tractable – but maybe useful for High Value Domains 16
  • 17. Mitigation & Response Strategies • Know WHO to contact at the ISPs within your span of control • Know the procedures for flushing the DNS cache – you may have to instruct operators how to do this! • Information Sharing – if you’re the victim of an attack – share the details of the attack within the community – you may prevent someone else from becoming a victim 17
  • 18. Questions? ? 18