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

Содержание

Журнал

Вторник (12/18/12)

/dev/pts/1
12:35:35
#ls -hl
итого 4,0K
-rw-r--r-- 1 root staff 195 Дек 18 13:35 chargen
-rw-r--r-- 1 root staff   0 Дек 18 13:35 telnet
12:35:37
#vim telnet
12:35:58
#ls -hl
итого 8,0K
-rw-r--r-- 1 root staff 195 Дек 18 13:35 chargen
-rw-r--r-- 1 root staff 191 Дек 18 13:35 telnet
12:35:59
#ls -hl /etc/xinetd.d/
итого 20K
-rw-r--r-- 1 root root 798 Мар 26  2008 chargen
-rw-r--r-- 1 root root 660 Мар 26  2008 daytime
-rw-r--r-- 1 root root 549 Мар 26  2008 discard
-rw-r--r-- 1 root root 580 Мар 26  2008 echo
-rw-r--r-- 1 root root 727 Мар 26  2008 time
12:36:04
#vim chargen /etc/xinetd.d/
--- /tmp/l3-saved-2093.27869.22139	2012-12-18 13:37:48.000000000 +0200
+++ /etc/xinetd.conf	2012-12-18 13:38:09.000000000 +0200
@@ -34,25 +34,4 @@
 	# have to a specific service.  
 	per_source  = 5
 }
-
-service chargen
-{
-	socket_type = stream
-	protocol    = udp
-	wait        = no
-	user        = root
-	type        = INTERNAL
-	id          = chargen-stream
-}
-
-service telnet
-{
-	socket_type = stream
-	protocol    = tcp
-	wait        = no
-	user        = root
-	server      = /usr/sbin/in.telnetd
-	server_args = 
-}
-
 includedir /usr/local/etc/xinetd.d
12:36:21
#~
# default: off
# description: An xinetd internal service which generate characters.  The
# xinetd internal service which continuously generates characters until the
# connection is dropped.  The characters look something like this:
# !"#$% disable./012345 = yes<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefg
        type            = INTERNAL
# This  idthe tcp versi = chargen-stream
        socket_type     = stream
service protocol        = tcp
        user            = root
{       wait            = no
}
# This  disabledp versi = yes
        type            = INTERNAL
service idargen         = chargen-dgram
        socket_type     = dgram
{       protocol        = udp
        user            = root
        wait            = yes
}
"/etc/xinetd.d/chargen" 28L, 798C
12:36:34
#~

12:36:39
#ps aux|grep xinetd
root      2640  0.0  0.1   2448   840 ?        Ss   11:51   0:00 /usr/sbin/xinetd -pidfile /var/run/xinetd.pid -stayalive -inetd_compat -inetd_ipv6
root      3144  0.0  0.1   5076   740 pts/2    S+   13:36   0:00 grep xinetd
12:36:49
#tail /var/log/daemon.log
Dec 18 13:36:39 debian1 xinetd[3126]: Reading included configuration file: /usr/local/etc/xinetd.d/telnet [file=/usr/local/etc/xinetd.d/telnet] [line=9]
Dec 18 13:36:39 debian1 xinetd[3126]: attribute server_args expects at least 1 value and none were given. [file=/usr/local/etc/xinetd.d/telnet] [line=8]
Dec 18 13:36:39 debian1 xinetd[3126]: Error parsing attribute server_args - DISABLING SERVICE [file=/usr/local/etc/xinetd.d/telnet] [line=8]
Dec 18 13:36:39 debian1 xinetd[3126]: removing telnet
Dec 18 13:36:39 debian1 xinetd[3126]: removing telnet
Dec 18 13:36:39 debian1 xinetd[3126]: socket creation failed (Protocol not supported (errno = 93)). service = chargen-stream
Dec 18 13:36:39 debian1 xinetd[3126]: Service chargen-stream failed to start and is deactivated.
Dec 18 13:36:39 debian1 xinetd[3126]: socket creation failed (Protocol not supported (errno = 93)). service = chargen-stream
Dec 18 13:36:39 debian1 xinetd[3126]: Service chargen-stream failed to start and is deactivated.
Dec 18 13:36:39 debian1 xinetd[3126]: 3126 {init_services} no services. Exiting...
12:37:09
#vim /etc/xinetd.conf
12:38:09
#xinetd

12:38:13
#ps aux|grep xinetd
root      2640  0.0  0.1   2448   840 ?        Ss   11:51   0:00 /usr/sbin/xinetd -pidfile /var/run/xinetd.pid -stayalive -inetd_compat -inetd_ipv6
root      3191  0.0  0.1   5076   736 pts/2    S+   13:38   0:00 grep xinetd
12:38:15
#tail /var/log/daemon.log
Dec 18 13:36:39 debian1 xinetd[3126]: Service chargen-stream failed to start and is deactivated.
Dec 18 13:36:39 debian1 xinetd[3126]: 3126 {init_services} no services. Exiting...
Dec 18 13:38:13 debian1 xinetd[3177]: Reading included configuration file: /usr/local/etc/xinetd.d/chargen [file=/etc/xinetd.conf] [line=37]
Dec 18 13:38:13 debian1 xinetd[3177]: Reading included configuration file: /usr/local/etc/xinetd.d/telnet [file=/usr/local/etc/xinetd.d/telnet] [line=9]
Dec 18 13:38:13 debian1 xinetd[3177]: attribute server_args expects at least 1 value and none were given. [file=/usr/local/etc/xinetd.d/telnet] [line=8]
Dec 18 13:38:13 debian1 xinetd[3177]: Error parsing attribute server_args - DISABLING SERVICE [file=/usr/local/etc/xinetd.d/telnet] [line=8]
Dec 18 13:38:13 debian1 xinetd[3177]: removing telnet
Dec 18 13:38:13 debian1 xinetd[3177]: socket creation failed (Protocol not supported (errno = 93)). service = chargen-stream
Dec 18 13:38:13 debian1 xinetd[3177]: Service chargen-stream failed to start and is deactivated.
Dec 18 13:38:13 debian1 xinetd[3177]: 3177 {init_services} no services. Exiting...
12:38:19
#tail /var/log/messages
Dec 18 11:25:17 debian1 kernel: [66246.377390] device eth0 left promiscuous mode
Dec 18 11:25:17 debian1 kernel: [66246.377471] device lo left promiscuous mode
Dec 18 11:29:31 debian1 kernel: [66500.638273] device eth0 entered promiscuous mode
Dec 18 11:29:31 debian1 kernel: [66500.638816] device lo entered promiscuous mode
Dec 18 11:29:59 debian1 kernel: [66528.231968] device eth0 left promiscuous mode
Dec 18 11:29:59 debian1 kernel: [66528.232215] device lo left promiscuous mode
Dec 18 11:34:18 debian1 kernel: [66787.126935] device eth0 entered promiscuous mode
Dec 18 11:34:18 debian1 kernel: [66787.127465] device lo entered promiscuous mode
Dec 18 11:34:33 debian1 kernel: [66802.011318] device eth0 left promiscuous mode
Dec 18 11:34:33 debian1 kernel: [66802.011400] device lo left promiscuous mode
12:38:56
#pwd
/usr/local/etc/xinetd.d
12:39:08
#vim /etc/xinetd.d/
12:39:08
#vim /etc/xinetd.d/chargen
12:39:37
#~
service chargen
{       socket_type = stream
        protocol    = udp
        wait        = no
        user        = root
        type        = INTERNAL
        id          = chargen-stream
}
"/usr/local/etc/xinetd.d/chargen" 9L, 195C
12:40:00
#~
service telnet
{       socket_type = stream
        protocol    = tcp
        wait        = no
        user        = root
        server      = /usr/sbin/in.telnetd
        server_args =
}
~
~
...
~
~
~
~
~
~
~
~
~
"/usr/local/etc/xinetd.d/telnet" 9L, 191C                                      1,1          Весь
12:40:34
#{
/usr/local/etc/xinetd.d
12:40:36
#rm telnet

12:40:38
#ls -hl
итого 4,0K
-rw-r--r-- 1 root staff 195 Дек 18 13:35 chargen
12:40:40
#/etc/init.d/xinetd
Usage: /etc/init.d/xinetd {start|stop|reload|force-reload|restart}
12:40:49
#/etc/init.d/xinetd start
Starting internet superserver: xinetd failed!
12:40:51
#/etc/init.d/xinetd restart
Stopping internet superserver: xinetd.
Starting internet superserver: xinetd.
12:40:56
#ps aux|grep xine
root      3341  0.0  0.1   2448   848 ?        Ss   13:40   0:00 /usr/sbin/xinetd -pidfile /var/run/xinetd.pid -stayalive -inetd_compat -inetd_ipv6
root      3360  0.0  0.1   5076   736 pts/2    S+   13:41   0:00 grep xine
12:41:01
#tail /var/log/daemon.log
Dec 18 13:40:56 debian1 xinetd[2640]: Exiting...
Dec 18 13:40:56 debian1 xinetd[3341]: Reading included configuration file: /usr/local/etc/xinetd.d/chargen [file=/etc/xinetd.conf] [line=37]
Dec 18 13:40:56 debian1 xinetd[3341]: added service chargen [file=/etc/inetd.conf] [line=22]
Dec 18 13:40:56 debian1 xinetd[3341]: added service telnet [file=/etc/inetd.conf] [line=41]
Dec 18 13:40:56 debian1 xinetd[3341]: socket creation failed (Protocol not supported (errno = 93)). service = chargen-stream
Dec 18 13:40:56 debian1 xinetd[3341]: Service chargen-stream failed to start and is deactivated.
Dec 18 13:40:56 debian1 xinetd[3341]: socket creation failed (Protocol not supported (errno = 93)). service = chargen-dgram
Dec 18 13:40:56 debian1 xinetd[3341]: Service chargen-dgram failed to start and is deactivated.
Dec 18 13:40:56 debian1 xinetd[3341]: xinetd Version 2.3.14 started with libwrap loadavg options compiled in.
Dec 18 13:40:56 debian1 xinetd[3341]: Started working: 1 available service
12:41:16
#vim chargen
12:42:03
#~
# default: off
# description: An xinetd internal service which generate characters.  The
# xinetd internal service which continuously generates characters until the
# connection is dropped.  The characters look something like this:
# !"#$% disable./012345 = yes<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefg
        type            = INTERNAL
# This  idthe tcp versi = chargen-stream
        socket_type     = stream
service protocol        = tcp
        user            = root
{       wait            = no
}
# This  disabledp versi = yes
        type            = INTERNAL
service idargen         = chargen-dgram
        socket_type     = dgram
{       protocol        = udp
        user            = root
        wait            = yes
}
"/etc/xinetd.d/chargen" 28L, 798C
12:42:21
#~
service chargen
{       socket_type = stream
        protocol    = udp
        wait        = no
        user        = root
        type        = INTERNAL
        id          = chargen-stream
}
~
~
...
~
~
~
~
~
~
~
~
~
"chargen" 9L, 195C                                                             1,1          Весь
12:42:38
#{
l3script: mc: команда не найдена
12:42:41
#vim /etc/xinetd.d/chargen
12:42:55
#~
service chargen
{       socket_type = stream
        protocol    = udp
        wait        = no
        user        = root
        type        = INTERNAL
        id          = chargen-stream
}
"chargen" 9L, 195C
12:43:10
#~
Dec 18 13:40:56 debian1 xinetd[2640]: Exiting...
Dec 18 13:40:56 debian1 xinetd[3341]: Reading included configuration file: /usr/local/etc/xinetd.d/chargen [file=/etc/xinetd.conf] [line=37]
Dec 18 13:40:56 debian1 xinetd[3341]: added service chargen [file=/etc/inetd.conf] [line=22]
Dec 18 13:40:56 debian1 xinetd[3341]: added service telnet [file=/etc/inetd.conf] [line=41]
Dec 18 13:40:56 debian1 xinetd[3341]: socket creation failed (Protocol not supported (errno = 93)). service = chargen-stream
Dec 18 13:40:56 debian1 xinetd[3341]: Service chargen-stream failed to start and is deactivated.
Dec 18 13:40:56 debian1 xinetd[3341]: socket creation failed (Protocol not supported (errno = 93)). service = chargen-dgram
Dec 18 13:40:56 debian1 xinetd[3341]: Service chargen-dgram failed to start and is deactivated.
Dec 18 13:40:56 debian1 xinetd[3341]: xinetd Version 2.3.14 started with libwrap loadavg options compiled in.
Dec 18 13:40:56 debian1 xinetd[3341]: Started working: 1 available service
12:43:13
#/etc/init.d/xinetd restart
Stopping internet superserver: xinetd.
Starting internet superserver: xinetd.
12:43:34
#ps aux|grep xine
root      3493  0.0  0.1   2448   844 ?        Ss   13:43   0:00 /usr/sbin/xinetd -pidfile /var/run/xinetd.pid -stayalive -inetd_compat -inetd_ipv6
root      3512  0.0  0.1   5076   740 pts/2    S+   13:43   0:00 grep xine
12:43:43
#tail /var/log/daemon.log
Dec 18 13:43:34 debian1 xinetd[3341]: Exiting...
Dec 18 13:43:34 debian1 xinetd[3493]: Reading included configuration file: /usr/local/etc/xinetd.d/chargen [file=/etc/xinetd.conf] [line=37]
Dec 18 13:43:34 debian1 xinetd[3493]: added service chargen [file=/etc/inetd.conf] [line=22]
Dec 18 13:43:34 debian1 xinetd[3493]: added service telnet [file=/etc/inetd.conf] [line=41]
Dec 18 13:43:34 debian1 xinetd[3493]: socket creation failed (Protocol not supported (errno = 93)). service = chargen-stream
Dec 18 13:43:34 debian1 xinetd[3493]: Service chargen-stream failed to start and is deactivated.
Dec 18 13:43:34 debian1 xinetd[3493]: socket creation failed (Protocol not supported (errno = 93)). service = chargen-dgram
Dec 18 13:43:34 debian1 xinetd[3493]: Service chargen-dgram failed to start and is deactivated.
Dec 18 13:43:34 debian1 xinetd[3493]: xinetd Version 2.3.14 started with libwrap loadavg options compiled in.
Dec 18 13:43:34 debian1 xinetd[3493]: Started working: 1 available service
12:43:50
#vim /etc/inetd.conf
--- /tmp/l3-saved-2093.12998.1483	2012-12-18 13:44:17.000000000 +0200
+++ /etc/inetd.conf	2012-12-18 13:44:24.000000000 +0200
@@ -38,5 +38,5 @@
 #:HAM-RADIO: amateur-radio services
 
 #:OTHER: Other services
-telnet		stream 	tcp 	nowait 	root		/usr/sbin/in.telnetd
+#telnet		stream 	tcp 	nowait 	root		/usr/sbin/in.telnetd
 
12:44:24
#ps aux |grep inet
root      3493  0.0  0.1   2448   844 ?        Ss   13:43   0:00 /usr/sbin/xinetd -pidfile /var/run/xinetd.pid -stayalive -inetd_compat -inetd_ipv6
root      3545  0.0  0.1   5076   736 pts/2    S+   13:45   0:00 grep inet
12:45:08
#killall
killall   killall5
12:45:08
#killall inetd
inetd: процесс не найден
12:45:17
#mv /etc/inetd.conf /root/
.aptitude/     .bash_profile  .l3rc          .lilalo/       .ssh/          xinetd.conf
.bash_history  .bashrc        .lesshst       .profile       .viminfo
12:45:17
#mv /etc/inetd.conf /root/

12:45:47
#ls -hl /root/
итого 8,0K
-rw-r--r-- 1 root root 1,2K Дек 18 13:44 inetd.conf
-rw-r--r-- 1 root root 1,6K Дек 18 11:55 xinetd.conf
12:45:50
#vim /etc/xinetd.conf
12:46:10
#includedir /usr/local/etc/xinetd.d
Stopping internet superserver: xinetd.
Starting internet superserver: xinetd.
12:46:18
#ps aux|grep xine
root      3614  0.0  0.1   2448   836 ?        Ss   13:46   0:00 /usr/sbin/xinetd -pidfile /var/run/xinetd.pid -stayalive -inetd_compat -inetd_ipv6
root      3629  0.0  0.1   5076   736 pts/2    S+   13:46   0:00 grep xine
12:46:28
#tail /var/log/daemon.log
Dec 18 13:43:34 debian1 xinetd[3493]: socket creation failed (Protocol not supported (errno = 93)). service = chargen-dgram
Dec 18 13:43:34 debian1 xinetd[3493]: Service chargen-dgram failed to start and is deactivated.
Dec 18 13:43:34 debian1 xinetd[3493]: xinetd Version 2.3.14 started with libwrap loadavg options compiled in.
Dec 18 13:43:34 debian1 xinetd[3493]: Started working: 1 available service
Dec 18 13:46:18 debian1 xinetd[3493]: Exiting...
Dec 18 13:46:18 debian1 xinetd[3614]: Reading included configuration file: /usr/local/etc/xinetd.d/chargen [file=/etc/xinetd.conf] [line=37]
Dec 18 13:46:18 debian1 xinetd[3614]: socket creation failed (Protocol not supported (errno = 93)). service = chargen-stream
Dec 18 13:46:18 debian1 xinetd[3614]: Service chargen-stream failed to start and is deactivated.
Dec 18 13:46:18 debian1 xinetd[3614]: xinetd Version 2.3.14 started with libwrap loadavg options compiled in.
Dec 18 13:46:18 debian1 xinetd[3614]: Started working: 0 available services
12:46:38
#pwd
/usr/local/etc/xinetd.d
12:47:28
#vim chargen
--- /tmp/l3-saved-2093.498.22395	2012-12-18 13:47:29.000000000 +0200
+++ chargen	2012-12-18 13:48:37.000000000 +0200
@@ -1,9 +1,10 @@
 service chargen
 {
         socket_type = stream
-        protocol    = udp
+        protocol    = tcp
         wait        = no
         user        = root
         type        = INTERNAL
         id          = chargen-stream
+	disable	    = no
 }
12:48:37
#killall -1 xinetd

12:48:50
#ps aux|grep xine
root      3614  0.0  0.1   2448   888 ?        Ss   13:46   0:00 /usr/sbin/xinetd -pidfile /var/run/xinetd.pid -stayalive -inetd_compat -inetd_ipv6
root      3678  0.0  0.1   5076   736 pts/2    S+   13:49   0:00 grep xine
12:49:00
#tail /var/log/daemon.log
Dec 18 13:46:18 debian1 xinetd[3493]: Exiting...
Dec 18 13:46:18 debian1 xinetd[3614]: Reading included configuration file: /usr/local/etc/xinetd.d/chargen [file=/etc/xinetd.conf] [line=37]
Dec 18 13:46:18 debian1 xinetd[3614]: socket creation failed (Protocol not supported (errno = 93)). service = chargen-stream
Dec 18 13:46:18 debian1 xinetd[3614]: Service chargen-stream failed to start and is deactivated.
Dec 18 13:46:18 debian1 xinetd[3614]: xinetd Version 2.3.14 started with libwrap loadavg options compiled in.
Dec 18 13:46:18 debian1 xinetd[3614]: Started working: 0 available services
Dec 18 13:48:50 debian1 xinetd[3614]: Starting reconfiguration
Dec 18 13:48:50 debian1 xinetd[3614]: Reading included configuration file: /usr/local/etc/xinetd.d/chargen [file=/etc/xinetd.conf] [line=37]
Dec 18 13:48:50 debian1 xinetd[3614]: Swapping defaults
Dec 18 13:48:50 debian1 xinetd[3614]: Reconfigured: new=1 old=0 dropped=0 (services)
12:49:05
#telnet 127.0.0.1 chargen
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefgh
"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghi
#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghij
$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijk
%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijkl
&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklm
'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmn
...
abcdefghijklmnopqrstuvwxyz{|}!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJK
bcdefghijklmnopqrstuvwxyz{|}!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKL
cdefghijklmnopqrstuvwxyz{|}!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLM
defghijklmnopqrstuvwxyz{|}!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMN
efghijklmnopqrstuvwxyz{|}!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNO
fghijklmnopqrstuvwxyz{|}!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOP
ghijklmnopqrstuvwxyz{|}!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQ
hij^C^]
telnet> quit
Connection closed.
12:49:35
#nc 127.0.0.1:19
127.0.0.1:19: forward host lookup failed: Unknown host
12:49:51
#nc localhost:19