Home > Security Tips > Web Security Advisor > Basic steps for securing Apache
Security Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

WEB SECURITY ADVISOR

Basic steps for securing Apache


Mike Chapple, CISSP
12.08.2004
Rating: -3.86- (out of 5)


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


A recent study conducted by the market research firm IDC estimates that one-third of the server market will consist of Linux systems by the year 2008. With the growing trend toward Linux deployments, we're seeing a corresponding increase in the number of Web sites running on the Linux-based Apache Web server. If you're running Apache in your environment or are considering its implementation, you'll benefit from these five Apache security tips:

  • Verify your distribution. Don't assume that a Google search will turn up an appropriate Apache distribution. When you need to download the latest release, be sure to obtain it through an authorized mirror site. Even that's not enough, however. In fact, an attacker once managed to compromise the apache.org site itself. Therefore, it's critical that you use a tool like PGP to verify the digital signature of the release.
  • Keep Apache patched. Once you've installed Apache, it's critical that you keep up with security patches. Failure to do so could leave you vulnerable to high-profile exploits that storm the Internet. Fortunately, there are several easy ways to keep updated. Read our tip on keeping Apache patched to learn more about the Apache Server Announcements list, Linux package management systems and the RedHat up2date service.
  • Avoid using .htaccess files. Many Apache installations are managed by multiple administrators and content managers. A solution commonly implemented for shared management is the use of .htaccess files to provide flexible delegation of access control authority to users other than the administrator. However, these files also place quite a bit of security control outside of a centralized security function -- by their very nature they allow users other than security professionals to alter access control permissions. Those users might not be familiar with the importance of granular access controls and might inadvertently take actions that undermine the security of your system. Therefore, it's a good idea to avoid using this type of access control system unless absolutely necessary. For more on this topic, read our tip Banish .htaccess from your Apache Server .
  • Monitor your logs. Apache provides a comprehensive logging facility that offers administrators a comprehensive hindsight look at server activity. Apache provides several different logs, but the most significant to security professionals is the Access Log. This flexible facility allows for quite a bit of customization, making it easy for you to log as much or as little information as you're able to effectively analyze. At a minimum, you should log unsuccessful authentication attempts and system-generated errors. The analysis task may be facilitated through the use of free tools like AWStats. It's important to note that log monitoring is an after-the-fact analysis. You'll be able to look back and determine attacks (and attack attempts) on your server but it's unlikely you'll be able to interpret the log quickly enough to react to an emerging situation. In cases where proactivity is required, you should consider the use of an intrusion prevention system such as Lucid Security's ipAngel, winner of Information Security magazine's 2003 Best Emerging Technology award.
  • Manage file system permissions. We've already discussed the importance of managing access to files through the use (or non-use) of .htaccess files. It's equally important that you protect the Apache server from unauthorized modification through file system permissions. In particular, you should ensure that only the root user can modify files stored within the /usr/local/apache (or whatever directory you choose as the root directory for Apache). It's also important to ensure that your log files may only be modified by root to prevent users from covering their tracks.

With these basic principles in mind, you'll be well on your way to maintaining a secure Apache installation!

About the author
Mike Chapple, CISSP, currently serves as Chief Information Officer of the Brand Institute, a Miami-based marketing consultancy. He previously worked as an information security researcher for the U.S. National Security Agency. His publishing credits include the TICSA Training Guide from Que Publishing, the CISSP Study Guide from Sybex and the upcoming SANS GSEC Prep Guide from John Wiley. He's also the author of the About.com Guide to Databases.


Rate this Tip
To rate tips, you must be a member of SearchSecurity.com.
Register now to start rating these tips. Log in if you are already a member.




Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


RELATED CONTENT
Apache Security
Screencast: How to use Wikto for Web server assessment
Kaminsky: DNS flaw capable of attacks on many fronts
Trend Micro site compromised
DNS worm strikes at Microsoft flaw
Apache fixes pair of Web server flaws
IIS vs. Apache: Which is the right security choice?
Security Bytes: Flaws in Apache and Sophos SBS
Banish .htaccess from your Apache server
Securing Apache: Keeping patches current
Quick Takes: 'Chunked' vulnerability in Apache addressed

Web Application Security (Also see Web Access Control)
Symantec to acquire MessageLabs for SaaS model
Clickjacking details released after attack proof-of-concept emerges
Billy Hoffman on AJAX security and browser attacks
Data risks take shine off Google Chrome
Verizon breach study identifies industry specific threats
IronPort feature detects exploited websites
PCI DSS 1.2 clarifies wireless, antivirus use
MySpace, Facebook ignoring basic principles of security
Positive changes coming to ModSecurity
Kaminsky: DNS flaw capable of attacks on many fronts

Web Access Control
Sun launches open source OpenSSO for identity management
Should a new user have to confirm his or her email address before gaining access?
Shared Identity Providers Could Soothe Password Chaos
Users are complaining that they can no longer reach any login site belonging to Microsoft. Any ideas?
Vista WIL: How to take control of data integrity levels
Video: Changes ahead for MIT Kerberos Consortium
Kerberos security evolves for B2B, mobile tech
Kerberos: Authentication with some drawbacks
Sun shifts strategy with GRC push
CardSpace vs. user IDs and passwords

RELATED GLOSSARY TERMS
Terms from Whatis.com − the technology online dictionary
anonymous Web surfing  (SearchSecurity.com)
buffer overflow  (SearchSecurity.com)
cache cramming  (SearchSecurity.com)
cookie poisoning  (SearchSecurity.com)
dictionary attack  (SearchSecurity.com)
distributed denial-of-service attack  (SearchSecurity.com)
JavaScript hijacking  (SearchSecurity.com)
National Computer Security Center  (SearchSecurity.com)
threat modeling  (SearchSecurity.com)
trigraph  (SearchSecurity.com)

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary

DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.



Research Solutions for Network Security, Access Control and Security Threats
More Security Resources for Resellers, VARs and OEMs
TechTarget Security Media
Information Security View this month\\'s issue and subscribe today.
Information Security Decisions Apply online for free conference admission.
SearchSecurity.com
HomeNewsMagazineMultimediaWhite PapersLearningAdviceTopicsEventsAbout Us

About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
TechTarget provides enterprise IT professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective IT purchase decisions and managing their organizations' IT projects - with its network of technology-specific Web sites, events and magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Reprints  |  Site Map




All Rights Reserved, Copyright 2003 - 2008, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts