Deny-Spammers: Spam Blocking with a Dynamically Updated Firewall Ruleset 11.06.02 chris tracy deeann m.m. mikula.

Slides:



Advertisements
Similar presentations
Filtragem Filtragem de com Red Hat Linux Implementações Práticas e Apresentação de Laboratórios Ruben Oliveira RHCE RHCX MCSE MCITP.
Advertisements

1 Effective, secure and reliable hosted security and continuity solution.
Justin Mason, SpamAssassin Project & Deersoft
HONEYPOTS Mathew Benwell, Sunee Holland, Grant Pannell.
Code-Red : a case study on the spread and victims of an Internet worm David Moore, Colleen Shannon, Jeffery Brown Jonghyun Kim.
Using Capability to prevent Internet Denial-of-Service attacks  Tom Anderson  Timothy Roscoe  David Wetherall  Offense Team –Khoa To –Amit Saha.
Fighting spam: the thin grey line Alun Jones,
What is Spam  Any unwanted messages that are sent to many users at once.  Spam can be sent via , text message, online chat, blogs or various other.
Addressing spam and enforcing a Do Not Registry using a Certified Electronic Mail System Information Technology Advisory Group, Inc.
Methods for Stopping Spam James Lick
AVG Internet Security 7.5 Product presentation.
1 Aug. 3 rd, 2007Conference on and Anti-Spam (CEAS’07) Slicing Spam with Occam’s Razor Chris Fleizach, Geoffrey M. Voelker, Stefan Savage University.
IMF Mihály Andó IT-IS 6 November Mihály Andó 2 / 11 6 November 2006 What is IMF? ­ Intelligent Message Filter ­ provides server-side message filtering,
How do Networks work – Really The purposes of set of slides is to show networks really work. Most people (including technical people) don’t know Many people.
By Won Lee.  Stands for Simple Mail Transfer Protocol  Used for sending and receiving electronic mail efficiently and reliably  Daily function of life.
FROM RICHARD RODRIGUES JOHN ANIMALU FELIX SHULMAN THE HONORARY MEMBERS OF THE INTERCONTINENTAL GROUP Information security in real business firewall security.
Web Server Administration
Broadcast service Core tools. Agenda 1.Introduction – tool and its main features 2.Setting up and sending a simple broadcast 3.Achieving.
Introduction to the Secure SMTP Server service. Secure SMTP server is a secure, reliable SMTP mail relay server for your outgoing mail. Secure SMTP service.
Department Of Computer Engineering
Anti-Spam SMTP Implementation for anonymous Dial-In SwiNOG #5, Fredy Künzler, Init Seven AG.
Pro Exchange SPAM Filter An Exchange 2000 based spam filtering solution.
Kaspersky Open Space Security: Release 2 World-class security solution for your business.
23 October 2002Emmanuel Ormancey1 Spam Filtering at CERN Emmanuel Ormancey - 23 October 2002.
Spam Reduction Techniques Using greylisting and SpamAssassin.
Belnet Antispam Pro A practical example Belnet – Aris Adamantiadis BNC – 24 November 2011.
FIREWALL TECHNOLOGIES Tahani al jehani. Firewall benefits  A firewall functions as a choke point – all traffic in and out must pass through this single.
Taiwan Network Information Center Spam Status & Anti-Spam Schemes in Taiwan Taiwan Network Information Center David Chen Sep 5, 2002.
Norman SecureTide Powerful cloud solution to stop spam and threats before it reaches your network.
PacNOG 6: Nadi, Fiji Dealing with DDoS Attacks Hervey Allen Network Startup Resource Center.
Login Screen This is the Sign In page for the Dashboard Enter Id and Password to sign In New User Registration.
Copyright © 2000, ZipLink Inc. Patent Pending 1 Mail Message Metering or, how to block outbound spam Robert D. Haskins.
CS426Fall 2010/Lecture 361 Computer Security CS 426 Lecture 36 Perimeter Defense and Firewalls.
Section 11.1 Identify customer requirements Recommend appropriate network topologies Gather data about existing equipment and software Section 11.2 Demonstrate.
Login Screen This is the Sign In page for the Dashboard New User Registration Enter Id and Password to sign In.
IT:Network:Applications.  How messaging servers work  Initial tips for success Exchange management  Server roles  Exchange Server Management  Message.
Recovery-Oriented Computing User Study Training Materials October 2003.
© Toronto Area Security Klatch 2007 A drop-in anti-spam solution A 15 minute speed talk by Paul Wouters.
Client X CronLab Spam Filter Technical Training Presentation 19/09/2015.
An Anti-Spam Method with SMTP Session Abort Nariyoshi YAMAI 1 Kiyohiko OKAYAMA 1 Takumi SEIKE 1 Keita KAWANO 1 Motonori NAKAMURA 2 Shin MARUYAMA 3 1 Okayama.
Small Business Resource Power Point Series How to Avoid Your Marketing Messages Being Labelled as Spam.
Denial-of-Service Attacks Justin Steele Definition “A "denial-of-service" attack is characterized by an explicit attempt by attackers to prevent legitimate.
System Security Chapter no 16. Computer Security Computer security is concerned with taking care of hardware, Software and data The cost of creating data.
1 Implementing Monitoring and Reporting. 2 Why Should Implement Monitoring? One of the biggest complaints we hear about firewall products from almost.
SpamAssassin An Introduction PacNOG I Workshop June 20, 2005 Nadi, Fiji Hervey Allen.
Spam from an ISP perspective Simon Lyall, Ihug Uniforum NZ NetForum Conference July 2003.
Agilent Technologies Copyright 1999 H7211A+221 v Capture Filters, Logging, and Subnets: Module Objectives Create capture filters that control whether.
Silicon & Software Systems (S3)‏ Copyright © Silicon & Software Systems Limited Antispam protection IT Department 20/03/2008 Ondrej Valousek.
Source pictures for document ”Thoughts about increasing spam annoyance” by License: This material may be distributed only subject.
How a major ISP built a new anti-abuse platform Mike O’Reirdan Comcast Distinguished Engineer Internet Systems Engineering Comcast National Engineering.
LinxChix And Exim. Mail agents MUA = Mail User Agent Interacts directly with the end user  Pine, MH, Elm, mutt, mail, Eudora, Marcel, Mailstrom,
Lesson 19-E-Commerce Security Needs. Overview Understand e-commerce services. Understand the importance of availability. Implement client-side security.
Copyright ©2015 WatchGuard Technologies, Inc. All Rights Reserved WatchGuard Training WatchGuard XCS What’s New in version 10.1.
ITGS Network Architecture. ITGS Network architecture –The way computers are logically organized on a network, and the role each takes. Client/server network.
SMTP Tapu Ahmed Jeremy Nunn. Basics Responsible for electronic mail delivery. Responsible for electronic mail delivery. Simple ASCII protocol that runs.
Intrusion Detection Systems Paper written detailing importance of audit data in detecting misuse + user behavior 1984-SRI int’l develop method of.
Firewalls. Intro to Firewalls Basically a firewall is a barrier to keep destructive forces away from your computer network.
Role of Router. The Router as a Perimeter Device  Usually the main function of a router is considered as the forwarding of packets between two network.
Role Of Network IDS in Network Perimeter Defense.
CERN - IT Department CH-1211 Genève 23 Switzerland t OIS Update on the anti spam system at CERN Pawel Grzywaczewski, CERN IT/OIS HEPIX fall.
Spam By Dan Sterrett. Overview ► What is spam? ► Why it’s a problem ► The source of spam ► How spammers get your address ► Preventing Spam ► Possible.
[1] Control Spam by the Use of Greylisting Torgny Hallenmark LDC - Computing Center Lund University, Sweden TERENA Networking.
Firewalls. Overview of Firewalls As the name implies, a firewall acts to provide secured access between two networks A firewall may be implemented as.
Fighting Spam in an Exchange Environment Tzahi Kolber IT Supervisor - Polycom Israel.
Anti-Spam Updates Activity Coordination Meeting March 2006 Kevin Hill.
28th March 2003 SPAM Presenter: Matthew Sullivan.
Unit 3 Section 6.4: Internet Security
Project Management: Messages
Introduction to Networking
Spam Fighting at CERN 12 January 2019 Emmanuel Ormancey.
Presentation transcript:

Deny-Spammers: Spam Blocking with a Dynamically Updated Firewall Ruleset chris tracy deeann m.m. mikula

Motivation for Paper Deeann presented a Spam BOF at LISA 2001: –generated a lot of excitement –idea to write the paper came from this –seemed like a novel approach to fighting spam –share our “good idea” –get feedback to improve the idea

Introduction We will: –detail our methods for controlling spam at a small ISP –discuss initial unsuccessful tactics –discuss the resulting development of our unique spam blocking system

Introduction We will show how our spam blocking system: –classifies hosts as probable spammers –dynamically manages a firewall ruleset –conserves system resources –effectively blocks spam

Theft of Service Lost bandwidth CPU cycles Disk space Lost time –end-users and administrators Obviously this is lost money Apparent escalation in recent years

Spam Horror Stories Hotmail states that 80% of its almost 2 billion processed messages are spam. - Lee Gomes, The Wall Street Journal “Brightmail...now records 140,000 spam attacks a day, each potentially involving thousands of messages, if not millions.” - Jennifer Lee, The New York Times

Tools for Coping with Spam Simple Mail Filters –Mail::Audit, procmail... –patches for various MTAs qmail-uce, rblsmtpd...(lots of these) –versatile spam filters spamassassin sieve bayespam

Tools for Coping with Spam Databases –Relay Blackhole Lists (RBL) lists the IPs of known spammers, open relays, dialup/DSL address pools –Razor –Pyzor –DCC - Distributed Checksum Clearinghouse

Trouble with Spam Filtering Requires: –more CPU power –network bandwidth if accessing networked databases RBL, DCC, Razor, Pyzor... –a more complicated mail system administrative overhead –updates, configuration...

Trouble with Spam Filtering False positives (Type I error): –legitimate messages that are marked as spam –spam filters are getting better and better, but... –users are more likely to ignore everything that their spam filter catches

Our Problem Spammers were effectively DOS’ing our mail server Wanted a way to be able to selectively deny hosts –take away the ability to connect to our mail server if we detect them as a spammer –RFC 706 (next slide)

RFC On the Junk Mail Problem In a nutshell: –No mechanism for a mail host to selectively refuse messages –Lots of unwanted messages by a misbehaving host would constitute a DoS attack –Both local users and network communication could suffer

Hardware/Software Platform Software: –FreeBSD server is just a little behind... :) –qmail-1.03 patched with qmail-uce checklocal patch Hardware: –1GHz Athlon processor –640MB of RAM

What We Tried First qmail-uce checklocal patch –denys mail for non-existent mailboxes –by default, qmail accepts mail for these users this is actually an anti-spam mechanism to prevent spammers from getting valid addresses –qmail-smtpd returns a 550 when attempting to send

What We Tried First qmail-uce checklocal patch –example: RCPT TO: 550 Sorry, no mailbox here by that name. (#5.1.1)

What We Tried First qmail-uce checklocal patch –example of logging output: Oct 10 13:09:24 mail smtpd: : DENYMAIL: RCPT_TO:_Filter.NoUser:_ relay unknown [ ] FROM ADDR

What We Tried First qmail-uce checklocal patch –limitations: kept the queue size down, but didn’t prevent spammers from making parallel SMTP connections sluggish performance when there were many parallel SMTP connections to the server as a result, load average still >> 1

What We Tried First rblsmtpd (part of ucspi-tcp) –a.k.a. tcpserver – –queries any number of RBL sources (and anti-RBL sources) to catch spammers open relays, dialup/DSL pools, known spammers –temporary (451) or permanent (553)

What We Tried First rblsmtpd (part of ucspi-tcp) –toggled on when heavily spammed off if queue size < 2000 on if queue size > 2000 this was done to limit complaints –on/off method made 451 errors effectively useless –limitations: too many false positives many complaints from customers about mail delays (451) or bounces (553)

A Decision to Start Coding Should we buy more hardware? –more expensive Or write software to manage a firewall based on the checklocal logging output? –less expensive –Obviously, this is what we opted to do

Design Goals What has not worked for us in the past? Do we have enough resources to allow client-side filtering options? Do we have the time and expertise to create our own spam blocking solutions? Would it be more effective to purchase faster and better hardware than to script a custom solution? How transparent does the spam blocking need to be to the user base? Are we concerned with bandwidth consumed by spam attacks?

Requirements Method must conserve system resources. Method must reduce the amount of bandwidth consumed by spam attacks. Method must not add much additional overhead to mail processing. Method must prevent spamming sites from getting mail into the mail queue. The system must be manageable in a way that allows us to exempt certain hosts or networks. Keep our customers happy by minimizing the number of false positives. The process must be as transparent as possible to end users.

Data Flow Diagram

Oct 10 13:09:24 mail smtpd: : DENYMAIL: RCPT_TO:_Filter.NoUser:_ relay unknown [ ] FROM ADDR

Data Flow Diagram Add rule: ipfw add 1000 unreach filter-prohib tcp from to any 25 Delete rule: ipfw delete 1000

Data Structures 3 hash structures: –Host Tracking: %spammer ( hash of lists) keys of hash - host IP address values of hash - lists of timestamps timestamps - represent times that a host sent a mail to a nonexistent address –Banned Hosts: %banned (1-level hash) keys of hash - host IP address values of hash - timestamp for when a host was banned –Exception List: %noban_list (4-level hash) keys represent octets first level - first set of octets, etc... hash structure chosen for performance

Other Configuration Variables $MAX_SPAMMER_ENTRIES (default: 50) –number of timestamp entries to keep for each spammer $SPAM_TIMESPAN (default: 3600 seconds) –5-minute sampling interval –timespan to check for spam attempts $SPAM_TRIGGER (default: 10) –number of nonexistent mailbox delivery attempts required to trigger block $BAN_TIME (default: 3 days) –how long a host should stay banned for

Implementation / Pseudo-code While (true) { match maillog lines against a regexp for undeliverable messages to non-existent addresses and parse timestamp and IP address skip line if host is in the exception list trim the timestamp list for this host to $MAX_SPAMMER_ENTRIES add the timestamp to the host's list contained in the %spammer hash check how many delivery attempts to non-existent address this host has made in the sampling interval $SPAM_TIMESPAN if (nondeliverable messages count > $SPAM_TRIGGER) { add_firewall_rule(); } if (time() >= $next_refresh) { $next_refresh = time() + $REFRESH_INTERVAL; reload the exception list into %noban_list hash; prune %banned hash (un-ban hosts who have been banned for $BAN_TIME); }

In Production Firewall Reset

Quick Historical Statistics 25,284 Dec ,338 Jan ,849 Feb ,652 Mar ,175 Apr ,808 May ,298 Jun ,787 Jul ,781 Aug ,883 Sep ,935 Oct 2002 Number of hosts banned by month:

Limitations CIDR notation not supported in exception list only compatible with FreeBSD + checklocal patched qmail limited scalability checklocal exploitable by spammers to find valid addresses –easy to work around this

Future Plans Address scalability issues –add ability to use a separate firewall Integration with a 3rd-party app –SpamAssassin, Anomy Sanitizer... –use results from app to ban hosts Improve statistics generation –facilitate research –look for interesting patterns

Future Plans Develop a better interface... –for unbanning hosts –managing the exception list Interoperability with other operating systems and MTAs Develop more spam signatures...? –# of concurrent SMTP connections –# of recipients in RCPT TO list

Availability Deny-Spammers is freely available source code and documentation: – written in Perl 5 only works with FreeBSD + checklocal patched qmail

The End Thanks! Q&A...?