A10 2004 Insecure Configuration Management

From OWASP
Jump to: navigation, search

This article is for the OWASP Top 10 2004

Description

Web server and application server configurations play a key role in the security of a web application. These servers are responsible for serving content and invoking applications that generate content. In addition, many application servers provide a number of services that web applications can use, including data storage, directory services, mail, messaging, and more. Failure to manage the proper configuration of your servers can lead to a wide variety of security problems.

Frequently, the web development group is separate from the group operating the site. In fact, there is often a wide gap between those who write the application and those responsible for the operations environment. Web application security concerns often span this gap and require members from both sides of the project to properly ensure the security of a site’s application.

There are a wide variety of server configuration problems that can plague the security of a site. These include:

  • Unpatched security flaws in the server software
  • Server software flaws or misconfigurations that permit directory listing and directory traversal attacks
  • Unnecessary default, backup, or sample files, including scripts, applications, configuration files, and web pages
  • Improper file and directory permissions
  • Unnecessary services enabled, including content management and remote administration
  • Default accounts with their default passwords
  • Administrative or debugging functions that are enabled or accessible
  • Overly informative error messages (more details in the error handling section)
  • Misconfigured SSL certificates and encryption settings
  • Use of self-signed certificates to achieve authentication and man-in-the-middle protection
  • Use of default certificates
  • Improper authentication with external systems

Some of these problems can be detected with readily available security scanning tools. Once detected, these problems can be easily exploited and result in total compromise of a website. Successful attacks can also result in the compromise of backend systems including databases and corporate networks. Having secure software and a secure configuration are both required in order to have a secure site.

Environments Affected

All web servers, application servers, and web application environments are susceptible to misconfiguration.

Examples and References

How to Determine If You Are Vulnerable

If you have not made a concerted effort to lock down your web and application servers you are most likely vulnerable. Few, if any, server products are secure out of the box. A secure configuration for your platform should be documented and updated frequently. A manual review of the configuration guide should be performed regularly to ensure that it has been kept up to date and is consistent. A comparison to the actual deployed systems is also recommended.

In addition, there are a number of scanning products available that will externally scan a web or application server for known vulnerabilities, including Nessus and Nikto. You should run these tools on a regular basis, at least monthly, to find problems as soon as possible. The tools should be run both internally and externally. External scans should be run from a host located external to the server’s network. Internal scans should be run from the same network as the target servers.

How to Protect Yourself

The first step is to create a hardening guideline for your particular web server and application server configuration. This configuration should be used on all hosts running the application and in the development environment as well. We recommend starting with any existing guidance you can find from your vendor or those available from the various existing security organizations such as OWASP, CERT, and SANS and then tailoring them for your particular needs. The hardening guideline should include the following topics:

  • Configuring all security mechanisms
  • Turning off all unused services
  • Setting up roles, permissions, and accounts, including disabling all default accounts or changing their passwords
  • Logging and alerts

Once your guideline has been established, use it to configure and maintain your servers. If you have a large number of servers to configure, consider semi-automating or completely automating the configuration process. Use an existing configuration tool or develop your own. A number of such tools already exist. You can also use disk replication tools such as Ghost to take an image of an existing hardened server, and then replicate that image to new servers. Such a process may or may not work for you given your particular environment.

Keeping the server configuration secure requires vigilance. You should be sure that the responsibility for keeping the server configuration up to date is assigned to an individual or team. The maintenance process should include:

  • Monitoring the latest security vulnerabilities published
  • Applying the latest security patches
  • Updating the security configuration guideline
  • Regular vulnerability scanning from both internal and external perspectives
  • Regular internal reviews of the server’s security configuration as compared to your configuration guide
  • Regular status reports to upper management documenting overall security posture
{"cc_re__cc_re__cc_by_sa_3_0": ["<li id=\"t-info\"><a href=\"/index.php?title=A10_2004_Insecure_Configuration_Management&amp;action=info\">Page information</a></li>\n\t\t</ul>\n\t</div>\n</div>\n\t\t\t</div>\n\t\t</div>\n\t\t<div id=\"footer\" role=\"contentinfo\">\n\t\t\t\t\t\t\t<ul id=\"footer-info\">\n\t\t\t\t\t\t\t\t\t\t\t<li id=\"footer-info-lastmod\"> This page was last modified on 10 October 2008, at 07:20.</li>\n\t\t\t\t\t\t\t\t\t\t\t<li id=\"footer-info-viewcount\">This page has been accessed 23,136 times.</li>\n\t\t\t\t\t\t\t\t\t\t\t<li id=\"footer-info-copyright\">Content is available under <a class=\"external\" rel=\"nofollow\" href=\"http://creativecommons.org/licenses/by-sa/3.0/\">a Creative Commons 3.0 License</a> unless otherwise noted.</li>\n\t\t\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t\t<ul id=\"footer-places\">\n\t\t\t\t\t\t\t\t\t\t\t<li id=\"footer-places-privacy\"><a href=\"/index.php/OWASP:Privacy_policy\" title=\"OWASP:Privacy policy\">Privacy policy</a></li>\n\t\t\t\t\t\t\t\t\t\t\t<li id=\"footer-places-about\"><a href=\"/index.php/OWASP:About\" title=\"OWASP:About\">About OWASP</a></li>\n\t\t\t\t\t\t\t\t\t\t\t<li id=\"footer-places-disclaimer\"><a href=\"/index.php/OWASP:General_disclaimer\" title=\"OWASP:General disclaimer\">Disclaimers</a>", "\t\t\t\t\t\t\t\t\t\t<li id=\"footer-places-privacy\"><a href=\"/index.php/OWASP:Privacy_policy\" title=\"OWASP:Privacy policy\">Privacy policy</a></li>\n\t\t\t\t\t\t\t\t\t\t\t<li id=\"footer-places-about\"><a href=\"/index.php/OWASP:About\" title=\"OWASP:About\">About OWASP</a></li>\n\t\t\t\t\t\t\t\t\t\t\t<li id=\"footer-places-disclaimer\"><a href=\"/index.php/OWASP:General_disclaimer\" title=\"OWASP:General disclaimer\">Disclaimers</a></li>\n\t\t\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t\t\t\t\t<ul id=\"footer-icons\" class=\"noprint\">\n\t\t\t\t\t<li id=\"footer-copyrightico\">\n\t\t\t\t\t\t<a href=\"http://creativecommons.org/licenses/by-sa/3.0/\"><img src=\"https://www.owasp.org/images/f/fa/Somerights20.png\" alt=\"a Creative Commons 3.0 License\" width=\"88\" height=\"31\" /></a>\n\t\t\t\t\t</li>\n\t\t\t\t\t<li id=\"footer-poweredbyico\">\n\t\t\t\t\t\t<a href=\"//www.mediawiki.org/\"><img src=\"/skins/common/images/poweredby_mediawiki_88x31.png\" alt=\"Powered by MediaWiki\" width=\"88\" height=\"31\" /></a>\n\t\t\t\t\t\t<a href=\"http://www.rackspace.com/cloud/managed_cloud/\"><img src=\"/images/Powered_By_Rackspace_logo.png\" alt=\"Powered by Rackspace Managed Cloud\" height=\"30\" width"], "copyright__copyright__copyright": ["", " assigned to an individual or team. The maintenance process should include:\n\n  \u2022 Monitoring the latest security vulnerabilities published\n  \u2022 Applying the latest security patches\n  \u2022 Updating the security configuration guideline\n  \u2022 Regular vulnerability scanning from both internal and external perspectives\n  \u2022 Regular internal reviews of the server\u2019s security configuration as compared to your configuration guide\n  \u2022 Regular status reports to upper management documenting overall security posture", " assigned to an individual or team. The maintenance process should include:\n\n  \u2022 Monitoring the latest security vulnerabilities published\n  \u2022 Applying the latest security patches\n  \u2022 Updating the security configuration guideline\n  \u2022 Regular vulnerability scanning from both internal and external perspectives\n  \u2022 Regular internal reviews of the server\u2019s security configuration as compared to your configuration guide\n  \u2022 Regular status reports to upper management documenting overall security posture"]}