Best Practice: Protecting Personally Identifiable Data in a ASP.NET / SQL Server 2008 Environment

Posted by William on Stack Overflow See other posts from Stack Overflow or by William
Published on 2011-01-18T01:25:49Z Indexed on 2011/01/18 1:53 UTC
Read the original article Hit count: 196

Thanks to a SQL injection vulnerability found last week, some of my recommendations are being investigated at work. We recently re-did an application which stores personally identifiable information whose disclosure could lead to identity theft. While we read some of the data on a regular basis, the restricted data we only need a couple of times a year and then only two employees need it.

I've read up on SQL Server 2008's encryption function, but I'm not convinced that's the route I want to go. My problem ultimately boils down to the fact that we're either using symmetric keys or assymetric keys encrypted by a symmetric key. Thus it seems like a SQL injection attack could lead to a data leak. I realize permissions should prevent that, permissions should also prevent the leaking in the first place.

It seems to me the better method would be to asymmetrically encrypt the data in the web application. Then store the private key offline and have a fat client that they can run the few times a year they need to access the restricted data so the data could be decrypted on the client. This way, if the server get compromised, we don't leak old data although depending on what they do we may leak future data. I think the big disadvantage is this would require re-writing the web application and creating a new fat application (to pull the restricted data). Due to the recent problem, I can probably get the time allocated, so now would be the proper time to make the recommendation.

Do you have a better suggestion? Which method would you recommend? More importantly why?

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about sql-server-2008