Home Menu

Security


Contents


Security Issues


Security Planning


Basics


Prevention

Passwords

File Permissions

Root User

Keeping the &^$%&* Out

Secure Shell

Wrappers

Virus Prevention

While viruses have not been a big problem in the Linux world, they could be. Any program that can damage a system or users file space, or misuse the resources of a system is a problem for system administrators regardless of the total impact. As Linux become more popular, users become less sophisticated and the capabilities and demands of mailers, web agents and other applications increases, viruses will become a problem.

A good place to check out what is available is:

Virus scanners for Unix/Linux are available from McAfee, Trend Micro and others if you want a proprietary solution.

The primary entry point for viruses is email, and there are several email virus scanners. There are also wrappers that will integrate a proprietary scanner into your Linux email subsystem.

AMaViS (www.amavis.org) produces an GPL-licensed email scanner and provides regular updates for new virus types.

Closing the Holes

One method of preventing system intrusions is to use the tools that hackers use to find holes in your systems before they do. These programs are generally known as scanners of one type or another, primarily because they scan systems looking for potential vulnerabilities. In general, these programs are interested in network weaknesses that present opportunities for breaking-in, but some also attempt password breakins.

Never use on of these programs against a system that you do not have permission to use it against. Ever. Not only is it rude, but it could be illegal or a violation of policy, depending on the situation.

SATAN - Security Administrator Tool for Analyzing Networks

Nessus

nmap - Port Scanner

Packet Filtering


Detection

Use scripting

  • find

    File Lists

    cksum and m5sum

    COPS - Computer Oracle and Password System

    tripwire

    portsentry

    hostsentry

    snort

    logcheck

    Track the Users

    Turn on History on root

    ttysnoop

    Packet Filtering


    Restoration


    The SysAdmin's Role


    Assignment

    1. Check to see what your login/password system allows in terms of password sanity checking. Is it sufficient?
    2. Download nmap and install it. Use it to scan your machine to determine what vulnerabilities you find. Prepare a short report on what you found out and what you should think about fixing. Under no circumstances should you scan any other hosts. The switches and routers are configured to detect such activity when possible and report it.
    3. Recompile your kernel as necessary to get netfilter and iptables installed. Then start with with a completely closed policies (INPUT, OUTPUT and FORWARD drop all packets). Then add telnet out, but not in, DNS out, sendmail in and out and other things that you would like. You might take a look at http://www.linuxguruz.org/iptables for some very good examples to go by. In the end, you want a system that only allows what is necessary.
    4. Check the permissions of the directories and files that are critical to protecting the system - etc, boot, var, /usr/bin, /usr/lib, and so on. Do they seem reasonable.
    5. Write a script and find files that have been changed recently - one day or so. Use it to check significant files. Also, try looking for files whose permissions are wrong (perm option).
    6. Write a script to make a list of important files on your machine and store them somewhere. It should encrypt, but it isn't necessary. The script should be adaptable to new and different file systems that need to be tracked.
    7. Add cksum to your script to checksum important directories and files.
    8. Install COPS or tripwire on your system and try it out. What important information does it give you? DO NOT PUT THESE ON ANY MSU MACHINE, other than the ones in 259A!!
    9. Set up and test your tcp wrappers.


    Home Menu