nstnikto — NST script to administer nikto.
nstnikto [
-m
TEXT
| --mode TEXT
] [
-rd
DEVICE
| --ram-device DEVICE
] [
-rds
SIZE
| --ram-disk-size SIZE
] [
-rmp
PATH
| --ram-mount-point PATH
] [
-rdir
DIRECTORY
| --runtime-directory DIRECTORY
] [
-h
[true]|false
| --help [true]|false
] [
-H
[true]|false
| --help-long [true]|false
] [
-v
[true]|false
| --verbose [true]|false
] [ --version [true]|false
]
The nstnikto script is used in a NST distribution to administer the nikto process on a NST distribution (nikto is designed to examine web servers and look for security holes).
This script has been designed to support other scripts. For
example, the status mode doesn't echo anything
directly to the console unless you include the
-v option. Hence, if you use this script
directly from the command line, you will most likely want to
include the -v option to enable verbose
output.
There are several modes of operation support by the nstnikto script:
statusThe status mode of operation is
used to determine whether or not the nikto process has
been setup.
setupThe setup mode is used to prepare
the NST distribution to run the nikto process. It
removes any previous nikto instance if necessary, then
installs the original nikto files as distributed with the
NST. This mode is useful to restore nikto to a known
state.
If you run the nstnikto script on a NST system booted
by a live CD, it will create a 64MB
RAMDISK at
/mnt/ram4 by default to hold the
nikto run time information (but only if the
RAMDISK has not yet been
created).
updateThe update mode of operation is
used to update the nikto files with the latest plug-ins
from the nikto web site.
removeThe remove mode of operation is
used to remove the nikto files which were setup by a prior
invocation of setup.
locationThe location mode of operation is
intended to be used by other setup scripts. It simply
reports the directory where the nikto files were
installed.
Here is a typical example of using nstnikto to
setup, update and then
run nikto:
[root@probe ~]#nstnikto -m setup -v*** Creating a 64MByte RAM disk at mount point: "/mnt/ram4"... /root/bin/create_ramdisk -v -s 64 -d /dev/ram4 -m /mnt/ram4 *** Mount point: "/mnt/ram4" is already in use, script: "create_ramdisk" is exiting normally... *** (mount): /dev/ram4 on /mnt/ram4 type ext2 (rw) *** (df -k): Filesystem 1K-blocks Used Available Use% Mounted on /dev/hda5 20161172 857904 18279128 5% / none 193044 0 193044 0% /dev/shm /dev/ram4 63461 2954 60507 5% /mnt/ram4 /dev/ram5 11895 13 11882 1% /mnt/ram5 Created package directory: /mnt/ram4/nikto *** Copying the nikto distribution to: /mnt/ram4/nikto ... Adjusted nmap and plugins directory in config.txt *** Nikto setup complete. To run use: *** (cd /mnt/ram4/nikto; ./nikto.pl --help)[root@probe ~]#nstnikto -m update -v+ No updates required. + www.cirt.net message: Version 2.0 is still coming... Successfully updated nikto plug-ins[root@probe ~]#cd /mnt/ram4/nikto[root@probe nikto]#/mnt/ram4/nikto.pl --findonly -h 127.0.0.1./nikto.pl --findonly -h 127.0.0.1 --------------------------------------------------------------------------- - Nikto 1.35/1.34 - www.cirt.net + Server: http://localhost:80 Apache/2.0.51 (Fedora) + 1 host(s) tested[root@probe nikto]#cd[root@probe ~]#nstnikto -m remove[root@probe ~]#
The above assumes that one is running the NST from a
live CD. Had you been running from a hard
disk install, then /var/nst would appear
instead of /mnt/ram4 in the above
output.
The following command line options are available:
-m TEXT] | [--mode TEXT]
This option controls what
nstnikto will do. If you specify
status (the default), it will indicate whether
nikto has been setup yet or not. If you specify
setup it remove any previous instance of
nikto and set up your NST system to run
nikto. If you specify
update, it will update the
nikto plug-ins from www.cirt.net. If you
specify remove it will remove the run time
directory. If you specify location it will
display the location of the run time directory (according to the
last setup).
-rd DEVICE] | [--ram-device DEVICE]
Use this optional parameter to change the default RAM
device that will be used for setting up the runtime environment by
the script. The following RAM device names are
available on NST: /dev/ram0 -
/dev/ram9. A corresponding mount point path:
/mnt/ram0 - /mnt/ram9
will be automatically selected for the RAM device. One can use the
following optional parameter: [-rmp PATH] to
change the mount point path location for the selected RAM
device. If not specified, a reasonable default value for the
script shall be chosen.
-rds SIZE] | [--ram-disk-size SIZE]
Use this optional parameter to change the default RAM disk size in MegaBytes (MB) that will be used if a RAM disk is created by the nstnikto script. **Note: Use a reasonable value and make sure you to not exceed your available system RAM. The system memory utility: "free" can be used to help make your determination. If omitted, a reasonable value will be chosen by the script. The minimum value permitted is 10. The maximum value permitted is 1024.
-rmp PATH] | [--ram-mount-point PATH]
Use this optional parameter to change the selected
RAM device: [-rd DEVICE] mount point path
location for the runtime environment created by the nstnikto
script.
-rdir DIRECTORY] | [--runtime-directory DIRECTORY]
One can use this optional parameter to force the
nstnikto script to use an existing runtime directory on a
locally attached disk drive or a mounted network file system and
bypass the creation of a RAM disk. To do this, make sure the
directory initially exists prior to using this option. If omitted
and the -rd DEV option is omitted, then the
nstnikto will make a "smart choice" as to whether to allocate
a RAM disk or use a existing directory.
-h [true]|false] | [--help [true]|false]
When this option is specified, nstnikto will display a short one line description of nstnikto, followed by a short description of each of the supported command line options. After displaying this information nstnikto will terminate.
-H [true]|false] | [--help-long [true]|false]
This option will attempt to pull up additional
nstnikto documentation within a text based
web browser. You can force which browser we use setting the
environment variable TEXTBROWSER, otherwise,
we will search for some common ones.
-v [true]|false] | [--verbose [true]|false]
When you set this option to true, nstnikto will produce additional output. This is typically used for diagnostic purposes to help track down when things go wrong.
--version [true]|false]
If this option is specified, the version number of the script is displayed.
/etc/sysconfig/niktoConfiguration file created by
setup to help the NST locate the nikto
installation.
/usr/local/share/nstniktoDirectory containing resource files used by nstnikto.
/usr/local/niktoLocation where nikto files are originally
transferred when setup mode is invoked.