Five common asp.net safety flaws

Source: Internet
Author: User
Ensuring application security should start when writing the first line of code, for the simple reason that as the scale of application grows, the cost of patching up security vulnerabilities increases rapidly. According to the IBM System Science Association (Systems Sciences Institute), if you wait until the software is deployed to fix the bug, it costs 15 times times as much to detect and eliminate defects during development.
In order to secure the application with minimal cost, developers should assume more responsibility for the security of the code itself, the ability to resist attacks, and so on. However, to protect the security of the program from the earliest stages of development, you must have the appropriate skills and tools, and there are not many developers who really master these skills and tools. While learning to write safe code is a complex process, preferably in universities, in-house training sessions, industry meetings, but as long as you have mastered the following five common asp.net application security flaws as well as recommended corrective solutions, you can lead a step forward to integrate the necessary security factors into the application of the birth of the time.
One, can not blindly believe that user input
In Web application development, developers most often fail to trust user input unconditionally, assuming that users (even malicious users) are always restricted by browsers and always interact through browsers and servers, opening the door to attacking web apps. In fact, many of the tools that hackers attack and manipulate Web sites do not have to be limited to browsers, from the raw interface of the lowest-level character mode (for example, Telnet) to CGI script scanners, web proxies, Web application scanners, and malicious users who may be using a lot of attack patterns and tools.
Therefore, only rigorously verifying the legality of user input can effectively resist hacker attacks. An application can perform validation in a variety of ways, even with a range of validation scopes, for example, to perform validation before authenticating user input, to ensure that user input contains only legitimate characters, and that the content length of all input fields does not exceed the range (to prevent possible buffer overflow attacks). On this basis, other validation is performed to ensure that the data entered by the user is not only legitimate but also reasonable. When necessary, not only can you take a mandatory length restriction policy, but you can also perform validation on the input according to a well-defined set of features. The following recommendations will help you validate user input data correctly:
⑴ always performs validation on all user input, and validation must be performed on a reliable platform and should be performed on multiple layers of the application.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.