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.

FreeReviewedSigma · Medium · v5
Category
database
Author
@juju4 (SigmaHQ), DRL 1.1
Published
2022-12-27
Updated
2026-07-31
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