/l3/trainings/xg-ids/2005-12-19/fbsd2.linux.nt/user :1 :2 :3 :4 :5 :6 :7 :8 :9 :10 :11 :12 :13 :14 :15 :16 :17 :18 :19 :20 :21 :22 |
|
#ipfw show
65100 0 0 allow tcp from any to me dst-port 22 keep-state 65200 0 0 allow tcp from any to me dst-port 23 65300 8 480 allow ip from any to 192.168.15.110 65400 0 0 allow tcp from any to 192.168.15.110 65500 129 17080 allow tcp from me to any out keep-state 65500 6 448 reset log logamount 10 tcp from any to any 65500 13 1139 allow ip from any to any 65535 64 6845 deny ip from any to any |
#[root@fbsd2:arpd]#
|
#honeyd -d -i rl0 -f /usr/local/etc/honeyd.conf 192.168.15.110
Honeyd V1.0 Copyright (c) 2002-2004 Niels Provos honeyd[73301]: started with -d -i rl0 -f /usr/local/etc/honeyd.conf 192.168.15.110 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[73301]: listening promiscuously on rl0: (arp or ip proto 47 or (udp and src port 67 and dst port 68) or (ip and (host 192.168.15.110))) and not ether src 00:13:8f:2f:ac:5e honeyd[73301]: Demoting process privileges to uid 32767, gid 32767 honeyd[73301]: Sending ICMP Echo Reply: 192.168.15.110 -> 192.168.15.24 honeyd[73301]: Sending ICMP Echo Reply: 192.168.15.110 -> 192.168.15.24 honeyd[73301]: Sending ICMP Echo Reply: 192.168.15.110 -> 192.168.15.24 honeyd[73301]: Connection request: tcp (192.168.15.24:56432 - 192.168.15.110:80) honeyd[73301]: couldn't send packet: Permission denied honeyd[73301]: couldn't send packet: Permission denied honeyd[73301]: couldn't send packet: Permission denied honeyd[73301]: couldn't send packet: Permission denied honeyd[73301]: couldn't send packet: Permission denied honeyd[73301]: couldn't send packet: Permission denied honeyd[73301]: couldn't send packet: Permission denied honeyd[73301]: couldn't send packet: Permission denied ^Choneyd[73301]: exiting on signal 2 |
#ipfw show
65100 0 0 allow tcp from any to me dst-port 22 keep-state 65200 0 0 allow tcp from any to me dst-port 23 65300 25 1740 allow ip from any to 192.168.15.110 65400 0 0 allow tcp from any to 192.168.15.110 65500 417 44814 allow tcp from me to any out keep-state 65500 14 928 reset log logamount 10 tcp from any to any 65500 18 1584 allow ip from any to any 65535 64 6845 deny ip from any to any |
$ping 192.168.15.110
![]() PING 192.168.15.110 (192.168.15.110): 56 data bytes ^C --- 192.168.15.110 ping statistics --- 4 packets transmitted, 0 packets received, 100% packet loss |
$arng 192.168.15.110
![]() arping: must run as root |
$sudo g 192.168.15.110
![]() Password: ARPING 192.168.15.110 60 bytes from 00:13:8f:2f:ac:5e (192.168.15.110): index=0 time=9.952 msec 60 bytes from 00:13:8f:2f:ac:5e (192.168.15.110): index=1 time=9.954 msec 60 bytes from 00:13:8f:2f:ac:5e (192.168.15.110): index=2 time=9.958 msec ^C --- 192.168.15.110 statistics --- 4 packets transmitted, 3 packets received, 25% unanswered |
$arping 192.168.15.110
![]() arping: must run as root |
$ping 192.168.15.110
![]() PING 192.168.15.110 (192.168.15.110): 56 data bytes ^C --- 192.168.15.110 ping statistics --- 4 packets transmitted, 0 packets received, 100% packet loss |
#ipfw show
65100 13 3688 allow tcp from any to me dst-port 22 keep-state 65200 0 0 allow tcp from any to me dst-port 23 65300 28 1884 allow ip from any to 192.168.15.110 65400 0 0 allow tcp from any to 192.168.15.110 65500 420 45210 allow tcp from me to any out keep-state 65500 14 928 reset log logamount 10 tcp from any to any 65500 19 1813 allow ip from any to any 65535 64 6845 deny ip from any to any |
#ipfw delete 65400
|
$ping 192.168.15.110
PING 192.168.15.110 (192.168.15.110): 56 data bytes 64 bytes from 192.168.15.110: icmp_seq=0 ttl=128 time=0.799 ms 64 bytes from 192.168.15.110: icmp_seq=1 ttl=128 time=0.461 ms 64 bytes from 192.168.15.110: icmp_seq=2 ttl=128 time=0.460 ms ^C --- 192.168.15.110 ping statistics --- 3 packets transmitted, 3 packets received, 0% packet loss round-trip min/avg/max/stddev = 0.460/0.573/0.799/0.160 ms |
$telnet 192.168.15.110 80
![]() Trying 192.168.15.110... telnet: connect to address 192.168.15.110: Operation timed out telnet: Unable to connect to remote host |
#ipfw add 65400 allow ip from 192.168.15.110 to any
65400 allow ip from 192.168.15.110 to any |
#ipfw show
65100 13 3688 allow tcp from any to me dst-port 22 keep-state 65200 0 0 allow tcp from any to me dst-port 23 65300 28 1884 allow ip from any to 192.168.15.110 65400 0 0 allow ip from 192.168.15.110 to any 65500 420 45210 allow tcp from me to any out keep-state 65500 14 928 reset log logamount 10 tcp from any to any 65500 25 2281 allow ip from any to any 65535 64 6845 deny ip from any to any |
#honeyd -d -i rl0 -f /usr/local/etc/honeyd.conf 192.168.15.110
Honeyd V1.0 Copyright (c) 2002-2004 Niels Provos honeyd[73547]: started with -d -i rl0 -f /usr/local/etc/honeyd.conf 192.168.15.110 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[73547]: listening promiscuously on rl0: (arp or ip proto 47 or (udp and src port 67 and dst port 68) or (ip and (host 192.168.15.110))) and not ether src 00:13:8f:2f:ac:5e honeyd[73547]: Demoting process privileges to uid 32767, gid 32767 honeyd[73547]: Connection request: tcp (192.168.15.24:55179 - 192.168.15.110:80) honeyd[73547]: Connection established: tcp (192.168.15.24:55179 - 192.168.15.110:80) <-> /usr/local/share/honeyd/scripts/web.sh honeyd[73547]: Expiring TCP (192.168.15.24:55179 - 192.168.15.110:80) (0x81d8c00) in state 7 ^Choneyd[73547]: exiting on signal 2 |
#man honeyd
|
#honeyd -d -i rl0 -f /usr/local/etc/honeyd.conf --webserver-port 8080
Honeyd V1.0 Copyright (c) 2002-2004 Niels Provos honeyd[73632]: started with -d -i rl0 -f /usr/local/etc/honeyd.conf --webserver-port 8080 192.168.15.110 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[73632]: listening promiscuously on rl0: (arp or ip proto 47 or (udp and src port 67 and dst port 68) or (ip and (host 192.168.15.110))) and not ether src 00:13:8f:2f:ac:5e honeyd[73632]: Demoting process privileges to uid 32767, gid 32767 ^Choneyd[73632]: exiting on signal 2 |
$telnet 192.168.15.110 80
![]() Trying 192.168.15.110... Connected to 192.168.15.110. Escape character is '^]'. HTTP/1.1 404 NOT FOUND Server: Microsoft-IIS/5.0 P3P: CP='ALL IND DSP COR ADM CONo CUR CUSo IVAo IVDo PSA PSD TAI TELo OUR SAMo CNT COM INT NAV ONL PHY PRE PUR UNI' Content-Location: http://cpmsftwbw27/default.htm Date: Thu, 04 Apr 2002 06:42:18 GMT Content-Type: text/html Accept-Ranges: bytes <html><title>You are in Error</title> <body> <h1>You are in Error</h1> O strange and inconceivable thing! We did not really die, we were not really buried, we were not really crucified and raised again, but our imitation was but a figure, while our salvation is in reality. Christ was actually crucified, and actually buried, and truly rose again; and all these things have been vouchsafed to us, that we, by imitation communicating in His sufferings, might gain salvatio <p> St. Cyril of Jerusalem, On the Christian Sacraments. </body> </html> Connection closed by foreign host. |
#honeyd -d -i rl0 -f /usr/local/etc/honeyd.conf 192.168.15.110
Honeyd V1.0 Copyright (c) 2002-2004 Niels Provos honeyd[73674]: started with -d -i rl0 -f /usr/local/etc/honeyd.conf 192.168.15.110 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[73674]: listening promiscuously on rl0: (arp or ip proto 47 or (udp and src port 67 and dst port 68) or (ip and (host 192.168.15.110))) and not ether src 00:13:8f:2f:ac:5e honeyd[73674]: Demoting process privileges to uid 32767, gid 32767 ^Choneyd[73674]: exiting on signal 2 |
#cowsay
![]() ^C |
#cowsay
![]() ^C |
#man cowsay
|
#cowsay fortune
_________ < fortune > --------- \ ^__^ \ (oo)\_______ (__)\ )\/\ ||----w | || || |
#fortune | cowsay
________________________________________ / In Dr. Johnson's famous dictionary \ | patriotism is defined as the last | | resort of the scoundrel. With all due | | respect to an enlightened but inferior | | lexicographer I beg to submit that it | | is the first. | | | | -- Ambrose Bierce, "The Devil's | \ Dictionary" / ---------------------------------------- \ ^__^ \ (oo)\_______ (__)\ )\/\ ||----w | || || |
#fortune | cowsay
_______________________________________ / Newpaper editors are men who separate \ | the wheat from the chaff, and then | | print the chaff. | | | \ -- Adlai Stevenson / --------------------------------------- \ ^__^ \ (oo)\_______ (__)\ )\/\ ||----w | || || |
#fortune | cowsay
________________________________________ / The world really isn't any worse. It's \ | just that the news coverage is so much | \ better. / ---------------------------------------- \ ^__^ \ (oo)\_______ (__)\ )\/\ ||----w | || || |
#fortune | cowsay
________________________________________ / The way to make a small fortune in the \ | commodities market is to start with a | \ large fortune. / ---------------------------------------- \ ^__^ \ (oo)\_______ (__)\ )\/\ ||----w | || || |
#fortune | cowsay
_________________________________________ / For my son, Robert, this is proving to \ | be the high-point of his entire life to | | date. He has had his pajamas on for | | two, maybe three days now. He has the | | sense of joyful independence a | | 5-year-old child gets when he suddenly | | realizes that he could be operating an | | acetylene torch in the coat closet and | | neither parent [because of the flu] | ... | Lumps o' Froot ("part of this complete | | breakfast"). | | | \ -- Dave Barry, "Molecular Homicide" / ----------------------------------------- \ ^__^ \ (oo)\_______ (__)\ )\/\ ||----w | || || |
#fortune | cowsay
________________________________________ / I was playing poker the other night... \ | with Tarot cards. I got a full house | | and four people died. | | | \ -- Steven Wright / ---------------------------------------- \ ^__^ \ (oo)\_______ (__)\ )\/\ ||----w | || || |
#man cowsay
|
#ls
beavis.zen.cow dragon.cow kitty.cow ren.cow telebears.cow bong.cow elephant-in-snake.cow koala.cow satanic.cow three-eyes.cow box.cow elephant.cow kosh.cow sheep.cow turkey.cow bud-frogs.cow eyes.cow luke-koala.cow skeleton.cow turtle.cow bunny.cow flaming-sheep.cow mech-and-cow small.cow tux-stab.cow cheese.cow ghostbusters.cow meow.cow sodomized.cow tux.cow cower.cow head-in.cow milk.cow stegosaurus.cow udder.cow daemon.cow hellokitty.cow moofasa.cow stimpy.cow vader-koala.cow default.cow jkh.cow moose.cow supermilker.cow vader.cow dragon-and-cow.cow kiss.cow mutilated.cow surgery.cow www.cow |
#cat box.cow
# Created by Brian Feldman <green@FreeBSD.org> # Updated for content by Robert Watson <rwatson@FreeBSD.org> # $the_cow = ""; $the_cow .= " $thoughts\n"; $the_cow .= " $thoughts\n"; $the_cow .= " .----------------------.\n"; $the_cow .= " / \\ |\\\n"; $the_cow .= " \\ \\____________________|_\\\n"; $the_cow .= " \\\\/\\______________________\\\n"; $the_cow .= " \\| BOX O' STUPID PEOPLE |\n"; $the_cow .= " `----------------------'\n"; |
#cat wwww
## ## A cow wadvertising the World Wide Web, from lim@csua.berkeley.edu ## $the_cow = <<EOC; $thoughts ^__^ $thoughts ($eyes)\\_______ (__)\\ )\\/\\ $tongue ||--WWW | || || EOC |
#cat elephant
## ## An elephant out and about ## $the_cow = <<EOC; $thoughts /\\ ___ /\\ $thoughts // \\/ \\/ \\\\ (( O O )) \\\\ / \\ // \\/ | | \\/ | | | | | | | | | o | | | | | |m| |m| EOC |
#cat daemon.
## ## 4.4 >> 5.4 ## $the_cow = <<EOC; $thoughts , , $thoughts /( )` $thoughts \\ \\___ / | /- _ `-/ ' (/\\/ \\ \\ /\\ / / | ` \\ ... `-----' / <----. __ / __ \\ <----|====O)))==) \\) /==== <----' `--' `.__,' \\ | | \\ / ______( (_ / \\______ ,' ,-----' | \\ `--{__________) \\/ EOC |
#[root@fbsd2:cows]# man cowsay
the path specified in the COWPATH environment variable. To list all NAME cowsay/cowthink - configurable speaking/thinking cow (and a bit more) SYNOPSIS cowsay [-e eye_string] [-f cowfile] [-h] [-l] [-n] [-T tongue_string] [-W column] [-bdgpstwy] DESCRIPTION Cowsay generates an ASCII picture of a cow saying something provided by the user. If run with no arguments, it accepts standard input, word- wraps the message given at about 40 columns, and prints the cow saying ... The user may specify the -e option to select the appearance of the cow's eyes, in which case the first two characters of the argument string eye_string will be used. The default eyes are 'oo'. The tongue is similarly configurable through -T and tongue_string; it must be two characters and does not appear by default. However, it does appear in the 'dead' and 'stoned' modes. Any configuration done by -e and -T will be lost if one of the provided modes is used. The -f option specifies a particular cow picture file (``cowfile'') to use. If the cowfile spec contains '/' then it will be interpreted as a path relative to the current directory. Otherwise, cowsay will search |
#cowsay -f daemon.cow domoy
_______ < domoy > ------- \ , , \ /( )` \ \ \___ / | /- _ `-/ ' (/\/ \ \ /\ / / | ` \ O O ) / | ... `.___/` / `-----' / <----. __ / __ \ <----|====O)))==) \) /==== <----' `--' `.__,' \ | | \ / ______( (_ / \______ ,' ,-----' | \ `--{__________) \/ |
$finger
Login Name TTY Idle Login Time Office Phone root Charlie Root p6 41 Fri 09:33 root Charlie Root p8 1:12 Fri 14:23 root Charlie Root pa 2:27 Fri 16:33 root Charlie Root pb 1 Fri 18:59 root Charlie Root pf 41 Fri 16:05 root Charlie Root ph 1:12 Fri 16:34 root Charlie Root pi 14 Fri 14:29 root Charlie Root pk 27 Fri 14:44 user NT-IDS Student #2 *v1 9:36 Fri 09:24 user NT-IDS Student #2 p2 Fri 09:24 user NT-IDS Student #2 p4 1 Fri 09:26 |
$finger
Login Name TTY Idle Login Time Office Phone root Charlie Root p6 42 Fri 09:33 root Charlie Root p8 1:12 Fri 14:23 root Charlie Root pa 2:27 Fri 16:33 root Charlie Root pb 1 Fri 18:59 root Charlie Root pf 42 Fri 16:05 root Charlie Root ph 1:12 Fri 16:34 root Charlie Root pi 14 Fri 14:29 root Charlie Root pk 27 Fri 14:44 user NT-IDS Student #2 *v1 9:37 Fri 09:24 user NT-IDS Student #2 p2 Fri 09:24 user NT-IDS Student #2 p4 1 Fri 09:26 |
$finger user
Login: _pflogd Name: pflogd privsep user Directory: /var/empty Shell: /usr/sbin/nologin Never logged in. No Mail. No Plan. Login: mailnull Name: Sendmail Default User Directory: /var/spool/mqueue Shell: /usr/sbin/nologin Never logged in. No Mail. No Plan. ... No Mail. No Plan. Login: user Name: NT-IDS Student #2 Directory: /home/user Shell: /usr/local/bin/bash On since Fri Dec 23 09:24 (EET) on ttyv1, idle 9:37 (messages off) On since Fri Dec 23 09:24 (EET) on ttyp2 from :0 On since Fri Dec 23 09:26 (EET) on ttyp4, idle 0:01, from :0 Last login Fri Dec 23 14:29 (EET) on ttypg from fbsd4.linux.nt No Mail. No Plan. |
$echo est\'nemnogo > ~/lan
|
$finger user
Login: _pflogd Name: pflogd privsep user Directory: /var/empty Shell: /usr/sbin/nologin Never logged in. No Mail. No Plan. Login: mailnull Name: Sendmail Default User Directory: /var/spool/mqueue Shell: /usr/sbin/nologin Never logged in. No Mail. No Plan. ... No Mail. No Plan. Login: user Name: NT-IDS Student #2 Directory: /home/user Shell: /usr/local/bin/bash On since Fri Dec 23 09:24 (EET) on ttyv1, idle 9:37 (messages off) On since Fri Dec 23 09:24 (EET) on ttyp2 from :0 On since Fri Dec 23 09:26 (EET) on ttyp4, idle 0:01, from :0 Last login Fri Dec 23 14:29 (EET) on ttypg from fbsd4.linux.nt No Mail. Plan: est'nemnogo |
$echo est\' emnogo > ~/.plan
|
$finger user
Login: _pflogd Name: pflogd privsep user Directory: /var/empty Shell: /usr/sbin/nologin Never logged in. No Mail. No Plan. Login: mailnull Name: Sendmail Default User Directory: /var/spool/mqueue Shell: /usr/sbin/nologin Never logged in. No Mail. No Plan. ... No Mail. No Plan. Login: user Name: NT-IDS Student #2 Directory: /home/user Shell: /usr/local/bin/bash On since Fri Dec 23 09:24 (EET) on ttyv1, idle 9:37 (messages off) On since Fri Dec 23 09:24 (EET) on ttyp2 from :0 On since Fri Dec 23 09:26 (EET) on ttyp4, idle 0:02, from :0 Last login Fri Dec 23 14:29 (EET) on ttypg from fbsd4.linux.nt No Mail. Plan: est' nemnogo |
$finger user
Login: _pflogd Name: pflogd privsep user Directory: /var/empty Shell: /usr/sbin/nologin Never logged in. No Mail. No Plan. Login: mailnull Name: Sendmail Default User Directory: /var/spool/mqueue Shell: /usr/sbin/nologin Never logged in. No Mail. No Plan. ... No Mail. No Plan. Login: user Name: NT-IDS Student #2 Directory: /home/user Shell: /usr/local/bin/bash On since Fri Dec 23 09:24 (EET) on ttyv1, idle 9:38 (messages off) On since Fri Dec 23 09:24 (EET) on ttyp2 from :0 On since Fri Dec 23 09:26 (EET) on ttyp4 from :0 Last login Fri Dec 23 14:29 (EET) on ttypg from fbsd4.linux.nt No Mail. Plan: est' nemnogo |
$man finger
|
$man honeyd
|
$[user@fbsd2:mail]$ man honeyd
HONEYD(8) FreeBSD System Manager's Manual HONEYD(8) NAME honeyd -- Honeypot Daemon SYNOPSIS honeyd [-dP] [-l logfile] [-s servicelog] [-p fingerprints] [-0 p0f-file] [-x xprobe] [-a assoc] [-f file] [-i interface] [-u uid] [-g gid] [-c host:port:username:password] [--webserver-port port] [--webserver-root path] [--rrdtool-path path] [--disable-webserver] [--disable-update] HONEYD(8) FreeBSD System Manager's Manual HONEYD(8) ... [--fix-webserver-permissions] [-V|--version] [-h|--help] [--include-dir] [net ...] DESCRIPTION Honeyd creates virtual hosts for IP addresses matching the specified net. The daemon simulates the networking stack of the configured hosts and can simulate any TCP and UDP service. ICMP is fully supported, too. By default, all UDP ports are closed and honeyd will generate an ICMP unreachable port message if the configured personality permits that. Honeyd enables a single host to claim unused addresses on a LAN for net- work simulation. The net argument may contain multiple addresses and |
#[root@fbsd2:cows]# cd /shared/honeyd/webserver/htdocs/
![]() bash: cd: /shared/honeyd/webserver/htdocs/: No such file or directory |
#ls
beavis.zen.cow dragon.cow kitty.cow ren.cow telebears.cow bong.cow elephant-in-snake.cow koala.cow satanic.cow three-eyes.cow box.cow elephant.cow kosh.cow sheep.cow turkey.cow bud-frogs.cow eyes.cow luke-koala.cow skeleton.cow turtle.cow bunny.cow flaming-sheep.cow mech-and-cow small.cow tux-stab.cow cheese.cow ghostbusters.cow meow.cow sodomized.cow tux.cow cower.cow head-in.cow milk.cow stegosaurus.cow udder.cow daemon.cow hellokitty.cow moofasa.cow stimpy.cow vader-koala.cow default.cow jkh.cow moose.cow supermilker.cow vader.cow dragon-and-cow.cow kiss.cow mutilated.cow surgery.cow www.cow |
#cd /usr/localneyd/webserver/htdocs/
![]() bash: cd: /usr/local/shared/honeyd/webserver/htdocs/: No such file or directory |
#cd /usr/shared/honeyd/webserver/htdocs/
![]() bash: cd: /usr/shared/honeyd/webserver/htdocs/: No such file or directory |
#whereis / name=webserver
: /usr/src/bin/ name=webserver: |
#whereis / -name bserver
: /usr/src/bin/ -name: webserver: |
#findname webserver
![]() /usr/local/share/honeyd/webserver ^C |
#cd /usr/local/honeyd/webserver/htdocs/
|
#ls
config.py graphs images index.py styles templates |
#cd /usr/local/www
|
#ls
cgi-bin cgi-bin-dist data data-dist icons proxy |
#cd data
|
#ls
EXAMPLE_DIRECTORY-DONT_ADD_OR_TOUCH_ANYTHING index.html.lb.utf8 apache_pb.gif index.html.nl index.html.ca index.html.nn index.html.cz index.html.no index.html.de index.html.po.iso-pl index.html.dk index.html.pt index.html.ee index.html.pt-br index.html.el index.html.ru.cp-1251 index.html.en index.html.ru.cp866 index.html.es index.html.ru.iso-ru index.html.fr index.html.ru.koi8-r index.html.he.iso8859-8 index.html.ru.ucs2 index.html.hu index.html.ru.ucs4 index.html.it index.html.ru.utf8 index.html.ja.jis index.html.se index.html.kr.iso-kr index.html.zh-tw.big5 |
#cd /usr/local/share/honeyd/webserver/htdocs/
|
#ls
config.py graphs images index.py styles templates |
#ls -al
total 16 drwxr-xr-x 6 root wheel 512 Dec 23 14:19 . drwxr-xr-x 3 root wheel 512 Dec 23 14:19 .. -rw-r--r-- 1 root wheel 833 Sep 14 2004 config.py drwxr-xr-x 2 root wheel 512 Dec 23 14:19 graphs drwxr-xr-x 2 root wheel 512 Dec 23 14:19 images -rw-r--r-- 1 root wheel 1445 Dec 6 2004 index.py drwxr-xr-x 2 root wheel 512 Dec 23 14:19 styles drwxr-xr-x 3 root wheel 512 Dec 23 14:19 templates |
#cat config.py
import time import support from htmltmpl import TemplateManager, TemplateProcessor self.send_response(200) self.send_header("Content-Type", "text/html") self.send_nocache() self.end_headers() # Process commands given to us message = support.parse_query(self.query) # Compile or load already precompiled template. ... content = "Welcome to the Honeyd Configuration Interface.<p>" content += support.config_table() content += "<p>" content += support.config_ips(self.root) if message: tproc.set("message", message) tproc.set("content", content) tproc.set("uptime", support.uptime()) # Print the processed template. self.wfile.write(tproc.process(template)) |
#man scp
|
#scp /tmp/
![]() .ICE-unix/ .xf86config7238/ ad1 lm-saved-51667 screens/ .X0-lock .xf86config7247/ arp.log lm-saved-8516 scrollkeeper-user/ .X11-unix/ .xf86config7256/ ipfwshow log vi.psnSHG4Ux6 .XIM-unix/ Term-VT102-0.82/ kde-root/ mcop-root/ .font-unix/ Term-VT102-0.82.tar.gz kde-user/ mcop-user/ .snap/ Text-Iconv-1.4/ ksocket-root/ mysql.sock .vi Text-Iconv-1.4.tar.gz ksocket-user/ pipe |
#cat /tmp/a
![]() ad1 arp.log |
#cat /tmp/ad1
![]() cat: /tmp/ad1: Socket operation on non-socket |
#cat /tmp/log
get / |
#scp /tmp/log user@m04
|
#scp /tmp/log user@m04/tmp/
![]() cp: user@m04/tmp: Not a directory |
#scp /tmp/log user@m04:tmp/
![]() Password: scp: /tmp//log: Permission denied |
#scp /tmp/log root:/tmp/
Password: log 100% 6 0.0KB/s 00:00 |
#ssh m04
Password: Last login: Fri Dec 23 17:09:17 2005 from linux.nt Copyright (c) 1980, 1983, 1986, 1988, 1990, 1991, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD 6.0-RELEASE (GENERIC) #0: Thu Nov 3 09:36:13 UTC 2005 Welcome to FreeBSD! Before seeking technical support, please use the following resources: o Security advisories and updated errata information for all releases are at http://www.FreeBSD.org/releases/ - always consult the ERRATA section for your release first as it's updated frequently. o The Handbook and FAQ documents are at http://www.FreeBSD.org/ and, along with the mailing lists, can be searched by going to http://www.FreeBSD.org/search/. If the doc distribution has been installed, they're also available formatted in /usr/share/doc. If you still have a question or problem, please take the output of `uname -a', along with any relevant error messages, and email it as a question to the questions@FreeBSD.org mailing list. If you are unfamiliar with FreeBSD's directory layout, please refer to the hier(7) manual page. If you are not familiar with manual pages, type `man man'. You may also use sysinstall(8) to re-enter the installation and configuration utility. Edit /etc/motd to change this login announcement. |
#cat /tmp/
![]() .ICE-unix/ Term-VT102-0.82/ kde-user/ mcop-root/ scrollkeeper-user/ .X0-lock Term-VT102-0.82.tar.gz ksocket-root/ mcop-user/ swatch.log .X11-unix/ Text-Iconv-1.4/ ksocket-user/ mysql.sock .XIM-unix/ Text-Iconv-1.4.tar.gz log nessus-0gaHq6 .font-unix/ arp.log mc-root/ nessus-mkcert.19557/ .snap/ kde-root/ mc-user/ pthread.dump.14351.0 |
#cat /tmp/log
get / |
#exit
exit Connection to fbsd4.linux.nt closed. |
#exit
exit |
$http://en.wikipedia.org/wiki/Image:Unix.png
![]() exit bash: http://en.wikipedia.org/wiki/Image:Unix.png: No such file or directory |
$startx
X Window System Version 6.8.2 Release Date: 9 February 2005 X Protocol Version 11, Revision 0, Release 6.8.2 Build Operating System: FreeBSD 6.0 i386 [ELF] Current Operating System: FreeBSD fbsd2.linux.nt 6.0-RELEASE FreeBSD 6.0-RELEASE #0: Thu Nov 3 09:36:13 UTC 2005 root@x64.samsco.home:/usr/obj/usr/src/sys/GENERIC i386 Build Date: 12 October 2005 Before reporting problems, check http://wiki.X.Org to make sure that you have the latest version. Module Loader present Markers: (--) probed, (**) from config file, (==) default setting, ... X Error: BadWindow (invalid Window parameter) 3 Major opcode: 6 Minor opcode: 0 Resource id: 0x1a0000b kio (KDirWatch): WARNING: KDirWatch::removeDir can't handle 'Office/kword.desktop' startkde: Shutting down... klauncher: Exiting on signal 1 startkde: Running shutdown scripts... startkde: Done. waiting for X server to shut down FreeFontPath: FPE "/usr/X11R6/lib/X11/fonts/misc/" refcount is 2, should be 1; fixing. |
$sudo bash
Password: Sorry, try again. Password: |
#ipfw show
65535 36 2307 deny ip from any to any |
#vi /etc/rc.local
|
#vi /etc/rc.conf
|
#ipwf flush
![]() bash: ipwf: command not found |
#ipfwflush
Are you sure? [yn] y Flushed all rules. |
#ping ya.ru
![]() ping: cannot resolve ya.ru: Host name lookup failure |
#ipwf show
![]() bash: ipwf: command not found |
#ipfwshow
65535 117 7516 deny ip from any to any |
#ipfw add 65000 allow ip from any to any
65000 allow ip from any to any |
#ping ya.ru
PING ya.ru (213.180.204.8): 56 data bytes 64 bytes from 213.180.204.8: icmp_seq=0 ttl=50 time=142.007 ms 64 bytes from 213.180.204.8: icmp_seq=1 ttl=50 time=139.387 ms ^C --- ya.ru ping statistics --- 2 packets transmitted, 2 packets received, 0% packet loss round-trip min/avg/max/stddev = 139.387/140.697/142.007/1.310 ms |
#cp /var/mail/root /var/mail/user
You have new mail in /var/mail/user |
#chown
![]() usage: chown [-fhv] [-R [-H | -L | -P]] owner[:group] file ... chown [-fhv] [-R [-H | -L | -P]] :group file ... |
#chown user /var/mail/user
|
.ICE-unix/ Term-VT102-0.82/ kde-user/ mcop-root/ scrollkeeper-user/ .X0-lock Term-VT102-0.82.tar.gz ksocket-root/ mcop-user/ swatch.log .X11-unix/ Text-Iconv-1.4/ ksocket-user/ mysql.sock .XIM-unix/ Text-Iconv-1.4.tar.gz log nessus-0gaHq6 .font-unix/ arp.log mc-root/ nessus-mkcert.19557/ .snap/ kde-root/ mc-user/ pthread.dump.14351.0
ad1 arp.log
get /
# Created by Brian Feldman <green@FreeBSD.org> # Updated for content by Robert Watson <rwatson@FreeBSD.org> # $the_cow = ""; $the_cow .= " $thoughts\n"; $the_cow .= " $thoughts\n"; $the_cow .= " .----------------------.\n"; $the_cow .= " / \\ |\\\n"; $the_cow .= " \\ \\____________________|_\\\n"; $the_cow .= " \\\\/\\______________________\\\n"; $the_cow .= " \\| BOX O' STUPID PEOPLE |\n"; $the_cow .= " `----------------------'\n";
import time import support from htmltmpl import TemplateManager, TemplateProcessor self.send_response(200) self.send_header("Content-Type", "text/html") self.send_nocache() self.end_headers() # Process commands given to us message = support.parse_query(self.query) # Compile or load already precompiled template. template = TemplateManager().prepare(self.root+"/templates/index.tmpl") tproc = TemplateProcessor(0) # Set the title. tproc.set("title", "Honeyd Configuration Interface") content = "Welcome to the Honeyd Configuration Interface.<p>" content += support.config_table() content += "<p>" content += support.config_ips(self.root) if message: tproc.set("message", message) tproc.set("content", content) tproc.set("uptime", support.uptime()) # Print the processed template. self.wfile.write(tproc.process(template))
## ## 4.4 >> 5.4 ## $the_cow = <<EOC; $thoughts , , $thoughts /( )` $thoughts \\ \\___ / | /- _ `-/ ' (/\\/ \\ \\ /\\ / / | ` \\ O O ) / | `-^--'`< ' (_.) _ ) / `.___/` / `-----' / <----. __ / __ \\ <----|====O)))==) \\) /==== <----' `--' `.__,' \\ | | \\ / ______( (_ / \\______ ,' ,-----' | \\ `--{__________) \\/ EOC
## ## An elephant out and about ## $the_cow = <<EOC; $thoughts /\\ ___ /\\ $thoughts // \\/ \\/ \\\\ (( O O )) \\\\ / \\ // \\/ | | \\/ | | | | | | | | | o | | | | | |m| |m| EOC
## ## A cow wadvertising the World Wide Web, from lim@csua.berkeley.edu ## $the_cow = <<EOC; $thoughts ^__^ $thoughts ($eyes)\\_______ (__)\\ )\\/\\ $tongue ||--WWW | || || EOC
Время первой команды журнала | 18:42:03 2006-12-23 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 09:34:33 2006-12-24 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 101 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 16.83 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 2.97 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 1.23 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 1.36 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду 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