SMTP to the Internet

This rule detects events that may describe SMTP traffic from internal hosts to a host across the Internet. In an enterprise network, there is typically a dedicated internal host that performs this function. It is also frequently abused by threat actors for command and control, or data exfiltration.

Elastic rule (View on GitHub)

 1[metadata]
 2creation_date = "2020/02/18"
 3deprecation_date = "2021/04/15"
 4maturity = "deprecated"
 5updated_date = "2021/04/15"
 6
 7[rule]
 8author = ["Elastic"]
 9description = """
10This rule detects events that may describe SMTP traffic from internal hosts to a host across the Internet. In an
11enterprise network, there is typically a dedicated internal host that performs this function. It is also frequently
12abused by threat actors for command and control, or data exfiltration.
13"""
14false_positives = [
15    """
16    NATed servers that process email traffic may false and should be excluded from this rule as this is expected
17    behavior for them. Consumer and personal devices may send email traffic to remote Internet destinations. In this
18    case, such devices or networks can be excluded from this rule if this is expected behavior.
19    """,
20]
21from = "now-9m"
22index = ["filebeat-*", "packetbeat-*", "logs-endpoint.events.*"]
23language = "kuery"
24license = "Elastic License v2"
25name = "SMTP to the Internet"
26risk_score = 21
27rule_id = "67a9beba-830d-4035-bfe8-40b7e28f8ac4"
28severity = "low"
29tags = ["Elastic", "Host", "Network", "Threat Detection", "Command and Control"]
30timestamp_override = "event.ingested"
31type = "query"
32
33query = '''
34event.category:(network or network_traffic) and network.transport:tcp and (destination.port:(25 or 465 or 587) or event.dataset:zeek.smtp) and
35  source.ip:(
36    10.0.0.0/8 or
37    172.16.0.0/12 or
38    192.168.0.0/16
39  ) and
40  not destination.ip:(
41    10.0.0.0/8 or
42    127.0.0.0/8 or
43    169.254.0.0/16 or
44    172.16.0.0/12 or
45    192.168.0.0/16 or
46    224.0.0.0/4 or
47    "::1" or
48    "FE80::/10" or
49    "FF00::/8"
50  )
51'''
52
53
54[[rule.threat]]
55framework = "MITRE ATT&CK"
56
57[rule.threat.tactic]
58id = "TA0011"
59name = "Command and Control"
60reference = "https://attack.mitre.org/tactics/TA0011/"
61[[rule.threat]]
62framework = "MITRE ATT&CK"
63[[rule.threat.technique]]
64id = "T1048"
65name = "Exfiltration Over Alternative Protocol"
66reference = "https://attack.mitre.org/techniques/T1048/"
67
68
69[rule.threat.tactic]
70id = "TA0010"
71name = "Exfiltration"
72reference = "https://attack.mitre.org/tactics/TA0010/"

Related rules

to-top