VeriKQL by Kaushik Saha

T1213.006 Databases

Collectionon attack.mitre.org

ATT&CK Enterprise 20.0 · 20.1 released, update in review

How MITRE detects it

DET0242 Suspicious Database Access and Dump Activity Across Environments (T1213.006)

AN0676 Linux

Unusual database command-line access (e.g., `psql`, `mysql`, `mongo`) from non-admin users, occurring outside typical automation windows or without known service context. Often followed by data dumps to .sql/.csv files or outbound data transfers. Defender sees CLI tools launched interactively or by unusual parent processes, file writes to dump-like filenames, and external connections shortly after.

MITRE log sourceIn Microsoft Sentinel
auditd:SYSCALLexecve: Execution of CLI tools like psql, mysql, mongo, sqlite3Not mapped to Sentinel yet.
auditd:PATHCreation of files with extensions .sql, .csv, .sqlite, especially in user directoriesNot mapped to Sentinel yet.
NSM:Flowhttp::post: Outbound HTTP POST from host shortly after DB export activityNot mapped to Sentinel yet.

AN0677 Windows

Database client execution (e.g., sqlcmd.exe, isql.exe) by users or from locations not tied to enterprise automation or backups. Often followed by creation of .sql/.bak/.csv files, registry artifacts for ODBC/JDBC drivers, or encrypted ZIPs. Defender sees SQL tools launched by explorer.exe, Powershell, or odd parent processes, plus file writes in user temp locations.

MITRE log sourceIn Microsoft Sentinel
WinEventLog:SecurityEventCode=4688
  • Windows Security Events via AMA → SecurityEvent
    SecurityEvent | where EventID in (4688)
  • Security Events via Legacy Agent → SecurityEvent
    SecurityEvent | where EventID in (4688)
  • Windows Forwarded Events → WindowsEvent
    WindowsEvent | where Channel == "Security" | where EventID in (4688)

The same events land in SecurityEvent (Windows Security Events connectors) or WindowsEvent (Windows Event Forwarding); many built-in rules read SecurityEvent only.

WinEventLog:SysmonEventCode=11
  • Windows event logs (Azure Monitor Agent) → Event
    Event | where Source == "Microsoft-Windows-Sysmon" | where EventID in (11)
  • Windows Forwarded Events → WindowsEvent
    WindowsEvent | where Provider == "Microsoft-Windows-Sysmon" | where EventID in (11)

Sysmon has no dedicated Sentinel connector: it is collected as a Windows event log into Event or WindowsEvent.

WinEventLog:SysmonEventCode=3, 22
  • Windows event logs (Azure Monitor Agent) → Event
    Event | where Source == "Microsoft-Windows-Sysmon" | where EventID in (3, 22)
  • Windows Forwarded Events → WindowsEvent
    WindowsEvent | where Provider == "Microsoft-Windows-Sysmon" | where EventID in (3, 22)

Sysmon has no dedicated Sentinel connector: it is collected as a Windows event log into Event or WindowsEvent.

AN0678 macOS

Execution of Java-based or CLI database tools (e.g., DBeaver, Beekeeper, mysql, psql) from user profiles not tied to dev/admin roles, especially when followed by file writes and cloud sync activity. Defender correlates GUI tool launches, file write events in ~/Downloads or ~/Documents, and outbound API calls to known cloud services.

MITRE log sourceIn Microsoft Sentinel
macos:unifiedlogProcess start of Java or native DB client toolsNot mapped to Sentinel yet.
macos:unifiedlogWrites of .sql/.csv/.xlsx files to user documents/downloadsNot mapped to Sentinel yet.
NSM:FlowHTTPS API requests to Dropbox, iCloud, Google Drive, OneDrive shortly after DB tool usageNot mapped to Sentinel yet.

AN0679 IaaS

Database enumeration and export activity (e.g., `SELECT * FROM`, `SHOW DATABASES`) issued via ephemeral VMs, admin APIs, or cloud shell from non-monitoring accounts. Defender correlates audit logs (CloudTrail, GCP Admin, AzureDiagnostics), storage write ops, and cross-region transfers by identities not tied to DB operations.

MITRE log sourceIn Microsoft Sentinel
AWS:CloudTrailrds:ExecuteStatement: Large data access via RDS or Aurora with unknown session contextNot mapped to Sentinel yet.
AWS:CloudTrailPutObject: S3 writes with .sql/.csv extension by same identity or within 5 min of DB accessNot mapped to Sentinel yet.
AWS:VPCFlowLogsLarge transfer volume (>20MB) from RDS IP range to external public IPsNot mapped to Sentinel yet.

AN0680 SaaS

Unusual or excessive database/table exports from SaaS database platforms (e.g., Snowflake, Firebase, BigQuery, Airtable) by users or apps not in known analytics or dev groups. Defender observes access patterns outside baseline working hours or with new query templates, and correlates those with audit logs or file downloads.

MITRE log sourceIn Microsoft Sentinel
saas:SnowflakeQUERY: Large or repeated SELECT * queries to sensitive tablesNot mapped to Sentinel yet.
m365:unifiedBulk downloads or API extractions from Microsoft-hosted data repositories (e.g., Dynamics 365)interpreted
  • Microsoft 365 (formerly Office 365) → OfficeActivity
    OfficeActivity | where OfficeWorkload in ("Exchange", "SharePoint", "OneDrive", "MicrosoftTeams")
  • Microsoft Defender XDR → CloudAppEvents
    CloudAppEvents

The Office 365 connector brings the Exchange, SharePoint and Teams workloads of the unified audit log; Entra sign-ins in it are in SigninLogs; CloudAppEvents carries Microsoft 365 app activity.

Content Hub rules tagged with it (2)

Rules tagged with this technique (or a sub-technique) in their metadata. Whether one fits your connectors is the coverage view (M2).

How the Content Hub rules for T1213.006 are built: their tables, filters, joins, schedules and windows.

In Sigma rules

No SigmaHQ rule names it in their tags outright.

Community rules, not Microsoft's, and not checked by VeriKQL (Sigma is not KQL). From SigmaHQ/sigma at f083329, under the Detection Rule License (DRL) 1.1; each rule is credited to its author.

Mitigations

MITRE ATT&CK® is a registered trademark of The MITRE Corporation. VeriKQL is not affiliated with or endorsed by MITRE. ATT&CK data © The MITRE Corporation, used under its terms of use.