ASP.NET - Avoiding SQL Hypodermic Injection Attacks

Page 1

ASP.NET - Avoiding SQL Hypodermic Injection Attacks CRB Tech Reviews that the SQL hypodermic injection can occur, as confirmed above, when a program uses feedback to create powerful SQL claims or when it uses saved procedures to connect to the data source. Conventional precautionary features, such as the use of SSL and IPSec, do not secure your program from SQL hypodermic injection strikes. Successful SQL hypodermic injection strikes enable harmful customers to perform instructions in an application's data source. Common weaknesses that create your information access rule vulnerable to SQL hypodermic injection strikes include:

Weak feedback approval.

Dynamic construction of SQL claims without the use of type-safe factors.

Use of over-privileged data source logins.

So what can we do to help secure our program from such attacks? To counter SQL hypodermic injection strikes, we need to: Constrain and clean feedback information


Check for known good information by verifying for kind, length, format, and range and using a record of appropriate figures to restrict feedback. Create a record of appropriate figures and use regular expression to decline any figures that are not on the record. Using the record of undesirable figures is incorrect because it is very difficult to anticipate all possible modifications of bad feedback. Start by constraining feedback in the server-side rule for your ASP.NET Web pages. Do not depend on client-side approval because it can be quickly side stepped. Use client-side approval only to decrease circular visits and to enhance the consumer encounter. Examine my other blog on Validation Application Block for server-side approval. If the Purchase Variety value is taken by an ASP.NET TextBox management, you can restrict its feedback by using a RegularExpressionValidator management. If the Purchase Variety feedback is from another source, such as an HTML management, a question sequence parameter, or a biscuit, you can restrict it by using the Regex class from the System.Text.RegularExpressions namespace. Performing feedback approval is essential because almost all application-level strikes contain harmful feedback. You should confirm all feedback, such as form areas, question sequence factors, and biscuits to secure your program against harmful control hypodermic injection. Assume all feedback to your Web program is harmful, and create sure that you use server approval for all sources of feedback. Use client-side approval to decrease circular visits to the server and to enhance the consumer encounter, but do not depend on it because it is quickly side stepped. Apply ASP.NET demand approval during development to recognize hypodermic injection attacks ASP.NET demand approval finds any HTML elements and arranged figures in information published to the server. This inhibits customers from placing program into your program. Request approval checks all feedback information against a hard-coded record of very dangerous principles. If a match occurs, it brings an exemption of kind HttpRequestValidationException. Thus we hope that our CRB Tech reviews are useful to our readers.



Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.