Wednesday, August 19, 2009

Unix System Security.

. Wednesday, August 19, 2009

13 Unix System Security.

Securing any computer system involves many steps, including:

  • Knowing how the system may be attacked
  • Knowing how to protect against these attacks
  • Monitoring your system
  • Teaching users how to be "safe" and getting them to work with you
  • Knowing what to do when you detect you've been hit

13.1 Knowing how the system may be attacked

The best place to start is by reading articles, such as:

13.1.1 Detecting an attack

Common methods of attack include:

  • System crashes
    • Repeat crashes usually hardware related
    • Read log files/console for panic reasons
    • Any patterns (e.g., time of day) should raise suspicion
  • New accounts
    • Especially with UID 0
  • New files
    • With setuid/setgid bits or root ownership
    • Hidden directories (e.g., "..." or with control characters in the name, such as backspace)
  • Modified file
    • System programs (e.g., login, sh, csh, ps)
    • Configuration files (e.g., /etc/rc, /etc/aliases, /etc/hosts.equiv)
    • User files (e.g., .login, .cshrc, .history, .rhosts)
  • Poor Performance
    • May indicate password cracking or packet sniffing programs
    • Programs to use: ps, iostat, vmstat, pstat, sar, netstat
  • Denial of service
    • Exhaustion of finite resources
      • File space on partitions (e.g., filling /tmp)
      • inode table
      • process table
      • open files
      • virutal memory
      • network services
    • Destruction of data
      • Deleting user files/system configuration files/system programs

13.2 Knowing how to protect against these attacks

Make sure you've applied all recommended security patches to your system.

Learn about, and use, tools and papers from sources such as these:

Only provide as much access as is necessary:

  • Put access controls on IP services with tcp_wrapper
  • Remove IP services you don't really need, such as fingerd, sendmail, and tftp

13.3 Monitoring your system

  • At the very least, log access with something like tcp_wrapper - add to effectiveness by logging to another host (see "man syslogd")
  • Read your log files, or use a tool like swatch
  • Detect modified programs with tripwire

13.4 Teaching users how to be "safe" and getting them to work with you

13.5 Knowing what to do when you detect you've been hit

  • Have security policies in place. COAST has example security policies, including examples from several Universities.
  • There are some good guidelines in RFC1244 (chapters 5 and 6) on post-incident response, but it also provides much information on developing policies and procedures
  • Send email to help@cac.washington.edu to report the incident
  • Gather and preserve evidence - it may be needed by law enforcement investigators

13.6 Unix System Security Checklist

This Unix System Security Checklist can serve as a tool to help you with improving and auditing the security of your systems.

13.7 Vendor Security/Patch Web Sites

13.8 Computer Security related sites on the Internet

13.9 Example Problems and Reading

  • Get a copy of Crack (a password cracker) from cert.sei.cmu.edu and run it against your /etc/passwd file. See how many passwords it can break.
  • Get a copy of COPS (a system security checker) from cert.sei.cmu.edu and run it on your system to see what it finds. You may wish to set this up so it runs under cron to regularly check your system.
  • Here are some interesting articles/papers on system security issues.
www.washington.edu

0 komentar:

:)) ;)) ;;) :D ;) :p :(( :) :( :X =(( :-o :-/ :-* :| 8-} :)] ~x( :-t b-( :-L x( =))

Post a Comment

 
Namablogkamu is proudly powered by Blogger.com | Template by o-om.com