Spring 2009 CS 155 Unwanted Traffic Denial of

  • Slides: 87
Download presentation
Spring 2009 CS 155 Unwanted Traffic: Denial of Service and Spam email Dan Boneh

Spring 2009 CS 155 Unwanted Traffic: Denial of Service and Spam email Dan Boneh 1

What is network Do. S? Goal: take out a large site with little computing

What is network Do. S? Goal: take out a large site with little computing work How: Amplification n Small number of packets big effect Two types of amplification attacks: n Do. S bug: w Design flaw allowing one machine to disrupt a service n Do. S flood: w Command bot-net to generate flood of requests 2

A high profile example: Estonia • Attacked sites: (started apr. 2007, lasted two weeks)

A high profile example: Estonia • Attacked sites: (started apr. 2007, lasted two weeks) • Estonian ministerial sites • Various Estonian commercial sites (more on this later) 3

Do. S can happen at any layer This lecture: n n n Sample Dos

Do. S can happen at any layer This lecture: n n n Sample Dos at different layers (by order): w Link w TCP/UDP w Application w Payment Generic Do. S solutions Network Do. S solutions Sad truth: n Current Internet not designed to handle DDo. S attacks 4

Warm up: 802. 11 b Radio jamming attacks: Protocol Do. S bugs: n n

Warm up: 802. 11 b Radio jamming attacks: Protocol Do. S bugs: n n Do. S bugs trivial, not our focus. [Bellardo, Savage, ’ 03] NAV (Network Allocation Vector): w 15 -bit field. Max value: 32767 w Any node can reserve channel for NAV seconds w No one else should transmit during NAV period w … but not followed by most 802. 11 b cards De-authentication bug: w Any node can send deauth packet to AP w Deauth packet unauthenticated w … attacker can repeatedly deauth anyone 5

Smurf amplification Do. S attack 1 ICMP Echo Req Src: Dos Target Dest: brdct

Smurf amplification Do. S attack 1 ICMP Echo Req Src: Dos Target Dest: brdct addr Do. S Source 3 ICMP Echo Reply Dest: Dos Target gateway Do. S Target Send ping request to broadcast addr (ICMP Echo Req) Lots of responses: n Every host on target network generates a ping reply (ICMP Echo Reply) to victim Prevention: reject external packets to broadcast address 6

Modern day example DNS Amplification attack: ( 50 amplification ) DNS Query Src. IP:

Modern day example DNS Amplification attack: ( 50 amplification ) DNS Query Src. IP: Dos Target (60 bytes) Do. S Source (May ’ 06) EDNS Reponse (3000 bytes) DNS Server Do. S Target 580, 000 open resolvers on Internet (Kaminsky-Shiffman’ 06) 7

Review: IP Header format 0 Connectionless n Unreliable n Best effort 31 Version Header

Review: IP Header format 0 Connectionless n Unreliable n Best effort 31 Version Header Length Type of Service Total Length Identification Flags Fragment Time to. Offset Live Protocol Header Checksum Source Address of Originating Host Destination Address of Target Host Options Padding IP Data 8

Review: TCP Header format TCP: n Session based n Congestion control n In order

Review: TCP Header format TCP: n Session based n Congestion control n In order delivery 0 31 Source Port Dest port SEQ Number ACK Number U A P P S F R C S S Y I G K H R N N Other stuff 9

Review: TCP Handshake C S SN rand. C SYN: ANC 0 C SYN/ACK: SNS

Review: TCP Handshake C S SN rand. C SYN: ANC 0 C SYN/ACK: SNS rand. S ANS SNC ACK: SN SNC AN SNS Listening Store SNC , SNS Wait Established 10

TCP SYN Flood I: low rate C S (Do. S bug) Single machine: SYNC

TCP SYN Flood I: low rate C S (Do. S bug) Single machine: SYNC 2 • SYN Packets with random source IP addresses SYNC 3 • Fills up backlog queue on server SYNC 1 SYNC 4 SYNC 5 • No further connections possible 11

SYN Floods (phrack 48, no 13, 1996) OS Linux 1. 2. x Free. BSD

SYN Floods (phrack 48, no 13, 1996) OS Linux 1. 2. x Free. BSD 2. 1. 5 Win. NT 4. 0 Backlog timeout: Backlog queue size 10 128 6 3 minutes Attacker need only send 128 SYN packets every 3 minutes. Low rate SYN flood 12

A classic SYN flood example MS Blaster worm n (2003) Infected machines at noon

A classic SYN flood example MS Blaster worm n (2003) Infected machines at noon on Aug 16 th: w SYN flood on port 80 to windowsupdate. com w 50 SYN packets every second. n each packet is 40 bytes. w Spoofed source IP: a. b. X. Y where X, Y random. MS solution: n n new name: windowsupdate. microsoft. com Win update file delivered by Akamai 13

Low rate SYN flood defenses Non-solution: n Increase backlog queue size or decrease timeout

Low rate SYN flood defenses Non-solution: n Increase backlog queue size or decrease timeout Correct solution (when under attack) : n Syncookies: remove state from server n Small performance overhead 14

Syncookies [Bernstein, Schenk] Idea: use secret key and data in packet to gen. server

Syncookies [Bernstein, Schenk] Idea: use secret key and data in packet to gen. server SN Server responds to Client with SYN-ACK cookie: n T = 5 -bit counter incremented every 64 secs. n L = MACkey (SAddr, SPort, DAddr, DPort, SNC, T) [24 bits] w key: picked at random during boot n n SNS = (T. mss. L) ( |L| = 24 bits ) Server does not save state (other TCP options are lost) Honest client responds with ACK ( AN=SNS , SN=SNC+1 ) n Server allocates space for socket only if valid SN S. 15

SYN floods: backscatter [MVS’ 01] SYN with forged source IP SYN/ACK to random host

SYN floods: backscatter [MVS’ 01] SYN with forged source IP SYN/ACK to random host 16

Backscatter measurement [MVS’ 01] Listen to unused IP addresss space (darknet) /8 network monitor

Backscatter measurement [MVS’ 01] Listen to unused IP addresss space (darknet) /8 network monitor 0 232 Lonely SYN/ACK packet likely to be result of SYN attack 2001: 2008: n 400 SYN attacks/week 4425 SYN attacks/24 hours (arbor networks ATLAS) Larger experiments: (monitor many ISP darknets) w Arbor networks w Network telescope (UCSD) 17

SYN Floods II: Massive flood (e. g Bet. Cris. com ‘ 03) Command bot

SYN Floods II: Massive flood (e. g Bet. Cris. com ‘ 03) Command bot army to flood specific target: (DDo. S) n n 20, 000 bots can generate 2 Gb/sec of SYNs (2003) At web site: w Saturates network uplink or network router w Random source IP attack SYNs look the same as real SYNs n What to do ? ? ? 18

Prolexic Idea: only forward established TCP connections to site Lots-of-SYNs Lots-of-SYN/ACKs Prolexic Proxy Few

Prolexic Idea: only forward established TCP connections to site Lots-of-SYNs Lots-of-SYN/ACKs Prolexic Proxy Few ACKs Forward to site Web site Prolexic capacity: 20 Gb/sec link can handle 40 106 SYN/sec 19

Other junk packets Attack Packet Victim Response Rate (2008) TCP SYN to open port

Other junk packets Attack Packet Victim Response Rate (2008) TCP SYN to open port TCP SYN/ACK TCP SYN to closed port TCP RST TCP ACK or TCP DATA TCP RST No response 276 TCP NULL TCP RST 2821 ICMP ECHO Request ICMP ECHO Response 8352 UDP to closed port ICMP Port unreachable [ATLAS] 4425 Proxy must keep floods of these away from web site 20

Estonia attack (ATLAS ‘ 07) Attack types detected: n 115 ICMP floods, 4 TCP

Estonia attack (ATLAS ‘ 07) Attack types detected: n 115 ICMP floods, 4 TCP SYN floods Bandwidth: n 12 attacks: 70 -95 Mbps for over 10 hours All attack traffic was coming from outside Estonia n Estonia’s solution: w Estonian ISPs blocked all foreign traffic until attacks stopped => Do. S attack had little impact inside Estonia 21

Stronger attacks: TCP con flood Command bot army to: n n n Complete TCP

Stronger attacks: TCP con flood Command bot army to: n n n Complete TCP connection to web site Send short HTTP HEAD request Repeat Will bypass SYN flood protection proxy … but: n Attacker can no longer use random source IPs. w Reveals location of bot zombies n Proxy can now block or rate-limit bots. 22

DNS Do. S Attacks (e. g. bluesecurity ’ 06) DNS runs on UDP port

DNS Do. S Attacks (e. g. bluesecurity ’ 06) DNS runs on UDP port 53 n DNS entry for victim. com hosted at victim_isp. com DDo. S attack: n flood victim_isp. com with requests for victim. com n Random source IP address in UDP packets Takes out entire DNS server: (collateral damage) n bluesecurity DNS hosted at Tucows DNS server n DNS DDo. S took out Tucows hosting many sites What to do ? ? ? 23

Root level DNS attacks Feb. 6, 2007: n Botnet attack on the 13 Internet

Root level DNS attacks Feb. 6, 2007: n Botnet attack on the 13 Internet DNS root servers n Lasted 2. 5 hours n None crashed, but two performed badly: w g-root (Do. D), l-root (ICANN) w Most other root servers use anycast Attack in Oct. 2002 took out 9 of the 13 TLD servers 24

DNS Do. S solutions Generic DDo. S solutions: n Later on. Require major changes

DNS Do. S solutions Generic DDo. S solutions: n Later on. Require major changes to DNS. Do. S resistant DNS design: n n Co. Do. NS: [Sirer’ 04] w Cooperative Domain Name System P 2 P design for DNS system: w DNS nodes share the load w Simple update of DNS entries w Backwards compatible with existing DNS 25

Do. S via route hijacking You. Tube is 208. 65. 152. 0/22 (includes 210

Do. S via route hijacking You. Tube is 208. 65. 152. 0/22 (includes 210 IP addr) youtube. com is 208. 65. 153. 238, … Feb. 2008: n Pakistan telecom advertised a BGP path for 208. 65. 153. 0/24 (includes 28 IP addr) n Routing decisions use most specific prefix n The entire Internet now thinks 208. 65. 153. 238 is in Pakistan Outage resolved within two hours … but demonstrates huge Do. S vuln. with no solution! 26

Do. S at higher layers SSL/TLS handshake [SD’ 03] Client Hello Server Hello (pub-key)

Do. S at higher layers SSL/TLS handshake [SD’ 03] Client Hello Server Hello (pub-key) RSA Encrypt Web Server Client key exchange RSA Decrypt RSA-encrypt speed 10 RSA-decrypt speed Single machine can bring down ten web servers n Similar problem with application Do. S: n Send HTTP request for some large PDF file Easy work for client, hard work for server. 27

Payment DDo. S Aquiring Bank Merchant A Merchant B • Low rate at each

Payment DDo. S Aquiring Bank Merchant A Merchant B • Low rate at each Merchant • High rate at Aquiring bank Merchant C Dummy purchase Requests 28

Google Do. S q Firefox phishing/malware protection: § Browser downloads blacklisted list from Google

Google Do. S q Firefox phishing/malware protection: § Browser downloads blacklisted list from Google http: //safebrowsing. clients. google. com/safebrowsing/gethash § List contains hashes of (prefixes) of badware sites § Firefox consults list before following a URL Jan. 31, 2009: Google adds “/” to blacklist § For 55 minutes, all web sites marked as malware § Reason: human error q Browser bug: Firefox no longer checks for “/” on list 29

Google Do. S: results Amsterdam peering point 30

Google Do. S: results Amsterdam peering point 30

Do. S Mitigation 31

Do. S Mitigation 31

1. Client puzzles Idea: slow down attacker Moderately hard problem: n Given challenge C

1. Client puzzles Idea: slow down attacker Moderately hard problem: n Given challenge C find X such that LSBn ( SHA-1( C || X ) ) = 0 n n Assumption: takes expected 2 n time to solve For n=16 takes about. 3 sec on 1 Gh. Z machine Main point: checking puzzle solution is easy. During Do. S attack: n Everyone must submit puzzle solution with requests n When no attack: do not require puzzle solution 32

Examples TCP connection floods (RSA ‘ 99) n Example challenge: C = TCP server-seq-num

Examples TCP connection floods (RSA ‘ 99) n Example challenge: C = TCP server-seq-num n First data packet must contain puzzle solution w Otherwise TCP connection is closed SSL handshake Do. S: (SD’ 03) n Challenge C based on TLS session ID n Server: check puzzle solution before RSA decrypt. Same for application layer Do. S and payment Do. S. 33

Benefits and limitations Hardness of challenge: n n Decided based on Do. S attack

Benefits and limitations Hardness of challenge: n n Decided based on Do. S attack volume. Limitations: n n Requires changes to both clients and servers Hurts low power legitimate clients during attack: w Clients on cell phones, PDAs cannot connect 34

Memory-bound functions CPU power ratio: n high end server / low end cell phone

Memory-bound functions CPU power ratio: n high end server / low end cell phone = 8000 Impossible to scale to hard puzzles Interesting observation: n Main memory access time ratio: w high end server / low end cell phone = 2 Better puzzles: n Solution requires many main memory accesses w Dwork-Goldberg-Naor, Crypto ‘ 03 w Abadi-Burrows-Manasse-Wobber, ACM To. IT ‘ 05 35

2. CAPTCHAs Idea: verify that connection is from a human Applies to application layer

2. CAPTCHAs Idea: verify that connection is from a human Applies to application layer DDo. S [Killbots ’ 05] n During attack: generate CAPTCHAs and process request only if valid solution n Present one CAPTCHA per source IP address. 36

3. Source identification Goal: identify packet source Ultimate goal: block attack at the source

3. Source identification Goal: identify packet source Ultimate goal: block attack at the source 37

1. Ingress filtering Big problem: (RFC 2827, 2000) DDo. S with spoofed source IPs

1. Ingress filtering Big problem: (RFC 2827, 2000) DDo. S with spoofed source IPs Question: how to find packet origin? ISP Internet Ingress filtering policy: ISP only forwards packets with legitimate source IP. (see also SAVE protocol) 38

Implementation problems ALL ISPs must do this. Requires global trust. n If 10% of

Implementation problems ALL ISPs must do this. Requires global trust. n If 10% of ISPs do not implement no defense Another non-solution: enforce source IP at peer AS R 1 Source AS R 2 R 3 Transit AS dest R 4 Dest AS Can transit AS validate packet source IP? No … 39

2. Traceback [Savage et al. ’ 00] Goal: n Given set of attack packets

2. Traceback [Savage et al. ’ 00] Goal: n Given set of attack packets n Determine path to source How: change routers to record info in packets Assumptions: n Most routers remain uncompromised n Attacker sends many packets n Route from attacker to victim remains relatively stable 40

Simple method Write path into network packet n Each router adds its own IP

Simple method Write path into network packet n Each router adds its own IP address to packet n Victim reads path from packet Problem: n Requires space in packet w Path can be long w No extra fields in current IP format n Changes to packet format too much to expect 41

Better idea DDo. S involves many packets on same path A 1 Store one

Better idea DDo. S involves many packets on same path A 1 Store one link in each packet n n Each router probabilistically stores own address Fixed space regardless of path length A 2 R 6 A 3 R 7 A 4 A 5 R 8 R 9 R 10 R 12 V 42

Edge Sampling Data fields written to packet: n Edge: start and end IP addresses

Edge Sampling Data fields written to packet: n Edge: start and end IP addresses n Distance: number of hops since edge stored Marking procedure for router R if coin turns up heads (with probability p) then write R into start address write 0 into distance field else if distance == 0 write R into end field increment distance field 43

Edge Sampling: picture Packet received n R receives packet from source or another router

Edge Sampling: picture Packet received n R receives packet from source or another router 1 n Packet contains space for start, end, distance packet R 1 s e d R 2 R 3 44

Edge Sampling: picture Begin writing edge n R chooses to write start of edge

Edge Sampling: picture Begin writing edge n R chooses to write start of edge 1 n Sets distance to 0 packet R 1 0 R 2 R 3 45

Edge Sampling Finish writing edge n R chooses not to overwrite edge 2 n

Edge Sampling Finish writing edge n R chooses not to overwrite edge 2 n Distance is 0 w Write end of edge, increment distance to 1 packet R 1 R 2 R 3 46

Edge Sampling Increment distance n R chooses not to overwrite edge 3 n Distance

Edge Sampling Increment distance n R chooses not to overwrite edge 3 n Distance >0 w Increment distance to 2 packet R 1 R 2 2 R 3 47

Path reconstruction Extract information from attack packets Build graph rooted at victim n Each

Path reconstruction Extract information from attack packets Build graph rooted at victim n Each (start, end, distance) tuple provides an edge # packets needed to reconstruct path ln(d) E(X) < p(1 -p)d-1 where p is marking probability, d is length of path 48

Details: where to store edge Identification field n Used for fragmentation n Fragmentation is

Details: where to store edge Identification field n Used for fragmentation n Fragmentation is rare n 16 bits Store edge in 16 bits? offset distance edge chunk 0 23 78 15 Version Header Length Type of Service Total Length Identification Flags Fragment Time to. Offset Live Protocol Header Checksum Source Address of Originating Host Destination Address of Target Host Options n n Break into chunks Store start + end Padding IP Data 49

More traceback proposals Advanced and Authenticated Marking Schemes for IP Traceback n Song, Perrig.

More traceback proposals Advanced and Authenticated Marking Schemes for IP Traceback n Song, Perrig. IEEE Infocomm ’ 01 n Reduces noisy data and time to reconstruct paths An algebraic approach to IP traceback n Stubblefield, Dean, Franklin. NDSS ’ 02 Hash-Based IP Traceback n Snoeren, Partridge, Sanchez, Jones, Tchakountio, Kent, Strayer. SIGCOMM ‘ 01 50

Problem: Reflector attacks [Paxson ’ 01] Reflector: n A network component that responds to

Problem: Reflector attacks [Paxson ’ 01] Reflector: n A network component that responds to packets n Response sent to victim (spoofed source IP) Examples: n n n DNS Resolvers: UDP 53 with victim. com source w At victim: DNS response Web servers: TCP SYN 80 with victim. com source w At victim: TCP SYN ACK packet Gnutella servers 51

Do. S Attack Single Master Many bots to generate flood Zillions of reflectors to

Do. S Attack Single Master Many bots to generate flood Zillions of reflectors to hide bots n Kills traceback and pushback methods 52

Capability based defense 53

Capability based defense 53

Capability based defense Anderson, Roscoe, Wetherall. n Preventing internet denial-of-service with capabilities. SIGCOMM ‘

Capability based defense Anderson, Roscoe, Wetherall. n Preventing internet denial-of-service with capabilities. SIGCOMM ‘ 04. Yaar, Perrig, and Song. n Siff: A stateless internet flow filter to mitigate DDo. S flooding attacks. IEEE S&P ’ 04. Yang, Wetherall, Anderson. n A Do. S-limiting network architecture. SIGCOMM ’ 05 54

Capability based defense Basic idea: n Receivers can specify what packets they want How:

Capability based defense Basic idea: n Receivers can specify what packets they want How: n Sender requests capability in SYN packet w Path identifier used to limit # reqs from one source n Receiver responds with capability n Sender includes capability in all future packets n Main point: Routers only forward: w Request packets, and w Packets with valid capability 55

Capability based defense Capabilities can be revoked if source is attacking n Blocks attack

Capability based defense Capabilities can be revoked if source is attacking n Blocks attack packets close to source R 1 Source AS R 2 R 3 Transit AS R 4 dest Dest AS Attack packets dropped 56

Pushback Traffic Filtering 57

Pushback Traffic Filtering 57

Pushback filtering Mahajan, Bellovin, Floyd, Ioannidis, Paxson, Shenker. Controlling High Bandwidth Aggregates in the

Pushback filtering Mahajan, Bellovin, Floyd, Ioannidis, Paxson, Shenker. Controlling High Bandwidth Aggregates in the Network. Computer Communications Review ‘ 02. Ioannidis, Bellovin. Implementing Pushback: Router-Based Defense Against Do. S Attacks. NDSS ’ 02 Argyraki, Cheriton. Active Internet Traffic Filtering: Real-Time Response to Denial-of-Service Attacks. USENIX ‘ 05. 58

Pushback Traffic Filtering Assumption: Do. S attack from few sources Iteratively block attacking network

Pushback Traffic Filtering Assumption: Do. S attack from few sources Iteratively block attacking network segments. 59

Overlay filtering 60

Overlay filtering 60

Overlay filtering Keromytis, Misra, Rubenstein. SOS: Secure Overlay Services. SIGCOMM ‘ 02. D. Andersen.

Overlay filtering Keromytis, Misra, Rubenstein. SOS: Secure Overlay Services. SIGCOMM ‘ 02. D. Andersen. Mayday. Distributed Filtering for Internet Services. Usenix USITS ‘ 03. Lakshminarayanan, Adkins, Perrig, Stoica. Taming IP Packet Flooding Attacks. Hot. Nets ’ 03. 61

Take home message: Denial of Service attacks are real. Must be considered at design

Take home message: Denial of Service attacks are real. Must be considered at design time. Sad truth: n Current Internet is ill-equipped to handle DDo. S attacks Many good proposals for core redesign. 62

Spring 2008 CS 155 Spam Email

Spring 2008 CS 155 Spam Email

How email works: (RFC 821, 1982) SMTP Some SMTP Commands: MAIL FROM: <reverse-path> Repeated

How email works: (RFC 821, 1982) SMTP Some SMTP Commands: MAIL FROM: <reverse-path> Repeated RCPT TO: <forward-path> for each recipient RCPT TO: <forward-path> If unknown recipient: response “ 550 Failure reply” DATA email headers and contents . VRFY username (Often disabled) n 250 (user exists) or 550 (no such user)

Email in the early 1980’s Network 1 sender Mail relay Network 2 Mail relay

Email in the early 1980’s Network 1 sender Mail relay Network 2 Mail relay Network 3 • Mail Relay: forwards mail to next hop. • Sender path includes path through relays. recipient

Spoofed email SMTP: designed for a trusting world … Data in MAIL FROM totally

Spoofed email SMTP: designed for a trusting world … Data in MAIL FROM totally under control of sender n … an old example of improper input validation Recipient’s mail server: n Only sees IP address of direct peer n Recorded in the first From header

The received header Sending spoofed mail to myself: From someone@somewhere. com (172. 24. 64.

The received header Sending spoofed mail to myself: From someone@somewhere. com (172. 24. 64. 20). . . From relays Received: from cs-smtp-1. stanford. edu Received: from smtp 3. stanford. edu Received: from cipher. Stanford. EDU Received header inserted by relays --- untrustworthy From header inserted by recipient mail server

Spam Blacklists RBL: Realtime Blackhole Lists n Includes servers or ISPs that generate lots

Spam Blacklists RBL: Realtime Blackhole Lists n Includes servers or ISPs that generate lots of spam n spamhaus. org , spamcop. net Effectiveness (stats from spamhaus. org): n RBL can stop about 15 -25% of incoming spam at SMTP connection time, n Over 90% of spam with message body URI checks Spammer goal: n Evade blacklists by hiding its source IP address.

Spamming techniques

Spamming techniques

Open relays SMTP Relay forwards mail to destination 1. Bulk email tool connects via

Open relays SMTP Relay forwards mail to destination 1. Bulk email tool connects via SMTP (port 25) 2. Sends list of recipients (via RCPT TO command) 3. Sends email body --- once for all recipients 4. Relay delivers message Honest relay: n Adds Received header revealing source IP n Hacked relay does not

Example: bobax worm Infects machines with high bandwidth n Exploits MS LSASS. exe buffer

Example: bobax worm Infects machines with high bandwidth n Exploits MS LSASS. exe buffer overflow vulnerability Slow spreading: n Spreads on manual command from operator n Then randomly scans for vulnerable machines On infected machine: (spam zombie) n Installs hacked open mail relay. Used for spam. n Once spam zombie added to RBL: w Worm spreads to other machines

Open HTTP proxies Web cache (HTTP/HTTPS proxy) -- e. g. squid xyz. com URL:

Open HTTP proxies Web cache (HTTP/HTTPS proxy) -- e. g. squid xyz. com URL: HTTPS: //xyz. com CONNECT xyz. com 443 Client. Hello Server. Hello To spam: Client. Hello Squid Web Cache Server. Hello CONNECT Spam. Recipient-IP 25 SMTP Commands Squid becomes a mail proxy … Web Server

Finding proxies Squid manual: n (squid. conf) acl Safe_ports port 80 443 http_access deny

Finding proxies Squid manual: n (squid. conf) acl Safe_ports port 80 443 http_access deny !Safe_ports URLs for other ports will be denied Similar problem with SOCKS proxies Some open proxy and open relay listing services: n http: //www. multiproxy. org/ http: //www. stayinvisible. com/ http: //www. blackcode. com/proxy/ http: //www. openproxies. com/ (20$/month)

Open Relays vs. Open Proxies Relay vs. proxy: n Relay takes list of address

Open Relays vs. Open Proxies Relay vs. proxy: n Relay takes list of address and send msg to all n Proxy: spammer must send msg body to each recipient through proxy. zombies typically provide hacked mail relays.

Thin pipe / Thick pipe method Spam source has n High Speed Broadband connection

Thin pipe / Thick pipe method Spam source has n High Speed Broadband connection (HSB) n Controls a Low Speed Zombie (LSZ) TCP handshake LSZ Target SMTP Server TCP Seq #s HSB n n SMTP bulk mail (Source IP = LSZ) Assumes no ingress filtering at HSB’s ISP Hides IP address of HSB. LSZ is blacklisted.

Harvesting emails Will not discuss here … Lots of ways: n majordomo who command

Harvesting emails Will not discuss here … Lots of ways: n majordomo who command n SMTP VRFY command n Web pages n Dictionary harvesting Obvious lesson: n Systems should protect user info

Bulk email tools (spamware) Automate: n n Message personalization w Also test against spam

Bulk email tools (spamware) Automate: n n Message personalization w Also test against spam filters (e. g. spamassassin) Mailing list and proxy list management

Send-Safe bulk emailer

Send-Safe bulk emailer

Anti-spam methods Will not discuss filtering methods …

Anti-spam methods Will not discuss filtering methods …

The law: CAN-SPAM act (Jan. 2004) Bans false or misleading header information n To:

The law: CAN-SPAM act (Jan. 2004) Bans false or misleading header information n To: and From: headers must be accurate Prohibits deceptive subject lines Requires an opt-out method Requires that email be identified as advertisement n . . . and include sender's physical postal address Also prohibits various forms of email harvesting and the use of proxies

Effectiveness of CAN-SPAM Enforced by the FTC: n FTC spam archive spam@uce. gov n

Effectiveness of CAN-SPAM Enforced by the FTC: n FTC spam archive spam@uce. gov n Penalties: 11 K per act Dec ’ 05 FTC report on effectiveness of CAN-SPAM: n 50 cases in the US pursued by the FTC n No impact on spam originating outside the US n Open relays hosted on bot-nets make it difficult to collect evidence http: //www. ftc. gov/spam/

Sender verification I: SPF Goal: prevent spoof email claiming to be from Hot. Mail

Sender verification I: SPF Goal: prevent spoof email claiming to be from Hot. Mail n Why? Bounce messages flood Hot. Mail system MAIL FROM Sender xyz@hotmail. com Recipient hotmail. com Mail Server 64. 4. 33. 7 (MUA) 64. 4. 33. 8 hotmail. com: SPF record: 64. 4. 33. 7 DNS 64. 4. 33. 8 Is Sender. IP in list? More precisely: hotmail. com TXT v=spf 1 a: mailers. hotmail. com -all

Sender verification II: DKIM Domain Keys Identified Mail (DKIM) n Same goal as SPF.

Sender verification II: DKIM Domain Keys Identified Mail (DKIM) n Same goal as SPF. Harder to spoof. Basic idea: n n n Sender’s MTA signs email w Including body and selected header fields Receiver’s MUA checks sig w Rejects email if invalid Sender’s public key managed by DNS w Subdomain: _domainkey. hotmail. com

DKIM header example DKIM-Signature: a=rsa-sha 1; q=dns; d=hotmail. com s=may 2006; c=relaxed/simple; t=1117574938; x=1118006938;

DKIM header example DKIM-Signature: a=rsa-sha 1; q=dns; d=hotmail. com s=may 2006; c=relaxed/simple; t=1117574938; x=1118006938; h=from: to: subject: date; b=dzd. Vy. Of. AKCd. LXd. JOc 9 G 2 q 8 Lo. XSl. Eni. Sb av+yu. U 4 z. Geeru. D 00 lsz. ZVo. G 4 ZHRNi. Yz. R (domain) (selector) (time/exp) (header) (sig) Recipient’s MUA will query for DNS TXT record of may 2006. _domainkey. hotmail. com

Graylists Recipient’s mail server records triples: n (sender email, recipient email, peer IP) n

Graylists Recipient’s mail server records triples: n (sender email, recipient email, peer IP) n Mail server maintains DB of triples First time: triple not in DB: n Mail server sends 421 reply: n Records triple in DB “I am busy” Second time (after 5 minutes): allow email to pass Triples kept for 3 days (configurable) Easy to defeat but currently works well.

Whitelisting: DOEmail User specifies list of allowable senders n n All other senders must

Whitelisting: DOEmail User specifies list of allowable senders n n All other senders must solve CAPTCHA to enable email delivery Simple UI to add incoming senders to whitelist 86

THE END 87

THE END 87