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

Содержание

Журнал

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

/dev/pts/0
08:36:19
$ping ya.ru
PING ya.ru (213.180.193.3) 56(84) bytes of data.
64 bytes from www.yandex.ru (213.180.193.3): icmp_req=1 ttl=56 time=17.2 ms
64 bytes from www.yandex.ru (213.180.193.3): icmp_req=2 ttl=56 time=17.4 ms
64 bytes from www.yandex.ru (213.180.193.3): icmp_req=3 ttl=56 time=17.7 ms
64 bytes from www.yandex.ru (213.180.193.3): icmp_req=4 ttl=56 time=17.2 ms
^C
--- ya.ru ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3004ms
rtt min/avg/max/mdev = 17.265/17.437/17.737/0.187 ms
08:40:18
$ping -n ya.ru
PING ya.ru (93.158.134.3) 56(84) bytes of data.
64 bytes from 93.158.134.3: icmp_req=1 ttl=58 time=17.0 ms
64 bytes from 93.158.134.3: icmp_req=2 ttl=58 time=16.5 ms
64 bytes from 93.158.134.3: icmp_req=3 ttl=58 time=16.9 ms
^C
--- ya.ru ping statistics ---
4 packets transmitted, 3 received, 25% packet loss, time 3004ms
rtt min/avg/max/mdev = 16.558/16.832/17.031/0.200 ms
08:43:10
$ping -n -c 4 ya.ru
PING ya.ru (87.250.250.203) 56(84) bytes of data.
64 bytes from 87.250.250.203: icmp_req=1 ttl=56 time=16.5 ms
64 bytes from 87.250.250.203: icmp_req=2 ttl=56 time=17.2 ms
64 bytes from 87.250.250.203: icmp_req=3 ttl=59 time=17.6 ms
64 bytes from 87.250.250.203: icmp_req=4 ttl=56 time=16.7 ms
--- ya.ru ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3005ms
rtt min/avg/max/mdev = 16.576/17.052/17.653/0.442 ms
08:43:47
$ping -n -w 4 ya.ru
PING ya.ru (213.180.204.3) 56(84) bytes of data.
64 bytes from 213.180.204.3: icmp_req=1 ttl=56 time=17.4 ms
64 bytes from 213.180.204.3: icmp_req=2 ttl=59 time=17.5 ms
64 bytes from 213.180.204.3: icmp_req=3 ttl=59 time=17.3 ms
64 bytes from 213.180.204.3: icmp_req=4 ttl=56 time=17.1 ms
--- ya.ru ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3005ms
rtt min/avg/max/mdev = 17.151/17.374/17.521/0.174 ms
08:44:20
$echo $?
0
08:45:39
$ping -i 3
Usage: ping [-LRUbdfnqrvVaAD] [-c count] [-i interval] [-w deadline]
            [-p pattern] [-s packetsize] [-t ttl] [-I interface]
            [-M pmtudisc-hint] [-m mark] [-S sndbuf]
            [-T tstamp-options] [-Q tos] [hop1 ...] destination
08:48:25
$ping -i 3 ya.ru
PING ya.ru (93.158.134.3) 56(84) bytes of data.
64 bytes from www.yandex.ru (93.158.134.3): icmp_req=1 ttl=58 time=17.0 ms
64 bytes from www.yandex.ru (93.158.134.3): icmp_req=2 ttl=58 time=17.3 ms
64 bytes from www.yandex.ru (93.158.134.3): icmp_req=3 ttl=58 time=17.2 ms
64 bytes from www.yandex.ru (93.158.134.3): icmp_req=4 ttl=58 time=17.4 ms
^C
--- ya.ru ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 9010ms
rtt min/avg/max/mdev = 17.012/17.286/17.491/0.180 ms
08:48:44
$ping -f ya.ru
PING ya.ru (93.158.134.203) 56(84) bytes of data.
ping: cannot flood; minimal interval, allowed for user, is 200ms
прошло 14 минут
09:02:45
$ping -s 10000 -f ya.ru
PING ya.ru (93.158.134.3) 10000(10028) bytes of data.
ping: cannot flood; minimal interval, allowed for user, is 200ms
09:03:05
$ping -s 10000 -i 1 -f ya.ru
PING ya.ru (87.250.251.3) 10000(10028) bytes of data.
^C
--- ya.ru ping statistics ---
14 packets transmitted, 14 received, 0% packet loss, time 13022ms
rtt min/avg/max/mdev = 20.617/21.082/21.460/0.233 ms, ipg/ewma 1001.714/21.061 ms
09:03:33
$ping -s 10000 -i 0.2 -f ya.ru
PING ya.ru (87.250.250.203) 10000(10028) bytes of data.
^C
--- ya.ru ping statistics ---
139 packets transmitted, 139 received, 0% packet loss, time 27714ms
rtt min/avg/max/mdev = 20.465/21.095/22.186/0.326 ms, ipg/ewma 200.826/21.058 ms
09:04:06
$su
Пароль:
root@debian1:/home/user# l3script
09:04:27
#ping -f ya.ru
PING ya.ru (77.88.21.3) 56(84) bytes of data.
.......^C
--- ya.ru ping statistics ---
1396 packets transmitted, 1389 received, 0% packet loss, time 19535ms
rtt min/avg/max/mdev = 16.525/17.252/21.505/0.357 ms, pipe 2, ipg/ewma 14.003/17.392 ms
09:04:53
#traceroute ya.ru
traceroute to ya.ru (93.158.134.203), 30 hops max, 60 byte packets
 1  net.nt (192.168.13.253)  0.119 ms  0.207 ms  0.188 ms
 2  10.0.64.155 (10.0.64.155)  2.151 ms  2.150 ms  2.130 ms
 3  78.154.160.125.ett.ua (78.154.160.125)  2.112 ms  2.107 ms  2.099 ms
 4  yandex-10g-gw.ix.net.ua (195.35.65.88)  2.091 ms  2.416 ms  2.409 ms
 5  87.250.239.71 (87.250.239.71)  19.076 ms  19.081 ms  19.076 ms
 6  * * *
 7  www.yandex.ru (93.158.134.203)  17.461 ms  17.465 ms  17.537 ms
09:06:02
#traceroute ya.ru
traceroute to ya.ru (87.250.250.203), 30 hops max, 60 byte packets
 1  fobos.net.nt (192.168.13.253)  0.111 ms  0.093 ms  0.346 ms
 2  10.0.64.155 (10.0.64.155)  0.347 ms  0.339 ms  0.328 ms
 3  78.154.160.125.ett.ua (78.154.160.125)  0.834 ms  0.830 ms  0.803 ms
 4  yandex-10g-gw.ix.net.ua (195.35.65.88)  0.942 ms  0.936 ms  0.928 ms
 5  87.250.239.71 (87.250.239.71)  17.727 ms  17.718 ms  17.850 ms
 6  www.yandex.ru (87.250.250.203)  17.677 ms  18.156 ms  17.578 ms
09:06:38
#host ya.ru
ya.ru has address 213.180.193.3
ya.ru has address 213.180.204.3
ya.ru has address 77.88.21.3
ya.ru has address 87.250.250.3
ya.ru has address 87.250.250.203
ya.ru has address 87.250.251.3
ya.ru has address 93.158.134.3
ya.ru has address 93.158.134.203
ya.ru mail is handled by 10 mx.yandex.ru.
09:07:34
#less /etc/services
09:13:22
#traceroute --help
Usage:
  traceroute [ -46dFITnreAUV ] [ -f first_ttl ] [ -g gate,... ] [ -i device ] [ -m max_ttl ] [ -N squeries ] [ -p port ] [ -t tos ] [ -l flow_label ] [ -w waittime ] [ -q nqueries ] [ -s src_addr ] [ -z sendwait ] host [ packetlen ]
Options:
  -4                          Use IPv4
  -6                          Use IPv6
  -d  --debug                 Enable socket level debugging
  -F  --dont-fragment         Do not fragment packets
  -f first_ttl  --first=first_ttl
                              Start from the first_ttl hop (instead from 1)
  -g gate,...  --gateway=gate,...
...
                              `-F -N 1'
  --back                      Guess the number of hops in the backward path and
                              print if it differs
  -V  --version               Print version info and exit
  --help                      Read this help and exit
Arguments:
+     host          The host to traceroute to
      packetlen     The full packet length (default is the length of an IP
                    header plus 40). Can be ignored or increased to a minimal
                    allowed value
09:16:46
#traceroute -I ya.ru
traceroute to ya.ru (93.158.134.203), 30 hops max, 60 byte packets
 1  net.nt (192.168.13.253)  0.195 ms  0.196 ms  0.194 ms
 2  10.0.64.155 (10.0.64.155)  0.571 ms  0.591 ms  0.586 ms
 3  78.154.160.125.ett.ua (78.154.160.125)  0.760 ms  0.850 ms  0.848 ms
 4  yandex-10g-gw.ix.net.ua (195.35.65.88)  0.987 ms  0.987 ms  0.985 ms
 5  87.250.239.71 (87.250.239.71)  17.732 ms  17.738 ms  17.735 ms
 6  * * *
 7  www.yandex.ru (93.158.134.203)  17.289 ms  17.133 ms  17.011 ms
09:17:05
#traceroute -q 5 ya.ru
traceroute to ya.ru (87.250.250.203), 30 hops max, 60 byte packets
 1  fobos.net.nt (192.168.13.253)  0.080 ms  0.154 ms  0.135 ms  0.127 ms  0.119 ms
 2  10.0.64.155 (10.0.64.155)  0.425 ms  0.413 ms  0.405 ms  0.398 ms  0.389 ms
 3  78.154.160.125.ett.ua (78.154.160.125)  0.765 ms  1.708 ms  1.698 ms  1.691 ms  1.683 ms
 4  yandex-10g-gw.ix.net.ua (195.35.65.88)  1.674 ms  1.291 ms  2.120 ms  2.114 ms  2.107 ms
 5  87.250.239.71 (87.250.239.71)  59.582 ms  56.880 ms  57.425 ms  57.421 ms  57.414 ms
 6  www.yandex.ru (87.250.250.203)  18.346 ms  17.927 ms  17.559 ms  17.538 ms  17.513 ms
09:19:18
#less /etc/services
прошло 10 минут
09:30:16
#telnet localhost 80
Trying 127.0.0.1...
telnet: Unable to connect to remote host: Connection refused
09:34:57
#telnet 192.168.13.253 80
Trying 192.168.13.253...
Connected to 192.168.13.253.
Escape character is '^]'.
^]
telnet> quit
Connection closed.
09:35:21
#nc fobos.net.nt 53
^C
09:37:04
#n
namei             nc.traditional    netload           nfsstat           nohup
nameif            ncurses5-config   netstat           ngettext          nologin
nano              ncursesw5-config  netwatch          nice              nproc
nawk              ndiff             newaliases        nisdomainname     nroff
nc                neqn              newgrp            nl                nslookup
ncal              netcat            newusers          nm                nstat
ncat              netkit-ftp        nfnl_osf          nmap              nsupdate
09:37:04
#nc 192.168.13.253 53
^C
09:37:24
#nc fobos.net.nt 80
^C
09:37:39
#nc localhost 80
localhost.localdomain [127.0.0.1] 80 (www) : Connection refused
09:37:46
#nc localhost 53
localhost.localdomain [127.0.0.1] 53 (domain) : Connection refused
09:37:51
#nc -p 80 fobos.net.nt 53 -u
^C
09:38:48
#nc -z localhost 1-100

09:41:50
#nc -z localhost 1-100 -v
localhost.localdomain [127.0.0.1] 25 (smtp) open
localhost.localdomain [127.0.0.1] 22 (ssh) open
09:41:52
#nc -z localhost
no port[s] to connect to
09:42:23
#nc -z localhost -v
no port[s] to connect to
09:42:28
#nc -z 1-1000 localhost -v
1-1000: forward host lookup failed: Unknown host
09:42:44
#nc -z localhost 1-1000 -v
localhost.localdomain [127.0.0.1] 111 (sunrpc) open
localhost.localdomain [127.0.0.1] 25 (smtp) open
localhost.localdomain [127.0.0.1] 22 (ssh) open
09:42:54
#nc -z localhost all -v
invalid port all
09:42:59
#nc -z localhost * -v
invalid port bigfile
09:43:05
#cat /etc/passwd|nc -l -p 3000
^C
09:44:59
#telnet 192.168.13.3 3333
Trying 192.168.13.3...
Connected to 192.168.13.3.
Escape character is '^]'.
root:x:0:0:root:/root:/bin/bash
daemon:x:1:1:daemon:/usr/sbin:/bin/sh
bin:x:2:2:bin:/bin:/bin/sh
sys:x:3:3:sys:/dev:/bin/sh
sync:x:4:65534:sync:/bin:/bin/sync
games:x:5:60:games:/usr/games:/bin/sh
man:x:6:12:man:/var/cache/man:/bin/sh
...
nobody:x:65534:65534:nobody:/nonexistent:/bin/sh
libuuid:x:100:101::/var/lib/libuuid:/bin/sh
Debian-exim:x:101:103::/var/spool/exim4:/bin/false
statd:x:102:65534::/var/lib/nfs:/bin/false
user:x:1000:1000:user,,,:/home/user:/bin/bash
sshd:x:103:65534::/var/run/sshd:/usr/sbin/nologin
telnetd:x:104:106::/nonexistent:/bin/false
^]
telnet> quit
Connection closed.
09:45:19
#nmap localhost
Starting Nmap 5.00 ( http://nmap.org ) at 2012-12-18 10:50 EET
Interesting ports on localhost.localdomain (127.0.0.1):
Not shown: 997 closed ports
PORT    STATE SERVICE
22/tcp  open  ssh
25/tcp  open  smtp
111/tcp open  rpcbind
Nmap done: 1 IP address (1 host up) scanned in 0.14 seconds
прошло 15 минут
/dev/pts/0
10:00:34
$su
Пароль:
root@debian1:/home/user# l3script
10:00:43
#netstat
Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State
tcp        0    236 debian1.net.nt:ssh      192.168.15.102:49159    ESTABLISHED
Active UNIX domain sockets (w/o servers)
Proto RefCnt Flags       Type       State         I-Node   Path
unix  2      [ ]         DGRAM                    2395     @/org/kernel/udev/udevd
unix  4      [ ]         DGRAM                    3570     /dev/log
unix  3      [ ]         STREAM     CONNECTED     8623
unix  3      [ ]         STREAM     CONNECTED     8622
unix  2      [ ]         DGRAM                    8621
unix  2      [ ]         DGRAM                    3591
unix  3      [ ]         DGRAM                    2400
unix  3      [ ]         DGRAM                    2399
10:09:00
#netstat -l
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State
tcp        0      0 *:47662                 *:*                     LISTEN
tcp        0      0 *:sunrpc                *:*                     LISTEN
tcp        0      0 *:ssh                   *:*                     LISTEN
tcp        0      0 localhost.localdom:smtp *:*                     LISTEN
tcp6       0      0 [::]:ssh                [::]:*                  LISTEN
tcp6       0      0 ::1%3220586888:smtp     [::]:*                  LISTEN
udp        0      0 *:sunrpc                *:*
udp        0      0 *:44684                 *:*
udp        0      0 *:853                   *:*
Active UNIX domain sockets (only servers)
Proto RefCnt Flags       Type       State         I-Node   Path
unix  2      [ ACC ]     STREAM     LISTENING     3594     /var/run/acpid.socket
10:09:03
#netstat -lp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 *:47662                 *:*                     LISTEN      677/rpc.statd
tcp        0      0 *:sunrpc                *:*                     LISTEN      665/portmap
tcp        0      0 *:ssh                   *:*                     LISTEN      1075/sshd
tcp        0      0 localhost.localdom:smtp *:*                     LISTEN      1164/exim4
tcp6       0      0 [::]:ssh                [::]:*                  LISTEN      1075/sshd
tcp6       0      0 ::1%3219512968:smtp     [::]:*                  LISTEN      1164/exim4
udp        0      0 *:sunrpc                *:*                                 665/portmap
udp        0      0 *:44684                 *:*                                 677/rpc.statd
udp        0      0 *:853                   *:*                                 677/rpc.statd
Active UNIX domain sockets (only servers)
Proto RefCnt Flags       Type       State         I-Node   PID/Program name    Path
unix  2      [ ACC ]     STREAM     LISTENING     3594     851/acpid           /var/run/acpid.socket
10:09:10
#netstat -nlp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 0.0.0.0:47662           0.0.0.0:*               LISTEN      677/rpc.statd
tcp        0      0 0.0.0.0:111             0.0.0.0:*               LISTEN      665/portmap
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      1075/sshd
tcp        0      0 127.0.0.1:25            0.0.0.0:*               LISTEN      1164/exim4
tcp6       0      0 :::22                   :::*                    LISTEN      1075/sshd
tcp6       0      0 ::1:25                  :::*                    LISTEN      1164/exim4
udp        0      0 0.0.0.0:111             0.0.0.0:*                           665/portmap
udp        0      0 0.0.0.0:44684           0.0.0.0:*                           677/rpc.statd
udp        0      0 0.0.0.0:853             0.0.0.0:*                           677/rpc.statd
Active UNIX domain sockets (only servers)
Proto RefC