10 security vulnerabilities in. Net configuration files

Source: Internet
Author: User

Application in ASP. NETProgramDuring deployment in the production environment, check whether the following 10 incorrect configurations exist in the web. config file, which may cause security vulnerabilities:

 

1. Disabling custom errors

Vulnerable: Secure:

<Configuration>

<System. Web> <system. Web>

<Custom mode = "off"> <customerrors mode = "remoteonly">

 

2. Leaving tracing enabled

Vulnerable: Secure:

<Configuration>

<System. Web> <system. Web>

<Trace enabled = "true" <trace enabled = "false"

Localonly = "false"> localonly = "true">

 

3. enabling debugging

Vulnerable: Secure:

<Configuration>

<System. Web> <system. Web>

<Compilation DEBUG = "true"> <compilation DEBUG = "false">

 

4. Making cookies accessible through client-side script

Vulnerable: Secure:

<Configuration>

<System. Web> <system. Web>

<Httpcookies

Httponlycookies = "false"> httponlycookies = "true">

 

5. Enabling cookieless session state

Vulnerable: Secure:

<Configuration>

<System. Web> <system. Web>

<Sessionstate

Cookieless = "useuri"> cookieless = "usecookies">

 

6. Enabling cookieless Authentication

Vulnerable: Secure:

<Configuration>

<System. Web> <system. Web>

<Authentication mode = "forms"> <Authentication mode = "forms">

<Forms cookieless = "useuri"> <forms cookieless = "usecookies">

 

7. Failing to require SSL for authentication cookies

Vulnerable: Secure:

<Configuration>

<System. Web> <system. Web>

<Authentication mode = "forms"> <Authentication mode = "forms">

<Forms requiressl = "false"> <forms requiressl = "true">

 

8. Using Sliding expiration

Vulnerable: Secure:

<Configuration>

<System. Web> <system. Web>

<Authentication mode = "forms"> <Authentication mode = "forms">

<Forms slidingexpiration = "true"> <forms slidingexpiration = "false">

 

9. Using Non-unique authentication cookies

Vulnerable: Secure:

<Configuration>

<System. Web> <system. Web>

<Authentication mode = "forms"> <Authentication mode = "forms">

<Forms name = ". aspxauth"> <forms name = "{abcd1234 ...}"

 

10. using hard-coded credentials

Vulnerable: Secure:

<Configuration>

<System. Web> <system. Web>

<Authentication mode = "forms"> <Authentication mode = "forms">

<Forms>

<Credentials>...

...

</Credentials> </Forms>

</Forms>

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.