I am looking for a SQL query to clean up a hacked SQL Server database. I have some basic SQL knowledge, but I have no idea how to solve the below.
For one of our websites we have a SQL Server database that was recently hacked into. Thousands of records were filled with hidden divs, containing all sorts of dodgy references. Our ISP says the content of the database is not their responsibility and they have no knowledge how to help us clean up the database. There are no clean backups available. It is way too much work to go through all records manually.
So I am now desperately trying to find a SQL query to remove these blocks of hidden text from the database.
Two useful bits of information:
All the spammy content is contained within div tags. The information between the tags is different in every instance, but they all open and close with the div tag.
Our original data will have some HTML-content, but will never contain div tags. So if we can find a way to remove everything from the starting div up to and including the closing div, then we would be sorted.
Any assistance here is much appreciated. Thanks for your time.