Журнал лабораторных работ

Содержание

Журнал

Суббота (12/23/06)

/dev/ttyp4
09:46:49
#pkg_add -r nessus
-------------------------------------------------------------------------------
                        Creation of the Nessus SSL Certificate
-------------------------------------------------------------------------------
Congratulations. Your server certificate was properly created.
/usr/local/etc/nessus/nessusd.conf updated
The following files were created :
. Certification authority :
   Certificate = /usr/local/com/CA/cacert.pem
   Private key = /usr/local/var/CA/cakey.pem
. Nessus Server :
...
Press [ENTER] to exit
         ***********************************
         * !!!!!!!!!!! WARNING !!!!!!!!!!! *
         ***********************************
Since 2.0.12_1, to run nessusd server from startup, add nessusd_enable="YES"
in your /etc/rc.conf.
Available variables you add/set to /etc/rc.conf.
- nessusd_enable (bool):      Set to "NO" by default.
                              Set it to "YES" to enable nessusd.
- nessusd_flags (str):        Set to "-D" by default.
/dev/ttyp6
09:47:31
#vi /etc/rc.conf
29a30
> nessusd_enable="YES"
/dev/ttyp4
09:49:22
#cat /etc/rc.d/named
#!/bin/sh
#
# $NetBSD: named,v 1.10 2002/03/22 04:33:59 thorpej Exp $
# $FreeBSD: src/etc/rc.d/named,v 1.22 2005/05/23 12:25:33 pjd Exp $
#
# PROVIDE: named
# REQUIRE: SERVERS cleanvar
# BEFORE:  DAEMON
# KEYWORD: shutdown
. /etc/rc.subr
...
            ! -f "${named_chrootdir}/etc/namedb/rndc.conf" ]; then
                rndc-confgen -a -b256 ${confgen_chroot}
        fi
}
load_rc_config $name
# The following variable requires that rc.conf be loaded first
#
required_dirs="$named_chrootdir"        # if it is set, it must exist
pidfile="${named_pidfile:-/var/run/${name}/pid}"
run_rc_command "$1"
прошло 17 минут
10:06:44
#tsort
^C
10:06:56
#/usr/local/etc/rc.d/nessusd.sh start
Starting nessusd.
All plugins loaded
10:08:38
#nessus-adduser user
Using /var/tmp as a temporary file holder
Add a new nessusd user
----------------------
Login : user
Authentication (pass/cert) [pass] :
Login password :
Login password (again) :
User rules
----------
nessusd has a rules system which allows you to restrict the hosts
that user has the right to test. For instance, you may want
him to be able to scan his own host only.
Please see the nessus-adduser(8) man page for the rules syntax
Enter the rules for this user, and hit ctrl-D once you are done :
(the user can have an empty rules set)
q^C
/dev/ttyp6
10:12:07
#man nessus-adduser
/dev/ttyp4
10:15:07
#nessus-adduser user
Using /var/tmp as a temporary file holder
Add a new nessusd user
----------------------
Login : user
Authentication (pass/cert) [pass] :
Login password :
Login password (again) :
User rules
----------
nessusd has a rules system which allows you to restrict the hosts
...
Please see the nessus-adduser(8) man page for the rules syntax
Enter the rules for this user, and hit ctrl-D once you are done :
(the user can have an empty rules set)
^D
Login             : user
Password          : ***********
DN                :
Rules             :
Is that ok ? (y/n) [y] y
user added.
10:15:41
#nessus
Ooops ...
  This nessus version has no gui support.  You need to give nessus the
  arguments SERVER PORT LOGIN TRG RESULT as explained in more detail
  using the --help option.
10:15:48
#/usr/local/etc/rc.d/nessusd.sh start
nessusd already running? (pid=1441).
10:16:11
#nessus --help
nessus, version 2.2.5.
Common options :
 nessus [-vnh] [-c .rcfile] [-V] [-T <format>]
Batch-mode scan:
 nessus -q [-pPS] <host> <port> <user> <pass> <targets-file> <result-file>
List sessions  :
 nessus -s -q <host> <port> <user> <pass>
Restore session:
 nessus -R <sessionid> -q <host> <port> <user> <pass> <result-file>
Report conversion :
...
        host     : nessusd host
        port     : nessusd host port
        user     : user name
        pass     : password
        targets  : file containing the list of targets
        result   : name of the file where
                   nessus will store the results
        -p       : obtain list of plugins installed on the server.
        -P       : obtain list of server and plugin preferences.
        -S       : issue SQL output for -p and -P (experimental).
10:17:30
#nessus
Ooops ...
  This nessus version has no gui support.  You need to give nessus the
  arguments SERVER PORT LOGIN TRG RESULT as explained in more detail
  using the --help option.
10:19:57
#nessus --help
nessus, version 2.2.5.
Common options :
 nessus [-vnh] [-c .rcfile] [-V] [-T <format>]
Batch-mode scan:
 nessus -q [-pPS] <host> <port> <user> <pass> <targets-file> <result-file>
List sessions  :
 nessus -s -q <host> <port> <user> <pass>
Restore session:
 nessus -R <sessionid> -q <host> <port> <user> <pass> <result-file>
Report conversion :
...
        host     : nessusd host
        port     : nessusd host port
        user     : user name
        pass     : password
        targets  : file containing the list of targets
        result   : name of the file where
                   nessus will store the results
        -p       : obtain list of plugins installed on the server.
        -P       : obtain list of server and plugin preferences.
        -S       : issue SQL output for -p and -P (experimental).
10:20:09
#cd /usr/ports

10:21:00
#make search name="nessus"
Port:   nessus-2.2.5
Path:   /usr/ports/security/nessus
Info:   A security scanner: looks for vulnerabilities in a given network
Maint:  udo.schweigert@siemens.com
B-deps: libtool-1.3.5_2 nessus-libnasl-2.2.5 nessus-libraries-2.2.5
R-deps: nessus-libnasl-2.2.5 nessus-libraries-2.2.5
WWW:    http://www.nessus.org/
Port:   nessus-devel-2.3.1
Path:   /usr/ports/security/nessus-devel
Info:   A security scanner: looks for vulnerabilities in a given network
...
B-deps: nessus-2.2.5 nessus-libnasl-2.2.5 nessus-libraries-2.2.5
R-deps: nessus-2.2.5 nessus-libnasl-2.2.5 nessus-libraries-2.2.5 nmap-3.81 pcre-6.2
WWW:    http://www.nessus.org/
Port:   nessus-plugins-devel-2.3.1
Path:   /usr/ports/security/nessus-plugins-devel
Info:   Plugins for Nessus, the security scanner
Maint:  udo.schweigert@siemens.com
B-deps: nessus-devel-2.3.1 nessus-libnasl-devel-2.3.1 nessus-libraries-devel-2.3.1
R-deps: nessus-devel-2.3.1 nessus-libnasl-devel-2.3.1 nessus-libraries-devel-2.3.1 nmap-3.81 pcre-6.2
WWW:    http://www.nessus.org/
10:21:16
#nessus
Ooops ...
  This nessus version has no gui support.  You need to give nessus the
  arguments SERVER PORT LOGIN TRG RESULT as explained in more detail
  using the --help option.
10:22:18
#pkg_del nessus
bash: pkg_del: command not found
10:23:00
#pkg_rmessus
bash: pkg_rm: command not found
10:23:06
#pkg_info |grep
nessus-2.2.5        A security scanner: looks for vulnerabilities in a given ne
nessus-libnasl-2.2.5 Nessus Attack Scripting Language
nessus-libraries-2.2.5 Libraries for Nessus, the security scanner
10:23:36
#pkg_delete nessus-2.2.5
The nessus-2.2.5 server package has been deleted.
If you're *not* upgrading and won't be using
it any longer, you may want to issue the
following commands:
- to delete the nessus server permanently (losing all data):
  rm -Rf /usr/local/var/nessus
- to remove the Certificate Authority associated with nessus:
  rm -Rf /usr/local/com/CA /usr/local/var/CA
If you are upgrading, don't forget to restart
nessusd and updating the plugins.
10:25:21
#/usr/local/etc/rc.d/nessusd.sh stop
bash: /usr/local/etc/rc.d/nessusd.sh: No such file or directory
10:25:48
#pkg_info |grep nessus
nessus-libnasl-2.2.5 Nessus Attack Scripting Language
nessus-libraries-2.2.5 Libraries for Nessus, the security scanner
10:26:01
#pkg_info |grep nessus-libnasl-2.2.5
nessus-libnasl-2.2.5 Nessus Attack Scripting Language
10:26:31
#pkg_info |grep nessus
nessus-libnasl-2.2.5 Nessus Attack Scripting Language
nessus-libraries-2.2.5 Libraries for Nessus, the security scanner
10:26:35
#pkg_info |grep nessus-libraries-2.2.5
nessus-libraries-2.2.5 Libraries for Nessus, the security scanner
10:26:56
#pkg_delete nessus-libraries-2.2.5
pkg_delete: package 'nessus-libraries-2.2.5' is required by these other packages
and may not be deinstalled:
nessus-libnasl-2.2.5
10:27:27
#pkg_delete libnasl-2.2.5

10:28:02
#pkg_delete nessus-libraries-2.2.5

10:28:06
#make search name="nessus"
Port:   nessus-2.2.5
Path:   /usr/ports/security/nessus
Info:   A security scanner: looks for vulnerabilities in a given network
Maint:  udo.schweigert@siemens.com
B-deps: libtool-1.3.5_2 nessus-libnasl-2.2.5 nessus-libraries-2.2.5
R-deps: nessus-libnasl-2.2.5 nessus-libraries-2.2.5
WWW:    http://www.nessus.org/
Port:   nessus-devel-2.3.1
Path:   /usr/ports/security/nessus-devel
Info:   A security scanner: looks for vulnerabilities in a given network
...
B-deps: nessus-2.2.5 nessus-libnasl-2.2.5 nessus-libraries-2.2.5
R-deps: nessus-2.2.5 nessus-libnasl-2.2.5 nessus-libraries-2.2.5 nmap-3.81 pcre-6.2
WWW:    http://www.nessus.org/
Port:   nessus-plugins-devel-2.3.1
Path:   /usr/ports/security/nessus-plugins-devel
Info:   Plugins for Nessus, the security scanner
Maint:  udo.schweigert@siemens.com
B-deps: nessus-devel-2.3.1 nessus-libnasl-devel-2.3.1 nessus-libraries-devel-2.3.1
R-deps: nessus-devel-2.3.1 nessus-libnasl-devel-2.3.1 nessus-libraries-devel-2.3.1 nmap-3.81 pcre-6.2
WWW:    http://www.nessus.org/
10:29:13
#cd nessus
bash: cd: nessus: No such file or directory
10:29:21
#cd /security/
bash: cd: /security/nessus: No such file or directory
10:29:38
#cd /security/nessus/
bash: cd: /security/nessus/: No such file or directory
10:29:46
#cd /usr/ports/security/nessus

10:30:15
#make install
rm -f .libs/gencode.lo
cc -pipe -O2 -fno-strict-aliasing -pipe -O2 -O2 -fno-strict-aliasing -pipe -I. -I../../include -DHAVE_CONFIG_H -DNESSUS_ON_SSL -DHAVE_SYS_IOCCOM_H=1 -DHAVE_SYS_SOCKIO_H=1 -DHAVE_ETHER_HOSTTON=1 -DHAVE_STRERROR=1 -DHAVE_SOCKADDR_SA_LEN=1 -I. -DHAVE_SSL -I/usr/include/openssl -I/usr/ports/security/nessus-libraries/work/nessus-libraries/include -I/usr/ports/security/nessus-libraries/work/nessus-libra
cc -pipe -O2 -fno-strict-aliasing -pipe -O2 -O2 -fno-strict-aliasing -pipe -I. -I../../include -DHAVE_CONFIG_H -DNESSUS_ON_SSL -DHAVE_SYS_IOCCOM_H=1 -DHAVE_SYS_SOCKIO_H=1 -DHAVE_ETHER_HOSTTON=1 -DHAVE_STRERROR=1 -DHAVE_SOCKADDR_SA_LEN=1 -I. -DHAVE_SSL -I/usr/include/openssl -I/usr/ports/security/nessus-libraries/work/nessus-libraries/include -I/usr/ports/security/nessus-libraries/work/nessus-libra
mv -f .libs/gencode.lo gencode.lo
libtool cc -pipe -O2 -fno-strict-aliasing -pipe   -O2 -O2 -fno-strict-aliasing -pipe -I.  -I../../include -DHAVE_CONFIG_H  -DNESSUS_ON_SSL   -DHAVE_SYS_IOCCOM_H=1 -DHAVE_SYS_SOCKIO_H=1 -DHAVE_ETHER_HOSTTON=1 -DHAVE_STRERROR=1 -DHAVE_SOCKADDR_SA_LEN=1 -I. -DHAVE_SSL -I/usr/include/openssl -I/usr/ports/security/nessus-libraries/work/nessus-libraries/include -I/usr/ports/security/nessus-libraries/wor
rm -f .libs/optimize.lo
cc -pipe -O2 -fno-strict-aliasing -pipe -O2 -O2 -fno-strict-aliasing -pipe -I. -I../../include -DHAVE_CONFIG_H -DNESSUS_ON_SSL -DHAVE_SYS_IOCCOM_H=1 -DHAVE_SYS_SOCKIO_H=1 -DHAVE_ETHER_HOSTTON=1 -DHAVE_STRERROR=1 -DHAVE_SOCKADDR_SA_LEN=1 -I. -DHAVE_SSL -I/usr/include/openssl -I/usr/ports/security/nessus-libraries/work/nessus-libraries/include -I/usr/ports/security/nessus-libraries/work/nessus-libra
cc -pipe -O2 -fno-strict-aliasing -pipe -O2 -O2 -fno-strict-aliasing -pipe -I. -I../../include -DHAVE_CONFIG_H -DNESSUS_ON_SSL -DHAVE_SYS_IOCCOM_H=1 -DHAVE_SYS_SOCKIO_H=1 -DHAVE_ETHER_HOSTTON=1 -DHAVE_STRERROR=1 -DHAVE_SOCKADDR_SA_LEN=1 -I. -DHAVE_SSL -I/usr/include/openssl -I/usr/ports/security/nessus-libraries/work/nessus-libraries/include -I/usr/ports/security/nessus-libraries/work/nessus-libra
mv -f .libs/optimize.lo optimize.lo
libtool cc -pipe -O2 -fno-strict-aliasing -pipe   -O2 -O2 -fno-strict-aliasing -pipe -I.  -I../../include -DHAVE_CONFIG_H  -DNESSUS_ON_SSL   -DHAVE_SYS_IOCCOM_H=1 -DHAVE_SYS_SOCKIO_H=1 -DHAVE_ETHER_HOSTTON=1 -DHAVE_STRERROR=1 -DHAVE_SOCKADDR_SA_LEN=1 -I. -DHAVE_SSL -I/usr/include/openssl -I/usr/ports/security/nessus-libraries/work/nessus-libraries/include -I/usr/ports/security/nessus-libraries/wor
...
cc -pipe -I../ -DHAVE_CONFIG_H -DNESSUS_ON_SSL -I. -DHAVE_SSL -I/usr/include/openssl -I/usr/ports/security/nessus-libraries/work/nessus-libraries/include -I/usr/ports/security/nessus-libraries/work/nessus-libraries/libpcap-nessus -O2 -fno-strict-aliasing -pipe -g -c ids_send.c  -fPIC -DPIC -o .libs/ids_send.lo
cc -pipe -I../ -DHAVE_CONFIG_H -DNESSUS_ON_SSL -I. -DHAVE_SSL -I/usr/include/openssl -I/usr/ports/security/nessus-libraries/work/nessus-libraries/include -I/usr/ports/security/nessus-libraries/work/nessus-libraries/libpcap-nessus -O2 -fno-strict-aliasing -pipe -g -c ids_send.c -o ids_send.o >/dev/null 2>&1
mv -f .libs/ids_send.lo ids_send.lo
libtool cc -pipe -I../ -DHAVE_CONFIG_H  -DNESSUS_ON_SSL  -I. -DHAVE_SSL -I/usr/include/openssl -I/usr/ports/security/nessus-libraries/work/nessus-libraries/include -I/usr/ports/security/nessus-libraries/work/nessus-libraries/libpcap-nessus -O2 -fno-strict-aliasing -pipe   -g -c rand.c
rm -f .libs/rand.lo
cc -pipe -I../ -DHAVE_CONFIG_H -DNESSUS_ON_SSL -I. -DHAVE_SSL -I/usr/include/openssl -I/usr/ports/security/nessus-libraries/work/nessus-libraries/include -I/usr/ports/security/nessus-libraries/work/nessus-libraries/libpcap-nessus -O2 -fno-strict-aliasing -pipe -g -c rand.c  -fPIC -DPIC -o .libs/rand.lo
cc -pipe -I../ -DHAVE_CONFIG_H -DNESSUS_ON_SSL -I. -DHAVE_SSL -I/usr/include/openssl -I/usr/ports/security/nessus-libraries/work/nessus-libraries/include -I/usr/ports/security/nessus-libraries/work/nessus-libraries/libpcap-nessus -O2 -fno-strict-aliasing -pipe -g -c rand.c -o rand.o >/dev/null 2>&1
mv -f .libs/rand.lo rand.lo
libtool cc -pipe -I../ -DHAVE_CONFIG_H  -DNESSUS_ON_SSL  -I. -DHAVE_SSL -I/usr/include/openssl -I/usr/ports/security/nessus-libraries/work/nessus-libraries/include -I/usr/ports/security/nessus-libraries/work/nessus-libraries/libpcap-nessus -O2 -fno-strict-aliasing -pipe   -g -c popen.c
rm -f .libs/popen.lo
10:36:21
#cd ..

10:37:08
#make search name="nessus"
Port:   nessus-2.2.5
Path:   /usr/ports/security/nessus
Info:   A security scanner: looks for vulnerabilities in a given network
Maint:  udo.schweigert@siemens.com
B-deps: libtool-1.3.5_2 nessus-libnasl-2.2.5 nessus-libraries-2.2.5
R-deps: nessus-libnasl-2.2.5 nessus-libraries-2.2.5
WWW:    http://www.nessus.org/
Port:   nessus-devel-2.3.1
Path:   /usr/ports/security/nessus-devel
Info:   A security scanner: looks for vulnerabilities in a given network
...
B-deps: nessus-2.2.5 nessus-libnasl-2.2.5 nessus-libraries-2.2.5
R-deps: nessus-2.2.5 nessus-libnasl-2.2.5 nessus-libraries-2.2.5 nmap-3.81 pcre-6.2
WWW:    http://www.nessus.org/
Port:   nessus-plugins-devel-2.3.1
Path:   /usr/ports/security/nessus-plugins-devel
Info:   Plugins for Nessus, the security scanner
Maint:  udo.schweigert@siemens.com
B-deps: nessus-devel-2.3.1 nessus-libnasl-devel-2.3.1 nessus-libraries-devel-2.3.1
R-deps: nessus-devel-2.3.1 nessus-libnasl-devel-2.3.1 nessus-libraries-devel-2.3.1 nmap-3.81 pcre-6.2
WWW:    http://www.nessus.org/
10:37:47
#cd nessus-plugins-2.2.5
bash: cd: nessus-plugins-2.2.5: No such file or directory
10:38:33
#make install
/usr/local/bin/perl5.8.7 mkVFunc -m x tixInt.h
Ignoring from tixInt.exc
tixInt.h:876:  * (these are declared with the EXTERN in win/winMain.c but without it
TIXINT
/usr/local/bin/perl5.8.7 mkVFunc -t x tixInt.h
Ignoring from tixInt.exc
tixInt.h:876:  * (these are declared with the EXTERN in win/winMain.c but without it
TIXINT
/usr/local/bin/perl5.8.7 mkVFunc -m x tk.h
Ignoring from tk.exc
...
cp tkInitScript.h ../blib/arch/Tk/pTk/tkInitScript.h
cp tkCanvas.h ../blib/arch/Tk/pTk/tkCanvas.h
cp tkIntXlibDecls_f.h ../blib/arch/Tk/pTk/tkIntXlibDecls_f.h
cp tkEvent.h ../blib/arch/Tk/pTk/tkEvent.h
cp tkConfig.h ../blib/arch/Tk/pTk/tkConfig.h
cp tkImgPhoto.h ../blib/arch/Tk/pTk/tkImgPhoto.h
cp tixPort.h ../blib/arch/Tk/pTk/tixPort.h
cp tkImgPhoto_f.h ../blib/arch/Tk/pTk/tkImgPhoto_f.h
cp ks_names.h ../blib/arch/Tk/pTk/ks_names.h
cp tkOption.h ../blib/arch/Tk/pTk/tkOption.h
прошло 13 минут
10:51:41
#nessus

10:53:51
#/usr/local/etc/rc.d/nessusd.sh stop
Stopping nessusd.
Waiting for PIDS: 1441, 1441.
10:54:11
#/usr/local/etc/rc.d/nessusd.sh start
Starting nessusd.
All plugins loaded
10:54:25
#nessus
^Z
[1]+  Stopped                 nessus
10:56:49
#bg
[1]+ nessus &
10:56:50
#cd nessus-plugins-2.2.5
bash: cd: nessus-plugins-2.2.5: No such file or directory
10:56:58
#cd nessus-plugins
nessus-plugins/       nessus-plugins-devel/
10:56:58
#cd nessus-plugins
nessus-plugins/       nessus-plugins-devel/
10:56:58
#cd nessus-plugins

10:57:07
#cd ..

10:57:35
#cd nessus-
nessus-devel/           nessus-libnasl-devel/   nessus-libraries-devel/ nessus-plugins-devel/
nessus-libnasl/         nessus-libraries/       nessus-plugins/
10:57:35
#cd nessus-
nessus-devel/           nessus-libnasl-devel/   nessus-libraries-devel/ nessus-plugins-devel/
nessus-libnasl/         nessus-libraries/       nessus-plugins/
10:57:35
#ls |grep nessus
nessus
nessus-devel
nessus-libnasl
nessus-libnasl-devel
nessus-libraries
nessus-libraries-devel
nessus-plugins
nessus-plugins-devel
10:58:19
#cd nessus-plugins

10:59:00
#ls
Makefile        distinfo        pkg-descr       pkg-plist
10:59:54
#make install
/bin/sh /usr/ports/security/nessus-plugins/work/nessus-plugins/libtool cc -O2 -fno-strict-aliasing -pipe   -I/usr/local/include/nessus -DNESSUS_ON_SSL -DHAVE_SSL -I/usr/include/openssl  -DHAVE_LIBNET_1_1   -c  nmap_tcp_connect.c
mkdir .libs
cc -O2 -fno-strict-aliasing -pipe -I/usr/local/include/nessus -DNESSUS_ON_SSL -DHAVE_SSL -I/usr/include/openssl -DHAVE_LIBNET_1_1 -c nmap_tcp_connect.c  -fPIC -DPIC -o .libs/nmap_tcp_connect.lo
cc -O2 -fno-strict-aliasing -pipe -I/usr/local/include/nessus -DNESSUS_ON_SSL -DHAVE_SSL -I/usr/include/openssl -DHAVE_LIBNET_1_1 -c nmap_tcp_connect.c -o nmap_tcp_connect.o >/dev/null 2>&1
mv -f .libs/nmap_tcp_connect.lo nmap_tcp_connect.lo
/bin/sh /usr/ports/security/nessus-plugins/work/nessus-plugins/libtool cc -O2 -fno-strict-aliasing -pipe   -I/usr/local/include/nessus -DNESSUS_ON_SSL -DHAVE_SSL -I/usr/include/openssl  -DHAVE_LIBNET_1_1  -o libnmap_tcp_connect.la nmap_tcp_connect.lo -L/usr/local/lib -lnessus -lhosts_gatherer -lpcap-nessus  -lutil   -L/usr/lib -lssl -lcrypto  -rpath /usr/ports/security/nessus-plugins/work/nessus-p
rm -fr .libs/libnmap_tcp_connect.la .libs/libnmap_tcp_connect.* .libs/libnmap_tcp_connect.*
cc -shared  nmap_tcp_connect.lo  -Wl,--rpath -Wl,/usr/local/lib -Wl,--rpath -Wl,/usr/local/lib  -L/usr/local/lib /usr/local/lib/libnessus.so /usr/local/lib/libhosts_gatherer.so /usr/local/lib/libpcap-nessus.so -lutil -L/usr/lib -lssl -lcrypto -lc  -Wl,-soname -Wl,libnmap_tcp_connect.so.0 -o .libs/libnmap_tcp_connect.so.0
(cd .libs && rm -f libnmap_tcp_connect.so && ln -s libnmap_tcp_connect.so.0 libnmap_tcp_connect.so)
(cd .libs && rm -f libnmap_tcp_connect.so && ln -s libnmap_tcp_connect.so.0 libnmap_tcp_connect.so)
...
/usr/bin/install -c -o root -g wheel -m 444 libtool /usr/local/lib/nessus/plugins_factory
/usr/bin/install -c -o root -g wheel -m 444 nessus.tmpl /usr/local/lib/nessus/plugins_factory
test -d /usr/local/bin || /usr/bin/install -c -o root -g wheel -d -m 755  /usr/local/bin
/usr/bin/install -c -o root -g wheel -m 755 pf/nessus-build /usr/local/bin/
================================================================================
Use /usr/local/sbin/nessus-update-plugins to update your plugin
collection.
================================================================================
===>   Compressing manual pages for nessus-plugins-2.2.5
===>   Registering installation for nessus-plugins-2.2.5
11:01:44
#/usr/local/etc/rc.d/nessusd.sh stop
Stopping nessusd.
Waiting for PIDS: 26795, 26795.
[1]+  Done                    nessus  (wd: /usr/ports/security)
(wd now: /usr/ports/security/nessus-plugins)
11:03:43
#/usr/local/etc/rc.d/nessusd.sh start
Starting nessusd.
Loading the plugins... 51 (out of 1239)
------------------------------------------------------------------------------
You are running a version of Nessus which is not configured to receive
a full plugin feed. As a result, your security audits will produce incomplete
results.
To obtain a complete plugin feed, you need to register your Nessus scanner
at the following URL :
               http://www.nessus.org/register/
------------------------------------------------------------------------------
All plugins loaded
11:04:00
#nessus
[34415] SSL_CTX_load_verify_locations: error:02001002:system library:fopen:No such file or directory
^D
^C
/dev/ttyp8
11:10:41
#telnet alba.org.ua 25
DROP       tcp  --  192.168.1.0/24       anywhere           tcp spts:netbios-ns:netbios-ssn
DROP       udp  --  192.168.1.0/24       anywhere           udp spts:netbios-ns:netbios-ssn
ACCEPT     all  --  192.168.1.0/24       anywhere
Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination
PUB_OUT    all  --  anywhere             anywhere
INT_OUT    all  --  anywhere             anywhere
Chain INT_IN (1 references)
target     prot opt source               destination
ACCEPT     tcp  --  anywhere             192.168.1.0/24     tcp dpt:ssh
...
354 Enter message, ending with "." on a line by itself
From: Bill Gates <billgates@microsoft.com>
To: little4est@fm.com.ua
Subject: Update you Windows installation
Update your operating system
.
250 OK id=1Epixh-0006E4-QK
^]
telnet> q
Connection closed.
прошло 38 минут
/dev/ttyp4
11:49:12
#nessus
[36739] SSL_CTX_load_verify_locations: error:02001002:system library:fopen:No such file or directory
^Z
[1]+  Stopped                 nessus
прошло 16 минут
12:05:49
#bg
[1]+ nessus &
12:05:54
#cd nessus-plugins-2.2.5
bash: cd: nessus-plugins-2.2.5: No such file or directory
12:13:16
#cd nessus-plugins-2.2.5
bash: cd: nessus-plugins-2.2.5: No such file or directory
12:13:37
#man rrdcreate
прошло 83 минуты
13:36:40
#pkg_add -r rool
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-6.0-release/Latest/rrdtool.tbz... Done.
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-6.0-release/All/cgilib-0.5.tbz... Done.
13:37:25
#man rrdcreate
13:38:56
#rrdtool create /usr/local/bin/traffic.rrd
ERROR: you must define at least one Round Robin Archive
13:42:23
#rrdtool create /usr/local/bin/traffic.rrd
ERROR: you must define at least one Round Robin Archive
13:42:29
#man rrd
13:42:49
#man rrdtool
13:43:49
#rrdtune
bash: rrdtune: command not found
13:44:05
#man rrdtune
13:45:56
#man rrdcreate
13:47:53
#man rrd
13:47:57
#man rrdtool
прошло 24 минуты
14:12:21
#pkg_add -r honeyd
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-6.0-release/Latest/honeyd.tbz... Done.
14:13:40
#cd /usr/ports/misc/screen

прошло 14 минут
/dev/ttyp2
14:28:10
#screen -x
/dev/ttyp4
14:29:16
#make install
configure: checking sockets...
- your sockets are usable
configure: checking socket implementation...
- you are normal
- both sockets and fifos usable. let's take fifos.
configure: checking select return value...
- select is ok
configure: checking for tgetent...
configure: checking libtermcap...
- you use the termcap database
...
      This port has installed the following binaries which execute with
      increased privileges.
/usr/local/bin/screen
      If there are vulnerabilities in these programs there may be a security
      risk to the system. FreeBSD makes no guarantee about the security of
      ports included in the Ports Collection. Please type 'make deinstall'
      to deinstall the port if this is a concern.
      For more information, and contact details about the security
      status of this software, see the following webpage:
http://www.gnu.org/software/screen/
14:30:53
#man scp
прошло 67 минут
15:38:11
#vi /etc/rc.conf
прошло 26 минут
/dev/ttyp2
16:05:00
#:

16:05:06
#screen -x
прошло 25 минут
/dev/ttyp4
16:30:17
#farpd
bash: farpd: command not found
16:30:21
#arpd
bash: arpd: command not found
16:30:26
#cd /usr/ports

16:30:49
#make search name=arpd
Port:   arpd-0.2_1
Path:   /usr/ports/net/arpd
Info:   A daemon to service arp replies
Maint:  yb@bashibuzuk.net
B-deps: libdnet-1.10 libevent-1.1a
R-deps: libdnet-1.10 libevent-1.1a
WWW:    http://www.citi.umich.edu/u/provos/
16:31:00
#cd /net/ports
bash: cd: /net/ports: No such file or directory
16:33:15
#cd .net/ports
bash: cd: ./net/ports: No such file or directory
16:33:26
#cd /net/arpd
bash: cd: /net/arpd: No such file or directory
16:33:35
#cd /usr/ports

16:33:47
#make install
checking for vasprintf... yes
checking for fcntl... yes
checking for F_SETFD in fcntl.h... yes
checking for select... yes
checking for poll... yes
checking for epoll_ctl... no
checking for kqueue... yes
checking for working kqueue... yes
checking for pid_t... yes
checking for size_t... yes
...
configure: WARNING: you should use --build, --host, --target
checking for a BSD compatible install... /usr/bin/install -c -o root -g wheel
checking whether build environment is sane... yes
checking whether make sets ${MAKE}... yes
checking for working aclocal... missing
checking for working autoconf... missing
checking for working automake... missing
checking for working autoheader... missing
checking for working makeinfo... found
checking for mawk... no
16:36:27
#pwd
/usr/ports/net/arpd
16:39:20
#vi /usr/local/bin/honeyd.conf
16:42:28
#arpd -i xl0 192.168.15.100-192.168.15.109
arpd[64787]: listening on xl0: arp and (dst net 192.168.15.100/30 or dst net 192.168.15.104/30 or dst net 192.168.15.108/31) and not ether src 00:04:75:82:53:43
16:44:01
#honeyd -p nmap.prints -f /usr/local/bin/honeyd.conf 192.168.1.100-192.168.15.109
Honeyd V1.0 Copyright (c) 2002-2004 Niels Provos
honeyd[64843]: started with -p nmap.prints -f /usr/local/bin/honeyd.conf 192.168.1.100-192.168.15.109
honeyd: fopen(nmap.prints): No such file or directory
прошло 23 минуты
17:07:50
#pkg_info -Lx honeyd
Information for honeyd-1.0_1:
Files:
/usr/local/man/man1/honeydctl.1.gz
/usr/local/man/man8/honeyd.8.gz
/usr/local/bin/honeyd
/usr/local/bin/honeydctl
/usr/local/include/honeyd/debug.h
/usr/local/include/honeyd/hooks.h
/usr/local/include/honeyd/plugins.h
/usr/local/include/honeyd/plugins_config.h
...
/usr/local/share/honeyd/scripts/mydoom.pl
/usr/local/share/honeyd/scripts/README.mydoom
/usr/local/share/honeyd/scripts/cmdexe.pl
/usr/local/share/honeyd/scripts/README.cmdexe
/usr/local/share/honeyd/scripts/README.kuang2
/usr/local/share/honeyd/scripts/INSTALL.kuang2
/usr/local/share/honeyd/scripts/kuang2.pl
/usr/local/share/honeyd/scripts/kuang2.conf
/usr/local/share/honeyd/scripts/smtp.pl
/usr/local/share/honeyd/scripts/proxy.pl
17:08:18
#honeyd -p /usr/local/share/honeyd/nmap.printsd.conf 192.168.1.100-192.168.15.109
Honeyd V1.0 Copyright (c) 2002-2004 Niels Provos
honeyd[64861]: started with -p /usr/local/share/honeyd/nmap.printsnmap.prints -f /usr/local/bin/honeyd.conf 192.168.1.100-192.168.15.109
honeyd: fopen(/usr/local/share/honeyd/nmap.printsnmap.prints): No such file or directory
17:08:58
#honeyd -p /usr/local/share/honeyd/nmap.prints -f /usr/local/bin/honeyd.conf 192.168.1.100-192.168.15.109
Honeyd V1.0 Copyright (c) 2002-2004 Niels Provos
honeyd[64870]: started with -p /usr/local/share/honeyd/nmap.prints -f /usr/local/bin/honeyd.conf 192.168.1.100-192.168.15.109
Warning: Impossible SI range in Class fingerprint "IBM OS/400 V4R2M0"
Warning: Impossible SI range in Class fingerprint "Microsoft Windows NT 4.0 SP3"
honeyd[64870]: listening promiscuously on xl0: (arp or ip proto 47 or (udp and src port 67 and dst port 68) or (ip and (dst net 192.168.1.100/30 or dst net 192.168.1.104/29 or dst net 192.168.1.112/28 or dst net 192.168.1.128/25 or dst net 192.168.2.0/23 or dst net 192.168.4.0/22 or dst net 192.168.8.0/22 or dst net 192.168.12.0/23 or dst net 192.168.14.0/24 or dst net 192.168.15.0/26 or dst net 1
/usr/local/bin/honeyd.conf:3: Unknown personality "Windows NT 4.0 Server SP5-SP6"
honeyd: parsing configuration file failed
17:09:13
#vi /usr/local/bin/honeyd.conf
17:12:33
#honeyd -p /usr/local/share/honeyd/nmap.prints -f /usr/local/bin/honeyd.conf 192.168.1.100-192.168.15.109
Honeyd V1.0 Copyright (c) 2002-2004 Niels Provos
honeyd[64983]: started with -p /usr/local/share/honeyd/nmap.prints -f /usr/local/bin/honeyd.conf 192.168.1.100-192.168.15.109
Warning: Impossible SI range in Class fingerprint "IBM OS/400 V4R2M0"
Warning: Impossible SI range in Class fingerprint "Microsoft Windows NT 4.0 SP3"
honeyd[64983]: listening promiscuously on xl0: (arp or ip proto 47 or (udp and src port 67 and dst port 68) or (ip and (dst net 192.168.1.100/30 or dst net 192.168.1.104/29 or dst net 192.168.1.112/28 or dst net 192.168.1.128/25 or dst net 192.168.2.0/23 or dst net 192.168.4.0/22 or dst net 192.168.8.0/22 or dst net 192.168.12.0/23 or dst net 192.168.14.0/24 or dst net 192.168.15.0/26 or dst net 1
/usr/local/bin/honeyd.conf:3: Unknown personality "Windows NT 4.0 Server SP5-SP6"
honeyd: parsing configuration file failed
17:13:39
#vi /usr/local/share/honeyd/nmap.prints

Файлы

  • /etc/rc.d/named
  • /etc/rc.d/named
    >
    #!/bin/sh
    #
    # $NetBSD: named,v 1.10 2002/03/22 04:33:59 thorpej Exp $
    # $FreeBSD: src/etc/rc.d/named,v 1.22 2005/05/23 12:25:33 pjd Exp $
    #
    # PROVIDE: named
    # REQUIRE: SERVERS cleanvar
    # BEFORE:  DAEMON
    # KEYWORD: shutdown
    . /etc/rc.subr
    name="named"
    rcvar=`set_rcvar`
    start_precmd="named_precmd"
    start_postcmd="make_symlinks"
    stop_postcmd="named_poststop"
    required_dirs="$named_chrootdir"        # if it is set, it must exist
    extra_commands="reload"
    # If running in a chroot cage, ensure that the appropriate files
    # exist inside the cage, as well as helper symlinks into the cage
    # from outside.
    #
    # As this is called after the is_running and required_dir checks
    # are made in run_rc_command(), we can safely assume ${named_chrootdir}
    # exists and named isn't running at this point (unless forcestart
    # is used).
    #
    chroot_autoupdate()
    {
            # Create (or update) the chroot directory structure
            #
            if [ -f /etc/mtree/BIND.chroot.dist ]; then
                    mtree -deU -f /etc/mtree/BIND.chroot.dist \
                        -p ${named_chrootdir}
            else
                    warn "/etc/mtree/BIND.chroot.dist missing,"
                    warn "chroot directory structure not updated"
            fi
            # Create /etc/namedb symlink
            #
            if [ ! -L /etc/namedb ]; then
                    if [ -d /etc/namedb ]; then
                            warn "named chroot: /etc/namedb is a directory!"
                    elif [ -e /etc/namedb ]; then
                            warn "named chroot: /etc/namedb exists!"
                    else
                            ln -s ${named_chrootdir}/etc/namedb /etc/namedb
                    fi
            else
                    # Make sure it points to the right place.
                    ln -shf ${named_chrootdir}/etc/namedb /etc/namedb
            fi
            # Mount a devfs in the chroot directory if needed
            #
            umount ${named_chrootdir}/dev 2>/dev/null
            devfs_domount ${named_chrootdir}/dev devfsrules_hide_all
            devfs -m ${named_chrootdir}/dev rule apply path null unhide
            devfs -m ${named_chrootdir}/dev rule apply path random unhide
            # Copy local timezone information if it is not up to date.
            #
            if [ -f /etc/localtime ]; then
                    cmp -s /etc/localtime "${named_chrootdir}/etc/localtime" || \
                    cp -p /etc/localtime "${named_chrootdir}/etc/localtime"
            fi
    }
    # Make symlinks to the correct pid file
    #
    make_symlinks()
    {
            checkyesno named_symlink_enable &&
            ln -fs "${named_chrootdir}${pidfile}" ${pidfile}
    }
    named_poststop()
    {
            if [ -n "${named_chrootdir}"  -a -c ${named_chrootdir}/dev/null ]; then
                    umount ${named_chrootdir}/dev 2>/dev/null || true
            fi
    }
    named_precmd()
    {
            local confgen_chroot
            # Is the user using a sandbox?
            #
            if [ -n "$named_chrootdir" ]; then
                    rc_flags="$rc_flags -t $named_chrootdir"
                    confgen_chroot="-t${named_chrootdir} -u bind"
                    checkyesno named_chroot_autoupdate && chroot_autoupdate
            else
                    named_symlink_enable=NO
            fi
            # Create an rndc.key file for the user if none exists
            #
            if [ ! -f "${named_chrootdir}/etc/namedb/rndc.key" -a \
                ! -f "${named_chrootdir}/etc/namedb/rndc.conf" ]; then
                    rndc-confgen -a -b256 ${confgen_chroot}
            fi
    }
    load_rc_config $name
    # The following variable requires that rc.conf be loaded first
    #
    required_dirs="$named_chrootdir"        # if it is set, it must exist
    pidfile="${named_pidfile:-/var/run/${name}/pid}"
    run_rc_command "$1"
    

    Статистика

    Время первой команды журнала09:46:49 2006-12-23
    Время последней команды журнала17:13:39 2006-12-23
    Количество командных строк в журнале101
    Процент команд с ненулевым кодом завершения, %27.72
    Процент синтаксически неверно набранных команд, % 5.94
    Суммарное время работы с терминалом *, час 4.30
    Количество командных строк в единицу времени, команда/мин 0.39
    Частота использования команд
    cd23|=====================| 21.50%
    man10|=========| 9.35%
    nessus9|========| 8.41%
    make9|========| 8.41%
    /usr/local/etc/rc.d/nessusd.sh7|======| 6.54%
    pkg_info6|=====| 5.61%
    grep6|=====| 5.61%
    vi5|====| 4.67%
    honeyd4|===| 3.74%
    pkg_delete4|===| 3.74%
    pkg_add3|==| 2.80%
    screen2|=| 1.87%
    arpd2|=| 1.87%
    nessus-adduser2|=| 1.87%
    bg2|=| 1.87%
    ls2|=| 1.87%
    rrdtool2|=| 1.87%
    telnet1|| 0.93%
    pwd1|| 0.93%
    pkg_rmessus1|| 0.93%
    rrdtune1|| 0.93%
    farpd1|| 0.93%
    pkg_del1|| 0.93%
    tsort1|| 0.93%
    cat1|| 0.93%
    :1|| 0.93%
    ____
    *) Интервалы неактивности длительностью 30 минут и более не учитываются

    Справка

    Для того чтобы использовать LiLaLo, не нужно знать ничего особенного: всё происходит само собой. Однако, чтобы ведение и последующее использование журналов было как можно более эффективным, желательно иметь в виду следующее:
    1. В журнал автоматически попадают все команды, данные в любом терминале системы.

    2. Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду w. В поле WHAT, соответствующем текущему терминалу, должна быть указана программа script.

    3. Команды, при наборе которых были допущены синтаксические ошибки, выводятся перечёркнутым текстом:
      $ l s-l
      bash: l: command not found
      

    4. Если код завершения команды равен нулю, команда была выполнена без ошибок. Команды, код завершения которых отличен от нуля, выделяются цветом.
      $ test 5 -lt 4
      Обратите внимание на то, что код завершения команды может быть отличен от нуля не только в тех случаях, когда команда была выполнена с ошибкой. Многие команды используют код завершения, например, для того чтобы показать результаты проверки

    5. Команды, ход выполнения которых был прерван пользователем, выделяются цветом.
      $ find / -name abc
      find: /home/devi-orig/.gnome2: Keine Berechtigung
      find: /home/devi-orig/.gnome2_private: Keine Berechtigung
      find: /home/devi-orig/.nautilus/metafiles: Keine Berechtigung
      find: /home/devi-orig/.metacity: Keine Berechtigung
      find: /home/devi-orig/.inkscape: Keine Berechtigung
      ^C
      

    6. Команды, выполненные с привилегиями суперпользователя, выделяются слева красной чертой.
      # id
      uid=0(root) gid=0(root) Gruppen=0(root)
      

    7. Изменения, внесённые в текстовый файл с помощью редактора, запоминаются и показываются в журнале в формате ed. Строки, начинающиеся символом "<", удалены, а строки, начинающиеся символом ">" -- добавлены.
      $ vi ~/.bashrc
      2a3,5
      >    if [ -f /usr/local/etc/bash_completion ]; then
      >         . /usr/local/etc/bash_completion
      >        fi
      

    8. Для того чтобы изменить файл в соответствии с показанными в диффшоте изменениями, можно воспользоваться командой patch. Нужно скопировать изменения, запустить программу patch, указав в качестве её аргумента файл, к которому применяются изменения, и всавить скопированный текст:
      $ patch ~/.bashrc
      В данном случае изменения применяются к файлу ~/.bashrc

    9. Для того чтобы получить краткую справочную информацию о команде, нужно подвести к ней мышь. Во всплывающей подсказке появится краткое описание команды.

      Если справочная информация о команде есть, команда выделяется голубым фоном, например: vi. Если справочная информация отсутствует, команда выделяется розовым фоном, например: notepad.exe. Справочная информация может отсутствовать в том случае, если (1) команда введена неверно; (2) если распознавание команды LiLaLo выполнено неверно; (3) если информация о команде неизвестна LiLaLo. Последнее возможно для редких команд.

    10. Большие, в особенности многострочные, всплывающие подсказки лучше всего показываются браузерами KDE Konqueror, Apple Safari и Microsoft Internet Explorer. В браузерах Mozilla и Firefox они отображаются не полностью, а вместо перевода строки выводится специальный символ.

    11. Время ввода команды, показанное в журнале, соответствует времени начала ввода командной строки, которое равно тому моменту, когда на терминале появилось приглашение интерпретатора

    12. Имя терминала, на котором была введена команда, показано в специальном блоке. Этот блок показывается только в том случае, если терминал текущей команды отличается от терминала предыдущей.

    13. Вывод не интересующих вас в настоящий момент элементов журнала, таких как время, имя терминала и других, можно отключить. Для этого нужно воспользоваться формой управления журналом вверху страницы.

    14. Небольшие комментарии к командам можно вставлять прямо из командной строки. Комментарий вводится прямо в командную строку, после символов #^ или #v. Символы ^ и v показывают направление выбора команды, к которой относится комментарий: ^ - к предыдущей, v - к следующей. Например, если в командной строке было введено:

      $ whoami
      
      user
      
      $ #^ Интересно, кто я?
      
      в журнале это будет выглядеть так:
      $ whoami
      
      user
      
      Интересно, кто я?

    15. Если комментарий содержит несколько строк, его можно вставить в журнал следующим образом:

      $ whoami
      
      user
      
      $ cat > /dev/null #^ Интересно, кто я?
      
      Программа whoami выводит имя пользователя, под которым 
      мы зарегистрировались в системе.
      -
      Она не может ответить на вопрос о нашем назначении 
      в этом мире.
      
      В журнале это будет выглядеть так:
      $ whoami
      user
      
      Интересно, кто я?
      Программа whoami выводит имя пользователя, под которым
      мы зарегистрировались в системе.

      Она не может ответить на вопрос о нашем назначении
      в этом мире.
      Для разделения нескольких абзацев между собой используйте символ "-", один в строке.

    16. Комментарии, не относящиеся непосредственно ни к какой из команд, добавляются точно таким же способом, только вместо симолов #^ или #v нужно использовать символы #=

    17. Содержимое файла может быть показано в журнале. Для этого его нужно вывести с помощью программы cat. Если вывод команды отметить симоволами #!, содержимое файла будет показано в журнале в специально отведённой для этого секции.
    18. Для того чтобы вставить скриншот интересующего вас окна в журнал, нужно воспользоваться командой l3shot. После того как команда вызвана, нужно с помощью мыши выбрать окно, которое должно быть в журнале.
    19. Команды в журнале расположены в хронологическом порядке. Если две команды давались одна за другой, но на разных терминалах, в журнале они будут рядом, даже если они не имеют друг к другу никакого отношения.
      1
          2
      3   
          4
      
      Группы команд, выполненных на разных терминалах, разделяются специальной линией. Под этой линией в правом углу показано имя терминала, на котором выполнялись команды. Для того чтобы посмотреть команды только одного сенса, нужно щёкнуть по этому названию.

    О программе

    LiLaLo (L3) расшифровывается как Live Lab Log.
    Программа разработана для повышения эффективности обучения Unix/Linux-системам.
    (c) Игорь Чубин, 2004-2008

    $Id$