{"id":"c615d676-f655-46b9-b913-78729021e5d7","title":"Data Export From MSSQL Table Via BCP.EXE","description":"Detects the execution of the BCP utility in order to export data from the database.\nAttackers were seen saving their malware to a database column or table and then later extracting it via \"bcp.exe\" into a file.\n","author":"Omar Khaled (@beacon_exe), MahirAli Khan (in/mahiralikhan), Nasreddine Bencherchali (Nextron Systems)","status":"test","level":"medium","date":"2024-08-20","modified":"","tags":["attack.execution","attack.exfiltration","attack.t1048"],"technique_ids":["T1048"],"logsource":{"category":"process_creation","product":"windows"},"falsepositives":["Legitimate data export operations."],"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/"],"source_path":"rules/windows/process_creation/proc_creation_win_bcp_export_data.yml","source_sha256":"f6fc174b80823deee95473161a12858551ddaeff279f4374290106a9680376c1","source_url":"https://github.com/anpa1200/sigma/blob/b249e9683190cffdcaf188ccbfb90bf4759844e1/rules/windows/process_creation/proc_creation_win_bcp_export_data.yml","license":"Detection Rule License 1.1","license_url":"https://github.com/SigmaHQ/Detection-Rule-License/blob/main/LICENSE.Detection.Rules.md","yaml":"title: Data Export From MSSQL Table Via BCP.EXE\nid: c615d676-f655-46b9-b913-78729021e5d7\nstatus: test\ndescription: |\n    Detects the execution of the BCP utility in order to export data from the database.\n    Attackers were seen saving their malware to a database column or table and then later extracting it via \"bcp.exe\" into a file.\nreferences:\n    - https://docs.microsoft.com/en-us/sql/tools/bcp-utility\n    - https://asec.ahnlab.com/en/61000/\n    - https://asec.ahnlab.com/en/78944/\n    - https://www.huntress.com/blog/attacking-mssql-servers\n    - https://www.huntress.com/blog/attacking-mssql-servers-pt-ii\n    - https://news.sophos.com/en-us/2024/08/07/sophos-mdr-hunt-tracks-mimic-ransomware-campaign-against-organizations-in-india/\n    - https://research.nccgroup.com/2018/03/10/apt15-is-alive-and-strong-an-analysis-of-royalcli-and-royaldns/\nauthor: Omar Khaled (@beacon_exe), MahirAli Khan (in/mahiralikhan), Nasreddine Bencherchali (Nextron Systems)\ndate: 2024-08-20\ntags:\n    - attack.execution\n    - attack.exfiltration\n    - attack.t1048\nlogsource:\n    category: process_creation\n    product: windows\ndetection:\n    selection_img:\n        - Image|endswith: '\\bcp.exe'\n        - OriginalFileName: 'BCP.exe'\n    selection_cli:\n        CommandLine|contains:\n            - ' out ' # Export data from a table\n            - ' queryout ' # Export data based on a SQL query\n    condition: all of selection_*\nfalsepositives:\n    - Legitimate data export operations.\nlevel: medium\n","validation":"yaml_parsed_not_backend_compiled_or_live_validated","techniques":[{"key":"enterprise/T1048","id":"T1048","name":"Exfiltration Over Alternative Protocol","page":"techniques/enterprise/T1048/"}],"data_path":"data/detection-rules/c615d676-f655-46b9-b913-78729021e5d7.json","kind":"sigma"}
