MYSQLDUMP
PG_DUMP
BCP
ROW COUNTS
DetectionBlue TeamSOCOctober 12, 2026•9 min read

Detecting Database Dumping and Bulk Export

A database dump is the fastest way to collect everything. The tools are standard, the command lines are distinctive, and application accounts rarely run them.

Scroll

Attackers who reach a database server or obtain application credentials export tables with the vendor’s own utilities. That makes the process telemetry on database hosts and the query telemetry from the database engine the two best places to look. The goal is separating a person running a dump from the application doing its normal work.

Signals at a Glance

SignalWhereATT&CK
mysqldump, pg_dump or mongodump executed interactively or from a shellProcess creation, auditdT1005
bcp ... out or sqlcmd -Q "SELECT ..." -o writing to a fileProcess creationT1005
Query returning millions of rows to an account that normally returns hundredsDB audit, pg_stat_statementsT1030
Application account connecting from a new host or interactive toolDB connection logsT1078
Large dump file appearing, then archived or transferredFile eventsT1074.001

Dump Utilities on the Host

Dump utilities run regularly from backup jobs, so the discriminators are the parent process and the account. A dump launched from an interactive shell, a web-server process or a remote execution service is not a backup:

title: Database Dump Utility Launched From Interactive Or Web Context
logsource:
  category: process_creation
detection:
  tools:
    Image|endswith:
      - '/mysqldump'
      - '/pg_dump'
      - '/pg_dumpall'
      - '/mongodump'
      - '\\mysqldump.exe'
      - '\\pg_dump.exe'
      - '\\bcp.exe'
  bcp_out:
    CommandLine|contains: ' out '
  sqlcmd_export:
    Image|endswith: '\\sqlcmd.exe'
    CommandLine|contains:
      - ' -o '
      - ' -Q '
  suspicious_parent:
    ParentImage|endswith:
      - '/bash'
      - '/sh'
      - '/php-fpm'
      - '/w3wp.exe'
      - '\\cmd.exe'
      - '\\powershell.exe'
  condition: (tools or sqlcmd_export) and suspicious_parent
level: medium
# tune/validate: allowlist scheduled backup users and their parent job runners

Telemetry From the Engine

The engine knows how many rows each statement returned. PostgreSQL’s pg_stat_statements makes the check a single query, and SQL Server, MySQL and Oracle audit logs offer comparable fields:

-- PostgreSQL: statements returning very large result sets, by role
-- tune/validate: requires pg_stat_statements; reset or snapshot to measure windows
SELECT userid::regrole AS role,
       calls,
       rows,
       round(rows::numeric / NULLIF(calls, 0)) AS rows_per_call,
       left(query, 120) AS query_sample
FROM pg_stat_statements
WHERE rows > 1000000
  AND query ILIKE 'select%'
ORDER BY rows DESC
LIMIT 50;
Vetted sources

SigmaHQ and Elastic rules for database utility abuse, Splunk ESCU analytics for SQL Server and MySQL audit data, vendor audit-logging documentation, and Falco or auditd rules on database hosts. Baseline your own environment — backup tooling, ETL and reporting jobs legitimately export large datasets.

Build Detections That Fire

Mjolnir Security helps blue teams turn threat intelligence into high-fidelity detections across endpoint, network, identity and cloud telemetry.

Detection EngineeringManaged Detection & ResponseThreat HuntingIncident ResponsePurple Teaming
  • Detection Engineering We build and tune detections mapped to ATT&CK from your own telemetry.
  • Threat Hunting as a Service Hypothesis-driven hunts for the behaviours on this page.
  • 24/7 Incident Response Containment when a detection fires. Call +1 833 403 5875.
Written by: Mjolnir Threat Research (MTAC)  |  Published: October 12, 2026  |  Last reviewed: October 12, 2026