Detection rules › Sigma

Potential Suspicious Activity Using SeCEdit

Status
test
Severity
medium
Log source
category process_creation, product windows
Author
Janantha Marasinghe
Source
github.com/SigmaHQ/sigma

Detects potential suspicious behaviour using secedit.exe. Such as exporting or modifying the security policy

Known false positives

  • Legitimate administrative use

MITRE ATT&CK coverage

Telemetry coverage

ProviderRecord / event type
SysmonEvent ID 1: Process creation

Rule body

title: Potential Suspicious Activity Using SeCEdit
id: c2c76b77-32be-4d1f-82c9-7e544bdfe0eb
status: test
description: Detects potential suspicious behaviour using secedit.exe. Such as exporting or modifying the security policy
references:
    - https://blueteamops.medium.com/secedit-and-i-know-it-595056dee53d
    - https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/secedit
author: Janantha Marasinghe
date: 2022-11-18
modified: 2022-12-30
tags:
    - attack.collection
    - attack.discovery
    - attack.persistence
    - attack.credential-access
    - attack.privilege-escalation
    - attack.execution
    - attack.stealth
    - attack.defense-impairment
    - attack.t1685.001
    - attack.t1547.001
    - attack.t1505.005
    - attack.t1556.002
    - attack.t1685
    - attack.t1574.007
    - attack.t1564.002
    - attack.t1546.008
    - attack.t1546.007
    - attack.t1547.014
    - attack.t1547.010
    - attack.t1547.002
    - attack.t1557
    - attack.t1082
logsource:
    category: process_creation
    product: windows
detection:
    selection_img:
        - Image|endswith: '\secedit.exe'
        - OriginalFileName: 'SeCEdit'
    selection_flags_discovery:
        CommandLine|contains|all:
            - '/export'
            - '/cfg'
    selection_flags_configure:
        CommandLine|contains|all:
            - '/configure'
            - '/db'
    # filter:
    #     SubjectUserName|endswith: '$'  SubjectUserName is from event ID 4719 in the Windows Security log
    condition: selection_img and (1 of selection_flags_*)
falsepositives:
    - Legitimate administrative use
level: medium

Stages and Predicates

Stage 0: condition

selection_img and (1 of selection_flags_*)

Stage 1: selection_img

selection_img:
    - Image|endswith: '\secedit.exe'
    - OriginalFileName: 'SeCEdit'

Stage 2: selection_flags_discovery

selection_flags_discovery:
    CommandLine|contains|all:
        - '/export'
        - '/cfg'

Stage 3: selection_flags_configure

selection_flags_configure:
    CommandLine|contains|all:
        - '/configure'
        - '/db'

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
CommandLinematch
  • /cfg corpus 2 (sigma 1, chronicle 1)
  • /configure corpus 2 (sigma 1, chronicle 1)
  • /db corpus 2 (sigma 1, chronicle 1)
  • /export corpus 2 (sigma 1, chronicle 1)
field:"CommandLine" kind:match
Imageends_with
  • \secedit.exe
field:"Image" kind:ends_with value:"\secedit.exe"
OriginalFileNameeq
  • SeCEdit
field:"OriginalFileName" kind:eq value:"SeCEdit"