using dns to protect - boston university · using dns to protect clients from malicious domains...

27
Using DNS to protect clients from malicious domains Melissa Muth University of Pennsylvania Security Camp 2015 Boston University

Upload: others

Post on 19-Jun-2020

6 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Using DNS to protect - Boston University · Using DNS to protect clients from malicious domains Melissa Muth! University of Pennsylvania!!!! Security Camp 2015! Boston University

Using DNS to protect clients from malicious domains

Melissa Muth!University of Pennsylvania!!!!Security Camp 2015!Boston University

Page 2: Using DNS to protect - Boston University · Using DNS to protect clients from malicious domains Melissa Muth! University of Pennsylvania!!!! Security Camp 2015! Boston University

The Problem

❖ Polymorphic Malware!

❖ 50% Effective AV Software!

❖ 0-Day Threats!

❖ Legitimate websites serving malicious 3rd party ads!

❖ Fast-flux DNS

Page 3: Using DNS to protect - Boston University · Using DNS to protect clients from malicious domains Melissa Muth! University of Pennsylvania!!!! Security Camp 2015! Boston University

Malware Domain List! Zeus Tracker!

REN-ISAC!...

DNS

Leverage: Reputation

Page 4: Using DNS to protect - Boston University · Using DNS to protect clients from malicious domains Melissa Muth! University of Pennsylvania!!!! Security Camp 2015! Boston University

Without DNS Sinkhole

vanilla DNS

12.3.4.56

microsoft.com.xyz.net ?

12.3.4.56

GET /dangerous.html

dangerous.html

Page 5: Using DNS to protect - Boston University · Using DNS to protect clients from malicious domains Melissa Muth! University of Pennsylvania!!!! Security Camp 2015! Boston University

With DNS Sinkhole

vanilla DNS

12.3.4.56

micr

osof

t.com

.xyz.n

et ?

192.1

68.1.

2

GET /

dang

erou

s.htm

l

DNS Sinkhole!192.168.1.2

safe.

htm

l

ww

w.upenn.edu ?

Page 6: Using DNS to protect - Boston University · Using DNS to protect clients from malicious domains Melissa Muth! University of Pennsylvania!!!! Security Camp 2015! Boston University

Benefits

❖ Opt-in!

❖ Can supplement existing campus DNS!

❖ Can be anywhere on the network!

❖ Easy to deploy (if using DHCP)!

❖ Lightweight (compare: proxy)

Page 7: Using DNS to protect - Boston University · Using DNS to protect clients from malicious domains Melissa Muth! University of Pennsylvania!!!! Security Camp 2015! Boston University

Limitations

❖ Granularity!

❖ Hostname/domain !

❖ IP / CIDR!

❖ Not by URL!

❖ DNSSEC broken (for malicious domains)

Page 8: Using DNS to protect - Boston University · Using DNS to protect clients from malicious domains Melissa Muth! University of Pennsylvania!!!! Security Camp 2015! Boston University

Poll

❖ Are you using a DNS Sinkhole?!

❖ Are you thinking about it?!

❖ What are your concerns?

Page 9: Using DNS to protect - Boston University · Using DNS to protect clients from malicious domains Melissa Muth! University of Pennsylvania!!!! Security Camp 2015! Boston University

Environment at Penn

❖ Tier 1 Research University!

❖ 40,000 users, incl. 4000 international!

❖ 50,000+ nodes!

❖ Decentralized

29%

10%27%

25%

9%

P/T studentsUndergraduatesGraduate/ProfessionalFacultyStaff

Page 10: Using DNS to protect - Boston University · Using DNS to protect clients from malicious domains Melissa Muth! University of Pennsylvania!!!! Security Camp 2015! Boston University

Implementation options

($)

_______________________

+

In-house Proof of Concept

(tied to older software version)

Page 11: Using DNS to protect - Boston University · Using DNS to protect clients from malicious domains Melissa Muth! University of Pennsylvania!!!! Security Camp 2015! Boston University

Implementation: Domain Sources2%

45%54%

SESv2 MDL Zeus

Page 12: Using DNS to protect - Boston University · Using DNS to protect clients from malicious domains Melissa Muth! University of Pennsylvania!!!! Security Camp 2015! Boston University

Implementation - platform

Page 13: Using DNS to protect - Boston University · Using DNS to protect clients from malicious domains Melissa Muth! University of Pennsylvania!!!! Security Camp 2015! Boston University

MySQL DB

!!

Raw Domain List

BIND!(w/DLZ)

Implementation - load

Whitelist

dns_records_1

dns_records_2

named.conf

insert_2named.conf

MDLSES Zeus

Blacklist

Filtered domain list

Page 14: Using DNS to protect - Boston University · Using DNS to protect clients from malicious domains Melissa Muth! University of Pennsylvania!!!! Security Camp 2015! Boston University

SafeDNS on Github

1. https://github.com/mrmuth/SafeDNS/!

2. Install OS & Packages!

3. Customize (School name, IPs)!

4. Configure BIND!

5. Set up loading of feeds, blacklist, whitelist!

6. Set up Apache (landing page)

Page 15: Using DNS to protect - Boston University · Using DNS to protect clients from malicious domains Melissa Muth! University of Pennsylvania!!!! Security Camp 2015! Boston University

Recruiting Clients❖ Increase subscribers gradually!

❖ Communications!

❖ Terms of Service!

❖ Privacy Policy!

❖ Documentation

Page 16: Using DNS to protect - Boston University · Using DNS to protect clients from malicious domains Melissa Muth! University of Pennsylvania!!!! Security Camp 2015! Boston University

Results - % malicious queries

0.0000

20.0000

40.0000

60.0000

80.0000

% Requests for Malicious Domains

Page 17: Using DNS to protect - Boston University · Using DNS to protect clients from malicious domains Melissa Muth! University of Pennsylvania!!!! Security Camp 2015! Boston University

Results - # Requests

0

350000

700000

1050000

1400000

Malicious Non-Malicious

Page 18: Using DNS to protect - Boston University · Using DNS to protect clients from malicious domains Melissa Muth! University of Pennsylvania!!!! Security Camp 2015! Boston University

Results - user experience

❖ No downtime!

❖ Tertiary masked network outage!

❖ False Positives!

❖ 3 from SRI (removed)!

❖ < 2 reported per year of operation

Page 19: Using DNS to protect - Boston University · Using DNS to protect clients from malicious domains Melissa Muth! University of Pennsylvania!!!! Security Camp 2015! Boston University

Success!

❖ 97% reduction in compromises!

❖ Pilot: 7,700 clients !

❖ Production: Feb 20150.0000

0.0100

0.0200

0.0300

0.0400

Before AfterMonthly compromise %

Page 20: Using DNS to protect - Boston University · Using DNS to protect clients from malicious domains Melissa Muth! University of Pennsylvania!!!! Security Camp 2015! Boston University

Costs

Out-of-pocketHardware $0

Software $0

Time

Build 2 person-weeks

Maintenance 30 min/mo

Page 21: Using DNS to protect - Boston University · Using DNS to protect clients from malicious domains Melissa Muth! University of Pennsylvania!!!! Security Camp 2015! Boston University

Lessons Learned

Not a replacement !for campus DNS:!

! a value add

Page 22: Using DNS to protect - Boston University · Using DNS to protect clients from malicious domains Melissa Muth! University of Pennsylvania!!!! Security Camp 2015! Boston University

Lessons LearnedBranding!matters:

vs

Page 23: Using DNS to protect - Boston University · Using DNS to protect clients from malicious domains Melissa Muth! University of Pennsylvania!!!! Security Camp 2015! Boston University

Production!

❖ 35,000 clients (including guest wireless)!

❖ 440 DNS Queries/sec!

!

!

Page 24: Using DNS to protect - Boston University · Using DNS to protect clients from malicious domains Melissa Muth! University of Pennsylvania!!!! Security Camp 2015! Boston University

Production: RPZs❖ Response Policy Zones (BIND)!

❖ Overlay policy on native DNS responses !

❖ BIND 9.8 (supported), 9.10 (built-in feature)!

❖ Block malicious name servers, IPs, CIDRs!

❖ SpamHaus DROP list!!

❖ Reputation feeds (SpamHaus, SURBL, …)!

❖ https://dnsrpz.info/

Page 25: Using DNS to protect - Boston University · Using DNS to protect clients from malicious domains Melissa Muth! University of Pennsylvania!!!! Security Camp 2015! Boston University

DNS Sinkhole Options

❖ Roll Your Own:!

❖ (ISO)!

❖ https://github.com/mrmuth/SafeDNS/ (code, comm)!

❖ https://github.com/secure411dotorg/rpzone (AWS AMI)!

❖ Commercial:

Page 26: Using DNS to protect - Boston University · Using DNS to protect clients from malicious domains Melissa Muth! University of Pennsylvania!!!! Security Camp 2015! Boston University

Resources❖ SANS dist: https://isc.sans.edu/diary/DNS+Sinkhole

+ISO+Available+for+Download/9037!

❖ SafeDNS: !

❖ https://github.com/mrmuth/SafeDNS/!

❖ http://www.upenn.edu/computing/dns/safedns/!!

❖ RPZs: https://dnsrpz.info/!

❖ https://github.com/secure411dotorg/rpzone

Page 27: Using DNS to protect - Boston University · Using DNS to protect clients from malicious domains Melissa Muth! University of Pennsylvania!!!! Security Camp 2015! Boston University

Melissa Muth!University of Pennsylvania!

[email protected]!

215-573-6798

https://github.com/mrmuth/SafeDNS/!http://www.upenn.edu/computing/dns/safedns/