Detection rules › Sigma

Uncommon Connection to Active Directory Web Services

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

Detects uncommon network connections to the Active Directory Web Services (ADWS) from processes not typically associated with ADWS management.

Known false positives

  • ADWS is used by a number of legitimate applications that need to interact with Active Directory. These applications should be added to the allow-listing to avoid false positives.

MITRE ATT&CK coverage

TacticTechniques
Discovery

Telemetry coverage

ProviderRecord / event type
SysmonEvent ID 3: Network connection

Rule body

title: Uncommon Connection to Active Directory Web Services
id: b3ad3c0f-c949-47a1-a30e-b0491ccae876
status: test
description: |
    Detects uncommon network connections to the Active Directory Web Services (ADWS) from processes not typically associated with ADWS management.
references:
    - https://medium.com/falconforce/soaphound-tool-to-collect-active-directory-data-via-adws-165aca78288c
    - https://github.com/FalconForceTeam/FalconFriday/blob/a9219dfcfd89836f34660223f47d766982bdce46/Discovery/ADWS_Connection_from_Unexpected_Binary-Win.md
author: '@kostastsale'
date: 2024-01-26
tags:
    - attack.discovery
    - attack.t1087
logsource:
    category: network_connection
    product: windows
detection:
    selection:
        Initiated: true
        DestinationPort: 9389
    filter_main_dsac:
        Image: 'C:\Windows\system32\dsac.exe'
    filter_main_ms_monitoring_agent:
        Image: 'C:\Program Files\Microsoft Monitoring Agent\'
    filter_main_powershell:
        Image|startswith:
            - 'C:\Program Files\PowerShell\7\pwsh.exe'
            - 'C:\Program Files\PowerShell\7-preview\pwsh.ex'
            - 'C:\Windows\System32\WindowsPowerShell\'
            - 'C:\Windows\SysWOW64\WindowsPowerShell\'
    condition: selection and not 1 of filter_main_*
falsepositives:
    - ADWS is used by a number of legitimate applications that need to interact with Active Directory. These applications should be added to the allow-listing to avoid false positives.
level: medium

Stages and Predicates

Stage 0: condition

selection and not 1 of filter_main_*

Stage 1: selection

selection:
    Initiated: true
    DestinationPort: 9389

Stage 2: not filter_main_*

filter_main_dsac:
    Image: 'C:\Windows\system32\dsac.exe'
filter_main_ms_monitoring_agent:
    Image: 'C:\Program Files\Microsoft Monitoring Agent\'
filter_main_powershell:
    Image|startswith:
        - 'C:\Program Files\PowerShell\7\pwsh.exe'
        - 'C:\Program Files\PowerShell\7-preview\pwsh.ex'
        - 'C:\Windows\System32\WindowsPowerShell\'
        - 'C:\Windows\SysWOW64\WindowsPowerShell\'

Exclusions

The rule actively suppresses these predicates.

FieldKindExcluded valuesSearch
ImageeqC:\Program Files\Microsoft Monitoring Agent\excludes:Image field:"Image" value:"C:\Program Files\Microsoft Monitoring Agent\"
ImageeqC:\Windows\system32\dsac.exeexcludes:Image field:"Image" value:"C:\Windows\system32\dsac.exe"
Imagestarts_withC:\Program Files\PowerShell\7-preview\pwsh.exexcludes:Image field:"Image" value:"C:\Program Files\PowerShell\7-preview\pwsh.ex"
Imagestarts_withC:\Program Files\PowerShell\7\pwsh.exeexcludes:Image field:"Image" value:"C:\Program Files\PowerShell\7\pwsh.exe"
Imagestarts_withC:\Windows\SysWOW64\WindowsPowerShell\excludes:Image field:"Image" value:"C:\Windows\SysWOW64\WindowsPowerShell\"
Imagestarts_withC:\Windows\System32\WindowsPowerShell\excludes:Image field:"Image" value:"C:\Windows\System32\WindowsPowerShell\"

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
DestinationPorteq
  • 9389 corpus 5 (kusto 2, sigma 1, elastic 1, splunk 1)
field:"DestinationPort" kind:eq value:"9389"
Initiatedeq
  • true corpus 50 (sigma 50)
field:"Initiated" kind:eq value:"true"