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

Содержание

Журнал

Пятница (07/31/09)

/dev/ttyp7
19:47:13
$sudo vim /etc/inetd.conf
19:47:53
$sudo invoke-rc.d openbsd-inetd restart
Restarting internet superserver: inetd.
19:47:57
$sudo netstat -lnp | less
19:48:57
$nc 127.0.0.1
[user@debian7:~]$ nc 127.0.0.1 bash
nobody@debian7:/$ ls
bin
boot
dev
etc
home
initrd
lib
lost+found
...
touch: невозможно выполнить touch для `/home/user/test': Permission denied
nobody@debian7:/$ sudo /etc/init.d/openbsd-inetd restart
We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:
    #1) Respect the privacy of others.
    #2) Think before you type.
    #3) With great power comes great responsibility.
Password:
nobody@debian7:/$ exit
exit
19:49:10
$grep bash /etc/services
bash   65533/tcp
19:49:28
$nc 192.168.16.7
[user@debian7:~]$ nc 127.0.0.1 65533
nobody@debian7:/$ exit
exit
19:49:48
$telnet 192.168.16.7 65533
Trying 192.168.16.7...
Connected to 192.168.16.7.
Escape character is '^]'.
Connection closed by foreign host.
19:50:04
$vim /etc/hosts.allow
19:50:14
$vim /etc/hosts.deny
19:50:19
$vim /etc/hosts.allow
19:50:24
$ifconfig
bash: ifconfig: command not found
19:50:26
$sudo
eth0      Link encap:Ethernet  HWaddr 00:16:3E:00:00:07
          inet addr:192.168.16.7  Bcast:192.168.16.255  Mask:255.255.255.0
          inet6 addr: fe80::216:3eff:fe00:7/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:45170 errors:0 dropped:0 overruns:0 frame:0
          TX packets:61127 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:5299258 (5.0 MiB)  TX bytes:16053259 (15.3 MiB)
lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:157 errors:0 dropped:0 overruns:0 frame:0
          TX packets:157 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:10489 (10.2 KiB)  TX bytes:10489 (10.2 KiB)
19:50:38
$telnet 192.168.16.7 65533
Trying 192.168.16.7...
Connected to 192.168.16.7.
Escape character is '^]'.
Connection closed by foreign host.
19:51:17
$telnet 192.168.16.7 65533
Trying 192.168.16.7...
Connected to 192.168.16.7.
Escape character is '^]'.
Connection closed by foreign host.
19:51:19
$telnet 192.168.16.7 65533
Trying 192.168.16.7...
Connected to 192.168.16.7.
Escape character is '^]'.
Connection closed by foreign host.
19:51:33
$sudo
#:BOOT: TFTP service is provided primarily for booting.  Most sites
#       run this only on machines acting as "boot servers."
#:RPC: RPC based services
#:HAM-RADIO: amateur-radio services
#:OTHER: Other services
#vnc1 stream tcp nowait nobody /usr/bin/Xvnc Xvnc -inetd  -query 127.0.0.1 -oncee
 -geometry 1024x768 -depth 24
bash stream tcp nowait nobody  /bin/bash bash -i
"/etc/inetd.conf" 40L, 1214C записано
19:52:01
$telnet 192.168.16.7 65533
NC(1)                                                                    NC(1)
NAME
       nc - TCP/IP swiss army knife
SYNOPSIS
       nc [-options] hostname port[s] [ports] ...
       nc -l -p port [-options] [hostname] [port]
DESCRIPTION
       netcat is a simple unix utility which reads and writes data across net‐
       work connections, using TCP or UDP protocol. It is  designed  to  be  a
       reliable  "back-end" tool that can be used directly or easily driven by
...
SEE ALSO
       /usr/share/doc/netcat/README.gz
AUTHOR
       This manual page was written by Joey Hess <joeyh@debian.org> and Robert
       Woodcock  <rcw@debian.org>, cribbing heavily from Netcat’s README file.
       Netcat was written by a guy we know as the Hobbit <hobbit@avian.org>.
                                                                         NC(1)
nobody@debian7:/$ nobody@debian7:/$ exit
exit
Connection closed by foreign host.
19:52:49
$man nc
19:53:10
$sudo vim /etc/hosts.deny
19:53:10
$sudo vim /etc/hosts.deny
19:53:10
$sudo vim /etc/hosts.deny
19:53:10
$sudo vim /etc/hosts.deny
19:53:10
$sudo vim /etc/hosts.deny
19:53:10
$sudo vim /etc/hosts.deny
19:53:10
$sudo vim /etc/hosts.deny
19:53:10
$sudo vim /etc/hosts.deny
19:53:10
$sudo vim /etc/hosts.deny
19:53:10
$sudo vim /etc/hosts.deny
19:55:28
$:wq!
bash: :wq!: command not found
19:55:28
$:wq!
bash: :wq!: command not found
19:55:28
$:wq!
bash: :wq!: command not found
19:55:28
$:wq!
bash: :wq!: command not found
19:55:28
$:wq!
bash: :wq!: command not found
19:55:28
$:wq!
bash: :wq!: command not found
19:55:28
$:wq!
bash: :wq!: command not found
19:55:28
$:wq!
bash: :wq!: command not found
19:55:28
$:wq!
bash: :wq!: command not found
19:55:28
$:wq!
bash: :wq!: command not found
19:55:29
$sudo vim /etc/hosts.deny
19:55:29
$sudo vim /etc/hosts.deny
19:55:29
$sudo vim /etc/hosts.deny
19:55:29
$sudo vim /etc/hosts.deny
19:55:29
$sudo vim /etc/hosts.deny
19:55:29
$sudo vim /etc/hosts.deny
19:55:29
$sudo vim /etc/hosts.deny
19:55:29
$sudo vim /etc/hosts.deny
19:55:29
$sudo vim /etc/hosts.deny
19:55:29
$sudo vim /etc/hosts.deny
20:02:15
$screen
/dev/ttyp4
20:02:47
$screen -x
/dev/ttyp5
20:02:47
$screen -x
20:02:56
$sudo vim /etc/inetd.conf
/dev/ttyp9
20:02:58
$screen -x
/dev/ttypd
20:03:02
$screen -x
/dev/ttypa
20:03:18
$screen -x
20:03:25
$/sbin/ifconfig -a

20:03:29
$sudo /etc/init.d/openbsd-inetd restart
Restarting internet superserver: inetd.
20:03:37
$sudo netstat -lnp | less
20:03:48
$nc 192.168.16.7 65533

20:04:09
$nc 192.168.16.7 653
(UNKNOWN) [192.168.16.7] 65333 (?) : Connection refused
20:04:14
$nc 192.168.16.7 65533

20:04:16
$nc 192.168.16.7 65533

20:04:40
$sudo /etc/init.d/openbsd-inetd restart
#:BOOT: TFTP service is provided primarily for booting.  Most sites
#       run this only on machines acting as "boot servers."
#:RPC: RPC based servicesndard services.                      1,1       Наверху
#:HAM-RADIO: amateur-radio services
#:OTHER: Other services
 -geometry 1024x768 -depth 24
                nowait root /bin/bash bash -i                 40,17       Внизу
"/etc/inetd.conf" 40L, 1212C записано
Restarting internet superserver: inetd.
20:04:44