T1071.003 Sumo Logic CSE · Sumo

Detect Mail Protocols in Sumo Logic CSE

Adversaries may communicate using application layer protocols associated with electronic mail delivery to avoid detection/network filtering by blending in with existing traffic. Commands to the remote system, and often the results of those commands, will be embedded within the protocol traffic between the client and server. Protocols such as SMTP/S, POP3/S, and IMAP that carry electronic mail may be very common in environments. Packets produced from these protocols may have many fields and headers in which data can be concealed. Data could also be concealed within the email messages themselves. An adversary may abuse these protocols to communicate with systems under their control within a victim network while also mimicking normal, expected traffic.

MITRE ATT&CK

Tactic
Command and Control
Technique
T1071 Application Layer Protocol
Sub-technique
T1071.003 Mail Protocols
Canonical reference
https://attack.mitre.org/techniques/T1071/003/

Sumo Detection Query

Sumo Logic CSE (Sumo)
sql
(_sourceCategory=*network* OR _sourceCategory=*firewall* OR _sourceCategory=*proxy*)
| where dest_port in ("25","465","587","110","995","143","993")
| where !(process_name matches "(?i)(outlook|thunderbird|mailclient|em\\.client|msedge|chrome|firefox)")
| if (dest_port in ("25","465","587"), "SMTP",
    if (dest_port in ("110","995"), "POP3",
      if (dest_port in ("143","993"), "IMAP", "Unknown"))) as Protocol
| if (Protocol in ("IMAP","POP3"), "critical",
    if (Protocol = "SMTP", "high", "medium")) as Severity
| count as ConnectionCount,
  dcount(dest_ip) as UniqueDestIPs,
  sum(bytes_out) as TotalBytesSent,
  min(_messageTime) as FirstSeen,
  max(_messageTime) as LastSeen
  by src_ip, dest_ip, dest_port, Protocol, process_name, Severity
| where ConnectionCount > 2
| sort by ConnectionCount desc
high severity medium confidence

Sumo Logic query detecting non-standard processes making repeated outbound connections to mail protocol ports from network and firewall log sources. Classifies connections by mail protocol, assigns severity (critical for IMAP/POP3 abuse, high for SMTP), and requires more than 2 connections per source/destination/process tuple to reduce false positives from transient connections.

Data Sources

Palo Alto Networks PAN-OS (via Sumo Logic app or syslog)Cisco ASA / FTD firewall logsZscaler NSS cloud proxy logsWindows Sysmon network events (Event ID 3) forwarded via Sumo Logic collectorLinux auditd SYSCALL connect events

Required Tables

Network, firewall, and proxy log sources indexed under sourceCategories matching *network*, *firewall*, or *proxy*

False Positives & Tuning

  • Application servers or web frameworks (java.exe, node.exe, ruby.exe) with embedded email functionality sending transactional email via SMTP, commonly seen in CRM or ticketing platforms
  • Database engines configured for direct SMTP notification delivery (sqlservr.exe, mysqld.exe) that exceed the connection threshold during batch alerting windows
  • Security orchestration or SOAR platforms sending email alerts via SMTP using automation agent process names that are not in the exclusion list
Download portable Sigma rule (.yml)

Other platforms for T1071.003


Testing Methodology

Validate this detection against 3 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are available with Pro.

  1. Test 1SMTP C2 Exfiltration via PowerShell

    Expected signal: Sysmon Event ID 1: PowerShell process creation with Send-MailMessage in command line. Sysmon Event ID 3: Network connection attempt to 127.0.0.1:25. PowerShell ScriptBlock Log Event ID 4104 with SMTP command details.

  2. Test 2POP3 Command Retrieval Simulation

    Expected signal: Sysmon for Linux Event ID 3: Network connection from nc to 127.0.0.1:110. Process creation event for nc with POP3 commands piped via stdin.

  3. Test 3IMAP C2 Channel Simulation

    Expected signal: Sysmon for Linux Event ID 3: Network connection from curl to 127.0.0.1:143. Process creation event for curl with imap:// URL and credentials in command line.

Unlock Pro Content

Get the full detection package for T1071.003 including response playbook, investigation guide, and atomic red team tests.

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections