310 likes | 346 Views
Spam, Spam, Spam, Spit and Spim. CS5480/6480 17-Sep-2008 Matthew J. Probst *with some slides/graphics adapted from J.F Kurose and K.W. Ross. Announcements. HW1 due by 11:59:59pm MT 18-Sep-08 (tomorrow).
E N D
Spam, Spam, Spam,Spit and Spim CS5480/6480 17-Sep-2008 Matthew J. Probst *with some slides/graphics adapted from J.F Kurose and K.W. Ross
Announcements • HW1 due by 11:59:59pm MT 18-Sep-08 (tomorrow). • Hard copy can be turned in now or you can hand it in the cs5480/6480 box outside the SoC office
Spammers: Cost to send? Assuming a $10/mo dialup account: • 13.4 million messages per month might be sent… • A cost of about 1 penny per 14,300 messages • Free trials and virus infected computers (zombies/bots) make it free! • Side benefits of bots to spammers: Email address harvesting.
You: Cost to Receive? $$ $$ • 10+ Billion spam received each day • At 5 seconds per spam (to recognize & delete).. • That’s 50 billion seconds of lost productivity each day (39,457 work years) • Assuming $36k average income per person: $1.5 Billion per day in lost productivity to economy.
Driving Business Incentives? • Pump and dump penny-stocks • Scams-Nigerian investments, phishing,etc. • Botnet Viruses • Meds • Insurance • Porn • Loans/Mortgages • Others… ROI? Assuming: 13.4M spam/month @ 0.05% take rate (1/2000) on a $20 pill that “cures cancer, eliminates all joint pain AND pleases your significant other”, you could make $134K/month
Botnets and Spammers DDOS • Example: Storm worm currently running on up to 40 million infected computers. • More computing power than top 500 supercomputers in world combined! • Used for DDOS attacks, penny stock spam and propagating itself via email. • Sends ~186 Billion spam messages a day. Replication Spam Vender Spammer Bot controller Interesting stats from Spamhaus (widely used RBL): http://www.spamhaus.org/statistics/countries.lasso
SMTP: delivery to receiver’s server (w/queuing) Mail access protocol: retrieval from server POP: Post Office Protocol [RFC 1939] authorization (agent <-->server) and download IMAP: Internet Mail Access Protocol [RFC 1730] more features (more complex) manipulation of stored msgs on server HTTP: Hotmail , Yahoo! Mail, gmail etc. user agent user agent Alice.com MTA SMTP Mail access protocols SMTP HTTP, POP3 or IMAP Bob.com MTA Delivered!
user agent user agent Alice.com MTA SMTP Ideal place to filter spam? SMTP HTTP POP3 or IMAP • Source machine • Source MTA server • In middle of network • Recipient MTA server • Recipient machine Pros & Cons of each? Bob.com MTA
user agent user agent Alice.com MTA SMTP ISP IP block white-listing SMTP Only 12.1.X.X allowed! HTTP POP3 or IMAP • Source MTA filter. • ISPs allow any IP blocks on their network to relay through their mail servers. Problems? Disallows mobility Allows botnets, viruses, etc 12.1.1.5 Bob.com MTA Delivered!
user agent user agent Alice.com MTA SMTP SMTP-AUTH SMTP HTTP POP3 or IMAP +Username +Password • Source MTA requires username/password before relaying a message. • Only ISP’s own customers allowed to relay • Optional: Block all other outgoing SMTP • Allows mobility, Blocks dumb viruses Problems? Free Trial & Fraudulant accounts. Can source MTA itself be trusted? (no) Bob.com MTA Delivered!
user agent user agent Alice.com MTA SMTP Rate throttling SMTP HTTP POP3 or IMAP 25 M/M • Simple: Source MTA Limits the number/rate of emails from individual senders. • Limit on: Max recipients per message Max messages per time period etc. Problems? Again: spammers can code their own MTAs Millions of throttled bots can still spam-a-lot! Bob.com MTA Delivered!
user agent user agent Alice.com MTA (13.1.1.1) SMTP SPF (Sender Policy Framework) SMTP HTTP POP3 or IMAP spf? • Recipient MTA Filter • TXT dns record on a domain that lists “Authorized” relays for email marked as coming from that domain. Problems? Only effective with mass adoption. Spammers happily comply with SPF 13.1.1.1 Alice.com DNS Bob.com MTA Delivered!
user agent user agent Alice.com MTA (13.1.1.1) SMTP Relay Blacklists (RBLs) SMTP HTTP POP3 or IMAP • Recipient MTA Filter • DB of IP addresses (& IP blocks) that should not be allowed to relay email. • 100s of RBLs publicly available. • Mail servers commonly use several RBLs • Individually or group maintained. • Conservative vs ultraliberal inclusion. 13.1.1.1 ok? OK! Bob.com MTA OK! DNS rbl3 Delivered! OK! DNS rbl2 DNS rbl1
Relay Blacklists (RBLs) cont. Problems? Take it or leave it one-size-fits-all. (Is either too aggressive or too passive). Central RBL servers easy to DDOS.If done within network, then prevents smtp-auth.
user agent user agent Alice.com MTA (13.1.1.1) SMTP Relay White-lists SMTP HTTP, POP3 or IMAP • Recipient MTA Filter • Automatically allows specific domains, relays & senders. All others blocked by default. Problems? Easy to get out of date? Spammers can use legitimate email addresses, ISPs and domains. (botnets,etc). 13.1.1.1 ok? OK! Bob.com MTA OK! DNS wl3 Delivered! OK! DNS wl2 DNS wl1
user agent user agent Alice.com MTA (13.1.1.1) SMTP Greylists SMTP 13.1.1.1 ok? • Don’t fully allow (not a whitelist) • Don’t completely block (not a blacklist). • Slow down handshake & negotiation (tarpit) and/or take more time/resources to scan. Problems? Grey! Bob.com MTA Grey! DNS gl3 Temporarily Reject! Grey! DNS gl2 DNS gl1 Tarpitting doesn’t block determined spammers with effectively unlimited resources.
user agent user agent Alice.com MTA SMTP Tricking Spammers dumb MTAs Fake MTA FAIL! 14.1.1.1 SMTP HTTP POP3 or IMAP • Require MTAs to adhere to full SMTP RFC. • Point primary MX record at null sync. • Secondary MX record point to real MTA. Problems? Spammers can make their MTAs smarter Some Spammers use existing ISP MTAs bob.com mx? MX10: 14.1.1.1 MX20: 14.1.12 Bob.com MTA (14.1.1.2) Bob.com DNS Delivered!
user agent user agent SMTP Domain Keys Identified Mail (DKIM) SMTP HTTP POP3 or IMAP Pub Key? <PubKey> • Sender MTA signs message hash w/ priv key. • Adds signature as new header: “DomainKey-Signature” • Recipient MTA uses DNS txt record to find public key to authenticate signature. Problems? Spammer domains can conform Spammers can hijack legitimate accounts Alice.com DNS Bob.com MTA (Authenticates message) Alice.com MTA (Signs Message) Delivered! Adoption
user agent user agent Alice.com MTA SMTP S/MIME Signatures SMTP POP3 or IMAP • Senders obtain a digital cert from a trusted Certificate Authority (CA). • Can use the cert for both signing as well as encryption of messages. • Recipients can verify certs via certificate chain (just like web browsers). Problems? Cost of per sender cert. Verifies Signature Signs Message Bob.com MTA Trusted CA Delivered! Adoption
user agent user agent Alice.com MTA SMTP Bayesian Content Filters SMTP • Recipient filter • Individualized DB. Requires training • Learns common words & phrases from spam • Spam “scoring” given to each message. Problems? misspellings jpeg/pdf spam Hash(“Viagra”)? Bob.com MTA SPAM! DB X-Rejected-X Randomized spam content
user agent user agent Alice.com MTA SMTP Vipul’s Razor SMTP HTTP, POP3 or IMAP • Recipient Filter. • Hash of email body, html links or paragraphs (messages “signature”). Lookup this signature in centralized DB of known spam. • Only “Authorized Reporters” can register spam signatures. Problems? 2e821f039 ok? OK! Bob.com MTA (computes signature) Razor DB1 Delivered! OK! Razor DB2 • Randomized content • jpeg/pdf spam.
Spam Training Honeypots • Dedicate an inbox to only attract and profile spam. • Randomly generated address: asdf@domain.com or common (but unused) address: bob@domain.com • Email received by this box can be fed to bayesian filter, vipuls razor & personal RBLs.
What is used today? • Combination of all of these techniques. • Spamassassin as an example. • RBLs are low hanging fruit… Commonly block 80%+ of spam.
Remaining Problems • Not only smtp needs protection (spit,spim) • Increased client mobility & P2P messaging • P2P spit (no reliance on central scanners or CA). • Fast vs slow path selection based on trust of sender & sender’s email path. • Fast reaction to entity behavior changes (iZombie?)
Idea: Micro-payments • Senders pay fraction of a cent for each email they send. • Won’t deter normal email users, but would definitely stop many spammers. • Variation: Rather than charge for each email… Force all email users to put $$ in escrow… only charging account upon receiving complaints.
user agent user agent Alice.com MTA SMTP Idea:Social-net Transitive Trust Nancy Jim Carol linkedin myspace Bob opensocial Alice fb SMTP HTTP POP3 or IMAP Accept or Reject? Bob.com MTA Accept! • Based off of “Small Worlds” • No centralized filters required • Online or P2P (with social net caching) • Trust levels are constantly changing (fast reaction to observed mis-behaviors)
P2P Experience & RBL • User agents collect their own experience (positive and negative) and share them with their social peers. • User agents generate their own personal RBLs mods based off of their “experience DB”. • User agents query for neighbor’s experiences via multicast.
Dynamic Grey-listing • Selectively decide which message to send on fast-path (Layer 3) vs through tarpit (Layer-7..for further inspection). • Fast path may include no scanning at all freeing up scanning resources to be used on un-trusted messages.
Best single current method of avoiding spam: HIDE! • Use BCC when two recipients have no need of knowing each other’s email addr. • Keep your anti virus software up to date (or use a Mac). • Don’t allow your email address to be posted on public web sites. • Use at least two email accounts… one for your smart friends (that know how to use bcc and how to keep their system’s virus free) and one for everyone else.
Questions? • Questions / Comments / Feedback? *costume available at spamgift.com