Web Security Development Considerations

Source: Internet
Author: User

1.sql injection: This is normal, do not spell the string and filter the keyword can be anti-stop, it should be noted that the cookie submitted by the parameter

can also cause an injection of vulnerabilities.
2. Side note: That is, in order to ensure that their own program is not a problem, but also to ensure that the same server other sites no problem. To set at least

Good system permissions, even if someone else's site problems can not affect their own site.
3. Upload: Try not to have upload function, if must have upload function. Also do the following: You cannot let the user define the path, file

Name, which restricts the types of files that can be uploaded. Also to restrict permissions, basic rules: execution and writable are mutually exclusive permissions, should not exist simultaneously

。
4. Password Strength: Password strength requirements should be added to functions such as setting a password. When the server is deployed on-line, the default should be immediately

Password changed.
5. Anti-exhaustive mechanism: appropriate to add a verification code, to prevent others to use the program poor account password.
6. Third-party controls: The use of third-party controls is subject to rigorous audits (many third-party controls are intentionally left defective), and tick

Use it in addition to unnecessary functionality.
7. Permissions minimization: can give read-only to read-only, as far as possible specific to each subdirectory.
8. Directory is very well-regulated: Get the Administrator account password, but can not find the background login address is also difficult to invade. Do not move the background path

Move is Http://www.2cto.com/admin, manager, GL and so on, it is easy to guess the solution.
10.XSS: Commonly known as cross-site scripting attacks. Users of HTML, JS and other tags into the edit box, after storage, and then display the time can be

Causes the layout error, JS can parse the execution and so on all belong to the category of XSS. If the attacker inserts an IFRAME connected to a Trojan page, then check

The people who look at this content are tragic. Workaround: Filter greater than less than the number can be
11.CSRF URL jump unauthenticated vulnerability: similar to XSS, just write the code in the URL, such as
Http:///www.2cto.com/logout.aspx?preURL=aaaa.html
That is, often appear in the login to exit the page, through the parameters of the Preurl decision to complete the action when to jump to which page, if so
Http://www.2cto.com/logout.aspx?preURL=javascript:alert (' Test ')
You can play the box, that our JS code has been implemented.

In a word, in the development process, do not trust the user to submit any data, planning the directory, to do the right to minimize, close, delete

Unnecessary things, it will be relatively safe.

CERT Security Coding Recommendations:
1. Validate input: Input from untrusted data source requires validation. Proper input validation can reduce the vulnerability of a large number of software. Will

Must be skeptical about most data sources, including command line parameters, network interfaces, environment variables, and user files.
2. Message compiler Warning: Use the compiler's highest warning level when compiling code to reduce the warning by modifying the code.
3. Architecture and design for security policy: adopt security policy when building software architecture and designing software. For example, if the system is in a different

Requires different permissions, consider dividing the system into different subsystems that each have appropriate permissions.
4. Keep it simple: the simpler the design the better, the more complex the design increases the likelihood of errors when implemented.
5. Default deny: The default Access policy is based on the allowed. In other words, the default access is denied, unless it is indicated that it is allowed

Of
6, the principle of least privilege: each process has the minimum permissions required to complete the work. The ownership time of any permission should be as short as possible. This party

Method prevents an attacker from exploiting the privilege to elevate the chance of executing arbitrary code.
7. Clean the data sent to other systems: Clean all data sent to complex subsystems such as: command shell (shells), relationship

Database, commercial components. An attacker could attack through an SQL command or injection. This is not avoided by the subsystem through input validation.

Problem because the subsystem does not know the context of the call, and the calling process directs the context, so it is the responsibility to clean the data when the subsystem is called

。
8, in-depth defense: This is a general security principle, from a number of defensive strategies to avoid risk, if one layer of defense failure, then another layer of anti-

The imperial still plays a role.
9, the use of effective security quality assurance technology: Good quality assurance technology can effectively detect and eliminate weaknesses. Penetration testing, fuzz testing,

and the source code audit can be used as an effective quality assurance measure. An independent security review can create a more secure system.
10, the use of security coding standards: for the development of language and platform to specify the security coding standards, and the adoption of these standards.

Web Security Development Considerations

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.