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.

546 Part IV: Securing Your Network, Host, <strong>and</strong> <strong>Application</strong>Aspnet_setreg.exe <strong>and</strong> Process, Session, <strong>and</strong> IdentityAspnet_setreg.exe allows you to store credentials <strong>and</strong> connection strings in encryptedformat in the registry. This tool allows you to encrypt the following attributes:● ● ● The following example shows the element with a custom accountboth before <strong>and</strong> after running Aspnet_setreg.exe to secure the credentials:You can choose the registry location that stores the encrypted data, although it mustbe beneath HKEY_LOCAL_MACHINE. In addition to encrypting the data using theData Protection API (DPAPI) <strong>and</strong> storing it in the registry, the tool applies a secureACL to restrict access to the registry key. The ACL on the registry key grants FullControl to System, Administrators, <strong>and</strong> Creator Owner. If you use the tool toencrypt the credentials for the element or the connection string for the element, you must also grant read access to the ASP.NET processaccount.To obtain the Aspnet_setreg.exe tool <strong>and</strong> for more information, see MicrosoftKnowledge Base article 329290, “How To: Use the ASP.NET Utility to EncryptCredentials <strong>and</strong> Session State Connection Strings.”Impersonation is Not the DefaultBy default, ASP.NET applications do not impersonate. As a result, resource access isperformed using the ASP.NET worker process identity. You must grant the processidentity read access (at minimum) to the Windows resources that your applicationrequires access to by creating an appropriately configured ACL.If you do enable impersonation, you can either impersonate the original caller — thatis, the IIS authenticated identity — or a fixed identity specified on the element. For more information, see “Impersonation” later in this chapter.

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

Saved successfully!

Ooh no, something went wrong!