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

Содержание

Журнал

Пятница (09/05/08)

/dev/pts/9
16:15:29
#iptables -A INPUT -j RESET --reject-with tcp-reset
iptables v1.4.1.1: Unknown arg `--reject-with'
Try `iptables -h' or 'iptables --help' for more information.
16:15:54
#iptables -A INPUT -j REJECT --reject-with tcp-reset
iptables: Invalid argument
16:15:59
#iptables -A INPUT -p tcp -j REJECT --reject-with tcp-reset

16:16:04
#iptables -A INPUT -p udp -j REJECT --reject-with port-unreach

16:16:15
#iptables -A INPUT -p icmp -j DROP

16:18:06
#iptables -t nat -L
Chain PREROUTING (policy ACCEPT)
target     prot opt source               destination
Chain POSTROUTING (policy ACCEPT)
target     prot opt source               destination
Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination
16:18:09
#iptables -L
Chain INPUT (policy ACCEPT)
target     prot opt source               destination
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:ssh
ACCEPT     all  --  anywhere             anywhere            ctstate ESTABLISHED
REJECT     tcp  --  anywhere             anywhere            reject-with tcp-reset
REJECT     udp  --  anywhere             anywhere            reject-with icmp-port-unreachable
DROP       icmp --  anywhere             anywhere
Chain FORWARD (policy ACCEPT)
target     prot opt source               destination
Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination
16:18:12
#ping ya.ru
PING ya.ru (213.180.204.8) 56(84) bytes of data.
64 bytes from ya.ru (213.180.204.8): icmp_seq=1 ttl=55 time=24.8 ms
^C
--- ya.ru ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 24.862/24.862/24.862/0.000 ms
16:18:53
#iptables -A INPUT -p icmp -j DROP

прошло 10 минут
16:29:21
#iptables-save
# Generated by iptables-save v1.4.1.1 on Fri Sep  5 13:29:36 2008
*nat
:PREROUTING ACCEPT [12332:544535]
:POSTROUTING ACCEPT [12366:496216]
:OUTPUT ACCEPT [73:4496]
COMMIT
# Completed on Fri Sep  5 13:29:36 2008
# Generated by iptables-save v1.4.1.1 on Fri Sep  5 13:29:36 2008
*filter
:INPUT ACCEPT [1430:283811]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [22592:1240127]
-A INPUT -p tcp -m tcp --dport 22 -j ACCEPT
-A INPUT -m conntrack --ctstate ESTABLISHED -j ACCEPT
-A INPUT -p tcp -j REJECT --reject-with tcp-reset
-A INPUT -p udp -j REJECT --reject-with icmp-port-unreachable
-A INPUT -p icmp -j DROP
-A INPUT -p icmp -j DROP
COMMIT
# Completed on Fri Sep  5 13:29:36 2008
16:29:36
#ping microsoft.com
PING microsoft.com (207.46.232.182) 56(84) bytes of data.
^C
--- microsoft.com ping statistics ---
65 packets transmitted, 0 received, 100% packet loss, time 63999ms
прошло 26 минут
16:56:11
#hping3 microsoft.com
l3script: hping3: command not found
прошла 71 минута
/dev/pts/2
18:07:25
#man iptables
18:08:01
#iptables -m imcp -h
iptables v1.4.1.1: Couldn't load match `imcp':/lib/xtables/libipt_imcp.so: cannot open shared object file: No such file or directory
Try `iptables -h' or 'iptables --help' for more information.
18:08:02
#iptables -m icmp -h
iptables v1.4.1.1
Usage: iptables -[AD] chain rule-specification [options]
       iptables -[RI] chain rulenum rule-specification [options]
       iptables -D chain rulenum [options]
       iptables -[LS] [chain [rulenum]] [options]
       iptables -[FZ] [chain] [options]
       iptables -[NX] chain
       iptables -E old-chain-name new-chain-name
       iptables -P chain target [options]
       iptables -h (print this help information)
...
time-exceeded (ttl-exceeded)
   ttl-zero-during-transit
   ttl-zero-during-reassembly
parameter-problem
   ip-header-bad
   required-option-missing
timestamp-request
timestamp-reply
address-mask-request
address-mask-reply
18:08:06
#iptables -L
Chain INPUT (policy ACCEPT)
target     prot opt source               destination
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:ssh
ACCEPT     all  --  anywhere             anywhere            ctstate ESTABLISHED
REJECT     tcp  --  anywhere             anywhere            reject-with tcp-reset
REJECT     udp  --  anywhere             anywhere            reject-with icmp-port-unreachable
DROP       icmp --  anywhere             anywhere
DROP       icmp --  anywhere             anywhere
Chain FORWARD (policy ACCEPT)
target     prot opt source               destination
Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination
18:08:28
#iptables -L --line-numbers
Chain INPUT (policy ACCEPT)
num  target     prot opt source               destination
1    ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:ssh
2    ACCEPT     all  --  anywhere             anywhere            ctstate ESTABLISHED
3    REJECT     tcp  --  anywhere             anywhere            reject-with tcp-reset
4    REJECT     udp  --  anywhere             anywhere            reject-with icmp-port-unreachable
5    DROP       icmp --  anywhere             anywhere
6    DROP       icmp --  anywhere             anywhere
Chain FORWARD (policy ACCEPT)
num  target     prot opt source               destination
Chain OUTPUT (policy ACCEPT)
num  target     prot opt source               destination
18:08:37
#iptables -R INPUT 5 -p icmp --icmp-type echo-reply -j ACCEPT

18:09:03
#iptables -R INPUT 5 -p icmp --icmp-type echo-request -j ACCEPT

18:09:25
#echo hello | mail root

прошло 15 минут
18:25:10
#man iptables
18:26:51
#iptables -m time
iptables v1.4.1.1: no command specified
Try `iptables -h' or 'iptables --help' for more information.
18:27:02
#iptables -I "$RULE" ; sleep 10000 ; ipables -D "$RULE"

18:35:54
#ps aux | less
18:37:14
#apt-cache search nessus
harden-remoteaudit - Audit your remote systems from this host
libnasl-dev - Nessus Attack Scripting Language, static library and headers
libnasl2 - Nessus Attack Scripting Language, shared library
libnessus-dev - Nessus static libraries and headers
libnessus2 - Nessus shared libraries
nessus - Remote network security auditor, the client
nessus-dev - Nessus development header files
nessus-plugins - Nessus plugins
nessusclient - Transitional package to openvas-client
nessusd - Remote network security auditor, the server
18:37:42
#apt-get install nessus nessusclient nessusd nessus-plugins
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
  nessusclient: Conflicts: nessus but 2.2.10-3 is to be installed
E: Broken packages
18:37:58
#apt-get install nessus nessusd nessus-plugins
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  libgdchart-gd2-noxpm libnasl2 libnessus2
The following NEW packages will be installed:
  libgdchart-gd2-noxpm libnasl2 libnessus2 nessus nessus-plugins nessusd
0 upgraded, 6 newly installed, 0 to remove and 14 not upgraded.
Need to get 3679kB of archives.
After this operation, 21.4MB of additional disk space will be used.
...
Congratulations. Your server certificate was properly created.
The following files were created :
. Certification authority :
   Certificate = /var/lib/nessus/CA/cacert.pem
   Private key = /var/lib/nessus/private/CA/cakey.pem
. Nessus Server :
    Certificate = /var/lib/nessus/CA/servercert.pem
    Private key = /var/lib/nessus/private/CA/serverkey.pem
/etc/nessus/nessusd.conf updated to use the server's certificate / keys
Processing triggers for menu ...
18:38:12
#cfdisk
18:44:43
#apt-get install lvm2
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
  dmsetup
The following NEW packages will be installed:
  lvm2
0 upgraded, 1 newly installed, 0 to remove and 14 not upgraded.
Need to get 352kB of archives.
After this operation, 901kB of additional disk space will be used.
Get:1 http://192.168.15.254 sid/main lvm2 2.02.39-2 [352kB]
Fetched 352kB in 0s (4927kB/s)
Selecting previously deselected package lvm2.
(Reading database ... 156866 files and directories currently installed.)
Unpacking lvm2 (from .../lvm2_2.02.39-2_i386.deb) ...
Processing triggers for man-db ...
Setting up lvm2 (2.02.39-2) ...
Backing up any LVM2 metadata that may exist...done.
18:46:06
#cfdisk
18:47:02
#pvcreate /dev/sda2
  Device /dev/sda2 not found (or ignored by filtering).
18:47:10
#apt-get install parted
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
  parted-doc
The following NEW packages will be installed:
  parted
0 upgraded, 1 newly installed, 0 to remove and 14 not upgraded.
Need to get 64.0kB of archives.
After this operation, 135kB of additional disk space will be used.
Get:1 http://192.168.15.254 sid/main parted 1.8.8.git.2008.03.24-9 [64.0kB]
Fetched 64.0kB in 0s (267kB/s)
Selecting previously deselected package parted.
(Reading database ... 156967 files and directories currently installed.)
Unpacking parted (from .../parted_1.8.8.git.2008.03.24-9_i386.deb) ...
Processing triggers for man-db ...
Setting up parted (1.8.8.git.2008.03.24-9) ...
18:47:18
#partprobe

18:47:21
#pvcreate /dev/sda2
  Physical volume "/dev/sda2" successfully created
18:47:22
#vgcreate VG0 /dev/sda2
  Volume group "VG0" successfully created
18:47:32
#lvcreate -L4G -n debian1 /dev/VG0
  /proc/misc: No entry for device-mapper found
  Is device-mapper driver missing from kernel?
  Failure to communicate with kernel device-mapper driver.
  /proc/misc: No entry for device-mapper found
  Is device-mapper driver missing from kernel?
  Failure to communicate with kernel device-mapper driver.
  Incompatible libdevmapper 1.02.27 (2008-06-25)(compat) and kernel driver
  striped: Required device-mapper target(s) not detected in your kernel
  Run `lvcreate --help' for more information.
18:48:06
#/etc/init.d/lvm2 start
Setting up LVM Volume Groups  Reading all physical volumes.  This may take a while...
  Found volume group "VG0" using metadata type lvm2
  0 logical volume(s) in volume group "VG0" now active
.
18:48:14
#lvcreate -L4G -n debian1 /dev/VG0
  Logical volume "debian1" created
18:48:16
#mkfs.ext3 /dev/VG0/debian1
mke2fs 1.41.1 (01-Sep-2008)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
262144 inodes, 1048576 blocks
52428 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=1073741824
32 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
        32768, 98304, 163840, 229376, 294912, 819200, 884736
Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 29 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.
18:48:30
#mount /dev/VG0/debian1 /mnt

18:48:33
#debootstrap sid /mnt http://192.168.15.254:9999/
l3script: debootstrap: command not found
18:48:58
#apt-get install deboostrap
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Couldn't find package deboostrap
18:49:03
#apt-get install debootstrap
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  debootstrap
0 upgraded, 1 newly installed, 0 to remove and 14 not upgraded.
Need to get 50.6kB of archives.
After this operation, 266kB of additional disk space will be used.
Get:1 http://192.168.15.254 sid/main debootstrap 1.0.10 [50.6kB]
Fetched 50.6kB in 0s (1481kB/s)
Selecting previously deselected package debootstrap.
(Reading database ... 156975 files and directories currently installed.)
Unpacking debootstrap (from .../debootstrap_1.0.10_all.deb) ...
Processing triggers for man-db ...
Setting up debootstrap (1.0.10) ...
18:49:10
#debootstrap sid /mnt http://192.168.15.254:9999/
I: Retrieving Release
E: Failed getting release file http://192.168.15.254:9999/dists/sid/Release
18:49:20
#debootstrap sid /mnt http://192.168.15.254:9999/debian
I: Configuring makedev...
I: Configuring lzma...
I: Configuring ncurses-base...
I: Configuring ncurses-bin...
I: Configuring base-files...
I: Configuring libdevmapper1.02.1...
I: Configuring e2fslibs...
I: Configuring debconf-i18n...
I: Configuring dpkg...
I: Configuring sysvinit-utils...
...
I: Configuring libcwidget3...
I: Configuring libgnutls26...
I: Configuring debian-archive-keyring...
I: Configuring apt...
I: Configuring libept0...
I: Configuring apt-utils...
I: Configuring aptitude...
I: Configuring tasksel-data...
I: Configuring tasksel...
I: Base system installed successfully.
18:50:34
#iptables -A INPUT -i lo -j ACCEPT

18:50:59
#iptables -D INPUT -i lo -j ACCEPT

18:51:05
#iptables -I INPUT -i lo -j ACCEPT

18:51:08
#apt-cache search xen kernel
libxenomai-dev - Headers and static libs for Xenomai
libxenomai1 - Headers and static libs for Xenomai
linux-headers-2.6.26-1-common-xen - Common header files for Linux 2.6.26-1-xen
linux-headers-2.6.26-1-xen-686 - Header files for Linux 2.6.26-1-xen-686
linux-patch-xenomai - Linux kernel patches for Xenomai
multiboot-doc - The Multiboot specification
schroot - Execute commands in a chroot environment
tgt - Linux target framework user-space tools
xen-hypervisor-3.2-1-i386 - The Xen Hypervisor on i386
xen-hypervisor-3.2-1-i386-nonpae - The Xen Hypervisor on i386 without pae
xen-hypervisor-unstable-i386 - The Xen Hypervisor on i386
xenomai-doc - Xenomai documentation
xenomai-runtime - Xenomai runtime utilities
18:52:02
#vi /etc/apt/sources.list
--- /tmp/l3-saved-8445.15308.19670	2008-09-05 15:52:18.000000000 +0000
+++ /etc/apt/sources.list	2008-09-05 15:52:26.000000000 +0000
@@ -1,2 +1,2 @@
 deb http://192.168.15.254:9999/debian sid main
-deb-src http://192.168.15.254:9999/debian sid main
+deb http://192.168.15.254:9999/debian lenny main
18:52:26
#apt-get update
Hit http://192.168.15.254 sid Release.gpg
Get:1 http://192.168.15.254 lenny Release.gpg [189B]
Hit http://192.168.15.254 sid Release
Get:2 http://192.168.15.254 lenny Release [74.4kB]
Ign http://192.168.15.254 sid/main Packages/DiffIndex
Ign http://192.168.15.254 lenny/main Packages
Ign http://192.168.15.254 sid/main Packages
Get:3 http://192.168.15.254 lenny/main Packages [6997kB]
Get:4 http://192.168.15.254 sid/main Packages [7256kB]
Fetched 14.3MB in 11s (1269kB/s)
Reading package lists... Done
18:52:48
#apt-cache search xen kernel
libxenomai-dev - Headers and static libs for Xenomai
libxenomai1 - Headers and static libs for Xenomai
linux-headers-2.6.26-1-common-xen - Common header files for Linux 2.6.26-1-xen
linux-headers-2.6.26-1-xen-686 - Header files for Linux 2.6.26-1-xen-686
linux-patch-xenomai - Linux kernel patches for Xenomai
multiboot-doc - The Multiboot specification
schroot - Execute commands in a chroot environment
tgt - Linux target framework user-space tools
xen-hypervisor-3.2-1-i386 - The Xen Hypervisor on i386
xen-hypervisor-3.2-1-i386-nonpae - The Xen Hypervisor on i386 without pae
xen-hypervisor-unstable-i386 - The Xen Hypervisor on i386
xenomai-doc - Xenomai documentation
xenomai-runtime - Xenomai runtime utilities
18:52:50
#vi /etc/apt/sources.list
--- /tmp/l3-saved-8445.29622.13538	2008-09-05 15:52:52.000000000 +0000
+++ /etc/apt/sources.list	2008-09-05 15:53:00.000000000 +0000
@@ -1,2 +1,2 @@
 deb http://192.168.15.254:9999/debian sid main
-deb http://192.168.15.254:9999/debian lenny main
+deb http://192.168.15.254:9999/debian etch main
18:53:00
#apt-get update
Hit http://192.168.15.254 sid Release.gpg
Get:1 http://192.168.15.254 etch Release.gpg [386B]
Hit http://192.168.15.254 sid Release
Get:2 http://192.168.15.254 etch Release [58.2kB]
Ign http://192.168.15.254 sid/main Packages/DiffIndex
Ign http://192.168.15.254 etch/main Packages
Ign http://192.168.15.254 sid/main Packages
Get:3 http://192.168.15.254 etch/main Packages [5624kB]
Hit http://192.168.15.254 sid/main Packages
Fetched 5683kB in 2s (2042kB/s)
Reading package lists... Done
18:53:07
#apt-cache search xen kernel
libxenomai-dev - Headers and static libs for Xenomai
libxenomai1 - Headers and static libs for Xenomai
linux-headers-2.6.26-1-common-xen - Common header files for Linux 2.6.26-1-xen
linux-headers-2.6.26-1-xen-686 - Header files for Linux 2.6.26-1-xen-686
linux-patch-xenomai - Linux kernel patches for Xenomai
multiboot-doc - The Multiboot specification
schroot - Execute commands in a chroot environment
tgt - Linux target framework user-space tools
xen-hypervisor-3.2-1-i386 - The Xen Hypervisor on i386
xen-hypervisor-3.2-1-i386-nonpae - The Xen Hypervisor on i386 without pae
xen-hypervisor-unstable-i386 - The Xen Hypervisor on i386
xenomai-doc - Xenomai documentation
xenomai-runtime - Xenomai runtime utilities
linux-headers-2.6.18-6-xen-686 - Header files for Linux 2.6.18 on i686
linux-headers-2.6.18-6-xen-vserver-686 - Header files for Linux 2.6.18 on i686
xen-hypervisor-3.0.3-1-i386 - The Xen Hypervisor on i386
xen-hypervisor-3.0.3-1-i386-pae - The Xen Hypervisor on i386 with pae
xen-ioemu-3.0.3-1 - XEN administrative tools
18:53:11
#apt-get install linux-headers-2.6.18-6-xen-686
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  cpp-4.1 gcc-4.1 gcc-4.1-base libmudflap0 libmudflap0-dev linux-headers-2.6.18-6-xen linux-kbuild-2.6.18
Suggested packages:
  gcc-4.1-locales gcc-4.1-multilib gcc-4.1-doc
The following NEW packages will be installed:
  cpp-4.1 gcc-4.1 gcc-4.1-base libmudflap0 libmudflap0-dev linux-headers-2.6.18-6-xen
  linux-headers-2.6.18-6-xen-686 linux-kbuild-2.6.18
0 upgraded, 8 newly installed, 0 to remove and 14 not upgraded.
Need to get 6629kB of archives.
After this operation, 26.9MB of additional disk space will be used.
Do you want to continue [Y/n]? n
Abort.
18:53:41
#apt-cache search xen liunx image

18:53:46
#vi /etc/apt/sources.list
--- /tmp/l3-saved-8445.24215.21531	2008-09-05 15:53:48.000000000 +0000
+++ /etc/apt/sources.list	2008-09-05 15:53:57.000000000 +0000
@@ -1,2 +1,2 @@
 deb http://192.168.15.254:9999/debian sid main
-deb http://192.168.15.254:9999/debian etch main
+deb http://192.168.15.254:9999/debian etch main contrib non-free
18:53:57
#apt-get update
Hit http://192.168.15.254 sid Release.gpg
Hit http://192.168.15.254 etch Release.gpg
Hit http://192.168.15.254 sid Release
Hit http://192.168.15.254 etch Release
Ign http://192.168.15.254 sid/main Packages/DiffIndex
Ign http://192.168.15.254 etch/main Packages/DiffIndex
Ign http://192.168.15.254 etch/contrib Packages
Ign http://192.168.15.254 etch/non-free Packages
Ign http://192.168.15.254 sid/main Packages
Ign http://192.168.15.254 etch/main Packages
Get:1 http://192.168.15.254 etch/contrib Packages [71.8kB]
Get:2 http://192.168.15.254 etch/non-free Packages [102kB]
Hit http://192.168.15.254 sid/main Packages
Hit http://192.168.15.254 etch/main Packages
Fetched 174kB in 2s (68.6kB/s)
Reading package lists... Done
18:54:03
#apt-cache search xen liunx

18:54:07
#apt-cache search xen linux
libroxen-hubbethrottle - Bandwidth throttle module for the Roxen Challenger web server
libvirt-bin - the programs for the libvirt library
libvirt-dev - development files for the libvirt library
libvirt-doc - documentation for the libvirt library
libvirt-ocaml - OCaml bindings for libvirt
libvirt-ocaml-dev - OCaml bindings for libvirt
libvirt0 - library for interfacing with different virtualization systems
libvirt0-dbg - library for interfacing with different virtualization systems
libxenomai-dev - Headers and static libs for Xenomai
libxenomai1 - Headers and static libs for Xenomai
...
linux-image-2.6-xen-vserver-686 - Linux kernel 2.6 image on i686
linux-image-2.6.18-6-xen-686 - Linux 2.6.18 image on i686
linux-image-2.6.18-6-xen-vserver-686 - Linux 2.6.18 image on i686
linux-image-xen-vserver-686 - Linux kernel image on i686
linux-modules-2.6.18-6-xen-686 - Linux 2.6.18 modules on i686
linux-modules-2.6.18-6-xen-vserver-686 - Linux 2.6.18 modules on i686
xen-ioemu-3.0.3-1 - XEN administrative tools
xen-linux-system-2.6.18-6-xen-686 - XEN system with Linux 2.6.18 image on i686
xen-linux-system-2.6.18-6-xen-vserver-686 - XEN system with Linux 2.6.18 image on i686
avifile-divx-plugin - Divx4Linux video de/encoding plugin for libavifile
18:54:11
#apt-get install linux-image-2.6.18-6-xen-686
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  libc6-xen linux-modules-2.6.18-6-xen-686
Suggested packages:
  linux-doc-2.6.18
The following NEW packages will be installed:
  libc6-xen linux-image-2.6.18-6-xen-686 linux-modules-2.6.18-6-xen-686
0 upgraded, 3 newly installed, 0 to remove and 14 not upgraded.
...
Setting up libc6-xen (2.7-13) ...
Setting up linux-modules-2.6.18-6-xen-686 (2.6.18.dfsg.1-22) ...
Setting up linux-image-2.6.18-6-xen-686 (2.6.18.dfsg.1-22) ...
update-initramfs: Generating /boot/initrd.img-2.6.18-6-xen-686
Searching for GRUB installation directory ... found: /boot/grub
dpkg: error processing linux-image-2.6.18-6-xen-686 (--configure):
 subprocess post-installation script returned error exit status 1
Errors were encountered while processing:
 linux-image-2.6.18-6-xen-686
E: Sub-process /usr/bin/dpkg returned an error code (1)
18:54:34
#apt-cache search xen
libroxen-pop3 - POP3 server module for the Roxen Challenger web server
libroxen-popdrop - POP3 module for the Roxen Challenger web server
libroxen-presentit - Slideshow module for the Roxen Challenger web server
libroxen-pressrelease - Pressrelease module for the Roxen Challenger web server
libroxen-pretoggle - Prestate and configs toggling module for the Roxen Challenger web server
libroxen-programcache - Program cache utility module for the Roxen Challenger web server
libroxen-randomfile - File randomizer module for the Roxen Challenger web server
libroxen-referrerdeny - File deny module for the Roxen Challenger web server
libroxen-remoteuser - Connection identifier module for the Roxen Challenger web server
libroxen-roxpoll - User poll module for the Roxen Challenger web server
...
ipw2200-modules-2.6.18-6-xen-686 - Intel PRO/Wireless 2200 and 2915ABG (ipw2200) driver modules for Linux 2.6.18 on i686
ipw2200-modules-2.6.18-6-xen-vserver-686 - Intel PRO/Wireless 2200 and 2915ABG (ipw2200) driver modules for Linux 2.6.18 on i686
ipw3945-modules-2.6-xen-686 - Intel PRO/Wireless 3945ABG (ipw3945) driver modules for Linux 2.6 on i686
ipw3945-modules-2.6-xen-vserver-686 - Intel PRO/Wireless 3945ABG (ipw3945) driver modules for Linux 2.6 on i686
ipw3945-modules-2.6.18-6-xen-686 - Intel PRO/Wireless 3945ABG (ipw3945) driver modules for Linux 2.6.18 on i686
ipw3945-modules-2.6.18-6-xen-vserver-686 - Intel PRO/Wireless 3945ABG (ipw3945) driver modules for Linux 2.6.18 on i686
ivtv-modules-2.6-xen-686 - driver for the iTVC15 family of MPEG codecs modules for Linux 2.6 on i686
ivtv-modules-2.6-xen-vserver-686 - driver for the iTVC15 family of MPEG codecs modules for Linux 2.6 on i686
ivtv-modules-2.6.18-6-xen-686 - driver for the iTVC15 family of MPEG codecs modules for Linux 2.6.18 on i686
ivtv-modules-2.6.18-6-xen-vserver-686 - driver for the iTVC15 family of MPEG codecs modules for Linux 2.6.18 on i686
18:54:41
#apt-cache search xen utils
autopkgtest - automatic as-installed testing for Debian packages
libroxen-xmlutils - XML utility functions for the Roxen Challenger web server
xen-utils-3.2-1 - XEN administrative tools
xen-utils-common - XEN administrative tools - common files
xen-utils-unstable - XEN administrative tools
xenstore-utils - Xenstore utilities for Xen
xen-utils-3.0.3-1 - XEN administrative tools
18:54:44
#apt-get install xen-utils-3.2-1
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  bridge-utils libxenstore3.0 xen-hypervisor-3.2-1-i386 xen-utils-common xenstore-utils
Suggested packages:
  xen-docs-3.2
Recommended packages:
  xen-hypervisor-3.2-1
The following NEW packages will be installed:
...
Setting up bridge-utils (1.4-5) ...
Setting up libxenstore3.0 (3.2.1-2) ...
Setting up xenstore-utils (3.2.1-2) ...
Setting up xen-utils-common (3.2.0-2) ...
Setting up xen-hypervisor-3.2-1-i386 (3.2.1-2) ...
Searching for GRUB installation directory ... found: /boot/grub
Setting up xen-utils-3.2-1 (3.2.1-2) ...
Errors were encountered while processing:
 linux-image-2.6.18-6-xen-686
E: Sub-process /usr/bin/dpkg returned an error code (1)
18:55:00
#apt-cache search xen hypervisor
libc6-xen - GNU C Library: Shared libraries [Xen version]
xen-hypervisor-3.2-1-i386 - The Xen Hypervisor on i386
xen-hypervisor-3.2-1-i386-nonpae - The Xen Hypervisor on i386 without pae
xen-hypervisor-unstable-i386 - The Xen Hypervisor on i386
xen-hypervisor-3.0.3-1-i386 - The Xen Hypervisor on i386
xen-hypervisor-3.0.3-1-i386-pae - The Xen Hypervisor on i386 with pae
xen-linux-system-2.6.18-6-xen-686 - XEN system with Linux 2.6.18 image on i686
xen-linux-system-2.6.18-6-xen-vserver-686 - XEN system with Linux 2.6.18 image on i686
18:55:08
#apt-get install xen-hypervisor-3.2-1-i386
Reading package lists... Done
Building dependency tree
Reading state information... Done
xen-hypervisor-3.2-1-i386 is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 14 not upgraded.
1 not fully installed or removed.
After this operation, 0B of additional disk space will be used.
Setting up linux-image-2.6.18-6-xen-686 (2.6.18.dfsg.1-22) ...
update-initramfs: Generating /boot/initrd.img-2.6.18-6-xen-686
Searching for GRUB installation directory ... found: /boot/grub
dpkg: error processing linux-image-2.6.18-6-xen-686 (--configure):
 subprocess post-installation script returned error exit status 1
Errors were encountered while processing:
 linux-image-2.6.18-6-xen-686
E: Sub-process /usr/bin/dpkg returned an error code (1)
18:55:23
#apt-get install libc6-xen
Reading package lists... Done
Building dependency tree
Reading state information... Done
libc6-xen is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 14 not upgraded.
1 not fully installed or removed.
After this operation, 0B of additional disk space will be used.
Setting up linux-image-2.6.18-6-xen-686 (2.6.18.dfsg.1-22) ...
update-initramfs: Generating /boot/initrd.img-2.6.18-6-xen-686
Searching for GRUB installation directory ... found: /boot/grub
dpkg: error processing linux-image-2.6.18-6-xen-686 (--configure):
 subprocess post-installation script returned error exit status 1
Errors were encountered while processing:
 linux-image-2.6.18-6-xen-686
E: Sub-process /usr/bin/dpkg returned an error code (1)
18:55:34
#vi /boot/grub/menu.lst
--- /tmp/l3-saved-8445.13112.391	2008-09-05 15:55:42.000000000 +0000
+++ /boot/grub/menu.lst	2008-09-05 15:57:20.000000000 +0000
@@ -3,3 +3,13 @@
 kernel /boot/vmlinuz-2.6.26-1-686 root=/dev/sda1
 initrd /boot/initrd.img-2.6.26-1-686
 
+default 1
+title Xen+Linux
+kernel /boot/xen-3.2-1-i386.gz dom0_mem=512000
+module /boot/vmlinuz-2.6.18-6-xen-686 root=/dev/sda1
+module /boot/initrd.img-2.6.18-6-xen-686
+
+
+
+
+
18:57:20
#reboot

прошло 12 минут
/dev/pts/3
19:09:35
#mount /dev/VG0/debian1 /mnt

19:09:45
#cp -R /lib/modules/2.6.18-6-xen-686 /mnt/lib/modules/

19:09:57
#umount /mnt

19:11:39
#find /usr/share/xen-3.2-1/ -name \*xmexample\*

19:12:05
#find /usr/share/ -name \*xmexample\*

19:12:15
#find /usr/share/doc/xen
xen-hypervisor-3.2-1-i386/ xen-utils-common/
xen-utils-3.2-1/           xenstore-utils/
19:12:15
#find /usr/share/doc/xen
xen-hypervisor-3.2-1-i386/ xen-utils-common/
xen-utils-3.2-1/           xenstore-utils/
19:12:15
#find /usr/share/doc/xen-
xen-hypervisor-3.2-1-i386/ xen-utils-3.2-1/           xen-utils-common/
19:12:15
#find /usr/share/doc/xen-utils-
xen-utils-3.2-1/  xen-utils-common/
19:12:15
#ls /usr/share/doc/xen-utils-common/
changelog.Debian.gz  copyright  examples
19:12:28
#ls /usr/share/doc/xen-utils-common/examples/
xm-config-xenapi.xml  xm-config.xml  xmexample.hvm.gz  xmexample.vti.gz  xmexample1.gz  xmexample2.gz
19:12:30
#zcat /usr/share/doc/xen-utils-common/examples/xmexample1.gz | grep -v ^#
kernel = "/boot/vmlinuz-2.6.10-xenU"
memory = 64
name = "ExampleDomain"
vif = [ '' ]
disk = [ 'phy:hda1,hda1,w' ]
root = "/dev/hda1 ro"
extra = "4"
19:12:46
#zcat /usr/share/doc/xen-utils-common/examples/xmexample1.gz | grep -v ^# | grep -vx ''
kernel = "/boot/vmlinuz-2.6.10-xenU"
memory = 64
name = "ExampleDomain"
vif = [ '' ]
disk = [ 'phy:hda1,hda1,w' ]
root = "/dev/hda1 ro"
extra = "4"
19:12:56
#vi /etc/xen/debian1
--- /tmp/l3-saved-3439.25437.10845	2008-09-05 16:12:57.000000000 +0000
+++ /etc/xen/debian1	2008-09-05 16:13:44.000000000 +0000
@@ -1,7 +1,7 @@
-kernel = "/boot/vmlinuz-2.6.10-xenU"
+kernel = "/boot/vmlinuz-2.6.18-6-xen-686"
 memory = 64
-name = "ExampleDomain"
+name = "debian1"
 vif = [ '' ]
-disk = [ 'phy:hda1,hda1,w' ]
+disk = [ 'phy:/dev/VG0/debian1,hda1,w' ]
 root = "/dev/hda1 ro"
 extra = "4"
19:13:44
#vi /etc/xen/debian1
19:13:44
#vi /etc/xen/debian1
--- /tmp/l3-saved-3439.253.19584	2008-09-05 16:13:45.000000000 +0000
+++ /etc/xen/debian1	2008-09-05 16:14:03.000000000 +0000
@@ -1,4 +1,5 @@
 kernel = "/boot/vmlinuz-2.6.18-6-xen-686"
+ramdisk = "/boot/initrd.img-2.6.18-6-xen-686"
 memory = 64
 name = "debian1"
 vif = [ '' ]
19:14:03
#xm create -c debian1
Using config file "/etc/xen/debian1".
Error: Device 0 (vif) could not be connected. Could not find bridge, and none was specified
19:14:09
#brctl show
bridge name     bridge id               STP enabled     interfaces
19:14:12
#vi /etc/xen/debian1
--- /tmp/l3-saved-3439.26291.21973	2008-09-05 16:14:14.000000000 +0000
+++ /etc/xen/debian1	2008-09-05 16:14:22.000000000 +0000
@@ -2,7 +2,7 @@
 ramdisk = "/boot/initrd.img-2.6.18-6-xen-686"
 memory = 64
 name = "debian1"
-vif = [ '' ]
+#vif = [ '' ]
 disk = [ 'phy:/dev/VG0/debian1,hda1,w' ]
 root = "/dev/hda1 ro"
 extra = "4"
19:14:22
#xm create -c debian1
Using config file "/etc/xen/debian1".
Started domain debian1
TCP bind hash table entries: 2048 (order: 2, 16384 bytes)
TCP: Hash tables configured (established 4096 bind 2048)
TCP reno registered
audit: initializing netlink socket (disabled)
audit(1220631264.045:1): initialized
VFS: Disk quotas dquot_6.5.1
Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
Initializing Cryptographic API
...
Debian GNU/Linux lenny/sid linux1 tty1
linux1 login: root
printk: 25879 messages suppressed.
4gb seg fixup, process login (pid 746), cs:ip 73:b7e0633a
Linux linux1 2.6.18-6-xen-686 #1 SMP Wed Jun 18 01:17:40 UTC 2008 i686
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
19:14:36
#xm list
Name                                        ID   Mem VCPUs      State   Time(s)
Domain-0                                     0   500     2     r-----     34.4
debian1                                      2    64     1     -b----      4.2
19:14:37
#xm shutdown debian1

19:15:15
#vi /boot/grub/menu.lst
--- /tmp/l3-saved-3439.5486.27555	2008-09-05 16:15:20.000000000 +0000
+++ /boot/grub/menu.lst	2008-09-05 16:15:34.000000000 +0000
@@ -1,9 +1,10 @@
-default 0
+default 1
+timeout 10
+
 title Linux
 kernel /boot/vmlinuz-2.6.26-1-686 root=/dev/sda1
 initrd /boot/initrd.img-2.6.26-1-686
 
-default 1
 title Xen+Linux
 kernel /boot/xen-3.2-1-i386.gz dom0_mem=512000
 module /boot/vmlinuz-2.6.18-6-xen-686 root=/dev/sda1
19:15:34
#iptables -L -n
Chain INPUT (policy ACCEPT)
target     prot opt source               destination
ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           tcp dpt:22
REJECT     tcp  --  0.0.0.0/0            0.0.0.0/0           tcp flags:0x17/0x02 reject-with tcp-reset
Chain FORWARD (policy ACCEPT)
target     prot opt source               destination
Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination
19:16:51
#iptables -I -i lo -j ACCEPT
iptables v1.4.1.1: Invalid rule number `lo'
Try `iptables -h' or 'iptables --help' for more information.
19:17:05
#iptables -I INPUT -i lo -j ACCEPT

19:17:09
#nessus
(nessus:4126): Gtk-WARNING **: cannot open display:
19:18:04
#man nessus
19:21:21
#nessus -q 192.168.15.5
nessus, version 2.2.10.
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).
19:24:03
#nessus 192.168.15.5
nessus, version 2.2.10.
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).
19:25:28
#zcat /usr/share/doc/xen-utils-common/examples/xmexample1.gz | grep -v ^# | grep -vx ''

Статистика

Время первой команды журнала16:15:29 2008- 9- 5
Время последней команды журнала19:25:28 2008- 9- 5
Количество командных строк в журнале101
Процент команд с ненулевым кодом завершения, %18.81
Процент синтаксически неверно набранных команд, % 1.98
Суммарное время работы с терминалом *, час 1.98
Количество командных строк в единицу времени, команда/мин 0.85
Частота использования команд
iptables22|====================| 20.37%
apt-get14|============| 12.96%
apt-cache10|=========| 9.26%
vi9|========| 8.33%
find6|=====| 5.56%
xm4|===| 3.70%
man3|==| 2.78%
nessus3|==| 2.78%
zcat3|==| 2.78%
grep3|==| 2.78%
debootstrap3|==| 2.78%
cfdisk2|=| 1.85%
pvcreate2|=| 1.85%
ls2|=| 1.85%
ping2|=| 1.85%
mount2|=| 1.85%
lvcreate2|=| 1.85%
hping31|| 0.93%
sleep1|| 0.93%
brctl1|| 0.93%
umount1|| 0.93%
vgcreate1|| 0.93%
cp1|| 0.93%
mkfs.ext31|| 0.93%
reboot1|| 0.93%
echo1|| 0.93%
mail1|| 0.93%
iptables-save1|| 0.93%
ps1|| 0.93%
/etc/init.d/lvm21|| 0.93%
ipables1|| 0.93%
less1|| 0.93%
partprobe1|| 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$