I have prepared some cheat-sheet to get into consideration
while working on any ASP.Net project.
- Authentication and authorization policies
- Input ValidationSecurity Parameters AlignmentConfirm the input range is checked at Form textbox controls.Confirm RequiredFieldValidator is implemented.Confirm RegularExpressionValidator is implemented.Confirm RangeValidator is implemented.Textbox is properly validating the input length and type to SQL injection attack.Confirm cookies and query strings are being validated by the Regex class.Confirm the HttpOnly cookie option is applied to defend from an XSS attack.Confirm if actual output is encoded with urlEncode and HtmlEncode.
- Parameters HandlingSecurity Parameters AlignmentConfirm query strings data are encrypted.Confirm form viewstate is encrypted.
- Session Data HandlingSecurity Parameters AlignmentConfirm connections strings are encrypted.Confirm session cookies data are hashed.
- Sensitive Data ProtectionSecurity Parameters AlignmentConfirm sensitive data is not stored in web.config file in plain text.Confirm sensitive data does not reside in cookies, query strings, and hidden forms fields.Confirm server side state management is applied for clear text passing of data across the pages.
- Web servicesSecurity Parameters AlignmentConfirm redundant Web service protocols, including HTTP GET and HTTP POST, are disabled.Confirm Input to Web methods is validated for, length, type, range, and format.Confirm Web service running with least-privileged process account.Confirm SOAP messages are passed only in encrypted form over communication channels.
- Exception Handling ManagementSecurity Parameters AlignmentConfirm every occurred exception is recorded on the server.Confirm structure exception handling is applied to each code file.Confirm application level exception handling is applied.Confirm Page level exception handling is applied.
- Web.Config File Administration Security Parameters AlignmentConfirm enableViewState is disabled, if application doesn't rely on view state.Confirm enableViewStateMac is enabled, if application uses view state.Confirm httpMaxLength to prevent users from being able to upload a large-sized file.Confirm application is forced to use authentication by allowOverrride tofalse.Confirm customErrors option is enabled.
- Privilege ManagementSecurity Parameters AlignmentConfirm ASP.NET process account has Read permission to system root directory (%windir\System32).Confirm impersonate account has Read permission to GAC (%windir\assembly).Confirm process account has Read and Execute permission to solution content directory.Confirm ASP.NET process account has Read and execute permission to Framework directory (%windir\Microsoft.NET\Framework).Confirm process account has Full control permission to Temporary files (%windir%\Microsoft.NET\Framework\{version}Temporary ASP.NET Files)
- DeploymentSecurity Parameters AlignmentConfirm debug compilation is disabled.Confirm trace is disabled.Confirm access is denied by authentication configuration removed.Confirm Bin directory doesn't have read or write permission.Confirm Bin directory doesn't have directory browsing permission.
No comments:
Post a Comment