patternsqlMajor
Security implications of restoring a backup from an unknown source?
Viewed 0 times
unknownsourceimplicationsrestoringsecurityfrombackup
Problem
Scenario: You're handed a database backup and told to restore it to a server (that's already hosting other databases), but are given no useful information about what the backup contains or whether the source should be trusted.
Question 1: What are the potential implications of restoring a backup that could well be malicious?
Question 2: What can you do to protect your server/the data in other databases from the impact of restoring a potentially-malicious backup?
Question 1: What are the potential implications of restoring a backup that could well be malicious?
Question 2: What can you do to protect your server/the data in other databases from the impact of restoring a potentially-malicious backup?
RESTORE VERIFYONLY would seem to be a good first step. The ultimate answer is probably 'restore the database in a sandbox VM with no access to the outside world', but let's assume that option is off the table. What else should be done in this situation?Solution
A database may contain malicious code, possibly a procedure that is going to change a password for the "sa" login or drop every database. However the only way that I can see that causing an issue is for an individual to restore the database, and then manually execute any code within that database. It would not execute in any automated manner.
There is no setting that can be applied within a database to have SQL Server automatically execute some bit of code within the database upon restoring it to a server. If it did I would expect Microsoft would loose the Common Criteria certification for the product. That is to great of a bug to have allowed in a DBMS to me.
There is no setting that can be applied within a database to have SQL Server automatically execute some bit of code within the database upon restoring it to a server. If it did I would expect Microsoft would loose the Common Criteria certification for the product. That is to great of a bug to have allowed in a DBMS to me.
Context
StackExchange Database Administrators Q#71608, answer score: 22
Revisions (0)
No revisions yet.