Sigma rule: Data Export From MSSQL Table Via BCP.EXE
A detection rule from the SigmaHQ repository, shown as its author published it. Dataset version ref-46ee3c8b6b62, updated 2024-08-20T00:00:00.000Z.
Rule
- Title
- Data Export From MSSQL Table Via BCP.EXE
- Status
- test
- Level
- medium
- Author
- Omar Khaled (@beacon_exe), MahirAli Khan (in/mahiralikhan), Nasreddine Bencherchali (Nextron Systems)
- Date
- 2024-08-20
- File
- rules/windows/process_creation/proc_creation_win_bcp_export_data.yml
- Commit
- ccbb0369507f796db0b0ae6854c8a2be471b9d84
Detects the execution of the BCP utility in order to export data from the database.
Attackers were seen saving their malware to a database column or table and then later extracting it via "bcp.exe" into a file.
Log source
- product
- windows
- category
- process_creation
Detection
selection_img:
- Image|endswith: '\bcp.exe'
- OriginalFileName: 'BCP.exe'
selection_cli:
CommandLine|contains:
- ' out ' # Export data from a table
- ' queryout ' # Export data based on a SQL query
condition: all of selection_*False positives (as the rule lists them)
- Legitimate data export operations.
Tags
- attack.execution
- attack.exfiltration
- attack.t1048
MITRE ATT&CK ids this rule names
References
- https://docs.microsoft.com/en-us/sql/tools/bcp-utility
- https://asec.ahnlab.com/en/61000/
- https://asec.ahnlab.com/en/78944/
- https://www.huntress.com/blog/attacking-mssql-servers
- https://www.huntress.com/blog/attacking-mssql-servers-pt-ii
- https://news.sophos.com/en-us/2024/08/07/sophos-mdr-hunt-tracks-mimic-ransomware-campaign-against-organizations-in-india/
- https://research.nccgroup.com/2018/03/10/apt15-is-alive-and-strong-an-analysis-of-royalcli-and-royaldns/
Read on 2026-11-03T00:58:21.399Z under licence sigma-drl-1.1@d5f4c36a from https://github.com/SigmaHQ/sigma/blob/ccbb0369507f796db0b0ae6854c8a2be471b9d84/rules/windows/process_creation/proc_creation_win_bcp_export_data.yml
Sources and licences
SigmaHQ
"Data Export From MSSQL Table Via BCP.EXE" by Omar Khaled (@beacon_exe), MahirAli Khan (in/mahiralikhan), Nasreddine Bencherchali (Nextron Systems) (SigmaHQ). Rule: https://github.com/SigmaHQ/sigma/blob/ccbb0369507f796db0b0ae6854c8a2be471b9d84/rules/windows/process_creation/proc_creation_win_bcp_export_data.yml.
Licensed under the Detection Rule License (DRL) 1.1: https://github.com/SigmaHQ/Detection-Rule-License
Cite this page
Dragons Eye Ransomware Tracker, "Sigma rule: Data Export From MSSQL Table Via BCP.EXE",
entity page, dataset version ref-46ee3c8b6b62, updated 2024-08-20T00:00:00.000Z,
https://ransomware-tracker.com/detections/sigma/c615d676-f655-46b9-b913-78729021e5d7 (accessed 2026-11-03).
Underlying source: SigmaHQ rule c615d676-f655-46b9-b913-78729021e5d7, commit ccbb0369507f796db0b0ae6854c8a2be471b9d84.
Pages change. The dataset version identifies the data, but no archive of old versions is kept, so this citation cannot be replayed later.