SA Developer .NET

Welcome to SA Developer .NET Sign in | Join | Help
in Search

Securing a Hosted Site

Last post 10-07-2008, 12:49 by ProfK. 3 replies.
Sort Posts: Previous Next
  •  10-06-2008, 18:01 15080

    Securing a Hosted Site

    Beyond the security provided by my host, please can someone give me a run-down on securing an ASP.NET application using a MySql database?  I mean things outside of authentication and authorization inside the actual application.  One example is my database connection stored in plain text in web.config.  Granted, nobody should be able to access that, but someone at my host may, and that is a compromise.

    Unscrambling Eggs: Decompiling ASP.NET
  •  10-06-2008, 20:09 15081 in reply to 15080

    Re: Securing a Hosted Site

    As you've pointed out, plain text data in the web.config can be a compromise, but you can encrypt most sections there (using aspnet_regiis if you have console access, or in code if not). My understanding of this is that it is not bulletproof if they have write access to your web folder (they could either repeat the same process to unencrypt, or drop in some code), but eliminates another bunch of vulnerabilities (at least now a would be attacked has to be even more savvy, and have even more permissions that they shouldn't have). I think key here is to find a host that you can trust.

    More generally, I'd say it really depends on the sensitivity of what you're trying to secure. You should consider that someone already has access to your database, and consider the risk of them having this. Thus most payment providers won't necessarily encypt your address in their database, but will probably encrypt your credit card details. You could encrypt all data in your system, but the extra overhead (both in terms of cpu cycles, and inability to maintain the data in absence of decryption) means you need to balance this.

    But in general, find a reputable host, get an SLA of sorts that clearly states roles and rights (and your rights should an employee abuse), and then do a risk analysis of sorts to establish the risk if someone had access to your data, literally on a column by column basis. This would vary from no risk to lost reputation (e.g. your customers lose some trust since your privacy policy isn't accurate because some script kiddy has just posted your customer details on a spammer's ebay), to lawsuits or jailtime (said script kiddy stole 100s of millions from your customers), and likely a whole lot inbetween.

    When you get into lawsuits and jailtime risk, you probably want to outsource that to experts in security, such as payment providers, and make it their problem. Make it their job to prowl the hackers forums to find the latest vulnerabilities, read Bruce Schneier's latest papers, and so on.

    After having just re-read your question, I realise that this doesn't necessarily speak directly to it Stick out tongue. Once you've encrypted encryption strings, and have implemented the security features in asp.net, and have encryped the most secure data, the rest really lies with your host. They need to secure IIS, protect your folders from unauthorised access, and so on. Since they've taken this on as a service (their offering), I'd generally presume that they're doing a better job than I would. If I was an expert in such things, though, I'd probably get dedicated hosting, and configure the server myself.


    The high road might seem longer at first, but you'll enjoy the downhill at the end...

    http://blog.benhartonline.com/
  •  10-07-2008, 7:19 15085 in reply to 15080

    Re: Securing a Hosted Site

    ProfK:
    Beyond the security provided by my host, please can someone give me a run-down on securing an ASP.NET application using a MySql database?  I mean things outside of authentication and authorization inside the actual application.  One example is my database connection stored in plain text in web.config.  Granted, nobody should be able to access that, but someone at my host may, and that is a compromise.

    Here is my blog post on some security tweaks for your web.config file.


    SA Developer .Net Online Community Support
    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question.
  •  10-07-2008, 12:49 15095 in reply to 15085

    Re: Securing a Hosted Site

    fridgi:

    ProfK:
    Beyond the security provided by my host, please can someone give me a run-down on securing an ASP.NET application using a MySql database?  I mean things outside of authentication and authorization inside the actual application.  One example is my database connection stored in plain text in web.config.  Granted, nobody should be able to access that, but someone at my host may, and that is a compromise.

    Here is my blog post on some security tweaks for your web.config file.

    Thanks, that looks good.  I'll implement tonight before going live.


    Unscrambling Eggs: Decompiling ASP.NET
View as RSS news feed in XML
Powered by Community Server (Commercial Edition), by Telligent Systems