Security Guide
Total Page:16
File Type:pdf, Size:1020Kb
Fedora 11 Security Guide A Guide to Securing Fedora Linux Johnray Fuller John Ha David O'Brien Scott Radvan Eric Christensen Security Guide Fedora 11 Security Guide A Guide to Securing Fedora Linux Edition 1.0 Author Johnray Fuller [email protected] Author John Ha [email protected] Author David O'Brien [email protected] Author Scott Radvan [email protected] Author Eric Christensen [email protected] Copyright © 2008 Red Hat, Inc. The text of and illustrations in this document are licensed by Red Hat under a Creative Commons Attribution–Share Alike 3.0 Unported license ("CC-BY-SA"). An explanation of CC-BY-SA is available at http://creativecommons.org/licenses/by-sa/3.0/. The original authors of this document, and Red Hat, designate the Fedora Project as the "Attribution Party" for purposes of CC-BY-SA. In accordance with CC-BY-SA, if you distribute this document or an adaptation of it, you must provide the URL for the original version. Red Hat, as the licensor of this document, waives the right to enforce, and agrees not to assert, Section 4d of CC-BY-SA to the fullest extent permitted by applicable law. Red Hat, Red Hat Enterprise Linux, the Shadowman logo, JBoss, MetaMatrix, Fedora, the Infinity Logo, and RHCE are trademarks of Red Hat, Inc., registered in the United States and other countries. For guidelines on the permitted uses of the Fedora trademarks, refer to https://fedoraproject.org/wiki/ Legal:Trademark_guidelines. Linux® is the registered trademark of Linus Torvalds in the United States and other countries. Java® is a registered trademark of Oracle and/or its affiliates. XFS® is a trademark of Silicon Graphics International Corp. or its subsidiaries in the United States and/or other countries. All other trademarks are the property of their respective owners. The Linux Security Guide is designed to assist users of Linux in learning the processes and practices of securing workstations and servers against local and remote intrusion, exploitation, and malicious activity. The Linux Security Guide details the planning and the tools involved in creating a secured computing environment for the data center, workplace, and home. With proper administrative knowledge, vigilance, and tools, systems running Linux can be both fully functional and secured from most common intrusion and exploit methods. Preface vii 1. Document Conventions .................................................................................................. vii 1.1. Typographic Conventions .................................................................................... vii 1.2. Pull-quote Conventions ....................................................................................... viii 1.3. Notes and Warnings ............................................................................................ ix 2. We Need Feedback! ....................................................................................................... ix 1. Security Overview 1 1.1. Introduction to Security ................................................................................................. 1 1.1.1. What is Computer Security? ............................................................................... 1 1.1.2. SELinux ............................................................................................................ 3 1.1.3. Security Controls ............................................................................................... 3 1.1.4. Conclusion ........................................................................................................ 4 1.2. Vulnerability Assessment .............................................................................................. 4 1.2.1. Thinking Like the Enemy ................................................................................... 5 1.2.2. Defining Assessment and Testing ....................................................................... 5 1.2.3. Evaluating the Tools .......................................................................................... 7 1.3. Attackers and Vulnerabilities ......................................................................................... 9 1.3.1. A Quick History of Hackers ................................................................................ 9 1.3.2. Threats to Network Security ............................................................................. 10 1.3.3. Threats to Server Security ............................................................................... 11 1.3.4. Threats to Workstation and Home PC Security .................................................. 12 1.4. Common Exploits and Attacks ..................................................................................... 13 1.5. Security Updates ........................................................................................................ 15 1.5.1. Updating Packages .......................................................................................... 16 1.5.2. Verifying Signed Packages ............................................................................... 16 1.5.3. Installing Signed Packages .............................................................................. 17 1.5.4. Applying the Changes ...................................................................................... 17 2. Securing Your Network 21 2.1. Workstation Security ................................................................................................... 21 2.1.1. Evaluating Workstation Security ........................................................................ 21 2.1.2. BIOS and Boot Loader Security ........................................................................ 21 2.1.3. Password Security ........................................................................................... 23 2.1.4. Administrative Controls .................................................................................... 29 2.1.5. Available Network Services .............................................................................. 35 2.1.6. Personal Firewalls ........................................................................................... 38 2.1.7. Security Enhanced Communication Tools .......................................................... 39 2.2. Server Security .......................................................................................................... 39 2.2.1. Securing Services With TCP Wrappers and xinetd ............................................. 40 2.2.2. Securing Portmap ............................................................................................ 43 2.2.3. Securing NIS ................................................................................................... 43 2.2.4. Securing NFS .................................................................................................. 46 2.2.5. Securing the Apache HTTP Server ................................................................... 47 2.2.6. Securing FTP .................................................................................................. 48 2.2.7. Securing Sendmail ........................................................................................... 50 2.2.8. Verifying Which Ports Are Listening .................................................................. 51 2.3. Single Sign-on (SSO) ................................................................................................. 52 2.3.1. Introduction ..................................................................................................... 52 2.3.2. Getting Started with your new Smart Card ........................................................ 54 2.3.3. How Smart Card Enrollment Works .................................................................. 55 2.3.4. How Smart Card Login Works .......................................................................... 56 iii Security Guide 2.3.5. Configuring Firefox to use Kerberos for SSO ..................................................... 57 2.4. Pluggable Authentication Modules (PAM) ..................................................................... 59 2.4.1. Advantages of PAM ......................................................................................... 60 2.4.2. PAM Configuration Files ................................................................................... 60 2.4.3. PAM Configuration File Format ......................................................................... 60 2.4.4. Sample PAM Configuration Files ...................................................................... 63 2.4.5. Creating PAM Modules .................................................................................... 64 2.4.6. PAM and Administrative Credential Caching ...................................................... 64 2.4.7. PAM and Device Ownership ............................................................................. 66 2.4.8. Additional Resources ....................................................................................... 67 2.5. TCP Wrappers and xinetd ........................................................................................... 68 2.5.1. TCP Wrappers ................................................................................................. 69 2.5.2. TCP Wrappers Configuration Files .................................................................... 70 2.5.3. xinetd .............................................................................................................