Database SQL keyword matching suspicious queries (DROP/TRUNCATE/DUMP/SELECT *)
Alerts on SQL queries containing DROP, TRUNCATE, DUMP, or SELECT * indicative of potentially malicious database activity.
- Category
- database
- Author
- @juju4 (SigmaHQ), DRL 1.1
- Published
- 2022-12-27
- Updated
- 2026-07-31
ATT&CK techniques
Initial Access → PersistenceRecon
Resource Dev
Initial Access
Execution
Persistence
Priv Esc
Defense Evasion
Cred Access
Discovery
Lateral Movement
Collection
C2
Exfiltration
Impact
What it detects
This rule flags database activity containing common SQL keywords that may indicate recon, data extraction, or destructive actions, such as DROP, TRUNCATE, DUMP, or SELECT with wildcard fields. Attackers often use these statements to enumerate data, extract content, or disrupt availability. The detection relies on telemetry that records executed SQL query text and matches the presence of the specified keywords.
Reporting behind it
Changelog
v5- v5Candidate ingested via manual entry.2026-07-31
- v4Candidate ingested via manual entry.2026-07-31
- v3Candidate ingested via manual entry.2026-07-31
- v2Candidate ingested via manual entry.2026-07-31
- v1No changelog recorded for this version.2026-07-30
Detection content is published as a reviewed draft. Tune thresholds and exclusions against your own telemetry before enabling this rule for alerting.
title: Database SQL keyword matching suspicious queries (DROP/TRUNCATE/DUMP/SELECT *)
id: 389a734e-3ea0-433f-a20a-47e030b63e56
status: test
description: This rule flags database activity containing common SQL keywords that may indicate recon, data extraction, or destructive actions, such as DROP, TRUNCATE, DUMP, or SELECT with wildcard fields. Attackers often use these statements to enumerate data, extract content, or disrupt availability. The detection relies on telemetry that records executed SQL query text and matches the presence of the specified keywords.
author: "@juju4, Huntrule Team"
date: 2022-12-27
references:
- https://github.com/sqlmapproject/sqlmap
- https://github.com/SigmaHQ/sigma/blob/master/rules/category/database/db_anomalous_query.yml
tags:
- attack.exfiltration
- attack.initial-access
- attack.privilege-escalation
- attack.persistence
- attack.t1190
- attack.t1505.001
logsource:
category: database
definition: "Requirements: Must be able to log the SQL queries"
detection:
keywords:
- drop
- truncate
- dump
- select \*
condition: keywords
falsepositives:
- Inventory and monitoring activity
- Vulnerability scanners
- Legitimate applications
level: medium
license: DRL-1.1
related:
- id: d84c0ded-edd7-4123-80ed-348bb3ccc4d5
type: derived