Detection rules › Sigma

Suspicious Outbound SMTP Connections

Status
test
Severity
medium
Log source
category network_connection, product windows
Author
frack113
Source
github.com/SigmaHQ/sigma

Adversaries may steal data by exfiltrating it over an un-encrypted network protocol other than that of the existing command and control channel. The data may also be sent to an alternate network location from the main command and control server.

Known false positives

  • Other SMTP tools

MITRE ATT&CK coverage

Telemetry coverage

ProviderRecord / event type
SysmonEvent ID 3: Network connection

Rule body

title: Suspicious Outbound SMTP Connections
id: 9976fa64-2804-423c-8a5b-646ade840773
status: test
description: |
    Adversaries may steal data by exfiltrating it over an un-encrypted network protocol other than that of the existing command and control channel.
    The data may also be sent to an alternate network location from the main command and control server.
references:
    - https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1048.003/T1048.003.md#atomic-test-5---exfiltration-over-alternative-protocol---smtp
    - https://www.ietf.org/rfc/rfc2821.txt
author: frack113
date: 2022-01-07
modified: 2022-09-21
tags:
    - attack.exfiltration
    - attack.t1048.003
logsource:
    category: network_connection
    product: windows
detection:
    selection:
        DestinationPort:
            - 25
            - 587
            - 465
            - 2525
        Initiated: 'true'
    filter_clients:
        Image|endswith:
            - \thunderbird.exe
            - \outlook.exe
    filter_mailserver:
        Image|startswith: 'C:\Program Files\Microsoft\Exchange Server\'
    filter_outlook:
        Image|startswith: 'C:\Program Files\WindowsApps\microsoft.windowscommunicationsapps_'
        Image|endswith: '\HxTsr.exe'
    condition: selection and not 1 of filter_*
falsepositives:
    - Other SMTP tools
level: medium

Stages and Predicates

Stage 0: condition

selection and not 1 of filter_*

Stage 1: selection

selection:
    DestinationPort:
        - 25
        - 587
        - 465
        - 2525
    Initiated: 'true'

Stage 2: not filter_*

filter_clients:
    Image|endswith:
        - \thunderbird.exe
        - \outlook.exe
filter_mailserver:
    Image|startswith: 'C:\Program Files\Microsoft\Exchange Server\'
filter_outlook:
    Image|startswith: 'C:\Program Files\WindowsApps\microsoft.windowscommunicationsapps_'
    Image|endswith: '\HxTsr.exe'

Exclusions

The rule actively suppresses these predicates.

FieldKindExcluded valuesSearch
Imageends_with\HxTsr.exeexcludes:Image field:"Image" value:"\HxTsr.exe"
Imagestarts_withC:\Program Files\WindowsApps\microsoft.windowscommunicationsapps_excludes:Image field:"Image" value:"C:\Program Files\WindowsApps\microsoft.windowscommunicationsapps_"
Imageends_with\outlook.exeexcludes:Image field:"Image" value:"\outlook.exe"
Imageends_with\thunderbird.exeexcludes:Image field:"Image" value:"\thunderbird.exe"
Imagestarts_withC:\Program Files\Microsoft\Exchange Server\excludes:Image field:"Image" value:"C:\Program Files\Microsoft\Exchange Server\"

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
DestinationPorteq
  • 25
  • 2525
  • 465
  • 587
field:"DestinationPort" kind:eq
Initiatedeq
  • true corpus 50 (sigma 50)
field:"Initiated" kind:eq value:"true"