Detection rules › Sigma

Outbound RDP Connections Over Non-Standard Tools

Status
test
Severity
high
Log source
product windows, category network_connection
Author
Markus Neis
Source
github.com/SigmaHQ/sigma

Detects Non-Standard tools initiating a connection over port 3389 indicating possible lateral movement. An initial baseline is required before using this utility to exclude third party RDP tooling that you might use.

MITRE ATT&CK coverage

Event coverage

ProviderEventTitle
SysmonEvent ID 3Network connection

Rule body yaml

title: Outbound RDP Connections Over Non-Standard Tools
id: ed74fe75-7594-4b4b-ae38-e38e3fd2eb23
status: test
description: |
    Detects Non-Standard tools initiating a connection over port 3389 indicating possible lateral movement.
    An initial baseline is required before using this utility to exclude third party RDP tooling that you might use.
references:
    - https://portal.msrc.microsoft.com/en-US/security-guidance/advisory/CVE-2019-0708
author: Markus Neis
date: 2019-05-15
modified: 2024-02-09
tags:
    - attack.lateral-movement
    - attack.t1021.001
    - car.2013-07-002
logsource:
    category: network_connection
    product: windows
detection:
    selection:
        DestinationPort: 3389
        Initiated: 'true'
    filter_main_mstsc:
        Image:
            - 'C:\Windows\System32\mstsc.exe'
            - 'C:\Windows\SysWOW64\mstsc.exe'
    filter_optional_dns:
        # Note: https://github.com/SigmaHQ/sigma/pull/2249
        Image: 'C:\Windows\System32\dns.exe'
        SourcePort: 53
        Protocol: 'udp'
    filter_optional_avast:
        Image|endswith:
            - '\Avast Software\Avast\AvastSvc.exe'
            - '\Avast\AvastSvc.exe'
    filter_optional_sysinternals_rdcman:
        Image|endswith: '\RDCMan.exe'
    filter_optional_chrome:
        Image: 'C:\Program Files\Google\Chrome\Application\chrome.exe'
    filter_optional_third_party:
        Image|endswith:
            - '\FSAssessment.exe'
            - '\FSDiscovery.exe'
            - '\MobaRTE.exe'
            - '\mRemote.exe'
            - '\mRemoteNG.exe'
            - '\Passwordstate.exe'
            - '\RemoteDesktopManager.exe'
            - '\RemoteDesktopManager64.exe'
            - '\RemoteDesktopManagerFree.exe'
            - '\RSSensor.exe'
            - '\RTS2App.exe'
            - '\RTSApp.exe'
            - '\spiceworks-finder.exe'
            - '\Terminals.exe'
            - '\ws_TunnelService.exe'
    filter_optional_thor:
        Image|endswith:
            - '\thor.exe'
            - '\thor64.exe'
    filter_optional_splunk:
        Image|startswith: 'C:\Program Files\SplunkUniversalForwarder\bin\'
    filter_optional_sentinel_one:
        Image|endswith: '\Ranger\SentinelRanger.exe'
    filter_optional_firefox:
        Image: 'C:\Program Files\Mozilla Firefox\firefox.exe'
    filter_optional_tsplus:  # Some RAS
        Image:
            - 'C:\Program Files\TSplus\Java\bin\HTML5service.exe'
            - 'C:\Program Files (x86)\TSplus\Java\bin\HTML5service.exe'
    filter_optional_null:
        Image: null
    filter_optional_empty:
        Image: ''
    filter_optional_unknown:
        Image: '<unknown process>'
    condition: selection and not 1 of filter_main_* and not 1 of filter_optional_*
falsepositives:
    - Third party RDP tools
level: high

Stages and Predicates

Stage 0: condition

selection and not 1 of filter_main_* and not 1 of filter_optional_*

Stage 1: selection

selection:
    DestinationPort: 3389
    Initiated: 'true'

Stage 2: not filter_main_mstsc

filter_main_mstsc:
    Image:
        - 'C:\Windows\System32\mstsc.exe'
        - 'C:\Windows\SysWOW64\mstsc.exe'

Stage 3: not filter_optional_*

filter_optional_dns:
    Image: 'C:\Windows\System32\dns.exe'
    SourcePort: 53
    Protocol: 'udp'
filter_optional_avast:
    Image|endswith:
        - '\Avast Software\Avast\AvastSvc.exe'
        - '\Avast\AvastSvc.exe'
filter_optional_sysinternals_rdcman:
    Image|endswith: '\RDCMan.exe'
filter_optional_chrome:
    Image: 'C:\Program Files\Google\Chrome\Application\chrome.exe'
filter_optional_third_party:
    Image|endswith:
        - '\FSAssessment.exe'
        - '\FSDiscovery.exe'
        - '\MobaRTE.exe'
        - '\mRemote.exe'
        - '\mRemoteNG.exe'
        - '\Passwordstate.exe'
        - '\RemoteDesktopManager.exe'
        - '\RemoteDesktopManager64.exe'
        - '\RemoteDesktopManagerFree.exe'
        - '\RSSensor.exe'
        - '\RTS2App.exe'
        - '\RTSApp.exe'
        - '\spiceworks-finder.exe'
        - '\Terminals.exe'
        - '\ws_TunnelService.exe'
filter_optional_thor:
    Image|endswith:
        - '\thor.exe'
        - '\thor64.exe'
filter_optional_splunk:
    Image|startswith: 'C:\Program Files\SplunkUniversalForwarder\bin\'
filter_optional_sentinel_one:
    Image|endswith: '\Ranger\SentinelRanger.exe'
filter_optional_firefox:
    Image: 'C:\Program Files\Mozilla Firefox\firefox.exe'
filter_optional_tsplus:
    Image:
        - 'C:\Program Files\TSplus\Java\bin\HTML5service.exe'
        - 'C:\Program Files (x86)\TSplus\Java\bin\HTML5service.exe'
filter_optional_null:
    Image: null
filter_optional_empty:
    Image: ''
filter_optional_unknown:
    Image: '<unknown process>'

Exclusions

Top-level NOT(...) conjuncts: predicates this rule actively suppresses.

FieldKindExcluded values
ImageeqC:\Windows\SysWOW64\mstsc.exe
ImageeqC:\Windows\System32\mstsc.exe
ImageeqC:\Windows\System32\dns.exe
Protocolequdp
SourcePorteq53
Imageends_with\Avast Software\Avast\AvastSvc.exe
Imageends_with\Avast\AvastSvc.exe
Imageends_with\FSAssessment.exe
Imageends_with\FSDiscovery.exe
Imageends_with\MobaRTE.exe
Imageends_with\Passwordstate.exe
Imageends_with\RDCMan.exe
Imageends_with\RSSensor.exe
Imageends_with\RTS2App.exe
Imageends_with\RTSApp.exe
Imageends_with\Ranger\SentinelRanger.exe
Imageends_with\RemoteDesktopManager.exe
Imageends_with\RemoteDesktopManager64.exe
Imageends_with\RemoteDesktopManagerFree.exe
Imageends_with\Terminals.exe
Imageends_with\mRemote.exe
Imageends_with\mRemoteNG.exe
Imageends_with\spiceworks-finder.exe
Imageends_with\thor.exe
Imageends_with\thor64.exe
Imageends_with\ws_TunnelService.exe
Imageeq<unknown process>
ImageeqC:\Program Files (x86)\TSplus\Java\bin\HTML5service.exe
ImageeqC:\Program Files\Google\Chrome\Application\chrome.exe
ImageeqC:\Program Files\Mozilla Firefox\firefox.exe
ImageeqC:\Program Files\TSplus\Java\bin\HTML5service.exe
Imageis_null(no value, null check)
Imagestarts_withC:\Program Files\SplunkUniversalForwarder\bin\

Indicators

Each row is a field, operator, and value that the rule matches. The corpus column counts how many other rules in the catalog look for the same combination: high numbers point to widely-used, community-vetted indicators. Blank or 1 shows that the indicator is specific to this rule.

FieldKindValues
DestinationPorteq
  • 3389 corpus 11 (kusto 4, elastic 3, sigma 2, splunk 2)
Initiatedeq
  • true corpus 50 (sigma 50)