Operator On The Wire
Join
← Back to Knowledge Base
BLUE TEAM / THREAT HUNT / WINDOWS / EXFILTRATION

Database Dumping

This note documents detection patterns related to Database Dumping within Windows environments.


Direct Indicators

LogEvent IDMeaningForensic ValueNotes
Security4688Process creationCriticalDetects dump tooling and database utilities.
Sysmon1Process creationCriticalBest lineage source for dumping chains.
Sysmon11File createCriticalDump file creation is primary artifact.
Security4663File accessHighSensitive DB files accessed before dump.
Sysmon3Network connectionHighRemote DB extraction sessions.
Sysmon22DNS queryMediumExternal DB targets or exfil paths.

Indirect Indicators

IndicatorWhat To Look ForForensic ValueNotes
SQL utility launches archive/exportsqlcmd / mysqldumpCriticalCore dumping pattern.
Large dump file appears.sql / .bak / export filesCriticalStrong artifact clue.
DB service followed by file writeDump triggered locallyCriticalValuable sequence.
Dump stored in Temp/DesktopOperator staging patternHighCommon exfil prep.
Compression follows dumpArchive chainCriticalStrong exfil sequence.
Service account runs dumpUnusual maintenance patternHighValuable anomaly.

Common Tools

ToolUsage
sqlcmdMSSQL export
mysqldumpMySQL dump
pg_dumpPostgreSQL dump
PowerShellDB extraction scripts

Relevant Artifacts

  • Security Event IDs 4688, 4663
  • Sysmon Event IDs 1, 11, 3, 22
  • Dump files:
    • .sql
    • .bak
    • .dump
  • Prefetch:
    • SQLCMD.EXE
    • MYSQLDUMP.EXE
  • MFT / USN timeline
  • Archive correlation

MITRE ATT&CK References

  • T1005 Data from Local System
  • T1020 Automated Exfiltration

Decision Tree

  1. Which DB type?

    • MSSQL
    • MySQL
    • PostgreSQL
  2. Which tool?

    • Native utility
    • Script
    • Custom dump
  3. Dump destination?

    • Temp
    • Desktop
    • Network path
  4. Follow-on action?

    • Archive
    • Cloud sync
    • Outbound transfer
  5. Expand:

    • Credential source
    • DB access path
    • User context
  6. Scope:

    • Single DB
    • Multi-database
    • Campaign extraction

Example Detection Templates

KQL

SecurityEvent
| where EventID == 4688
| where CommandLine has_any ("sqlcmd","mysqldump","pg_dump")
| project TimeGenerated, Computer, CommandLine
Sysmon
| where EventID == 11
| where TargetFilename endswith ".sql" or TargetFilename endswith ".bak"
| project TimeGenerated, Computer, TargetFilename

EQL

process where process.command_line like "*mysqldump*" or process.command_line like "*sqlcmd*"
sequence by host.name with maxspan=10m
  [ process where process.command_line like "*mysqldump*" ]
  [ file where file.extension in ("sql","bak","dump") ]

Sigma

title: Database Dumping Detection
id: 5e2c7d18-database-dumping
status: experimental
description: Detects suspicious database export activity
references:
  - https://attack.mitre.org/
author: Vergil
date: 2026-03-07
logsource:
  product: windows
  service: security
detection:
  selection:
    EventID: 4688
  keywords:
    CommandLine|contains:
      - 'sqlcmd'
      - 'mysqldump'
      - 'pg_dump'
  condition: selection and keywords
fields:
  - CommandLine
falsepositives:
  - Legitimate DB administration
level: high
tags:
  - attack.collection

Mitigation & Hardening

Control AreaMitigationEffectivenessNotes
Alert on dump utilitiesStrong signalCriticalCore visibility
Watch dump file creationPrimary artifactCriticalHigh-value triage
Correlate dump + archiveStrong exfil chainCriticalHigh confidence
Restrict DB tool presenceReduce abuseHighPrevent misuse
Monitor service-account dumpsRare anomalyHighValuable context