ScavengerEXA. An open source program To fight spam at the source. Thomas Mangin Exa Networks UKNOF 12 2009/02/13



Similar documents
Anti Spam Best Practices

one million mails a day: open source software to deal with it Charly Kühnast Municipal Datacenter for the Lower Rhine Area Moers, Germany

Mail Avenger. David Mazières New York University

Hosted CanIt. Roaring Penguin Software Inc. 26 April 2011

Exim4U. Server Solution For Unix And Linux Systems

. Daniel Zappala. CS 460 Computer Networking Brigham Young University

Analysis of Spam Filter Methods on SMTP Servers Category: Trends in Anti-Spam Development

Internet Security [1] VU Engin Kirda

Mail system components. Electronic Mail MRA MUA MSA MAA. David Byers

OIS. Update on the anti spam system at CERN. Pawel Grzywaczewski, CERN IT/OIS HEPIX fall 2010

CipherMail Gateway Quick Setup Guide

Anti-Spam Measures Survey Pascal Manzano ENISA

SMTP Servers. Determine if an message should be sent to another machine and automatically send it to that machine using SMTP.

ContentCatcher. Voyant Strategies. Best Practice for Gateway Security and Enterprise-class Spam Filtering

Spam, Spam and More Spam. Spammers: Cost to send

Enhanced Spam Defence

Filtering Mail with Milter. David F. Skoll Roaring Penguin Software Inc.

security

Fighting Spam with open source software

Spam blocking methods and experiences

Copyright 2011 Sophos Ltd. Copyright strictly reserved. These materials are not to be reproduced, either in whole or in part, without permissions.

Collateral Damage. Consequences of Spam and Virus Filtering for the System. Peter Eisentraut 22C3. credativ GmbH.

QMAIL & SMTP: A Secure Application for an Unsecure Protocol. Orr Dunkelman. orrd@vipe.technion.ac.il. January 27, 2004 SMTP and QMAIL Slide 1

How To Configure Forefront Threat Management Gateway (Forefront) For An Server

Network Service, Systems and Data Communications Monitoring Policy

Using Traffic Analysis to Detect Spam

Why Spamhaus is Your Best Approach to Fighting Spam

Mail agents. Introduction to Internet Mail. Message format (2) Authenticating senders

Articles Fighting SPAM in Lotus Domino

CS 164 Winter 2009 Term Project Writing an SMTP server and an SMTP client (Receiver-SMTP and Sender-SMTP) Due & Demo Date (Friday, March 13th)

OpenSMTPD : We deliver!

escan Anti-Spam White Paper

EFFECTIVE SPAM FILTERING WITH MDAEMON

smtplib SMTP protocol client

accf_smtp: FreeBSD kernel protection measures against SMTP DDoS and DoS attacks

Advanced Settings. Help Documentation

Do you need to... Do you need to...

AXIGEN Mail Server. Quick Installation and Configuration Guide. Product version: 6.1 Document version: 1.0

services. Anders Wiehe IT department Gjøvik University College

Thanks for choosing sentora-paranoid for your sentora hosting environment security solution

ESET Mail Security 4. User Guide. for Microsoft Exchange Server. Microsoft Windows 2000 / 2003 / 2008

Log Analyzer Viewer Guide

Fighting Spam: Tools, Tips, and Techniques

Log Analyzer Viewer Guide

Security perimeter white paper. Configuring a security perimeter around JEP(S) with IIS SMTP

Inexpensive Addresses An Spam-Combating System

JAVAMAIL API - SMTP SERVERS

escan SBS 2008 Installation Guide

Postfix: Status Quo current development an overview

Cannot send Autosupport , error message: Unknown User

Introduction. Friday, June 21, 2002

Postfix Configuration and Administration

Why Content Filters Can t Eradicate spam

How To Block Ndr Spam

Lab 7: Introduction to Pen Testing (NMAP)

A D M I N I S T R A T O R V 1. 0

OR Filter 3.2 Manual. Draft. Copyright 2003, Martijn Jongen. All Rights Reserved Version : Ref. nr. : MhJ/ By : M.

SMTP Status Codes & SMTP Error Codes Reference

Network Services. SMTP, Internet Message Format. Johann Oberleitner SS 2006

Reputation Metrics Troubleshooter. Share it!

ESET Mail Security & Zarafa 7 infrastructure Integration

Automating Linux Malware Analysis Using Limon Sandbox Monnappa K A monnappa22@gmail.com

ETH Zürich - Mail Filtering Service

smtp-user-enum User Documentation

Technical Note. ISP Protection against BlackListing. FORTIMAIL Deployment for Outbound Spam Filtering. Rev 2.2

An Introduction to Syslog. Rainer Gerhards Adiscon

Configuring Your Gateman Server

IP Addresses in Clients

Protecting DNS Critical Infrastructure Solution Overview. Radware Attack Mitigation System (AMS) - Whitepaper

Configure a Mail Server

PineApp Anti IP Blacklisting

Overview An Evolution. Improving Trust, Confidence & Safety working together to fight the beast. Microsoft's online safety strategy

Detecting Botnets with NetFlow

GRAYWALL. Introduction. Installing Graywall. Graylist Mercury/32 daemon Version 1.0.0

Implementing MDaemon as an Security Gateway to Exchange Server

Avira AntiVir MailGate 3.2 Release Notes

Understanding SMTP authentication and securing your IBM Lotus Domino 8 server from spam

Internet Architecture

Anti-Spam White Paper

An Overview of Spam Blocking Techniques

What is a Mail Gateway?... 1 Mail Gateway Setup Peering... 3 Domain Forwarding... 4 External Address Verification... 4

# Constructors $smtp = Net::SMTP->new('mailhost'); $smtp = Net::SMTP->new('mailhost', Timeout => 60);

Domain Name System WWW. Application Layer. Mahalingam Ramkumar Mississippi State University, MS. September 15, 2014.

Configuring MDaemon for Centralized Spam Blocking and Filtering

Spam DNA Filtering System

POP3 Connector for Exchange - Configuration

Aloaha Mail and Archive

Fast, flexible & efficient delivery software

Comprehensive Filtering. Whitepaper

Quick Start Policy Patrol Mail Security 10

FortiMail Filtering Course 221-v2.0. Course Overview. Course Objectives

How-To: Write simple sieve scripts

Cork Institute of Technology Master of Science in Computing in Education National Framework of Qualifications Level 9

My FreeScan Vulnerabilities Report

SpamPanel Level Manual Version 1 Last update: March 21, 2014 SpamPanel

IBM Express Managed Security Services for Security. Anti-Spam Administrator s Guide. Version 5.32

CS43: Computer Networks . Kevin Webb Swarthmore College September 24, 2015

Emacs SMTP Library. An Emacs package for sending mail via SMTP. Simon Josefsson, Alex Schroeder

NETWORKS AND THE INTERNET

Transcription:

ScavengerEXA An open source program To fight spam at the source Thomas Mangin Exa Networks UKNOF 12 2009/02/13 http://wiki.exa.org.uk/doku.phpdo=export_s5&id=scavenger:uknof12

The spam battle - Yesterday Mouse: Using existing mail servers, open relay Few high volume source Cat: scanning for open relay Using RBL -> Trying to block the spam at the source

The spam battle - Today Mouse: BOTNETs, Spammers creating their own spam infrastructure Lots of low volume source Cat: Bots are simple, not RFC compliant (Greylisting) Spam traps -> RBLs when all fails ask SpamAssasin for some CPU time -> The defense is now at the receiving end

The spam battle - Tomorrow Mouse: Larger, more clever bots, able to bypass greylisting Better spam distribution to become more stealthy Cat: Trying to block bots faster, so they send less -> It looks bleak, doesn't it?

What will not change: Using my crystal ball The use of bots The use of out of date email address databases Compromised machine sending spam but no mail before or after. What should change: Postmaster should get help some help from the 'network', spammers do. The fight should be brought back to the edge

Why am I here? 1- present ScavengerEXA 2 - reduce the spam in //my// mailbox 3 -? 4 - profit.. not! Get help from the community to produce a turn key solution Convince some to help us with an high profile deployment

On the net: What is scavengerexa http://www.thefreedictionary.com/scavenger Alteration of Middle English scauager, schavager, official charged with street maintenance In my book: An carnivore eating Junk created by Exa http://en.wikipedia.org/wiki/carnivore_(fbi) http://en.wikipedia.org/wiki/junk_mail http://en.wikipedia.org/wiki/exa-

ScavengerEXA Design A collection of several application working together through the network mail conversation capture program dispatch server policy server (postfix policy server alike) action servers (email, block spam, etc. the part no ISP wants the same) a dummy MTA (return 450 on all messages)

Capture libpcap based application keep a track of the smtp conversation: client command, parameter EHLO [127.0.0.1] RCPT TO: <user@domain.com> mail server answers 250 Please to meet you 550 user does not exists here Ignore the body of the mail Transmit a UDP packet for each command to the dispatching server

UDP Message Content key=value structure, with the following keys (in no particular order) for each unique si:sp -> di:dp or=pacp (how the packet was created) in=unique random id (identifying the SMTP conversation) si=source IP, the potential bot di=destination IP, mail server contacted he=ehlo/helo string st=state (HELO,MAIL,RCPT,DATA,END-OF-DATA) re=last recpient email address rc=number of recpient in the mail se=sender email address co=smtp response code

Example Mail conversation 220 mail server listing HELO [127.0.0.1] 250 mx.domain.com MAIL FROM: test@domain.com 250 2.1.0 Ok RCPT TO: user@spammed.com 550 5.7.1 <user@spammed.com>: Recipient address rejected: no such user <Disconnection> We do not track smtp auth information atm

UDP Message sent 1/3 HELO [127.0.0.1] 250 mx.domain.com or=pcap co=250 di=4.3.2.1 rc=0 st=ehlo re= si=1.2.3.4 in=01.3c6b.4e.c0c3 se= he=[127.0.0.1]

UDP Message sent 2/3 MAIL FROM: test@domain.com 250 2.1.0 Ok or=pcap co=250 di=4.3.2.1 rc=0 st=mail re= si=1.2.3.4 in=01.3c6b.4e.c0c3 se=test@domain.com he=[127.0.0.1]

UDP Message sent 3/3 RCPT TO: user@spammed.com 550 5.7.1 <user@spammed.com>: Recipient address rejected: no such user or=pcap co=550 di=4.3.2.1 rc=1 st=rcpt re=user@spammed.com si=1.2.3.4 in=01.3c6b.4e.c0c3 se=test@domain.com he=[127.0.0.1]

Dispatch Logic 1 - Receive the UDP message from a capture source Figure out a policy server (hash on sender IP) 2 - Generate a TCP message for that policy server with the same information as the UDP contained 3 - Wait for the answer from the policy server 4 - If the policy server reports it is spam 5 - Generate a/several TCP message(s) to action server(s) Prevent new message to the Policy Server from the spammer

Message Flow

Policy Daemon Based on the code of Exa's internal Postfix Policy Delegation Daemon (the daemon can still be used with Postfix) Use the UDP message format instead of Postfix's Returns: HAM HOLD <IP> (<duration>) <reason> FILTER <IP> [<MTA IP:PORT>] (<duration>) <reason> an MTA of [0.0.0.0:00000] mean that the MTA used to filter the message is left to the software performing the blocking to decide.

Policy Daemon A clear API for its spam classfication plugins with constraint, run if the message match what you are monitoring the backend DB is MySQL... Explaining its design would take another 20 slides writing plugins is **//simple//** Each plugin has its own database connection. support MySQL, PostgreSQL or Sqlite3

Action Mail You may want to use this action whatever else you do. Takes a HOLD or FILTER message Emails you the suspected spammer information

Action Netfilter Read a Linux machine netfilter rules. Force Transproxying of mail to a specified MTA on receipt of a FILTER rule Remove the FILTERING when the filtering period is over Keep state across reboots

Deployment Example

Deployment Example

It is F.R.E.E Licensed under the Affero GPL 3.0 Each ScavengerEXA program being a separate entity, there is no problem implementing a new server under a proprietary licence. AFAIK, IMNAL

It is available now Public SVN Tree http://svn.exa.org.uk/scavenger/trunk Fisheye http://fisheye.exa.org.uk/browse/scavenger/ provides nice delta of changes RSS feed of commits Mailing list http://mailman.exa.org.uk/mailman/listinfo

Build on solid foundations Python, tested with version 2.5.2 Twisted Matrix, event-driven networking engine Python packet capture library (pcap) Python dump packet module (dpkt) Optional MySQL or PostgreSQL For more information see: http://wiki.exa.org.uk/scavenger/faq

Thank you to Richard Clayton SpamHINTS http://www.spamhints.org/

Questions? Want to know more: website: http://scavenger.exa.org.uk/ Contact us: email: scavenger (at) exa (dot) org (dot) uk Thank you for listening.