How to export data from the Malwarebytes SQL database

Document created by vbariteau Employee on Oct 17, 2017Last modified by rsullinger on Oct 17, 2017
Version 3Show Document
  • View in full screen mode

There is a command utility, BCP that is installed along with SQL Management Studio. It copies data out of an instance of SQL Server.

 

Here is some info on the utility:

https://msdn.microsoft.com/en-us/library/ms162802.aspx

 

Here is an example query to export the system and security logs out to a CSV file.

 

Embedded:

bcp "SELECT * FROM SCDB.dbo.TBL_ClientSecurityLog" queryout C:\Test.csv -c -t, -T -S .\SQLEXPRESS

bcp "SELECT * FROM SCDB.dbo.TBL_ClientSystemLog" queryout C:\Test.csv -c -t, -T -S .\SQLEXPRESS

 

External:

bcp "SELECT * FROM SCDB.dbo.TBL_ClientSecurityLog" queryout C:\Test.csv -c -t, -T -S FQDN\INSTANCE                                                                                                                                                                                

bcp "SELECT * FROM SCDB.dbo.TBL_ClientSystemLog" queryout C:\Test.csv -c -t, -T -S FQDN\INSTANCE

 

You can edit that command to point to any .csv you would like and export any table you would need. In the example above, it is exporting the threat information that is stored in our database. For any questions, please contact our business support team! 

Attachments

    Outcomes