Detection rules › Sigma

SMB Create Remote File Admin Share

Status
test
Severity
high
Log source
product windows, service security
Author
Jose Rodriguez (@Cyb3rPandaH), OTR (Open Threat Research)
Source
github.com/SigmaHQ/sigma

Look for non-system accounts SMB accessing a file with write (0x2) access mask via administrative share (i.e C$).

MITRE ATT&CK coverage

Event coverage

Rule body yaml

title: SMB Create Remote File Admin Share
id: b210394c-ba12-4f89-9117-44a2464b9511
status: test
description: Look for non-system accounts SMB accessing a file with write (0x2) access mask via administrative share (i.e C$).
references:
    - https://github.com/OTRF/ThreatHunter-Playbook/blob/f7a58156dbfc9b019f17f638b8c62d22e557d350/playbooks/WIN-201012004336.yaml
    - https://securitydatasets.com/notebooks/atomic/windows/lateral_movement/SDWIN-200806015757.html?highlight=create%20file
author: Jose Rodriguez (@Cyb3rPandaH), OTR (Open Threat Research)
date: 2020-08-06
modified: 2025-10-17
tags:
    - attack.lateral-movement
    - attack.t1021.002
logsource:
    product: windows
    service: security
detection:
    selection:
        EventID: 5145
        ShareName|endswith: 'C$'
        AccessMask: '0x2'
    filter_main_subjectusername:
        SubjectUserName|endswith: '$'
    filter_optional_local_ip:
        IpAddress: '::1'
    condition: selection and not 1 of filter_main_* and not 1 of filter_optional_*
falsepositives:
    - Unknown
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:
    EventID: 5145
    ShareName|endswith: 'C$'
    AccessMask: '0x2'

Stage 2: not filter_main_subjectusername

filter_main_subjectusername:
    SubjectUserName|endswith: '$'

Stage 3: not filter_optional_local_ip

filter_optional_local_ip:
    IpAddress: '::1'

Exclusions

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

FieldKindExcluded values
SubjectUserNameends_with$
IpAddresseq::1

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
AccessMaskeq
  • 0x2 corpus 4 (sigma 2, splunk 2)
ShareNameends_with
  • C$