Detection rules › Sigma

SQL Server - Connection attempt using a disabled account

Status
experimental
Severity
medium
Log source
product mssql, category application
Author
mdecrevoisier
Source
github.com/mdecrevoisier/SIGMA-detection-rules

Detects scenarios where an attacker attempts authenticate to the database using a disabled user accont

MITRE ATT&CK coverage

TacticTechniques
Initial AccessT1078 Valid Accounts
PersistenceT1078 Valid Accounts
Privilege EscalationT1078 Valid Accounts
StealthT1078 Valid Accounts

Event coverage

Rule body yaml

title: SQL Server - Connection attempt using a disabled account
description: Detects scenarios where an attacker attempts authenticate to the database using a disabled user accont
references:
- https://github.com/mdecrevoisier/EVTX-to-MITRE-Attack/tree/master/TA0001-Initial%20access/T1078-Valid%20accounts
- https://www.eraofdata.com/sql-server/connectivity/login-failures/
- https://docs.microsoft.com/en-us/previous-versions/sql/sql-server-2008-r2/ms366351(v=sql.105)
tags:
- attack.valid_account
- attack.t1078
author: mdecrevoisier
status: experimental
logsource:
  product: mssql
  category: application
detection:
  selection_basic:
    EventID: 18470

  selection_advanced:
    EventID: 33205
    action_id:
      - LGFL # FAILED_LOGIN_GROUP
      - LGIF # LOGIN FAILED
    class_type: LX # LOGIN
    additional_information|contains: "<state>7</state>" # User account is disabled
  condition: selection_basic or selection_advanced
falsepositives:
- Miss configured accounts or scripts
level: medium

Stages and Predicates

Stage 0: condition

selection_basic or selection_advanced

Stage 1: selection_basic

selection_basic:
  EventID: 18470

Stage 2: selection_advanced

selection_advanced:
  EventID: 33205
  action_id:
    - LGFL
    - LGIF
  class_type: LX
  additional_information|contains: "<state>7</state>"

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
action_ideq
  • LGFL corpus 2 (sigma 2)
  • LGIF corpus 2 (sigma 2)
additional_informationmatch
  • <state>7</state>
class_typeeq
  • LX corpus 2 (sigma 2)