Top Ten Web security risks and Countermeasures

Source: Internet
Author: User

A1-cross site scripting (XSS)

1. on the page, convert the text input box, the value of the drop-down list, and some sensitive characters (for example, <> ).

2. Convert and filter some sensitive characters in the application_beginrequest event of Global. asax.

A2-injection flaws

1. See A1.

2. Do not directly use concatenated SQL statements. Use parameter-style SQL statements or stored procedures and set values for parameters.

A3-malicious File Execution

1. Upload of executable files such as EXE, DLL, JS, and vbs is prohibited

2. Set firewall and anti-virus software.

3. IIS executes Asp.net users to lower their permission to execute files.

A4-insecure direct object reference

When accessing data, add the access manual number in the SQL parameter, and calculate the permission based on the employee ID to limit the data accessed by the user.

A5-Cross Site Request Forgery (csrf)

1. Generate the random name hidden and random value, and then perform symmetric encryption verification when the client returns the data. Or, the viewstate exclusive to. NET is used for symmetric encryption verification.

2. Use JavaScript to encrypt sensitive data (such as passwords) before post, and then submit the data.

3. Reduce get transmission information.

A6-information leakage and improper error handling

1. Only a brief error prompt is displayed on the user page to avoid specific error messages, which are only recorded in server logs.

A7-broken authentication and session management

1. Use SSL links

2. Add an IP address to seesion for verification each time.

A8-insecure Cryptographic storage

1. Use more secure encryption algorithms AES, RSA and SHA-256.

2. You do not need to write the key explicitly in the program.

A9-insecure communications

Enable SSL connections in IIS to improve security

A10-failure to restrict URL access

Some important files, such as *. CS and *. config, cannot be downloaded. Set important files (such as header files) in the directory in IIS to not be downloaded.

Reference http://www.owasp.org/index.php/Top_10_2007

Related Article

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.