/l3/trainings/xg-ids/2005-12-19/fbsd1.linux.nt/root :1 :2 :3 :4 :5 :6 :7 :8 |
|
#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. |
#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" |
#tsort
![]() ^C |
#/usr/local/etc/rc.d/nessusd.sh start
Starting nessusd. All plugins loaded |
#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 |
#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. |
#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. |
#/usr/local/etc/rc.d/nessusd.sh start
![]() nessusd already running? (pid=1441). |
#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). |
#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. |
#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). |
#cd /usr/ports
|
#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/ |
#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. |
#pkg_del nessus
![]() bash: pkg_del: command not found |
#pkg_rmessus
![]() bash: pkg_rm: command not found |
#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 |
#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. |
#/usr/local/etc/rc.d/nessusd.sh stop
![]() bash: /usr/local/etc/rc.d/nessusd.sh: No such file or directory |
#pkg_info |grep nessus
nessus-libnasl-2.2.5 Nessus Attack Scripting Language nessus-libraries-2.2.5 Libraries for Nessus, the security scanner |
#pkg_info |grep nessus-libnasl-2.2.5
nessus-libnasl-2.2.5 Nessus Attack Scripting Language |
#pkg_info |grep nessus
nessus-libnasl-2.2.5 Nessus Attack Scripting Language nessus-libraries-2.2.5 Libraries for Nessus, the security scanner |
#pkg_info |grep nessus-libraries-2.2.5
nessus-libraries-2.2.5 Libraries for Nessus, the security scanner |
#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 |
#pkg_delete libnasl-2.2.5
|
#pkg_delete nessus-libraries-2.2.5
|
#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/ |
#cd nessus
![]() bash: cd: nessus: No such file or directory |
#cd /security/
![]() bash: cd: /security/nessus: No such file or directory |
#cd /security/nessus/
![]() bash: cd: /security/nessus/: No such file or directory |
#cd /usr/ports/security/nessus
|
#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 |
#cd ..
|
#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/ |
#cd nessus-plugins-2.2.5
![]() bash: cd: nessus-plugins-2.2.5: No such file or directory |
#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 |
#nessus
|
#/usr/local/etc/rc.d/nessusd.sh stop
Stopping nessusd. Waiting for PIDS: 1441, 1441. |
#/usr/local/etc/rc.d/nessusd.sh start
Starting nessusd. All plugins loaded |
#nessus
^Z [1]+ Stopped nessus |
#bg
[1]+ nessus & |
#cd nessus-plugins-2.2.5
![]() bash: cd: nessus-plugins-2.2.5: No such file or directory |
#cd nessus-plugins
![]() nessus-plugins/ nessus-plugins-devel/ |
#cd nessus-plugins
![]() nessus-plugins/ nessus-plugins-devel/ |
#cd nessus-plugins
|
#cd ..
|
#cd nessus-
![]() nessus-devel/ nessus-libnasl-devel/ nessus-libraries-devel/ nessus-plugins-devel/ nessus-libnasl/ nessus-libraries/ nessus-plugins/ |
#cd nessus-
![]() nessus-devel/ nessus-libnasl-devel/ nessus-libraries-devel/ nessus-plugins-devel/ nessus-libnasl/ nessus-libraries/ nessus-plugins/ |
#ls |grep nessus
nessus nessus-devel nessus-libnasl nessus-libnasl-devel nessus-libraries nessus-libraries-devel nessus-plugins nessus-plugins-devel |
#cd nessus-plugins
|
#ls
Makefile distinfo pkg-descr pkg-plist |
#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 |
#/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) |
#/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 |
#nessus
![]() [34415] SSL_CTX_load_verify_locations: error:02001002:system library:fopen:No such file or directory ^D ^C |
#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. |
#nessus
[36739] SSL_CTX_load_verify_locations: error:02001002:system library:fopen:No such file or directory ^Z [1]+ Stopped nessus |
#bg
[1]+ nessus & |
#cd nessus-plugins-2.2.5
![]() bash: cd: nessus-plugins-2.2.5: No such file or directory |
#cd nessus-plugins-2.2.5
![]() bash: cd: nessus-plugins-2.2.5: No such file or directory |
#man rrdcreate
![]() |
#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. |
#man rrdcreate
|
#rrdtool create /usr/local/bin/traffic.rrd
![]() ERROR: you must define at least one Round Robin Archive |
#rrdtool create /usr/local/bin/traffic.rrd
![]() ERROR: you must define at least one Round Robin Archive |
#man rrd
![]() |
#man rrdtool
|
#rrdtune
![]() bash: rrdtune: command not found |
#man rrdtune
|
#man rrdcreate
|
#man rrd
![]() |
#man rrdtool
|
#pkg_add -r honeyd
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-6.0-release/Latest/honeyd.tbz... Done. |
#cd /usr/ports/misc/screen
|
#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/ |
#man scp
|
#vi /etc/rc.conf
|
#screen -x
![]() |
#arpd
![]() bash: arpd: command not found |
#cd /usr/ports
|
#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/ |
#cd /net/ports
![]() bash: cd: /net/ports: No such file or directory |
#cd .net/ports
![]() bash: cd: ./net/ports: No such file or directory |
#cd /net/arpd
![]() bash: cd: /net/arpd: No such file or directory |
#cd /usr/ports
|
#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 |
#pwd
/usr/ports/net/arpd |
#vi /usr/local/bin/honeyd.conf
|
#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 |
#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 |
#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 |
#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 |
#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 |
#vi /usr/local/bin/honeyd.conf
|
#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 |
#vi /usr/local/share/honeyd/nmap.prints
|
#!/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 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду w. В поле WHAT, соответствующем текущему терминалу, должна быть указана программа script.
Команды, при наборе которых были допущены синтаксические ошибки, выводятся перечёркнутым текстом:
$ l s-l bash: l: command not found |
Если код завершения команды равен нулю, команда была выполнена без ошибок. Команды, код завершения которых отличен от нуля, выделяются цветом.
$ test 5 -lt 4 |
Команды, ход выполнения которых был прерван пользователем, выделяются цветом.
$ 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 |
Команды, выполненные с привилегиями суперпользователя, выделяются слева красной чертой.
# id uid=0(root) gid=0(root) Gruppen=0(root) |
Изменения, внесённые в текстовый файл с помощью редактора, запоминаются и показываются в журнале в формате ed. Строки, начинающиеся символом "<", удалены, а строки, начинающиеся символом ">" -- добавлены.
$ vi ~/.bashrc
|
Для того чтобы изменить файл в соответствии с показанными в диффшоте изменениями, можно воспользоваться командой patch. Нужно скопировать изменения, запустить программу patch, указав в качестве её аргумента файл, к которому применяются изменения, и всавить скопированный текст:
$ patch ~/.bashrc |
Для того чтобы получить краткую справочную информацию о команде, нужно подвести к ней мышь. Во всплывающей подсказке появится краткое описание команды.
Если справочная информация о команде есть, команда выделяется голубым фоном, например: vi. Если справочная информация отсутствует, команда выделяется розовым фоном, например: notepad.exe. Справочная информация может отсутствовать в том случае, если (1) команда введена неверно; (2) если распознавание команды LiLaLo выполнено неверно; (3) если информация о команде неизвестна LiLaLo. Последнее возможно для редких команд.
Большие, в особенности многострочные, всплывающие подсказки лучше всего показываются браузерами KDE Konqueror, Apple Safari и Microsoft Internet Explorer. В браузерах Mozilla и Firefox они отображаются не полностью, а вместо перевода строки выводится специальный символ.
Время ввода команды, показанное в журнале, соответствует времени начала ввода командной строки, которое равно тому моменту, когда на терминале появилось приглашение интерпретатора
Имя терминала, на котором была введена команда, показано в специальном блоке. Этот блок показывается только в том случае, если терминал текущей команды отличается от терминала предыдущей.
Вывод не интересующих вас в настоящий момент элементов журнала, таких как время, имя терминала и других, можно отключить. Для этого нужно воспользоваться формой управления журналом вверху страницы.
Небольшие комментарии к командам можно вставлять прямо из командной строки. Комментарий вводится прямо в командную строку, после символов #^ или #v. Символы ^ и v показывают направление выбора команды, к которой относится комментарий: ^ - к предыдущей, v - к следующей. Например, если в командной строке было введено:
$ whoami
user
$ #^ Интересно, кто я?в журнале это будет выглядеть так:
$ whoami
user
Интересно, кто я? |
Если комментарий содержит несколько строк, его можно вставить в журнал следующим образом:
$ whoami
user
$ cat > /dev/null #^ Интересно, кто я?
Программа whoami выводит имя пользователя, под которым мы зарегистрировались в системе. - Она не может ответить на вопрос о нашем назначении в этом мире.В журнале это будет выглядеть так:
$ whoami user
|
Комментарии, не относящиеся непосредственно ни к какой из команд, добавляются точно таким же способом, только вместо симолов #^ или #v нужно использовать символы #=
1 2 3 4Группы команд, выполненных на разных терминалах, разделяются специальной линией. Под этой линией в правом углу показано имя терминала, на котором выполнялись команды. Для того чтобы посмотреть команды только одного сенса, нужно щёкнуть по этому названию.
LiLaLo (L3) расшифровывается как Live Lab Log.
Программа разработана для повышения эффективности обучения Unix/Linux-системам.
(c) Игорь Чубин, 2004-2008