Detection rules › Sigma

First Time Seen Remote Named Pipe

Status
test
Severity
high
Log source
product windows, service security
Author
Samir Bousseaden
Source
github.com/SigmaHQ/sigma

This detection excludes known namped pipes accessible remotely and notify on newly observed ones, may help to detect lateral movement and remote exec using named pipes

MITRE ATT&CK coverage

Event coverage

Rule body yaml

title: First Time Seen Remote Named Pipe
id: 52d8b0c6-53d6-439a-9e41-52ad442ad9ad
status: test
description: This detection excludes known namped pipes accessible remotely and notify on newly observed ones, may help to detect lateral movement and remote exec using named pipes
references:
    - https://twitter.com/menasec1/status/1104489274387451904
author: Samir Bousseaden
date: 2019-04-03
modified: 2023-03-14
tags:
    - attack.lateral-movement
    - attack.t1021.002
logsource:
    product: windows
    service: security
    definition: 'The advanced audit policy setting "Object Access > Audit Detailed File Share" must be configured for Success/Failure'
detection:
    selection1:
        EventID: 5145
        ShareName: '\\\\\*\\IPC$' # looking for the string \\*\IPC$
    false_positives:
        RelativeTargetName:
            - 'atsvc'
            - 'samr'
            - 'lsarpc'
            - 'lsass'
            - 'winreg'
            - 'netlogon'
            - 'srvsvc'
            - 'protected_storage'
            - 'wkssvc'
            - 'browser'
            - 'netdfs'
            - 'svcctl'
            - 'spoolss'
            - 'ntsvcs'
            - 'LSM_API_service'
            - 'HydraLsPipe'
            - 'TermSrv_API_service'
            - 'MsFteWds'
            - 'sql\query'
            - 'eventlog'
    condition: selection1 and not false_positives
falsepositives:
    - Update the excluded named pipe to filter out any newly observed legit named pipe
level: high

Stages and Predicates

Stage 0: condition

selection1 and not false_positives

Stage 1: selection1

selection1:
    EventID: 5145
    ShareName: '\\\\\*\\IPC$'

Stage 2: not false_positives

false_positives:
    RelativeTargetName:
        - 'atsvc'
        - 'samr'
        - 'lsarpc'
        - 'lsass'
        - 'winreg'
        - 'netlogon'
        - 'srvsvc'
        - 'protected_storage'
        - 'wkssvc'
        - 'browser'
        - 'netdfs'
        - 'svcctl'
        - 'spoolss'
        - 'ntsvcs'
        - 'LSM_API_service'
        - 'HydraLsPipe'
        - 'TermSrv_API_service'
        - 'MsFteWds'
        - 'sql\query'
        - 'eventlog'

Exclusions

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

FieldKindExcluded values
RelativeTargetNameeqHydraLsPipe
RelativeTargetNameeqLSM_API_service
RelativeTargetNameeqMsFteWds
RelativeTargetNameeqTermSrv_API_service
RelativeTargetNameeqatsvc
RelativeTargetNameeqbrowser
RelativeTargetNameeqeventlog
RelativeTargetNameeqlsarpc
RelativeTargetNameeqlsass
RelativeTargetNameeqnetdfs
RelativeTargetNameeqnetlogon
RelativeTargetNameeqntsvcs
RelativeTargetNameeqprotected_storage
RelativeTargetNameeqsamr
RelativeTargetNameeqspoolss
RelativeTargetNameeqsql\query
RelativeTargetNameeqsrvsvc
RelativeTargetNameeqsvcctl
RelativeTargetNameeqwinreg
RelativeTargetNameeqwkssvc

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
ShareNameeq
  • \\\\\*\\IPC$ corpus 7 (sigma 7)