/l3/users/sergo/xg-ids/localhost.localdomain/root :1 :2 :3 :4 :5 :6 :7 :8 :9 :10 :11 :12 :13 :14 :15 :16 :17 :18 :19 |
|
#ls -la
total 7 drwxr-xr-x 6 root root 1024 Nov 16 15:23 . drwxr-xr-x 15 root root 1024 Nov 13 16:27 .. drwxrwxr-x 11 root root 2048 Nov 16 16:05 acidbase drwxr-xr-x 2 root root 1024 Nov 13 16:27 apache2-default drwxr-xr-x 6 root root 1024 Jun 16 2005 phpsyslogng drwxr-xr-x 2 root root 1024 Nov 13 16:35 test |
#chown www-data ./acidbase
|
#ls -la
total 7 drwxr-xr-x 6 root root 1024 Nov 16 15:23 . drwxr-xr-x 15 root root 1024 Nov 13 16:27 .. drwxrwxr-x 11 www-data root 2048 Nov 16 16:05 acidbase drwxr-xr-x 2 root root 1024 Nov 13 16:27 apache2-default drwxr-xr-x 6 root root 1024 Jun 16 2005 phpsyslogng drwxr-xr-x 2 root root 1024 Nov 13 16:35 test |
#chown www-data.www-data ./acidbase
|
#cd ..
|
#cd acidbase
bash: cd: acidbase: No such file or directory |
#cd acidbase
bash: cd: acidbase: No such file or directory |
#cd acidbase
bash: cd: acidbase: No such file or directory |
#ls
backups cache lib local lock log lost+found mail opt run spool tmp www |
#cd ww
bash: cd: ww: No such file or directory |
#cd www
|
#cd acibase
bash: cd: acibase: No such file or directory |
#cd acidbase
|
#ls
admin base_denied.php base_maintenance.php base_stat_common.php help base_ag_common.php base_footer.php base_payload.php base_stat_ipaddr.php images base_ag_main.php base_graph_common.php base_qry_alert.php base_stat_iplink.php includes base_common.php base_graph_display.php base_qry_common.php base_stat_ports.php index.php base_conf.php base_graph_form.php base_qry_form.php base_stat_sensor.php languages base_conf.php.dist base_graph_main.php base_qry_main.php base_stat_time.php scripts base_conf.php.old base_hdr1.php base_qry_sqlcalls.php base_stat_uaddr.php setup base_db_common.php base_hdr2.php base_stat_alerts.php base_user.php styles base_db_setup.php base_main.php base_stat_class.php contrib |
#ls -la
total 447 drwxrwxr-x 11 www-data www-data 2048 Nov 16 16:05 . drwxr-xr-x 6 root root 1024 Nov 16 15:23 .. drwxr-xr-x 2 root root 1024 Nov 16 12:22 admin -rw-r--r-- 1 root root 3525 Nov 16 15:10 base_ag_common.php -rw-r--r-- 1 root root 13536 Nov 16 15:10 base_ag_main.php -rw-r--r-- 1 root root 33253 Nov 16 15:10 base_common.php -rwxrwxrwx 1 root root 44778 Nov 16 16:05 base_conf.php -rw-r--r-- 1 root root 12379 Nov 16 15:10 base_conf.php.dist -rw-r--r-- 1 root root 12368 Nov 16 15:44 base_conf.php.old ... -rw-r--r-- 1 root root 4656 Nov 16 15:10 base_user.php drwxr-xr-x 2 root root 1024 Nov 16 12:22 contrib drwxr-xr-x 2 root root 1024 Nov 16 12:22 help drwxr-xr-x 2 root root 1024 Nov 16 12:22 images drwxr-xr-x 3 root root 1024 Nov 16 12:22 includes -rw-r--r-- 1 root root 3220 Nov 16 15:10 index.php drwxr-xr-x 2 root root 1024 Nov 16 12:22 languages drwxr-xr-x 2 root root 1024 Nov 16 12:22 scripts drwxr-xr-x 2 root root 1024 Nov 16 12:22 setup drwxr-xr-x 2 root root 1024 Nov 16 12:22 styles |
#chown www-data.www-data ./*
|
#ls -la
total 447 drwxrwxr-x 11 www-data www-data 2048 Nov 16 16:05 . drwxr-xr-x 6 root root 1024 Nov 16 15:23 .. drwxr-xr-x 2 www-data www-data 1024 Nov 16 12:22 admin -rw-r--r-- 1 www-data www-data 3525 Nov 16 15:10 base_ag_common.php -rw-r--r-- 1 www-data www-data 13536 Nov 16 15:10 base_ag_main.php -rw-r--r-- 1 www-data www-data 33253 Nov 16 15:10 base_common.php -rwxrwxrwx 1 www-data www-data 44778 Nov 16 16:05 base_conf.php -rw-r--r-- 1 www-data www-data 12379 Nov 16 15:10 base_conf.php.dist -rw-r--r-- 1 www-data www-data 12368 Nov 16 15:44 base_conf.php.old ... -rw-r--r-- 1 www-data www-data 4656 Nov 16 15:10 base_user.php drwxr-xr-x 2 www-data www-data 1024 Nov 16 12:22 contrib drwxr-xr-x 2 www-data www-data 1024 Nov 16 12:22 help drwxr-xr-x 2 www-data www-data 1024 Nov 16 12:22 images drwxr-xr-x 3 www-data www-data 1024 Nov 16 12:22 includes -rw-r--r-- 1 www-data www-data 3220 Nov 16 15:10 index.php drwxr-xr-x 2 www-data www-data 1024 Nov 16 12:22 languages drwxr-xr-x 2 www-data www-data 1024 Nov 16 12:22 scripts drwxr-xr-x 2 www-data www-data 1024 Nov 16 12:22 setup drwxr-xr-x 2 www-data www-data 1024 Nov 16 12:22 styles |
#/etc/init.d/apache2 resrtart
Usage: /etc/init.d/apache2 {start|stop|restart|reload|force-reload} |
#/etc/init.d/apache2 restart
Forcing reload of web server (apache2)...grep: /etc/apache2/conf.d/acidbase.conf: No such file or directory apache2: Syntax error on line 195 of /etc/apache2/apache2.conf: Could not open configuration file /etc/apache2/conf.d/acidbase.conf: No such file or directory failed! |
#find / -name apachebase.conf
find: /proc/18368/fd: No such file or directory find: /proc/18370/fd: No such file or directory find: /proc/19267/fd: No such file or directory find: /proc/19412/fd: No such file or directory find: /proc/19430/fd: No such file or directory find: /proc/19435/fd: No such file or directory find: /proc/20325/fd: No such file or directory |
#tail -f /var/log/snort/
use_external_bins = 1 # Temporary directory to use. The default configuration only allows # root to update the ruleset. # Note: If commented out will check environment variables TMP, # TMPDIR or TEMPDIR, or otherwise use "/tmp" if none of them was set. tmpdir = /var/run/oinkmaster # Umask to use while executing umask = 0027 # -------------------- # Extra configuration ... # checked for changes, and then updated or added if needed. # You can then choose to skip individual files by specifying # the "skipfile" keyword below. # Normally you shouldn't need to change this one. # (But if you do, make sure it's still a valid regexp.) update_files = \.rules$|\.config$|\.conf$|\.txt$|\.map$ # Regexp of keywords that starts a snort rule. # May be useful if you create your own ruletypes and want those alert tcpdump.log.1163673735 tcpdump.log.1163680174 tcpdump.log.1163672111 tcpdump.log.1163679905 tcpdump.log.1163681020 |
#tail -f /var/log/snort/
alert tcpdump.log.1163673735 tcpdump.log.1163680174 tcpdump.log.1163672111 tcpdump.log.1163679905 tcpdump.log.1163681020 |
#tail -f /var/log/snort/
alert tcpdump.log.1163673735 tcpdump.log.1163680174 tcpdump.log.1163672111 tcpdump.log.1163679905 tcpdump.log.1163681020 |
#tail -f /var/log/snort/alert
# -------------------- # Extra configuration # -------------------- # Files in the archive matching this regular expression will be # checked for changes, and then updated or added if needed. # You can then choose to skip individual files by specifying # the "skipfile" keyword below. # Normally you shouldn't need to change this one. # (But if you do, make sure it's still a valid regexp.) update_files = \.rules$|\.config$|\.conf$|\.txt$|\.map$ # Regexp of keywords that starts a snort rule. # May be useful if you create your own ruletypes and want those TCP Options (3) => NOP NOP TS: 10553837 19147750 [**] [122:1:0] (portscan) TCP Portscan [**] 11/16-14:44:04.099112 192.168.15.1 -> 192.168.15.2 PROTO255 TTL:0 TOS:0x0 ID:30656 IpLen:20 DgmLen:159 DF [**] [122:1:0] (portscan) TCP Portscan [**] 11/16-16:15:49.858702 192.168.15.1 -> 192.168.15.2 PROTO255 TTL:0 TOS:0x10 ID:55670 IpLen:20 DgmLen:164 DF |
#find / -name acidbase.conf
/etc/dbconfig-common/acidbase.conf find: /proc/18368/fd: No such file or directory find: /proc/18370/fd: No such file or directory find: /proc/19267/fd: No such file or directory find: /proc/19412/fd: No such file or directory find: /proc/19430/fd: No such file or directory find: /proc/19435/fd: No such file or directory find: /proc/20325/fd: No such file or directory |
#/etc/init.d/apache2 restart
Forcing reload of web server (apache2)...Syntax error on line 8 of /etc/apache2/conf.d/acidbase.conf: Invalid command 'dbc_install="true"', perhaps misspelled or defined by a module not included in the server configuration failed! |
#find / -name acidbase.conf
/etc/apache2/conf.d/acidbase.conf /etc/dbconfig-common/acidbase.conf find: /proc/18368/fd: No such file or directory find: /proc/18370/fd: No such file or directory find: /proc/19267/fd: No such file or directory find: /proc/19412/fd: No such file or directory find: /proc/19430/fd: No such file or directory find: /proc/19435/fd: No such file or directory find: /proc/20325/fd: No such file or directory |
#/etc/init.d/apache2 restart
[root@linux2:etc]# 35 # Umask to use while executing [root@linux2:etc]# oinkmaster -o /etc/snort/rules/ 36 umask = 0027 Loading /etc/oinkmaster.conf 37 Downloading file from http://www.snort.org/pub-bin/oinkmaster.cgi/*oinkcode*/s 38 nortrules-snapshot-2.3.tar.gz... 39 # -------------------- ... 46 # Normally you shouldn't need to change this one. 47 # (But if you do, make sure it's still a valid regexp.) 48 update_files = \.rules$|\.config$|\.conf$|\.txt$|\.map$ 49 50 51 # Regexp of keywords that starts a snort rule. "oinkmaster.conf" 166L, 8033C written [root@linux2:etc]# Forcing reload of web server (apache2)...httpd (no pid file) not running . |
#ssh -2 192.168.15.1
Loading /etc/oinkmaster.conf 37 Downloading file from http://www.snort.org/pub-bin/oinkmaster.cgi/*oinkcode*/s 38 nortrules-snapshot-2.3.tar.gz... 39 # -------------------- /usr/sbin/oinkmaster: Error: could not download from http://www.snort.org/pub- 40 # Extra configuration bin/oinkmaster.cgi/*oinkcode*/snortrules-snapshot-2.3.tar.gz. Output from wget 41 # -------------------- ... 48 update_files = \.rules$|\.config$|\.conf$|\.txt$|\.map$ 49 50 51 # Regexp of keywords that starts a snort rule. "oinkmaster.conf" 166L, 8033C written [root@linux2:etc]# Password: Password: Password: Permission denied (publickey,keyboard-interactive). |
#ssh -2 192.168.15.1
Password: Password: |
#tcpdump -i eth0 -n not port 22
16:18:08.681341 IP 217.27.159.217.18030 > 192.168.15.2.46457: . ack 1680 win 2896 <nop,nop,timestamp 489670646 11145522> 16:18:08.690377 IP 217.27.159.217.18030 > 192.168.15.2.46457: F 1:1(0) ack 1681 win 2896 <nop,nop,timestamp 489670648 11145524> 16:18:08.690456 IP 192.168.15.2.46457 > 217.27.159.217.18030: . ack 2 win 5840 <nop,nop,timestamp 11145528 489670648> 16:18:13.494459 arp who-has 192.168.15.2 tell 192.168.15.254 16:18:13.494526 arp reply 192.168.15.2 is-at 00:04:76:a1:f2:5a 16:18:14.150403 IP 192.168.15.1.60939 > 192.168.15.2.25: . ack 0 win 65535 16:18:14.150501 IP 192.168.15.2.25 > 192.168.15.1.60939: R 0:0(0) win 0 16:18:14.211432 IP 192.168.15.1.54166 > 192.168.15.2.37: . ack 0 win 65535 16:18:14.211525 IP 192.168.15.2.37 > 192.168.15.1.54166: R 0:0(0) win 0 16:18:14.271553 IP 192.168.15.1.35392 > 192.168.15.2.37: . ack 0 win 65535 ... 16:18:14.304079 IP 192.168.15.2.33528 > 192.168.15.1.20456: R 0:0(0) win 0 16:18:14.318529 IP 192.168.15.1.55343 > 192.168.15.2.22566: . ack 0 win 65535 16:18:14.318606 IP 192.168.15.2.22566 > 192.168.15.1.55343: R 0:0(0) win 0 16:18:16.262840 00:0a:01:d4:d1:39 > ff:ff:ff:ff:ff:ff, ethertype Unknown (0x88a2), length 60: 0x0000: 1000 ffff ff01 0000 0000 0000 0000 0000 ................ 0x0010: 0000 0303 0303 0303 0303 0303 0303 0303 ................ 0x0020: 0303 0303 0303 0303 0303 0303 0303 .............. 425 packets captured 747 packets received by filter 322 packets dropped by kernel |
#ssh 192.168.15.1
Loading /etc/oinkmaster.conf 37 Downloading file from http://www.snort.org/pub-bin/oinkmaster.cgi/*oinkcode*/s 38 nortrules-snapshot-2.3.tar.gz... 39 # -------------------- /usr/sbin/oinkmaster: Error: could not download from http://www.snort.org/pub- 40 # Extra configuration bin/oinkmaster.cgi/*oinkcode*/snortrules-snapshot-2.3.tar.gz. Output from wget 41 # -------------------- ... 48 update_files = \.rules$|\.config$|\.conf$|\.txt$|\.map$ 49 50 51 # Regexp of keywords that starts a snort rule. "oinkmaster.conf" 166L, 8033C written [root@linux2:etc]# Password: Password: Last login: Wed Nov 15 17:18:52 2006 from linux2.linux.nt l3-agent is already running: pid=1667; pidfile=/root/.lilalo/l3-agent.pid |
#tail -f /var/log/snort/alert
PROTO255 TTL:0 TOS:0x10 ID:55670 IpLen:20 DgmLen:164 DF [**] [122:1:0] (portscan) TCP Portscan [**] 11/16-16:17:09.573430 192.168.15.1 -> 192.168.15.2 PROTO255 TTL:0 TOS:0x10 ID:56373 IpLen:20 DgmLen:163 DF [**] [122:1:0] (portscan) TCP Portscan [**] 11/16-16:18:26.536807 192.168.15.1 -> 192.168.15.2 PROTO255 TTL:0 TOS:0x10 ID:0 IpLen:20 DgmLen:161 DF [**] [122:17:0] (portscan) UDP Portscan [**] 11/16-16:18:59.678064 192.168.15.1 -> 192.168.15.2 PROTO255 TTL:0 TOS:0x10 ID:0 IpLen:20 DgmLen:161 DF [**] [122:1:0] (portscan) TCP Portscan [**] 11/16-16:19:54.429408 192.168.15.1 -> 192.168.15.2 PROTO255 TTL:0 TOS:0x10 ID:56754 IpLen:20 DgmLen:161 DF |
#ps axu
user 22917 0.0 0.0 1716 484 pts/19 Ss+ 16:12 0:00 script -f -q /home/user/.lilalo//150631155749071481-116 user 22959 0.0 0.1 1720 592 pts/19 S+ 16:12 0:00 script -f -q /home/user/.lilalo//150631155749071481-116 user 22960 0.0 0.5 4188 2716 pts/20 Ss 16:12 0:00 bash -i root 22991 0.0 0.0 1400 420 pts/20 S+ 16:12 0:00 script -f -q /root/.lilalo//1954813381521817374-1163686 root 23029 0.0 0.1 1408 516 pts/20 S+ 16:12 0:00 script -f -q /root/.lilalo//1954813381521817374-1163686 root 23030 0.0 0.4 3268 2248 pts/21 Ss 16:12 0:00 bash -i root 23058 0.0 0.5 5024 2592 pts/21 S+ 16:12 0:00 mc root 23060 0.0 0.0 1400 420 pts/22 Ss+ 16:12 0:00 script -f -q /root/.lilalo//19490171422427113745-116368 root 23100 0.0 0.1 1408 516 pts/22 S+ 16:12 0:00 script -f -q /root/.lilalo//19490171422427113745-116368 root 23101 0.0 0.4 3268 2236 pts/23 Ss+ 16:12 0:00 bash -i root 23218 0.0 0.4 3600 2324 pts/21 S+ 16:16 0:00 vi acidbase.conf root 23277 0.0 0.3 3896 1784 pts/13 S+ 16:17 0:00 ssh 192.168.15.1 root 23299 0.0 0.0 1740 464 pts/12 S+ 16:18 0:00 tail -f /var/log/snort/alert user 23302 0.2 1.7 26484 8872 ? S 16:18 0:00 kdeinit: kio_http http /tmp/ksocket-user/klauncherWCQjU root 23317 0.3 1.1 18492 5936 ? Ss 16:18 0:00 /usr/sbin/apache2 -k start www-data 23327 0.0 1.1 18492 5952 ? S 16:18 0:00 /usr/sbin/apache2 -k start www-data 23328 0.0 1.1 18492 5952 ? S 16:18 0:00 /usr/sbin/apache2 -k start www-data 23329 0.0 1.1 18492 5952 ? S 16:18 0:00 /usr/sbin/apache2 -k start www-data 23330 0.0 1.1 18492 5952 ? S 16:18 0:00 /usr/sbin/apache2 -k start www-data 23331 0.0 1.1 18492 5952 ? S 16:18 0:00 /usr/sbin/apache2 -k start root 23334 0.0 0.1 2396 848 pts/16 R+ 16:19 0:00 ps axu |
#cd /etc
|
#ls
Community-Rules-CURRENT.tar.gz defoma host.conf mc python2.4 Muttrc deluser.conf hostname mdadm rc0.d X11 dev.d hosts mediaprm rc1.d acid devfs hosts.allow menu-methods rc2.d acidlab dhclient-script hosts.deny mime.types rc3.d adduser.conf dhclient.conf hotplug mkinitrd rc4.d adjtime dictionaries-common hotplug.d modprobe.d rc5.d aliases dirmngr identd.conf modules rc6.d alternatives discover.conf identd.key modules.conf rcS.d apache2 discover.conf-2.6 imlib modules.conf.old reportbug.conf ... csh.login groff logrotate.conf perl terminfo csh.logout group logrotate.d php4 timezone cups group- lsb-base php5 ucf.conf cvs-cron.conf gs-gpl lynx.cfg pmount.allow udev cvs-pserver.conf gshadow magic ppp updatedb.conf dbconfig-common gshadow- mail.rc printcap vim dbus-1 gtk mailcap profile w3m debconf.conf gtk-2.0 mailcap.order protocols wgetrc debian_version hal mailname python xdg default honeypot manpath.config python2.3 xml |
#cd /var/www
|
#ls -la
total 7 drwxr-xr-x 6 root root 1024 Nov 16 15:23 . drwxr-xr-x 15 root root 1024 Nov 13 16:27 .. drwxrwxr-x 11 www-data www-data 2048 Nov 16 16:05 acidbase drwxr-xr-x 2 root root 1024 Nov 13 16:27 apache2-default drwxr-xr-x 6 root root 1024 Jun 16 2005 phpsyslogng drwxr-xr-x 2 root root 1024 Nov 13 16:35 test |
#cd acidbase
|
#ls
admin base_denied.php base_maintenance.php base_stat_common.php help base_ag_common.php base_footer.php base_payload.php base_stat_ipaddr.php images base_ag_main.php base_graph_common.php base_qry_alert.php base_stat_iplink.php includes base_common.php base_graph_display.php base_qry_common.php base_stat_ports.php index.php base_conf.php base_graph_form.php base_qry_form.php base_stat_sensor.php languages base_conf.php.dist base_graph_main.php base_qry_main.php base_stat_time.php scripts base_conf.php.old base_hdr1.php base_qry_sqlcalls.php base_stat_uaddr.php setup base_db_common.php base_hdr2.php base_stat_alerts.php base_user.php styles base_db_setup.php base_main.php base_stat_class.php contrib |
#rm ./base_conf.php
[root@linux2:etc]# 33 # TMPDIR or TEMPDIR, or otherwise use "/tmp" if none of them was set. 34 tmpdir = /var/run/oinkmaster [root@linux2:etc]# 35 # Umask to use while executing [root@linux2:etc]# oinkmaster -o /etc/snort/rules/ 36 umask = 0027 Loading /etc/oinkmaster.conf 37 Downloading file from http://www.snort.org/pub-bin/oinkmaster.cgi/*oinkcode*/s ... 44 # You can then choose to skip individual files by specifying 45 # the "skipfile" keyword below. 46 # Normally you shouldn't need to change this one. 47 # (But if you do, make sure it's still a valid regexp.) 48 update_files = \.rules$|\.config$|\.conf$|\.txt$|\.map$ 49 50 51 # Regexp of keywords that starts a snort rule. "oinkmaster.conf" 166L, 8033C written [root@linux2:etc]# |
#cd /usr/share
[root@linux2:etc]# 33 # TMPDIR or TEMPDIR, or otherwise use "/tmp" if none of them was set. 34 tmpdir = /var/run/oinkmaster [root@linux2:etc]# 35 # Umask to use while executing [root@linux2:etc]# oinkmaster -o /etc/snort/rules/ 36 umask = 0027 Loading /etc/oinkmaster.conf 37 Downloading file from http://www.snort.org/pub-bin/oinkmaster.cgi/*oinkcode*/s ... 44 # You can then choose to skip individual files by specifying 45 # the "skipfile" keyword below. 46 # Normally you shouldn't need to change this one. 47 # (But if you do, make sure it's still a valid regexp.) 48 update_files = \.rules$|\.config$|\.conf$|\.txt$|\.map$ 49 50 51 # Regexp of keywords that starts a snort rule. "oinkmaster.conf" 166L, 8033C written [root@linux2:etc]# |
#tcpdump -i eth0 -n not port 22
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on eth0, link-type EN10MB (Ethernet), capture size 96 bytes 16:20:24.396731 IP 192.168.15.1.10101 > 192.168.15.2.19905: . ack 0 win 65535 16:20:24.396808 IP 192.168.15.2.19905 > 192.168.15.1.10101: R 0:0(0) win 0 16:20:24.448183 IP 192.168.15.1.56120 > 192.168.15.2.113: . ack 0 win 65535 16:20:24.448263 IP 192.168.15.2.113 > 192.168.15.1.56120: R 0:0(0) win 0 16:20:24.505101 IP 192.168.15.1.36593 > 192.168.15.2.12512: . ack 0 win 65535 16:20:24.505191 IP 192.168.15.2.12512 > 192.168.15.1.36593: R 0:0(0) win 0 16:20:24.520246 IP 192.168.15.1.54006 > 192.168.15.2.32916: . ack 0 win 65535 16:20:24.520317 IP 192.168.15.2.32916 > 192.168.15.1.54006: R 0:0(0) win 0 ... 16:20:28.932082 IP 192.168.15.2.46467 > 217.27.159.217.18030: . 1:1449(1448) ack 1 win 5840 <nop,nop,timestamp 11159552 489705695> 16:20:28.932121 IP 192.168.15.2.46467 > 217.27.159.217.18030: P 1449:1800(351) ack 1 win 5840 <nop,nop,timestamp 11159552 489705695> 16:20:28.950790 IP 192.168.15.2.46467 > 217.27.159.217.18030: F 1800:1800(0) ack 1 win 5840 <nop,nop,timestamp 11159554 489705695> 16:20:28.969067 IP 217.27.159.217.18030 > 192.168.15.2.46467: . ack 1449 win 2172 <nop,nop,timestamp 489705717 11159552> 16:20:28.969429 IP 217.27.159.217.18030 > 192.168.15.2.46467: . ack 1800 win 2896 <nop,nop,timestamp 489705717 11159552> 16:20:28.981254 IP 217.27.159.217.18030 > 192.168.15.2.46467: F 1:1(0) ack 1801 win 2896 <nop,nop,timestamp 489705720 11159554> 16:20:28.981331 IP 192.168.15.2.46467 > 217.27.159.217.18030: . ack 2 win 5840 <nop,nop,timestamp 11159557 489705720> 35 packets captured 35 packets received by filter 0 packets dropped by kernel |
#ls
AbiSuite-2.2 desktop-directories gnome-sound-recorder linda scrollkeeper ImageMagick-6.2.4 dia gnome-system-log lintian services X11 dict gnome-system-tools locale servicetypes acidbase dictionaries-common gnome-utils lua setup-tool-backends acidbaseold discover gnome-volume-manager mailx sgml acidlab doc gnomemeeting man sgml-base aclocal doc-base gnumeric man-db sgml-data adduser dpkg gnupg mc snmp alsa dsniff goffice menu sounds apache2 e2fsprogs gpdf mime stickynotes ... consolefonts gimp inkscape planner xml consoletrans gksu john ppp xml-core control-center-2.0 gnome keymaps pycentral-data xmms cowsay gnome-2.0 keyrings python xmodmap dbconfig-common gnome-2.2 libgda python-support xscreensaver dbus-1 gnome-about libgksu qt3 xsessions debconf gnome-cups-manager libgksuui1.0 readline zenity debhelper gnome-media libgnomeprint reportbug zoneinfo defoma gnome-nettool libgnomeprintui rhythmbox desktop-base gnome-pilot libgphoto2 screen |
#ls|less
|
#tail -f /var/log/snort/alert
PROTO255 TTL:0 TOS:0x10 ID:0 IpLen:20 DgmLen:161 DF [**] [122:1:0] (portscan) TCP Portscan [**] 11/16-16:19:54.429408 192.168.15.1 -> 192.168.15.2 PROTO255 TTL:0 TOS:0x10 ID:56754 IpLen:20 DgmLen:161 DF [**] [122:17:0] (portscan) UDP Portscan [**] 11/16-16:20:24.783349 192.168.15.1 -> 192.168.15.2 PROTO255 TTL:0 TOS:0xD0 ID:27368 IpLen:20 DgmLen:160 |
#perl /root/sneeze.pl -d 192.168.15.1 -f /etc/snort/
# Temporary directory to use. The default configuration only allows # root to update the ruleset. # Note: If commented out will check environment variables TMP, # TMPDIR or TEMPDIR, or otherwise use "/tmp" if none of them was set. tmpdir = /var/run/oinkmaster # Umask to use while executing umask = 0027 # -------------------- # Extra configuration # -------------------- ... # You can then choose to skip individual files by specifying # the "skipfile" keyword below. # Normally you shouldn't need to change this one. # (But if you do, make sure it's still a valid regexp.) update_files = \.rules$|\.config$|\.conf$|\.txt$|\.map$ # Regexp of keywords that starts a snort rule. # May be useful if you create your own ruletypes and want those classification.config rules snort.debian.conf gen-msg.map sid-msg.map threshold.conf reference.config snort.conf unicode.map |
#perl /root/sneeze.pl -d 192.168.15.1 -f /etc/snort/rules/
attack-responses.rules local.rules shellcode.rules backdoor.rules misc.rules smtp.rules bad-traffic.rules multimedia.rules snmp.rules chat.rules mysql.rules sql.rules ddos.rules netbios.rules telnet.rules deleted.rules nntp.rules tftp.rules dns.rules oracle.rules virus.rules dos.rules other-ids.rules web-attacks.rules experimental.rules p2p.rules web-cgi.rules exploit.rules policy.rules web-client.rules finger.rules pop2.rules web-coldfusion.rules ftp.rules pop3.rules web-frontpage.rules icmp-info.rules porn.rules web-iis.rules icmp.rules rpc.rules web-misc.rules imap.rules rservices.rules web-php.rules info.rules scan.rules x11.rules |
#ls
admin base_denied.php base_main.php base_stat_alerts.php base_stat_uaddr.php scripts base_ag_common.php base_footer.php base_maintenance.php base_stat_class.php base_user.php setup base_ag_main.php base_graph_common.php base_payload.php base_stat_common.php contrib styles base_common.php base_graph_display.php base_qry_alert.php base_stat_ipaddr.php help base_conf.php base_graph_form.php base_qry_common.php base_stat_iplink.php images base_conf.php.dist base_graph_main.php base_qry_form.php base_stat_ports.php includes base_db_common.php base_hdr1.php base_qry_main.php base_stat_sensor.php index.php base_db_setup.php base_hdr2.php base_qry_sqlcalls.php base_stat_time.php languages |
#cd ..
|
#cd php
|
#ls
Archive Console Image OS PEAR PEAR.php System.php adodb data doc pearcmd.php peclcmd.php |
#apt-get install libnet-rawip-perl
# checked for changes, and then updated or added if needed. # You can then choose to skip individual files by specifying # the "skipfile" keyword below. # Normally you shouldn't need to change this one. # (But if you do, make sure it's still a valid regexp.) update_files = \.rules$|\.config$|\.conf$|\.txt$|\.map$ # Regexp of keywords that starts a snort rule. # May be useful if you create your own ruletypes and want those Reading package lists... Done Building dependency tree... Done ... After unpacking 225kB of additional disk space will be used. WARNING: The following packages cannot be authenticated! libnet-rawip-perl Install these packages without verification [y/N]? Y Get: 1 http://debian.org.ua unstable/main libnet-rawip-perl 0.20-2 [69.3kB] Fetched 69.3kB in 0s (149kB/s) Selecting previously deselected package libnet-rawip-perl. (Reading database ... 77426 files and directories currently installed.) Unpacking libnet-rawip-perl (from .../libnet-rawip-perl_0.20-2_i386.deb) ... Setting up libnet-rawip-perl (0.20-2) ... |
#ls -la
total 7 drwxr-xr-x 6 root root 1024 Nov 16 15:23 . drwxr-xr-x 15 root root 1024 Nov 13 16:27 .. drwxrwxr-x 11 www-data www-data 2048 Nov 16 16:21 acidbase drwxr-xr-x 2 root root 1024 Nov 13 16:27 apache2-default drwxr-xr-x 6 root root 1024 Jun 16 2005 phpsyslogng drwxr-xr-x 2 root root 1024 Nov 13 16:35 test |
#cd acidbase
|
#ls
admin base_denied.php base_maintenance.php base_stat_common.php help base_ag_common.php base_footer.php base_payload.php base_stat_ipaddr.php images base_ag_main.php base_graph_common.php base_qry_alert.php base_stat_iplink.php includes base_common.php base_graph_display.php base_qry_common.php base_stat_ports.php index.php base_conf.php base_graph_form.php base_qry_form.php base_stat_sensor.php languages base_conf.php.dist base_graph_main.php base_qry_main.php base_stat_time.php scripts base_conf.php.old base_hdr1.php base_qry_sqlcalls.php base_stat_uaddr.php setup base_db_common.php base_hdr2.php base_stat_alerts.php base_user.php styles base_db_setup.php base_main.php base_stat_class.php contrib |
#cd languages
|
#ls
chinese.lang.php finnish.lang.php indonesian.lang.php polish.lang.php simplified_chinese.lang.php czech.lang.php french.lang.php italian.lang.php portuguese-PT.lang.php spanish.lang.php danish.lang.php german.lang.php japanese.lang.php portuguese.lang.php swedish.lang.php english.lang.php index.php norwegian.lang.php russian.lang.php turkish.lang.php |
#cd .
|
#cd ..
|
#vi base_conf.php
27c27 < $BASE_Language = 'english'; --- > $BASE_Language = 'russian'; 364c364 < ?> \ No newline at end of file --- > ?> |
#less base_conf.php
|
#perl /root/sneeze.pl
tmpdir = /var/run/oinkmaster # Umask to use while executing umask = 0027 # -------------------- # Extra configuration # -------------------- # Files in the archive matching this regular expression will be # checked for changes, and then updated or added if needed. # You can then choose to skip individual files by specifying # the "skipfile" keyword below. ... update_files = \.rules$|\.config$|\.conf$|\.txt$|\.map$ # Regexp of keywords that starts a snort rule. # May be useful if you create your own ruletypes and want those Usage /root/sneeze.pl -d <dest host> -f <rule file> [options] -c count Loop X times. -1 == forever. Default is 1. -s ip Spoof this IP as source. Default is your IP. -p port Force use of this source port. -i interface Outbound interface. Default is eth0. -x debug Turn on debugging information. -h help Duh? This is it. |
#perl /root/sneeze.pl -d 192.168.15.1 -s 192.168.15.2 -f /
tc/snort/rules/mys ATTACK: :35491 -> 192.168.15.1:17309 ATTACK: MYSQL root login attempt ATTACK TYPE: protocol-command-decode tcp :28497 -> 192.168.15.1:3306 ATTACK: MYSQL show databases attempt ATTACK TYPE: protocol-command-decode tcp :41873 -> 192.168.15.1:3306 ATTACK: MYSQL 4.0 root login attempt ATTACK TYPE: protocol-command-decode tcp :44381 -> 192.168.15.1:3306 |
#telnet 192.168.15.2 3306
use_external_bins = 1 # Temporary directory to use. The default configuration only allows # root to update the ruleset. # Note: If commented out will check environment variables TMP, # TMPDIR or TEMPDIR, or otherwise use "/tmp" if none of them was set. tmpdir = /var/run/oinkmaster # Umask to use while executing umask = 0027 # -------------------- # Extra configuration ... # checked for changes, and then updated or added if needed. # You can then choose to skip individual files by specifying # the "skipfile" keyword below. # Normally you shouldn't need to change this one. # (But if you do, make sure it's still a valid regexp.) update_files = \.rules$|\.config$|\.conf$|\.txt$|\.map$ # Regexp of keywords that starts a snort rule. # May be useful if you create your own ruletypes and want those Trying 192.168.15.2... telnet: Unable to connect to remote host: Connection refused |
#telnet 192.168.15.1 3306
Trying 192.168.15.1... telnet: Unable to connect to remote host: Connection refused |
#ls
1.txt dbootstrap_settings log.ecp sneeze.pl base install-report.template nohup.out test-syslog.sh base-1.2.6.tar john.pot phpsyslogng-2.6.tar cisco-show-run log.eci restore |
#less sneeze.pl
|
#ls
Community-Rules-CURRENT.tar.gz defoma host.conf mc python2.4 Muttrc deluser.conf hostname mdadm rc0.d X11 dev.d hosts mediaprm rc1.d acid devfs hosts.allow menu-methods rc2.d acidlab dhclient-script hosts.deny mime.types rc3.d adduser.conf dhclient.conf hotplug mkinitrd rc4.d adjtime dictionaries-common hotplug.d modprobe.d rc5.d aliases dirmngr identd.conf modules rc6.d alternatives discover.conf identd.key modules.conf rcS.d apache2 discover.conf-2.6 imlib modules.conf.old reportbug.conf ... csh.login groff logrotate.conf perl terminfo csh.logout group logrotate.d php4 timezone cups group- lsb-base php5 ucf.conf cvs-cron.conf gs-gpl lynx.cfg pmount.allow udev cvs-pserver.conf gshadow magic ppp updatedb.conf dbconfig-common gshadow- mail.rc printcap vim dbus-1 gtk mailcap profile w3m debconf.conf gtk-2.0 mailcap.order protocols wgetrc debian_version hal mailname python xdg default honeypot manpath.config python2.3 xml |
#cd acidbase
bash: cd: acidbase: No such file or directory |
#cd /var/www
|
#cd acidbase
|
#ls
admin base_denied.php base_maintenance.php base_stat_common.php help base_ag_common.php base_footer.php base_payload.php base_stat_ipaddr.php images base_ag_main.php base_graph_common.php base_qry_alert.php base_stat_iplink.php includes base_common.php base_graph_display.php base_qry_common.php base_stat_ports.php index.php base_conf.php base_graph_form.php base_qry_form.php base_stat_sensor.php languages base_conf.php.dist base_graph_main.php base_qry_main.php base_stat_time.php scripts base_conf.php.old base_hdr1.php base_qry_sqlcalls.php base_stat_uaddr.php setup base_db_common.php base_hdr2.php base_stat_alerts.php base_user.php styles base_db_setup.php base_main.php base_stat_class.php contrib |
#less base_conf.php
|
#tail -f /var/log/snort/alert
***A**** Seq: 0x0 Ack: 0x0 Win: 0xFFFF TcpLen: 20 [Xref => http://rr.sans.org/firewall/egress.php] [**] [1:528:5] BAD-TRAFFIC loopback traffic [**] [Classification: Potentially Bad Traffic] [Priority: 2] 11/16-16:28:17.600154 127.0.0.1:54394 -> 192.168.15.1:3306 TCP TTL:64 TOS:0x10 ID:0 IpLen:20 DgmLen:46 DF ***A**** Seq: 0x0 Ack: 0x0 Win: 0xFFFF TcpLen: 20 [Xref => http://rr.sans.org/firewall/egress.php] q |
#less /etc/snort/snort.log
|
#less /etc/snort/snort.conf
|
#mc -a
|
#screen -x
|
#/etc/init.d/snort restart
Stopping Network Intrusion Detection System: snort(eth0). Starting Network Intrusion Detection System: snort(eth0)No /etc/snort/snort.eth0.conf, defaulting to snort.conf . |
#cd /etc/snort
|
#ps ax
240 ? S 0:00 [kjournald] 241 ? S 0:00 [kjournald] 242 ? S 0:00 [kjournald] 368 ? S<s 0:00 udevd 462 ? S 0:00 [khubd] 857 ? S 0:00 [usb-storage-0] 859 ? S 0:00 [scsi_eh_1] 1021 ? Ss 0:00 /sbin/portmap 1341 ? Ss 0:00 /usr/bin/dbus-daemon-1 --system 1378 ? Ss 0:00 /usr/bin/dirmngr --daemon --sh ... 25055 ? S 0:00 kdeinit: kio_http http /tmp/ksocket-user/klauncherWCQjUb.slave-socket /tmp/ksocket-user/konquerorHTTAya.slave-sock 25056 ? Z 0:00 [kdeinit] <defunct> 25058 ? S 0:00 kdeinit: kio_http http /tmp/ksocket-user/klauncherWCQjUb.slave-socket /tmp/ksocket-user/konquerorHTTAya.slave-sock 25059 ? Z 0:00 [kdeinit] <defunct> 25061 ? Z 0:00 [kdeinit] <defunct> 25062 ? Z 0:00 [kdeinit] <defunct> 25069 ? Z 0:00 [kdeinit] <defunct> 25075 ? Z 0:00 [kdeinit] <defunct> 25083 ? Z 0:00 [kdeinit] <defunct> 25123 pts/3 R+ 0:00 ps ax |
#ps ax
24536 ? Ss 0:27 /usr/sbin/snort -m 027 -D -d -l /var/log/snort -u snort -g snort -c /etc/snort/snort.conf - 24808 pts/12 S+ 0:00 screen -x 25041 ? Z 0:00 [kdeinit] <defunct> 25045 ? Z 0:00 [kdeinit] <defunct> 25046 ? Z 0:00 [kdeinit] <defunct> 25049 ? Z 0:00 [kdeinit] <defunct> 25051 ? Z 0:00 [kdeinit] <defunct> 25052 ? Z 0:00 [kdeinit] <defunct> 25054 ? Z 0:00 [kdeinit] <defunct> 25055 ? S 0:00 kdeinit: kio_http http /tmp/ksocket-user/klauncherWCQjUb.slave-socket /tmp/ksocket-user/kon ... 25075 ? Z 0:00 [kdeinit] <defunct> 25083 ? Z 0:00 [kdeinit] <defunct> 25145 ? R 0:00 kdeinit: konsole 25147 pts/1 Ss+ 0:00 script -f -q /home/user/.lilalo//7354231162905311971-1163690285.script 25189 pts/1 S+ 0:00 script -f -q /home/user/.lilalo//7354231162905311971-1163690285.script 25190 pts/2 Ss 0:00 bash -i 25221 pts/2 S+ 0:00 script -f -q /root/.lilalo//2867729956672223263-1163690296.script 25262 pts/2 S+ 0:00 script -f -q /root/.lilalo//2867729956672223263-1163690296.script 25263 pts/3 Ss 0:00 bash -i 25291 pts/3 R+ 0:00 ps ax |
#kill -9 24808
|
#ps ax
2 ? S 0:00 [keventd] 3 ? SN 0:00 [ksoftirqd_CPU0] 4 ? S 0:01 [kswapd] 5 ? S 0:00 [bdflush] 6 ? S 0:00 [kupdated] 99 ? S 0:00 [kjournald] 239 ? S 0:00 [kjournald] 240 ? S 0:00 [kjournald] 241 ? S 0:00 [kjournald] 242 ? S 0:00 [kjournald] ... 25075 ? Z 0:00 [kdeinit] <defunct> 25083 ? Z 0:00 [kdeinit] <defunct> 25145 ? S 0:00 kdeinit: konsole 25147 pts/1 Ss+ 0:00 script -f -q /home/user/.lilalo//7354231162905311971-1163690285.script 25189 pts/1 S+ 0:00 script -f -q /home/user/.lilalo//7354231162905311971-1163690285.script 25190 pts/2 Ss 0:00 bash -i 25221 pts/2 S+ 0:00 script -f -q /root/.lilalo//2867729956672223263-1163690296.script 25262 pts/2 S+ 0:00 script -f -q /root/.lilalo//2867729956672223263-1163690296.script 25263 pts/3 Ss 0:00 bash -i 25325 pts/3 R+ 0:00 ps ax |
#kill -9 24184
bash: kill: (24184) - No such process |
#screen -x
|
#kill -9 24184
bash: kill: (24184) - No such process |
#ps ax
PID TTY STAT TIME COMMAND 1 ? S 0:00 init [2] 2 ? S 0:00 [keventd] 3 ? SN 0:00 [ksoftirqd_CPU0] 4 ? S 0:01 [kswapd] 5 ? S 0:00 [bdflush] 6 ? S 0:00 [kupdated] 99 ? S 0:00 [kjournald] 239 ? S 0:00 [kjournald] 240 ? S 0:00 [kjournald] ... 25075 ? Z 0:00 [kdeinit] <defunct> 25083 ? Z 0:00 [kdeinit] <defunct> 25145 ? S 0:01 kdeinit: konsole 25147 pts/1 Ss+ 0:00 script -f -q /home/user/.lilalo//7354231162905311971-1163690285.script 25189 pts/1 S+ 0:00 script -f -q /home/user/.lilalo//7354231162905311971-1163690285.script 25190 pts/2 Ss 0:00 bash -i 25221 pts/2 S+ 0:00 script -f -q /root/.lilalo//2867729956672223263-1163690296.script 25262 pts/2 S+ 0:00 script -f -q /root/.lilalo//2867729956672223263-1163690296.script 25263 pts/3 Ss 0:00 bash -i 25367 pts/3 R+ 0:00 ps ax |
#whoami
root |
Время первой команды журнала | 16:08:43 2006-11-16 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 17:19:37 2006-11-16 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 101 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 22.77 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 0.99 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 1.18 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 1.42 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду 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