Nathaniel Sammons
Colorado State University
nate@vis.colostate.edu
Sun Apr 2 17:19:08 MDT 1995
Rscan is a ``Heterogeneous Network Interrogator,'' which is to say that it is a tool that lets a system administrator run complex or simple scanner scripts on any number of machines in a heterogeneous environment. Rscan allows any ``module'' to be composed of scripts that run on either any operating system that is encountered, only certain operating systems (e.g. ``IRIX,'' ``SunOS,'' etc.), or only certain versions of a particular operating system (e.g. ``IRIX 4.0.5,'' ``IRIX 5.3,'' ``SunOS 4.1.1,'' etc.).
When Rscan runs, it collects data off of these scans and writes them to a report. The reports can be written in either plain ASCII or in automatically formatted HTML. If the reports are written in HTML, any text that looks like a URL (e.g. http://www.vis.colostate.edu/rscan ) is turned into a ``live'' HyperText link in the report (spacing is kept as it was). A report can be written for either each machine that is scanned (one report per machine) or for the entire scan run (one report per network).
Rscan can either be run on each machine manually, or, through the use of command line options or configuration files, can be run on one machine and collect data off of any number of machines automatically.
Once you unpack the Rscan distribution, the program to run is rscan in the rscan directory. Many people try to run the file scanner/scan, which is the program that Rscan runs on remote hosts, and should not be run as a stand alone application.
Rscan has many, many configuration options. It is hoped that there are enough options to make it customizable enough not make it necessary for each site to heavily modify (indeed, to modify at all) the code, although I don't mind if you do modify it to meet your needs.
The word modlist appears all over this guide, and it is an extremely important feature of Rscan. A modlist allows you to specify which modules are run on a machine, and which scans inside that module are run on that machine.
A modlist at it's most basic is a list of modules to run or the word ``any'' which is a keyword that tells Rscan to run all the modules it can find. Here is an example of a simple modlist:
Module names are separated by a single comma, with no space in between anything. This tells Rscan to run the IRIX-security module, the NetSecurity module, the crack module and the demo module.
Modlists can be more complicated and more powerful than this. Using the -list option to Rscan you can get a list of modules that are installed and a list of the individual scans that compose that module. Using these lists, you can construct a custom subset of scans to run out of each module.
Let's sat that the IRIX-security module had scans named suid, sendmail, rhosts, and xsession. Then if you only wanted to run the sendmail and rhosts scans out of that module, you could replace the IRIX-security part of the above modlist with the following:
and only those scans would be run. The scanner names are the names of the *.pl files without the .pl extension. You can also get the same result if you use the negation operator (``-'') in the modlists. The above is equivalent to:
This form of a modlists tells Rscan to run everything in the IRIX-security module except the suid and xsession scans.
A if you specify scans in a modlist, be sure not to mix the two kinds. You cannot have a modlist that contains both regular and negated scans. For instance, the modlist IRIX-security[-suid:xsession] is invalid, and would be caught by the modlist parser.
A modlist has no limit on length, though your shell may impose one. You can specify as many modules and as many scans as you want, provided that the space ` ' character doesn't show up in there, and you separate modules with the ',' character and scans with the ':' character. You may need to protect a modlist with double quotes when using them on command lines, since the `[', `]' and `:' characters are special to some shells. They should not be protected in the configuration files.
Command line options are as follows:
where host1,host2,...,hostN is the set of hosts, /path/to/perl is the path to the perl executable on the machines or the word ``same'' if the perl is located in the same place as the perl that is running the Rscan process, and modlist is the modlist to associate with the hosts. Unlike the configuration file option, you must specify a modlist on the command line (you can give a modlist of ``any'' you get the defaults.
%I | Integer time (seconds since Jan. 1, 1970) |
%H | hostname or ``network'' |
%M | month number |
%D | day of the month number |
%Y | two-digit year number (ex ``95'') |
%h | hour when Rscan was started |
%m | minute when Rscan was started |
%s | second when Rscan was started |
The default reportname format is:
Basically, a configuration file is a way to collect command line options in a file. Every command line option has an equivalent configuration file option (which can be overridden by the command line options). The options are as follows:
where host1,host2,...,hostN is the set of hosts, /path/to/perl is the path to the perl executable on the machines or the word ``same'' if the perl is located in the same place as the perl that is running the Rscan process, and modlist is the modlist to associate with the hosts. The modlist may be left out. If it is, a modlist of ``any'' is assumed.
Configuration files can be managed and tested by invoking Rscan with the -config option. This starts an interactive file editor. Once inside, you can type ``?'' to get a list of commands, and type ``help command'' to get help on a specific command.
I should probably put more here at some point. Run modman and type help if you need it. It's pretty self-explanatory.
There are currently three modules publicly available for Rscan.
Rscan is designed so that a module can be as simple as a directory and one .pl file, or as complex as you can imagine. Writing modules is a fairly simple process. The degree of customization you put into a module will make it more or less complicated, but the basic format for a module is always the same. The best way to see how a module is written is to look at one of the publicly available modules and examine it.
All files related to a particular module are gathered into a single directory, which sits in the ``rscan/scanner/modules'' directory. Filenames should not contain the ` ' (space) character, the ',' (comma), or the ':' (colon) character, since these are delimiters in the parser, and the parser is not really all that smart (but it is fast ;-) Files are arranged as follows:
module/ Main directory for the module init Generic initialization file fullname Module's "Full Name" version Module's version number desc descriptions of all *.pl files in this directory *.pl files individual scan files (with a .pl extension) OSNAME1/ init Initialization data for OSNAME1 VERSION1/ desc descriptions of all *.pl files *.pl files scans for OSNAME1 VERSION1 VERSION2/ desc descriptions of all *.pl files *.pl files scans for OSNAME1 VERSION2 VERSIONn/ desc descriptions of all *.pl files *.pl files scans for OSNAME1 VERSIONn common/ desc descriptions of all *.pl files *.pl files scans for all versions of OSNAME1 OSNAME2/ init Initialization data for OSNAME2 VERSION1/ desc descriptions of all *.pl files *.pl files scans for OSNAME2 VERSION1 VERSION2/ desc descriptions of all *.pl files *.pl files scans for OSNAME2 VERSION2 VERSIONn/ desc descriptions of all *.pl files *.pl files scans for OSNAME2 VERSIONn common/ desc descriptions of all *.pl files *.pl files scans for all versions of OSNAME2 OSNAMEn/ init Initialization data for OSNAMEn VERSION1/ desc descriptions of all *.pl files *.pl files scans for OSNAMEn VERSION1 VERSION2/ desc descriptions of all *.pl files *.pl files scans for OSNAMEn VERSION2 VERSIONn/ desc descriptions of all *.pl files *.pl files scans for OSNAMEn VERSIONn common/ desc descriptions of all *.pl files *.pl files scans for all versions of OSNAMEn
All or none of each directory and file needs to be present. The desc files should be present, since they are used by the -list command line option. The files fullname and version should also be present, since they are used in reports and other things.
Rscan has a set of functions for writing to the screen, reports, and performing other tasks. These functions should be used if applicable, and writers of modules are invited not to rewrite them, since it makes life hard when a new version of Rscan comes out with some changes.
headername: Value1 Value1 ValueN
and so on. There is no limit to how many values can be specified, other than those imposed by perl itself. The text for the headername is printed using &nprint in a 25 space wide field, and successive text is indented 25 spaces.
Most API variables are all collected in the %api hash table. Variables of particular interest are:
There is also a %os hash table that contains information about the operating system of the machine running the scanner. Here are the common %os variables, and some other that pertain to the os and the machine in general.
In general, Rscan should run on any UNIX OS that has either perl 4 or 5 installed on it. There is one operating system dependent file that has to be created for each ``new'' operating system that Rscan will be run on. This file is called the ``pathconfig'' file for the OS, and is located in the scanner/pathconfig directory and must be called whatever ``/bin/uname'' outputs for that OS.
It should contain definitions for how to obtain the variables in the %os hash table (name, version, etc). You should model it after the others in the pathconfig directory. The really important options are the definition of where rsh and tar and how to extract a tar archive. Read through a few of the other pathconfig files to get a feel for how to write one, and give it a shot... the worst thing that can happen is that Rscan will not run the scans properly!
Rscan is completely free. It can be anonymously ftp'd from ftp://ftp.vis.colostate.edu/pub/rscan . The file rscan.tar.gz will always be a link to the current version of Rscan. The WWW homepage is located at http://www.vis.colostate.edu/rscan and has lots of information about Rscan including sample reports, etc.
The IRIX-security module and the demo module can be obtained from the same source as Rscan.
The Rscan mailing list can be joined by sendmail mail to majordomo@vis.colostate.edu with the following text in the body:
The list is moderated by the author, and is extremely low traffic. It only carries announcements of new versions of Rscan and of Rscan modules. It is also archived at http://www.vis.colostate.edu/cgi-bin/mail2html/list/rscan-announce .
There is an automated RFE (Request For Enhancement) and Bug Reporting facility also. It is available from http://www.vis.colostate.edu/cgi-bin/rfebug .
I am a 19 year old sophomore at Colorado State Univerity and am also the System Administrator for the Computer Visualization Laboratory, where I take care of nine SGI's, three Suns, a mac, a PC, and an Amiga, along with some assorted video equipment, etc. I am majoring in Computer Science, and will be graduating in the spring of 1997 with a major in CS and minors in Mathematics and General Philosophy.
Rscan User's Guide Version 1.4.0
This document was generated using the LaTeX2HTML translator Version 95.1 (Fri Jan 20 1995) Copyright © 1993, 1994, Nikos Drakos, Computer Based Learning Unit, University of Leeds.
The command line arguments were:
latex2html tempfile.tex.
The translation was initiated by Nate Sammons on Sun Apr 2 17:18:55 MDT 1995