http://www.Linux-Sec.net




  • Hardening-Tightening

    Security_Policy

  • Hardening-HOWTO

    Linux Distros

    Distro Patches

    Kernel-Patches

    Dedicated Servers
  • Firewalls
  • DNS Servers
  • Mail Servers
  • Web Servers

    Turn-Off Daemons

    Tighten Inetd Services


  • Top-10 Vulnerabilities

    Top-7 Security Mistakes

    Top-10 Vulnerabilities

    Top-20 Most Critical Vulnerability


    Top-10 Virus


  • Scans/Attacks Stats

    Top-10 Attacks

    Hacked Servers


  • One Minute Audits
  • OpenPorts Audit


    AntiVirus - AntiSpam
  • Anti-Spam
  • Anti-Virus

  • spam.wav


    Wireless [In]Security
  • Sniffers


  • Security Tools

    SSH_SSL

    Firewalls

    MailServer

    FileSystem

    VPN

    Port Scan Detectors

    IDS Tools

    LogFile Analysis

    Ethernet Monitoring

    Server Monitoring

    Tracking & Forensics


  • Hackers Tools

    Audit Tools

    Port Scanners

    Hacking Tools

    Sniffer Tools

    Exploits & Vulnerbilities


  • Wireless

    Wireless [In]Security


  • Misc

    Statistics

    Linux/BSD Distros

    Links,Articles,WatchDogs

    Security Mailing Lists/FAQs

    Liability Insurance



  • 1U Rackmount Chassis

    Custom-Chassis.com

    Linux-1U.net

    1U-ITX.net


    ITX-Blades.net


    Small PC cases

    Mini-Box.net

    Wrap-Box.net

    Wrap-OS.net


    Wan-Sim.net



    Linux-Consulting.com

    Linux-CAE.net

    Linux-Sec.net

    Linux-Boot.net

    Linux-Backup.net

    Linux-Wireless.org

    Linux-Office.net

    Linux-Video.net

    Linux-Jobs.net

    Linux-Diff.net

    1U-Raid5.net


    Spam Reporting



    Free Linux CDs

    ISO9660.org

    Distro-CD.org

    Patch-CD.org




    Contact



    Linux is a registered trademark of
    Linus Torvalds

    More Linux Legalese


    FileSystem Hardening



    FileSystem Hardening

    • Remove un-needed users from /etc/passwd ( change shells )
      • cp -p /etc/passwd /etc/passwd.original
      • cp -p /etc/shadow /etc/shadown.original
      • Remove the account from the /etc/passwd and /etc/shadow files
      • Put a * in the second field ( no login permitted )
      • Use /bin/false for the shell -- something NOT listed in /etc/shells

    • chmod 1777 /tmp /usr/tmp
    • chmod 554 /sbin /usr/sbin /usr/lcoal/sbin -- dont allow world execute

    • Remove setuid on some ( most all ) of the apps
    • See the list of files to check
      • find / \( -perm +2000 -o -perm +4000 \) -ls
      • find / -user root -perm "-u+s"
      • chmod -s program_name

    • Turn off world-writable files
      • To See it...
        • find / -perm -2 -type f -ls
      • To Change it...
        • find / -perm -2 -type f -exec chmod -o-w {}\; -- untested

    • Add missing(empty) user files: .rhosts .forward .plan

    • Mail Server Fixes
      • chmod 775 /var/spool/mail /var/spool/mqueue
      • chown root.mail /var/spool/mail /var/spool/mqueue
      • chmod 6755 /usr/sbin/sendmail
      • chgrp mail /usr/sbin/sendmail

    • FileSystem Hierachy
      • Keep all system and user config files in /etc
      • Keep all user changes in their home dir
      • Keep all run time log files and info in /var
      • Install all user changes in /usr/local/{src,etc,bin,sbin,man}

    • Root Priviledges
      • Document all changes, no matter how small of a change, in the files itself
      • NEVER share root passwds - use sudo instead
      • NEVER write down passwds
      • NEVER use the same passwd on multiple machines
      • and if you do write it down in one of the servers, at least encrypt the file

    • Enable Shadow passwd if not already used
      • pwconv and grpconv

    • Scripts to Check filesystem


    Copyright © 2000
    Linux-Consulting
    All Rights Reserved.
    Updated: Sun Nov 21 23:52:12 2004 PDT