Скачать презентацию SPAM Prevention Using DNS Solutions Implementing reverse domain Скачать презентацию SPAM Prevention Using DNS Solutions Implementing reverse domain

6e2c1a6b0338932c84e562604f368007.ppt

  • Количество слайдов: 35

SPAM Prevention Using DNS Solutions Implementing reverse domain name services (r. DNS) and planning SPAM Prevention Using DNS Solutions Implementing reverse domain name services (r. DNS) and planning for SPF Classic Presented by: Ed Horley Date: May 2005

Overview • SPAM prevention is the primary reason that r. DNS and SPF Classic Overview • SPAM prevention is the primary reason that r. DNS and SPF Classic will become de jure within approximately 1 -2 years (IETF ratified) • Current methods for SPAM prevention are de facto solutions – filtering, black/white lists, etc • Reverse DNS (r. DNS) is a great quick check to determine if an MTA is being run and maintained correctly but it can be spoofed • Sender Policy Framework (SPF v 1) or SPF Classic is being used by service providers to confirm that the mail servers they are receiving mail from are authorized to do so on behalf of the sending domain, these records are published by the sending domain

Overview Continued • Future additional solutions for SPAM prevention are Yahoo’s Domain. Keys, Sender Overview Continued • Future additional solutions for SPAM prevention are Yahoo’s Domain. Keys, Sender Verification and perhaps Microsoft’s Puzzle Solution (unlikely) • Sender ID has been rejected by the IETF as a proposed standard (de jure) due to inclusion of patented technology by Microsoft and Microsoft has modified it and resubmitted. It may or may not make it through this time depending on the dependencies the working committee see on the patented or protected intellectual property

Current Solutions Overview • Current de facto solutions – Blacklists (IP and DNS based) Current Solutions Overview • Current de facto solutions – Blacklists (IP and DNS based) – r. DNS (optional – see RFC 2505 § 2. 5) – Anti-spam filtering (Bayesian and others) – Anti-spam services (Brightmail, Postini, Commtouch, etc) – Hardware appliance filters / services – Custom built scripts and applications – Sender Verification (Several different formats exist) – Whitelists (IP and DNS based) – SPF Classic (optional)

Solutions Used Today • Blacklists – Spam. Cop – MAPS – ORDB – SPAMhaus Solutions Used Today • Blacklists – Spam. Cop – MAPS – ORDB – SPAMhaus – Spews – SURBL – Mail-abuse – DSBL – DNSRBL • Client filters – Audiotrieve In. Boxer – Cloudmark Spam. Net – Lyris Mail. Shield – Mc. Afee Spam. Killer – Aladdin Spam. Catcher – Sunbelt IHate. Spam – Spam. Bayes (open source) – Spam Bully – Mail. Frontier Matador – Cloudmark Spamnet

Solutions Used Today • Server filters – Exchange IMF (comes bundled with Exchange) – Solutions Used Today • Server filters – Exchange IMF (comes bundled with Exchange) – XWall – Vircom modus. Gate – Sophos Pure. Message – Proofpoint Protection – Surf. Control – Symantec – Trend Micro – GFI Mail. Essentials – Sybari Antigen (Microsoft Aquired Feb 2005) – Network Associates / Mcafee – Spam. Assassin (open source) – Declude Junk. Mail • Hardware Appliances • Subscription Services – – – – Barracuda 300 Border. Ware MXtreme Cypher. Trust Iron. Mail Iron. Port C 60 Mail Foundry Sendio ICE Box Tumbleweed Brightmail Commtouch Greenview Data Katharion Postini PUREmail

The Proposed Solutions • Short term solutions: – Internet Engineering Task Force (IETF) draft The Proposed Solutions • Short term solutions: – Internet Engineering Task Force (IETF) draft rfc’s – Sender Policy Framework (SPF Classic) – Sender ID (SPF Classic + PRA) – Microsoft draft rfc (maybe? ) – Domain. Keys (Google and Yahoo have implemented) • Long term solutions: – Internet Research Task Force (IRTF) – New version / next generation of SMTP?

What to do now? • SMTP mail gateway filters (hardware or software) • Consider What to do now? • SMTP mail gateway filters (hardware or software) • Consider a commercial service (depends on the amount and type of traffic you except to see for your environment) • Software e-mail client filters (Small business accounts) • Blacklists / Whitelists (Enterprise and Service Providers) • r. DNS (anyone running an MTA that sends traffic to the Internet) • SPF Classic (anyone running an MTA that sends traffic to the Internet) • Domain. Keys (Service Providers)

What is r. DNS? • r. DNS is an acronym for reverse DNS • What is r. DNS? • r. DNS is an acronym for reverse DNS • It is a method of name resolution in which an IP address is resolved into a domain name • It is the opposite of the typical resolution method of DNS which resolves domain names into IP addresses • It utilizes the existing DNS infrastructure by using a special reserved domain name: in-addr. arpa. • IP addresses are more specific left to right and domain names are more specific right to left, therefore the r. DNS IP listings are reversed • Example: 63. 251. 192. 20 would have a reverse entry of 20. 192. 251. 63. in-addr. arpa.

Why you should do r. DNS now • Easy to implement • Because spammers Why you should do r. DNS now • Easy to implement • Because spammers often use invalid IP addresses (bogons) to send e-mails, r. DNS will determine the authenticity of a domain name compared to the IP address from which it is originating • It is used as one of several de facto methods to determine the likelihood of a server being a SPAM relay • Most Internet Service Providers are using this to determine legitimate mail sources • Reduces probability of legitimate mail servers being added to a Blacklist

What is SPF Classic? • • • SPF Classic is used to identify mail What is SPF Classic? • • • SPF Classic is used to identify mail servers that are explicitly permitted to send mail for a particular domain (think outgoing) Domain owners identify permitted sending mail servers in DNS using TXT records SMTP receivers verify the envelope sender address against the DNS information and can distinguish legitimate mail servers before any message data is transmitted It is backward compatible with MTA’s that are not patched with SPF filters or libraries (well, actually the old MTA just ignore it if that is considered backward compatible!) Remember – MX records publish which IP’s are to receive mail (incoming) destined for your domain, SPF records says which IP’s are allowed to send mail (outgoing) on behalf of your domain

Why you should do SPF now • Easy to implement (publish TXT records in Why you should do SPF now • Easy to implement (publish TXT records in DNS) • It is used by AOL, Symantec, Earth. Link, Google and more as one of several de facto methods to determine trustworthiness of the mail sources • Most Internet Service Providers are currently or starting to use this to determine legitimate mail sources • Will move your mail to priority queues for processing for many providers including AOL, you can also submit to be added to the Whitelist for AOL • Reduces probability of being added to a Blacklist • Oct 1 st , 2004 Microsoft, MSN and Hotmail will all start using Sender ID to prioritize incoming e-mail! (Sender ID is backward compatible with SPF Classic)

What to know about SPF Classic • • Meng Wong created SPF Classic. It What to know about SPF Classic • • Meng Wong created SPF Classic. It used to be called “Sender Permitted From” and was changed to “Sender Policy Framework” SPF v 1 (Classic) designates specific SMTP servers as being authorized to send for a FQDN Uses the TXT fields in DNS to publish relevant information Each sub-domain must be configured specifically SPF will become de jure within approximately 1 -2 years – most popular filters are flagging this already Most MTA’s support SPF Classic or have plug-ins available Backward compatible with existing technology It breaks e-mail forwarding! You'll have to switch from forwarding, where the envelope sender is preserved, to remailing, where the envelope sender is changed – your MTA will have to support this

What to know about Sender ID • • SPF Classic + PRA = Sender What to know about Sender ID • • SPF Classic + PRA = Sender ID (basically now the MTA (think Exchange) checks SPF AND the MUA (think Outlook) check the PRA or Purported Responsible Address) Meng Wong and Microsoft submitted a draft rfc merging both solutions and called it “Sender ID” – was just turned down as a standard by the IETF due to Microsoft patent issues – it is back on the table again! Uses the TXT fields in DNS to publish relevant information – same as SPF but uses a new version number Each sub-domain must be configured specifically – just like SPF Microsoft will be updating the MTA/MUA’s to support PRA (or Sender ID) – think Outlook, Outlook Express and Exchange Backward compatible with existing technology It breaks e-mail forwarding! You'll have to switch from forwarding, where the envelope sender is preserved, to remailing, where the envelope sender is changed – just like SPF v 2

What to know about PRA * • • A purported responsible address is determined What to know about PRA * • • A purported responsible address is determined as the first from the following list of items: – the first Resent-Sender header in the message, unless (per the rules of RFC 2822) it is preceded by a Resent-From header and one or more Received or Return-Path headers occur after said Resent. From header and before the Resent-Sender header (see § 3. 6. 6. of RFC 2822 for further information on Resent headers), – the first mailbox in the first Resent-From header in the message, – the Sender header in the message, and – the first mailbox in the From header in the message The purported responsible domain of a message is defined to be the domain part of the message’s purported responsible address.

What is coming in a few years • Domain. Keys – A Yahoo! submitted What is coming in a few years • Domain. Keys – A Yahoo! submitted draft rfc • http: //www. ietf. org/internet-drafts/draft-delany-domainkeys-base -00. txt – Basically public/private keys for authenticating client mail and the servers along the path – Acts as a chain of custody from the source client machine to the destination client machine – Will require a major re-write of all MTA’s to work – 5 to 10 years if at all? – Backward compatible with existing technology – Google and Yahoo have already deployed! – Has promise to be a great standard if adoption is quick enough

What is coming continued * • Puzzle Solution – Microsoft proposal – Assumed for What is coming continued * • Puzzle Solution – Microsoft proposal – Assumed for small businesses that cannot afford certificate services – Sending mail server has to perform time consuming calculation for each mail sent – Assumes spammers cannot afford the computational costs to send out large bulk mailings or the cost of the bulk certificate services – Will require a major re-write of all MTA’s to work – 5 to 10 years if at all? – Backward compatible with existing technology – Solution has serious shortcomings – Microsoft has little published on this solution

Future potential SPAM problems • Disposable domain names, certificates and registrars • Country Sanctioned Future potential SPAM problems • Disposable domain names, certificates and registrars • Country Sanctioned Activity (Governments allowing for profit activity or turning a blind eye to problem spammers) in order to generate $’s • Large Zombie Farms controlling clients with legit relay access (Think large University or poorly managed corporate environments) • Spyware agents that provide relay capabilities similar to Zombie configurations • IPv 6 and Mobile IP devices becoming more prevalent • Potential exploits that could turn large peer-to-peer networks into relays

How r. DNS works MX: mx 1. isp. A. net ->1. 1 Public ISP How r. DNS works MX: mx 1. isp. A. net ->1. 1 Public ISP SMTP servers send e-mail to destination ISP A Internet 4 Public SMTP servers receive e-mail and check r. DNS ISP B 5 3 Internal SMTP servers forwarding e-mail to public ISP SMTP servers 2 MX: mx 1. isp. B. net -> 2. 2 Public DNS servers supply reverse entries PTR: 1. 1 -> mx 1. isp. A. net PTR: 2. 2 -> mx 1. isp. B. net Internal SMTP servers take client e-mail 1 Worker sends e-mail to colleague 6 Colleague receives e-mail from Public SMTP servers 7

How to request r. DNS for sub /24 address blocks • You will have How to request r. DNS for sub /24 address blocks • You will have to contact your ISP to request r. DNS delegation – do this via e-mail so you have a written trail of correspondence • You will likely have to talk to several departments to figure out who can actually do this for you, first contact your account manager • Typically, the DNS group handles the sub-delegation but not always – sometimes it is the networking group • You will need to be patient but firm – inform them that you need it for Anti-SPAM reasons for your mail server, to be RFC 2505 compliant • RFC 2317 describes standard methods for r. DNS sub /24 delegation formats, there is also the De. Groot hack from the book "DNS & Bind" both work fine

Setting up RFC 2317 r. DNS Delegation • Example of 64. 94. 106. 40/29 Setting up RFC 2317 r. DNS Delegation • Example of 64. 94. 106. 40/29 configuration in the providers servers: $ORIGIN 106. 94. 64. in-addr. arpa. ; zone delegation of 64. 94. 106. 40/29 ; 40 -47. IN NS ; 40. IN CNAME 41. IN CNAME 42. IN CNAME 43. IN CNAME 44. IN CNAME 45. IN CNAME 46. IN CNAME 47. IN CNAME ns 1. j 2 global. com. ns 2. j 2 global. com. 40 -47. 106. 94. 64. in-addr. arpa. 41. 40 -47. 106. 94. 64. in-addr. arpa. 42. 40 -47. 106. 94. 64. in-addr. arpa. 43. 40 -47. 106. 94. 64. in-addr. arpa. 44. 40 -47. 106. 94. 64. in-addr. arpa. 45. 40 -47. 106. 94. 64. in-addr. arpa. 46. 40 -47. 106. 94. 64. in-addr. arpa. 47. 40 -47. 106. 94. 64. in-addr. arpa.

Setting up the r. DNS Zone • Example of 64. 94. 106. 40/29 configuration Setting up the r. DNS Zone • Example of 64. 94. 106. 40/29 configuration in your servers: $ORIGIN 40 -47. 106. 94. 64. in-addr. arpa. ; zone delegation of 64. 94. 106. 40/29 ; @ IN NS ; @ IN TXT ; 40 IN PTR 41 IN PTR 42 IN PTR 43 IN PTR 44 IN PTR 45 IN PTR 46 IN PTR 47 IN PTR ns 1. j 2 global. com. ns 2. j 2 global. com. "j 2 Global Communications, Inc. " 64. 94. 106. 40. efax. com. 64. 94. 106. 41. efax. com. 64. 94. 106. 42. efax. com. 64. 94. 106. 43. efax. com. 64. 94. 106. 44. efax. com. 64. 94. 106. 45. efax. com. 64. 94. 106. 46. efax. com. 64. 94. 106. 47. efax. com.

Checking the r. DNS Zone • Example of checking the 64. 94. 106. 40/29 Checking the r. DNS Zone • Example of checking the 64. 94. 106. 40/29 configuration: ; <<>> Di. G 2. 1 <<>> @206. 13. 31. 12 40. 106. 94. 64. in-addr. arpa. PTR ; (1 server found) ; ; res options: init recurs defnam dnsrch ; ; got answer: ; ; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 10 ; ; flags: qr rd ra; Ques: 1, Ans: 2, Auth: 2, Addit: 0 ; ; QUESTIONS: ; ; 40. 106. 94. 64. in-addr. arpa, type = PTR, class = IN ; ; ANSWERS: 40. 106. 94. 64. in-addr. arpa. 43200 CNAME 40. 40 -47. 106. 94. 64. in-addr. arpa. 86400 PTR 64. 94. 106. 40. efax. com. ; ; AUTHORITY RECORDS: 40 -47. 106. 94. 64. in-addr. arpa. 86400 NS ns 2. j 2 global. com. 40 -47. 106. 94. 64. in-addr. arpa. 86400 NS ns 1. j 2 global. com. ; ; Total query time: 48 msec ; ; FROM: us. mirror. menandmice. com to SERVER: 206. 13. 31. 12 ; ; WHEN: Tue Jul 20 01: 20: 09 2004 ; ; MSG SIZE sent: 43 rcvd: 146

MX: mx 1. isp. A. net ->1. 1 TXT: MX: mx 1. isp. A. net ->1. 1 TXT: "v=spf 1 a mx -all" Public ISP SMTP servers send e-mail to destination How SPF Classic works ISP A Internet 4 TXT: "v=spf 1 a mx -all" Public SMTP servers receive e-mail - checks SPF info ISP B 5 3 Internal SMTP servers forwarding e-mail to public ISP SMTP servers Public DNS servers supply TXT, MX and A records MX: mx 1. isp. A. net Internal SMTP servers take client e-mail 1 Worker sends e-mail to colleague 6 TXT: “v=spf 1 a mx –all” A: mx 1. isp. A. net -> 1. 1 2 MX: mx 1. isp. B. net -> 2. 2 Colleague receives e-mail from Public SMTP servers 7

SPF Classic Syntax * • Some common SPF options in the TXT field a SPF Classic Syntax * • Some common SPF options in the TXT field a = the A record entry for example. com sends e-mail on behalf of example. com mx = the published MX record entries for example. com do not only receive e-mail on behalf of example. com but send e-mail also ptr = approve any host that ends in example. com as part of its FQDN a: = a list of A record entries that are permitted to send e-mail on behalf of example. com mx: = a list of mx record entries that are permitted to send e-mail on behalf of example. com ip 4: = a list of ip addresses that are permitted to send e-mail on behalf of example. com (CIDR) include: = a different domain that may send e-mail on behalf of example. com (relay through your service provider) -all: = (fail) everything in the SPF record are the ONLY hosts/networks permitted to send (strictest policy – don’t do unless you know all the ramifications) ~all: = (soft fail) everything in the SPF record are the ONLY hosts/networks permitted to send (middle ground) ? all: = not sure (technically neutral) if everything in the SPF record are the ONLY hosts/networks permitted to send (start publishing with this one first as it is the most liberal policy) Please see http: //spf. pobox. com/mechanisms. html for a more detailed description and see http: //spf. pobox. com/whitepaper. pdf for an excellent whitepaper

Setting up SPF Classic • Configuration of example. com SPF $ORIGIN example. com. ; Setting up SPF Classic • Configuration of example. com SPF $ORIGIN example. com. ; Leaving out the SOA info for space reasons ; NS records @ IN NS ; MX records @ IN MX 10 @ IN MX 20 ; A records mx 1 IN A mx 2 IN A ; TXT – SPF records @ IN TXT mx 1 IN TXT mx 2 IN TXT ns 1. example. com. ns 2. example. com. mx 1. example. com. mx 2. example. com. 1. 1 2. 2 "v=spf 1 a mx -all" "v=spf 1 a -all"

Register your SPF domain • Once you have configured SPF for your domain you Register your SPF domain • Once you have configured SPF for your domain you should confirm your configuration at: • www. dnsstuff. com • Then put the logo on your site!

Testing SPF Classic • Testing of example. com SPF – http: //www. dnsstuff. com/pages/spf. Testing SPF Classic • Testing of example. com SPF – http: //www. dnsstuff. com/pages/spf. htm – Dummy Sample Output from dnsstuff: SPF lookup of sender droid@example. com. from IP 1. 1: SPF string used: v=spf 1 mx -all. Obtained the TXT record via DNS for example. com Processing SPF string: v=spf 1 mx -all. Checking against the TXT record Testing 'mx' on IP=1. 1, target domain example. com, CIDR 32, default=PASS. MATCH! Testing 'all' on IP=1. 1, target domain example. com, CIDR 32, default=FAIL. Result: PASS

Impact on the Internet • These solutions will help reduce overall architecture problems of Impact on the Internet • These solutions will help reduce overall architecture problems of Authentication, Authorization, and Accounting with e-mail (back to AAA) • 68 B e-mails daily of which approx. 42. 8 B are spam or 69% spam! 1 • Estimated $1, 400 annual savings per employee from lost productivity currently due to spam 2 1 – The Radicati Group and Brightmail 2 - Vircom

Resource Links • r. DNS: – http: //www. ietf. org/rfc 2317. txt – http: Resource Links • r. DNS: – http: //www. ietf. org/rfc 2317. txt – http: //www. ietf. org/rfc 2505. txt – http: //www. arin. net/registration/lame_delegations/index. html – http: //kbase. menandmice. com/view. html? rec=31 – http: //www. microsoft. com/windows 2000/techinfo/reskit/enus/default. asp? url=/windows 2000/techinfo/reskit/en-us/cnet/cncf_imp_dewg. asp – http: //dedicated. pacbell. net/custcare/dns_worksheet. html • DNS tools: – http: //www. dnsstuff. com/ – http: //us. mirror. menandmice. com/cgi-bin/Do. Dig – http: //network-tools. com/ – http: //www. squish. net/dnscheck/ – http: //www. dns. net/dnsrd/tools. html – http: //www. dnsreport. com/ – http: //www. samspade. org/t/ • General references: – http: //www. spamanatomy. com/ – http: //www. declude. com/Articles. asp? ID=97

Resource Links • SPF: – http: //spf. pobox. com/howworks. html – http: //spf. pobox. Resource Links • SPF: – http: //spf. pobox. com/howworks. html – http: //spf. pobox. com/rfcs. html – http: //spf. pobox. com/wizard. html – http: //www. ietf. org/internet-drafts/draft-mengwong-spf-01. txt – http: //www. dnsstuff. com/pages/spf. htm • Microsoft’s PRA (E-mail Caller ID): – http: //www. microsoft. com/downloads/details. aspx? Family. ID=9 a 9 e 8 a 28 -3 e 85 -4 d 07 -9 d 0 f 6 daeabd 3 b 71 b&displaylang=en • Sender ID – the merged PRA and SPF: – http: //www. microsoft. com/presspass/press/2004/may 04/05 -25 SPFCaller. IDPR. asp – http: //www. microsoft. com/presspass/press/2004/jun 04/06 -24 SIDSpec. IETFPR. asp – http: //www. microsoft. com/mscorp/twc/privacy/spam_senderid. mspx • Yahoo! Domain. Keys: – http: //antispam. yahoo. com/domainkeys – http: //www. ietf. org/internet-drafts/draft-delany-domainkeys-base-00. txt – http: //boycott-email-caller-id. org/

A look at some Service Provider’s records • aol. com. 300 IN TXT A look at some Service Provider’s records • aol. com. 300 IN TXT "v=spf 1 ip 4: 152. 163. 225. 0/24 ip 4: 205. 188. 139. 0/24 ip 4: 205. 188. 144. 0/24 ip 4: 205. 188. 156. 0/23 ip 4: 205. 188. 159. 0/24 ip 4: 64. 12. 136. 0/23 ip 4: 64. 12. 138. 0/24 ptr: mx. aol. com ? all“ aol. com. 300 IN TXT "spf 2. 0/pra ip 4: 152. 163. 225. 0/24 ip 4: 205. 188. 139. 0/24 ip 4: 205. 188. 144. 0/24 ip 4: 205. 188. 156. 0/23 ip 4: 205. 188. 159. 0/24 ip 4: 64. 12. 136. 0/23 ip 4: 64. 12. 138. 0/24 ptr: mx. aol. com ? all“ • cisco. com. 86400 IN • earthlink. net. ? all“ 1800 IN TXT "v=spf 1 ip 4: 207. 217. 120. 0/23 ip 4: 207. 69. 200. 0/24 ip 4: 209. 86. 89. 0/24 • efax. com. 86400 IN TXT "v=spf 1 ptr ? all" • google. com. TXT "v=spf 1 ptr ? all“ • hotmail. com. 3600 IN TXT "v=spf 1 include: spf-a. hotmail. com include: spf-b. hotmail. com include: spf-c. hotmail. com include: spf-d. hotmail. com ~all“ • microsoft. com. • msn. com. 900 IN TXT "v=spf 1 include: spf-a. hotmail. com include: spf-b. hotmail. com include: spf-c. hotmail. com include: spf-d. hotmail. com ~all“ • netzero. net. • symantec. com. ? all“ 300 3600 TXT IN IN IN "v=spf 1 ptr" TXT 18000 IN "v=spf 1 mx redirect=_ spf. microsoft. com" "v=spf 1 ptr: untd. com ptr: netzero. net ptr: juno. com ? all“ TXT "v=spf 1 ip 4: 198. 6. 49. 0/24 ip 4: 65. 125. 29. 0/25 ip 4: 206. 204. 57. 47

Questions and Answers Questions and Answers

About Ed Horley • Ed Horley is a Sr. Network Engineer for j 2 About Ed Horley • Ed Horley is a Sr. Network Engineer for j 2 Global Communications, better known as e. Fax. Ed currently designs, supports and maintains j 2's 58+ international and domestic collocation sites along with j 2's core data center IP infrastructure. He is experienced in e-commerce web content delivery, large scale e-mail delivery, firewalls, IPSec VPN's, and specializes in routing and switching and DNS issues. • Ed is a Cisco Certified Network Professional (CCNP), a Microsoft Certified Professional (MCP) and a Microsoft Most Valuable Professional (MVP). Ed graduated from the University of the Pacific in 1992 with a BS in Civil Engineering. • When he is not playing on network gear you can find him out on the lacrosse field as an Umpire for Women's Lacrosse. He is currently married to his wonderful wife Krys and has two children, Briana and Aisha. He lives and works in Walnut Creek, CA.

Contact Info Ed Horley ehorley@gmail. com Contact Info Ed Horley ehorley@gmail. com