Apache Spamassassin
Overview
SpamAssassin is a computer program used for e-mail spam filtering. SpamAssassin uses a variety of spam-detection techniques, including DNS-based and fuzzy-checksum-based spam detection, Bayesian filtering, external programs, blacklists and online databases. It is released under the Apache License 2.0 and is now part of the Apache Foundation.
Related Built-in Rules
The following Sekoia.io built-in rules match the intake Apache SpamAssassin. This documentation is updated automatically and is based solely on the fields used by the intake which are checked against our rules. This means that some rules will be listed but might not be relevant with the intake.
SEKOIA.IO x Apache SpamAssassin on ATT&CK Navigator
Cryptomining
Detection of domain names potentially related to cryptomining activities.
- Effort: master
Dynamic DNS Contacted
Detect communication with dynamic dns domain. This kind of domain is often used by attackers. This rule can trigger false positive in non-controlled environment because dynamic dns is not always malicious.
- Effort: master
Exfiltration Domain
Detects traffic toward a domain flagged as a possible exfiltration vector.
- Effort: master
Remote Access Tool Domain
Detects traffic toward a domain flagged as a Remote Administration Tool (RAT).
- Effort: master
SEKOIA.IO Intelligence Feed
Detect threats based on indicators of compromise (IOCs) collected by SEKOIA's Threat and Detection Research team.
- Effort: elementary
Sekoia.io EICAR Detection
Detects observables in Sekoia.io CTI tagged as EICAR, which are fake samples meant to test detection.
- Effort: master
TOR Usage Generic Rule
Detects TOR usage globally, whether the IP is a destination or source. TOR is short for The Onion Router, and it gets its name from how it works. TOR intercepts the network traffic from one or more apps on user’s computer, usually the user web browser, and shuffles it through a number of randomly-chosen computers before passing it on to its destination. This disguises user location, and makes it harder for servers to pick him/her out on repeat visits, or to tie together separate visits to different sites, this making tracking and surveillance more difficult. Before a network packet starts its journey, user’s computer chooses a random list of relays and repeatedly encrypts the data in multiple layers, like an onion. Each relay knows only enough to strip off the outermost layer of encryption, before passing what’s left on to the next relay in the list.
- Effort: master
Event Categories
The following table lists the data source offered by this integration.
Data Source | Description |
---|---|
Email gateway |
SpamAssassin logs the spam details along with message ID and email recipient. |
Mail server |
SpamAssassin logs the spam details along with message ID and email recipient. |
Event Samples
Find below few samples of events and how they are normalized by Sekoia.io.
{
"message": "2019-09-06T17:20:42+02:00 hostfoo spamd[15185]: dns: new_dns_packet: domain is utf8 flagged: ns-1547.awsdns-01.co.uk",
"related": {
"hosts": [
"ns-1547.awsdns-01.co.uk"
]
},
"source": {
"address": "ns-1547.awsdns-01.co.uk",
"domain": "ns-1547.awsdns-01.co.uk",
"registered_domain": "awsdns-01.co.uk",
"subdomain": "ns-1547",
"top_level_domain": "co.uk"
}
}
{
"message": "2019-09-10T16:27:15+02:00 hostfoo spamd[22559]: spamd: processing message <20190910142045.453A7E0933@gatewayxl.corp.net> for debian-spamd:119",
"related": {
"hosts": [
"gatewayxl.corp.net"
],
"user": [
"debian-spamd"
]
},
"source": {
"address": "gatewayxl.corp.net",
"domain": "gatewayxl.corp.net",
"registered_domain": "corp.net",
"subdomain": "gatewayxl",
"top_level_domain": "net"
},
"user": {
"id": "119",
"name": "debian-spamd"
}
}
{
"message": "2019-09-10T16:23:03+02:00 hostfoo spamd[13943]: spamd: result: . -1 - DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,HTML_FONT_LOW_CONTRAST,HTML_MESSAGE,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS scantime=2.9,size=55475,user=debian-spamd,uid=117,required_score=5.0,rhost=127.0.0.1,raddr=127.0.0.1,rport=46152,mid=<18470d5a9beea70020c028d49a50c882@corp.com>,autolearn=disabled",
"related": {
"hosts": [
"corp.com"
],
"ip": [
"127.0.0.1"
],
"user": [
"debian-spamd"
]
},
"source": {
"address": "corp.com",
"domain": "corp.com",
"ip": "127.0.0.1",
"port": 46152,
"registered_domain": "corp.com",
"top_level_domain": "com"
},
"user": {
"id": "117",
"name": "debian-spamd"
}
}
Extracted Fields
The following table lists the fields that are extracted, normalized under the ECS format, analyzed and indexed by the parser. It should be noted that infered fields are not listed.
Name | Type | Description |
---|---|---|
source.domain |
keyword |
The domain name of the source. |
source.ip |
ip |
IP address of the source. |
source.port |
long |
Port of the source. |
user.id |
keyword |
Unique identifier of the user. |
user.name |
keyword |
Short name or login of the user. |
Configure
This setup guide will show you how to forward logs produced by your SpamAssassin servers to Sekoia.io by means of an rsyslog transport channel. Please consult the Rsyslog Transport documentation to forward these logs to Sekoia.io.