11.07.2015 Views

Improving Web Application Security: Threats and - CGISecurity

Improving Web Application Security: Threats and - CGISecurity

Improving Web Application Security: Threats and - CGISecurity

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Chapter 19: Securing Your ASP.NET <strong>Application</strong> <strong>and</strong> <strong>Web</strong> Services 545●●●Accounts. The default ASPNET account is created for running <strong>Web</strong> applications,<strong>Web</strong> services, <strong>and</strong> the ASP.NET state service. If you create custom accounts to runprocesses or services, they must be configured as least privileged accounts withthe minimum set of required NTFS permissions <strong>and</strong> Windows privileges.Files <strong>and</strong> Directories. <strong>Application</strong> Bin directories that are used to hold privateassemblies should be secured to mitigate the risk of an attacker downloadingbusiness logic.Configuration Store. Many security-related settings that control functional areassuch as authentication, authorization, session state, <strong>and</strong> so on, are maintained inthe Machine.config <strong>and</strong> <strong>Web</strong>.config XML configuration files. To secure ASP.NETapplications, you must use secure configuration settings.What You Must KnowBefore you begin securing your <strong>Web</strong> applications <strong>and</strong> <strong>Web</strong> services, there areoverarching considerations <strong>and</strong> details of which you should be aware.ASP.NET Process ModelIn Microsoft Windows 2000, Internet Information Services (IIS) 5.0 runs all <strong>Web</strong>applications <strong>and</strong> <strong>Web</strong> services in the ASP.NET worker process (Aspnet_wp.exe).The unit of isolation is the application domain <strong>and</strong> each virtual directory has itsown application domain. Process-level configuration settings are maintained bythe element in Machine.config.In Microsoft Windows Server 2003, IIS 6.0 application pools allow you to isolateapplications using separate processes. For more information, see Chapter 20,“Hosting Multiple ASP.NET <strong>Application</strong>s.”ASP.NET AccountThe ASPNET account is a least privileged, local account created when you install the.NET Framework. By default, it runs the ASP.NET worker process <strong>and</strong> the ASP.NETstate service.If you decide to run <strong>Web</strong> applications using a custom account, make sure youconfigure the account with minimum privileges. This reduces the risks associatedwith an attacker who manages to execute code using the application’s securitycontext. You must also specify the account’s credentials on the element. Make sure you do not store credentials in plaintext. Instead, use theAspnet_setreg.exe tool to store encrypted credentials in the registry. The customaccount must also be granted the appropriate NTFS permissions.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!