Windows Event Log: MSSQLSERVER$AUDIT alerts on DROP/ TRUNCATE destructive SQL statements

Flags audited MSSQL transactions that include DROP TABLE, DROP DATABASE, or TRUNCATE TABLE.

FreeReviewedSigma · Medium · v2
Product
windows
Service
application
Author
Daniel Degasperi '@d4ns4n_' (SigmaHQ), DRL 1.1
Published
2025-06-04
Updated
2026-07-31
title: "Windows Event Log: MSSQLSERVER$AUDIT alerts on DROP/ TRUNCATE destructive SQL statements"
id: c13d2eb3-2a49-459b-a24b-0783093ad86d
status: experimental
description: This rule flags MSSQL audit events where the logged SQL statement contains destructive data actions such as TRUNCATE TABLE, DROP TABLE, or DROP DATABASE. Such statements enable attackers or misconfigured users to irreversibly remove data and disrupt availability. It relies on Windows application telemetry from the MSSQLSERVER$AUDIT provider and specifically event ID 33205 containing the statement text.
references:
  - https://learn.microsoft.com/en-us/sql/t-sql/statements/drop-table-transact-sql?view=sql-server-ver16
  - https://learn.microsoft.com/en-us/sql/t-sql/statements/drop-database-transact-sql?view=sql-server-ver16
  - https://learn.microsoft.com/en-us/sql/t-sql/statements/truncate-table-transact-sql?view=sql-server-ver16
  - https://github.com/SigmaHQ/sigma/blob/master/rules/windows/builtin/application/mssqlserver/win_mssql_destructive_query.yml
author: Daniel Degasperi '@d4ns4n_', Huntrule Team
date: 2025-06-04
tags:
  - attack.exfiltration
  - attack.impact
  - attack.t1485
logsource:
  product: windows
  service: application
  definition: "Requirements: MSSQL audit policy must be enabled in order to receive this event (event id 33205)"
detection:
  selection:
    Provider_Name: MSSQLSERVER$AUDIT
    EventID: 33205
    Data|contains:
      - statement:TRUNCATE TABLE
      - statement:DROP TABLE
      - statement:DROP DATABASE
  condition: selection
falsepositives:
  - Legitimate transaction from a sysadmin.
level: medium
license: DRL-1.1
related:
  - id: 00321fee-ca72-4cce-b011-5415af3b9960
    type: derived