Detection rules › Sigma
SQL Server database's table enumeration
Detects scenarios where an attacker attempts to enumerate local SQL Server tables (specially Veeam Backup).
Known false positives
- maintenance script
- backup process
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Discovery |
Telemetry coverage
| Provider | Record / event type |
|---|---|
| Sysmon | Event ID 1: Process creation |
| Security-Auditing | Event ID 4688: A new process has been created. |
Rule body
title: SQL Server database's table enumeration
description: Detects scenarios where an attacker attempts to enumerate local SQL Server tables (specially Veeam Backup).
references:
- https://labs.withsecure.com/publications/fin7-target-veeam-servers
- https://blog.checkymander.com/red%20team/veeam/decrypt-veeam-passwords/
tags:
- attack.discovery
- attack.t1518 # Software discovery
author: mdecrevoisier
status: experimental
logsource:
product: windows
category: process_creation
detection:
selection: # sqlcmd.exe -S localhos\VEEAMSQL2016 -E -Q "use VeeamBackup SELECT top 100 * FROM Ssh_creds;"
NewProcessName|endswith: '\sqlcmd.exe'
CommandLine|contains: # specify the database\instance'
- /S
- -S
CommandLine|contains:
- select
- use
- top
- from
condition: selection | count() by Computer > 20
timeframe: 5m
falsepositives:
- maintenance script
- backup process
level: medium
Stages and Predicates
Stage 0: condition
selection | count() by Computer > 20Stage 1: selection
selection:
NewProcessName|endswith: '\sqlcmd.exe'
CommandLine|contains:
- /S
- -S
CommandLine|contains:
- select
- use
- top
- from
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
CommandLine | match |
| field:"CommandLine" kind:match |
NewProcessName | ends_with |
| field:"Image" kind:ends_with value:"\sqlcmd.exe" |