18
Fighting spam for fun and profit the long road to SpamAssassin 4.0 Giovanni Bechis <[email protected]> Fosdem 2019, Brussels

Fighting spam for fun and pro t - FOSDEM · Fighting spam for fun and pro t the long road to SpamAssassin 4.0 Giovanni Bechis Fosdem 2019, ... I SA is a

  • Upload
    others

  • View
    0

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Fighting spam for fun and pro t - FOSDEM · Fighting spam for fun and pro t the long road to SpamAssassin 4.0 Giovanni Bechis  Fosdem 2019, ... I SA is a

Fighting spam for fun and profitthe long road to SpamAssassin 4.0

Giovanni Bechis<[email protected]>

Fosdem 2019, Brussels

Page 2: Fighting spam for fun and pro t - FOSDEM · Fighting spam for fun and pro t the long road to SpamAssassin 4.0 Giovanni Bechis  Fosdem 2019, ... I SA is a

SA as a framework

SpamAssassin should be seen as a framework, not as”plug & play” software

I if you follow HOWTOs you will not take the best outof any software

I to take the best out of SA:I write your ”simple” rulesI participate to ”masscheck”

I SA is a general purpose antispam framework, it’sused to filter spam in some webforms and it’s evenintegrated in a not-so-famous cms

Page 3: Fighting spam for fun and pro t - FOSDEM · Fighting spam for fun and pro t the long road to SpamAssassin 4.0 Giovanni Bechis  Fosdem 2019, ... I SA is a

What’s Masscheck ?

I a tool to test rules for accuracy and hit-rate

I a good way to check how rules are performing

I mass-check is run nightly based on users corporasubmission, from those data, scores are assigned torules and new rules are promoted

Page 4: Fighting spam for fun and pro t - FOSDEM · Fighting spam for fun and pro t the long road to SpamAssassin 4.0 Giovanni Bechis  Fosdem 2019, ... I SA is a

Checking how rules are performing

RuleQA:

I score assigned to messages that has been hit by a rule

I ham/spam hit by a single rule

I rules that overlaps on a particular rule

Page 5: Fighting spam for fun and pro t - FOSDEM · Fighting spam for fun and pro t the long road to SpamAssassin 4.0 Giovanni Bechis  Fosdem 2019, ... I SA is a

What have SpamAssassin done in 3 years and a half ?

I sysadmin team and mass-check work

I security fixes for PDFInfo plugin and core modulesCVE-2017-15705, CVE-2016-1238, CVE-2018-11780& CVE-2018-11781

I perl bug triggered by SA on RedHat distros

Page 6: Fighting spam for fun and pro t - FOSDEM · Fighting spam for fun and pro t the long road to SpamAssassin 4.0 Giovanni Bechis  Fosdem 2019, ... I SA is a

What have SpamAssassin done in 3 years and a half ?

Assorted improvements:

I faster startup code and free(3) fixes for spamc(1)

I SSLv3 support removed from spamc(1)

I freemail antiforge improvements

I added possibility to score based on continents ingeo-aware plugins

I improvements in URILocalBL plugin

I TxRep file descriptor leak fixes

I better check for http[s] mismatch plugin

I regression tests switched to Test::More

Page 7: Fighting spam for fun and pro t - FOSDEM · Fighting spam for fun and pro t the long road to SpamAssassin 4.0 Giovanni Bechis  Fosdem 2019, ... I SA is a

What have SpamAssassin done in 3 years and a half ?

HashBL plugin

The HashBL plugin is theinterface to The EmailBlocklist (EBL).

The EBL is intended to filterspam that is sent from IPaddresses and domains thatcannot be blocked withoutcausing significant numbersof false positives.

Page 8: Fighting spam for fun and pro t - FOSDEM · Fighting spam for fun and pro t the long road to SpamAssassin 4.0 Giovanni Bechis  Fosdem 2019, ... I SA is a

What have SpamAssassin done in 3 years and a half ?

HashBL plugin

Checking Bitcoin scams withHashBL.

Using HashBL plugin (in 4.xrelease) or using an externalplugin you can check if aBitcoin address has beenused for fraudolent purposesor not by asking via a dnsquery to$bitcoinaddress.bl.btcblack.it.

Page 9: Fighting spam for fun and pro t - FOSDEM · Fighting spam for fun and pro t the long road to SpamAssassin 4.0 Giovanni Bechis  Fosdem 2019, ... I SA is a

What have SpamAssassin done in 3 years and a half ?

GeoIP2 support

Starting on 04/01/2018Maxmind legacy geoipdatabases have beendiscontinued.

GeoIP2 support has beenadded to RelayCountry andURILocalBL plugins. Inaddiction RelayCountrysupports alsoIP::Country::DB File as anoption.

Page 10: Fighting spam for fun and pro t - FOSDEM · Fighting spam for fun and pro t the long road to SpamAssassin 4.0 Giovanni Bechis  Fosdem 2019, ... I SA is a

What have SpamAssassin done in 3 years and a half ?

Anti phishing plugin

A new anti phishing pluginhas been developed, itsearches phishing uri in adatabase downloaded fromPhishTank or fromOpenPhish. Moreantiphishing databases willbe added soon.

Page 11: Fighting spam for fun and pro t - FOSDEM · Fighting spam for fun and pro t the long road to SpamAssassin 4.0 Giovanni Bechis  Fosdem 2019, ... I SA is a

What have SpamAssassin done in 3 years and a half ?

Resource limits plugin

A new plugin that usesBSD::Resource perl moduleto assure your spamd childprocesses do not exceedspecified CPU or memorylimit.

Page 12: Fighting spam for fun and pro t - FOSDEM · Fighting spam for fun and pro t the long road to SpamAssassin 4.0 Giovanni Bechis  Fosdem 2019, ... I SA is a

What have SpamAssassin done in 3 years and a half ?

”From Name” spoof plugin

A new plugin that performvarious tests to detect spoofattempts using the Fromheader name section.

From: "[email protected]"

<[email protected]>

Page 13: Fighting spam for fun and pro t - FOSDEM · Fighting spam for fun and pro t the long road to SpamAssassin 4.0 Giovanni Bechis  Fosdem 2019, ... I SA is a

International channels

International channels

Channels are a set of signedrules, they are important andvery effective becausestandard rules are mostlybase on english emails.

Page 14: Fighting spam for fun and pro t - FOSDEM · Fighting spam for fun and pro t the long road to SpamAssassin 4.0 Giovanni Bechis  Fosdem 2019, ... I SA is a

New features in SpamAssassin 4.0

”Ole Macro” detection plugin

A plugin have beendeveloped to check if anemail contains an Officeattachment with a macro, ittries to detect if the attachedmacro is malicious or not.

Page 15: Fighting spam for fun and pro t - FOSDEM · Fighting spam for fun and pro t the long road to SpamAssassin 4.0 Giovanni Bechis  Fosdem 2019, ... I SA is a

New features in SpamAssassin 4.0

”Authentication-Results” parser plugin

A plugin have beendeveloped to check”Authentication-Results”header fields, it can supplythe results obtained to otherplugins, to avoid repeatingchecks that have beenperformed already.

Page 16: Fighting spam for fun and pro t - FOSDEM · Fighting spam for fun and pro t the long road to SpamAssassin 4.0 Giovanni Bechis  Fosdem 2019, ... I SA is a

KAM.cf rules: respond faster to spam

KAM.cf rules

KAM.cf is a set of”additional/unofficial” rulesdeveloped to respond fasterto spam, standard rulestakes some days to bedeployed due to masscheck.They are very effective butthere could be ”very few”false positives.

Page 17: Fighting spam for fun and pro t - FOSDEM · Fighting spam for fun and pro t the long road to SpamAssassin 4.0 Giovanni Bechis  Fosdem 2019, ... I SA is a

New features in SpamAssassin 4.0

SpamAssassin 4.0 and future releases

I full utf-8 support

I GeoDB module for abetter geolocalizationsupport

I better TxRep handling

Page 18: Fighting spam for fun and pro t - FOSDEM · Fighting spam for fun and pro t the long road to SpamAssassin 4.0 Giovanni Bechis  Fosdem 2019, ... I SA is a

Questions ?