国产一级一区二区_segui88久久综合9999_97久久夜色精品国产_欧美色网一区二区

掃一掃
關注微信公眾號

Linux環境下黑客常用嗅探器分析
2005-12-05   

本文對Linux環境下黑客常常使用的幾種嗅探器進行詳細的分析,這些嗅探器往往被入侵者完成入侵以后種植在受害者服務器當中。這些嗅探器各自有不同的特點,有的只是簡單的用來捕捉用戶名和密碼,有的則非常強大可記錄所有的網絡數據流。本文將對幾種嗅探器進行分析。(2002-09-16 13:41:20)
----------------------------------------------------------------------
1.概述
本文對Linux環境下黑客常常使用的幾種嗅探器進行詳細的分析,這些嗅探器往往被入侵者完成入侵以后種植在受害者服務器當中。這些嗅探器各自有不同的特點,有的只是簡單的用來捕捉用戶名和密碼,有的則非常強大可記錄所有的網絡數據流。本文將對下面幾種嗅探器進行分析:
linsniffer
linuxsniffer
hunt
sniffit
2.linsniffer
linsniffer是一個簡單實用的嗅探器。它主要的功能特點是用來捕捉用戶名和密碼,它在這方面非常出色。
??作者:Mike Edulla
??條件: C和IP頭文件
??配置文件:無
??位置: http://agape.trilidun.org/hack/network-sniffers/linsnifferc
??安全歷史: 無
注: 易于使用。但是lnsniffer需要完整的IP頭文件,包括常常存儲在/usr/include/net和 /usr/include/netinet的頭文件,在編譯前確保PATH變量包含/usr/include。
使用下面的命令來編譯lnsniffer:
??$cc linsniffer.c -o linsniffer
要運行linsniffer,使用下面的命令:
??$linsniffer
啟動以后linsniffer將創建一個空文件:tcp.log來存儲嗅探結果。
在測試中我創建一個名為hapless的用戶,密碼為unaware。然后使用該用戶來登錄Linux服務器,并進行一些常見的用戶操作。下面是進行的一次ftp過程:
??GNSS $ ftp 192.168.0.2
??Connected to 192.168.0.2.
??220 linux.test.net FTP server Wed Aug 19 02:55:52 MST 1998) ready.
??Name (192.168.0.2:root): hapless
??331 Password required for hapless.
??Password:
??230 User hapless logged in.
??Remote system type is UNIX.
??Using binary mode to transfer files.
??ftp> ls -al
??200 PORT command successful.
??150 Opening ASCII mode data connection for /bin/ls.
??total 14
??drwxrwxr-x 4 hapless hapless 1024 May 20 19:35 .
??drwxr-xr-x 6 root root 1024 May 20 19:28 ..
??-rw-rw-r-- 1 hapless hapless 96 May 20 19:56 .bash_history
??-rw-r--r-- 1 hapless hapless 49 Nov 25 1997 .bash_logout
??-rw-r--r-- 1 hapless hapless 913 Nov 24 1997 .bashrc
??-rw-r--r-- 1 hapless hapless 650 Nov 24 1997 .cshrc
??-rw-r--r-- 1 hapless hapless 111 Nov 3 1997 .inputrc
??-rwxr-xr-x 1 hapless hapless 186 Sep 1 1998 .kshrc
??-rw-r--r-- 1 hapless hapless 392 Jan 7 1998 .login
??-rw-r--r-- 1 hapless hapless 51 Nov 25 1997 .logout
??-rw-r--r-- 1 hapless hapless 341 Oct 13 1997 .profile
??-rwxr-xr-x 1 hapless hapless 182 Sep 1 1998 .profile.ksh
??drwxr-xr-x 2 hapless hapless 1024 May 14 12:16 .seyon
??drwxr-xr-x 3 hapless hapless 1024 May 14 12:15 lg
??226 Transfer complete.
??ftp> ls
??200 PORT command successful.
??150 Opening ASCII mode data connection for /bin/ls.
??total 14
??drwxrwxr-x 4 hapless hapless 1024 May 20 19:35 .
??drwxr-xr-x 6 root root 1024 May 20 19:28 ..
??-rw-rw-r-- 1 hapless hapless 96 May 20 19:56 .bash_history
??-rw-r--r-- 1 hapless hapless 49 Nov 25 1997 .bash_logout
??-rw-r--r-- 1 hapless hapless 913 Nov 24 1997 .bashrc
??-rw-r--r-- 1 hapless hapless 650 Nov 24 1997 .cshrc
??-rw-r--r-- 1 hapless hapless 111 Nov 3 1997 .inputrc
??-rwxr-xr-x 1 hapless hapless 186 Sep 1 1998 .kshrc
??-rw-r--r-- 1 hapless hapless 392 Jan 7 1998 .login
??-rw-r--r-- 1 hapless hapless 51 Nov 25 1997 .logout
??-rw-r--r-- 1 hapless hapless 341 Oct 13 1997 .profile
??-rwxr-xr-x 1 hapless hapless 182 Sep 1 1998 .profile.ksh
??drwxr-xr-x 2 hapless hapless 1024 May 14 12:16 .seyon
??drwxr-xr-x 3 hapless hapless 1024 May 14 12:15 lg
??226 Transfer complete.
??ftp> ls -F
??200 PORT command successful.
??150 Opening ASCII mode data connection for /bin/ls.
??total 14
??drwxrwxr-x 4 hapless hapless 1024 May 20 19:35 ./
??drwxr-xr-x 6 root root 1024 May 20 19:28 ../
??rw-rw-r-- 1 hapless hapless 96 May 20 19:56 .bash_history
??-rw-r--r-- 1 hapless hapless 49 Nov 25 1997 .bash_logout
??-rw-r--r-- 1 hapless hapless 913 Nov 24 1997 .bashrc
??-rw-r--r-- 1 hapless hapless 650 Nov 24 1997 .cshrc
??-rw-r--r-- 1 hapless hapless 111 Nov 3 1997 .inputrc
??-rwxr-xr-x 1 hapless hapless 186 Sep 1 1998 .kshrc*
??-rw-r--r-- 1 hapless hapless 392 Jan 7 1998 .login
??-rw-r--r-- 1 hapless hapless 51 Nov 25 1997 .logout
??-rw-r--r-- 1 hapless hapless 341 Oct 13 1997 .profile
??-rwxr-xr-x 1 hapless hapless 182 Sep 1 1998 .profile.ksh*
??drwxr-xr-x 2 hapless hapless 1024 May 14 12:16 .seyon/
??drwxr-xr-x 3 hapless hapless 1024 May 14 12:15 lg/
??226 Transfer complete.
??ftp> cd lg
??250 CWD command successful.
??ftp> ls -F
??200 PORT command successful.
??150 Opening ASCII mode data connection for /bin/ls.
??total 8
??drwxr-xr-x 3 hapless hapless 1024 May 14 12:15 ./
??drwxrwxr-x 4 hapless hapless 1024 May 20 19:35 ../
??rw-r--r-- 1 hapless hapless 70 Aug 22 1998 lg3_colors
??-rw-r--r-- 1 hapless hapless 629 Aug 22 1998 lg3_prefs
??-rw-r--r-- 1 hapless hapless 728 Aug 22 1998 lg3_soundPref
??-rw-r--r-- 1 hapless hapless 2024 Aug 22 1998 lg3_startup
??drwxr-xr-x 2 hapless hapless 1024 May 14 12:15 lg_layouts/
??226 Transfer complete.
??ftp> cd lg_layouts
??250 CWD command successful.
這是一個典型的用戶操作過程。現在我們看看linsniffer產生的嗅探結果:
??gnss => linux.test.net [21]
??USER hapless
??PASS unaware
??SYST
??PORT 172,16,0,1,4,192
??LIST -al
??PORT 172,16,0,1,4,193
??LIST
??PORT 172,16,0,1,4,194
??LIST -F
??CWD lg
??PORT 172,16,0,1,4,195
??LIST -F
輸出的內容是很直觀的。首先它記錄這是從GNSS到Linux主機的FTP連接:
??gnss => linux.test.net [21]
然后,linsniffer捕獲了hapless的用戶名和密碼。
??USER hapless
??PASS unaware
最后,linsniffer記錄了hapless使用的每一個命令:
??SYST
??PORT 172,16,0,1,4,192
??LIST -al
??PORT 172,16,0,1,4,193
??LIST
??PORT 172,16,0,1,4,194
??LIST -F
??CWD lg
??PORT 172,16,0,1,4,195
??LIST -F
輸出結果非常簡介并且非常適于竊聽密碼及記錄常見的活動。但是不適合于進行更加復雜的分析。這時候你也許會需要linux_sniffe。
3.linux_sniffer
linux_sniffer提供相對更復雜的探測結果。
??作者:loq
??要求:C和IP頭文件
??配置文件:無
??下載位置: http://www.ryanspc.com/sniffers/linux_sniffer.c.
??安全歷史:無
注意:linux_sniffer易于使用,但是需要完全的IP頭文件。
使用下面命令編譯linux_sniffer:
??$cc linux_sniffer.c -o linuxsniff
下面是一次telnet會話過程,同時被linux_sniffer記錄:
??GNSS 2# telnet 192.168.0.1
??Connected to 192.168.0.1.
??login: hapless
??password:
??[hapless@linux2 hapless]$ w
?? 19:55:29 up 58 min, 4 users, load average: 0.00, 0.00, 0.00
??USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT
??root tty1 7:44pm 27.00s 0.17s 0.06s -bash
??root tty2 7:46pm 1:56 0.24s 0.01s linuxsniff
??root tty3 7:44pm 10:43 0.17s 0.07s -bash
??hapless ttyp0 gnss 7:55pm 1.00s 0.26s 0.04s w
??[hapless@linux2 hapless]$ who
??root tty1 May 20 19:44
??root tty2 May 20 19:46
??root tty3 May 20 19:44
??hapless ttyp0 May 20 19:55 (gnss)
??[hapless@linux2 hapless]$ finger -l
??Login: root Name: root
??Directory: /root Shell: /bin/bash
??On since Thu May 20 19:44 (PDT) on tty1 35 seconds idle
??On since Thu May 20 19:46 (PDT) on tty2 2 minutes 4 seconds idle
??On since Thu May 20 19:44 (PDT) on tty3 10 minutes 51 seconds idle
??No mail.
??No Plan.
??Login: hapless Name: Caldera OpenLinux User
??Directory: /home/hapless Shell: /bin/bash
??On since Thu May 20 19:55 (PDT) on ttyp0 from gnss
??No mail.
??No Plan.
同樣這是一次典型的登錄過程:用戶登錄,檢測哪些用戶在登錄等等。linux_sniffer記錄額外的地址數據,但是同樣記錄了一些重要的數據。首先它記錄了連接:
eth
proto: 080008:00:69:07:3e:db->00:e0:29:19:4a:68 192.168.0.1[1239] ->192.168.0.2[23]
0000 ff fc 27 - ..'
eth
proto: 080008:00:69:07:3e:db->00:e0:29:19:4a:68 192.168.0.1[1239] ->192.168.0.2[23]
0000 ff fa 1f 00 50 00 28 ff - f0 ....P.(..
eth
proto: 080008:00:69:07:3e:db->00:e0:29:19:4a:68 192.168.0.1[1239] ->192.168.0.2[23]
0000 ff fa 20 00 33 38 34 30 - 30 2c 33 38 34 30 30 ff
.. .38400,38400.
0010 f0 ff fa 23 00 47 4e 53 - 53 3a 30 2e 30 ff f0 ff
...#.GNSS:0.0...
0020 fa 18 00 49 52 49 53 2d - 41 4e 53 49 2d 4e 45 54
...IRIS-ANSI-NET
0030 ff f0 - ..
eth
proto: 080008:00:69:07:3e:db->00:e0:29:19:4a:68 192.168.0.1[1239] ->192.168.0.2[23]
0000 ff fc 01 - ...
eth
proto: 080008:00:69:07:3e:db->00:e0:29:19:4a:68 192.168.0.1[1239] ->192.168.0.2[23]
0000 ff fd 01 - ...
eth
proto: 080008:00:69:07:3e:db->00:e0:29:19:4a:68 192.168.0.1[1239] ->192.168.0.2[23]
隨后,linux_sniffer記錄了登錄過程,下面用黑體表示:
eth
proto: 080008:00:69:07:3e:db->00:e0:29:19:4a:68 192.168.0.1[1239] ->192.168.0.2[23]
0000 68 - h
eth
proto: 080008:00:69:07:3e:db->00:e0:29:19:4a:68 192.168.0.1[1239] ->192.168.0.2[23]
eth
proto: 080008:00:69:07:3e:db->00:e0:29:19:4a:68 192.168.0.1[1239] ->192.168.0.2[23]
0000 61 - a
eth
proto: 080008:00:69:07:3e:db->00:e0:29:19:4a:68 192.168.0.1[1239] ->192.168.0.2[23]
eth
proto: 080008:00:69:07:3e:db->00:e0:29:19:4a:68 192.168.0.1[1239] ->192.168.0.2[23]
0000 70 - p
eth
proto: 080008:00:69:07:3e:db->00:e0:29:19:4a:68 192.168.0.1[1239] ->192.168.0.2[23]
0000 6c - l
eth
proto: 080008:00:69:07:3e:db->00:e0:29:19:4a:68 192.168.0.1[1239] ->192.168.0.2[23]
eth
proto: 080008:00:69:07:3e:db->00:e0:29:19:4a:68 192.168.0.1[1239] ->192.168.0.2[23]
0000 65 - e
eth
proto: 080008:00:69:07:3e:db->00:e0:29:19:4a:68 192.168.0.1[1239] ->192.168.0.2[23]
0000 73 - s
eth
proto: 080008:00:69:07:3e:db->00:e0:29:19:4a:68 192.168.0.1[1239] ->192.168.0.2[23]
eth
proto: 080008:00:69:07:3e:db->00:e0:29:19:4a:68 192.168.0.1[1239] ->192.168.0.2[23]
0000 73 - s
eth
proto: 080008:00:69:07:3e:db->00:e0:29:19:4a:68 192.168.0.1[1239] ->192.168.0.2[23]
eth
proto: 080008:00:69:07:3e:db->00:e0:29:19:4a:68 192.168.0.1[1239] ->192.168.0.2[23]
0000 0d 00 - ..
eth
proto: 080008:00:69:07:3e:db->00:e0:29:19:4a:68 192.168.0.1[1239] ->192.168.0.2[23]
eth
proto: 080008:00:69:07:3e:db->00:e0:29:19:4a:68 192.168.0.1[1239] ->192.168.0.2[23]
eth
proto: 080008:00:69:07:3e:db->00:e0:29:19:4a:68 192.168.0.1[1239] ->192.168.0.2[23]
0000 75 - u
eth
proto: 080008:00:69:07:3e:db->00:e0:29:19:4a:68 192.168.0.1[1239] ->192.168.0.2[23]
0000 6e - n
eth
proto: 080008:00:69:07:3e:db->00:e0:29:19:4a:68 192.168.0.1[1239] ->192.168.0.2[23]
0000 61 - a
eth
proto: 080008:00:69:07:3e:db->00:e0:29:19:4a:68 192.168.0.1[1239] ->192.168.0.2[23]
0000 77 - w
eth
proto: 080008:00:69:07:3e:db->00:e0:29:19:4a:68 192.168.0.1[1239] ->192.168.0.2[23]
0000 61 - a
eth
proto: 080008:00:69:07:3e:db->00:e0:29:19:4a:68 192.168.0.1[1239] ->192.168.0.2[23]
0000 72 - r
eth
proto: 080008:00:69:07:3e:db->00:e0:29:19:4a:68 192.168.0.1[1239] ->192.168.0.2[23]
0000 65 - e
eth
proto: 080008:00:69:07:3e:db->00:e0:29:19:4a:68 192.168.0.1[1239] ->192.168.0.2[23]
最后,linux_sniffer記錄了所有的命令:
eth
proto: 080008:00:69:07:3e:db->00:e0:29:19:4a:68 192.168.0.1[1239] ->192.168.0.2[23]
eth
proto: 080008:00:69:07:3e:db->00:e0:29:19:4a:68 192.168.0.1[1239] ->192.168.0.2[23]
eth
proto: 080008:00:69:07:3e:db->00:e0:29:19:4a:68 192.168.0.1[1239] ->192.168.0.2[23]
eth
proto: 080008:00:69:07:3e:db->00:e0:29:19:4a:68 192.168.0.1[1239] ->192.168.0.2[23]
0000 77 - w
eth
proto: 080008:00:69:07:3e:db->00:e0:29:19:4a:68 192.168.0.1[1239] ->192.168.0.2[23]
eth
proto: 080008:00:69:07:3e:db->00:e0:29:19:4a:68 192.168.0.1[1239] ->192.168.0.2[23]
0000 0d 00 - ..
eth
proto: 080008:00:69:07:3e:db->00:e0:29:19:4a:68 192.168.0.1[1239] ->192.168.0.2[23]
eth
proto: 080008:00:69:07:3e:db->00:e0:29:19:4a:68 192.168.0.1[1239] ->192.168.0.2[23]
eth
proto: 080008:00:69:07:3e:db->00:e0:29:19:4a:68 192.168.0.1[1239] ->192.168.0.2[23]
0000 77 - w
eth
proto: 080008:00:69:07:3e:db->00:e0:29:19:4a:68 192.168.0.1[1239] ->192.168.0.2[23]
eth
proto: 080008:00:69:07:3e:db->00:e0:29:19:4a:68 192.168.0.1[1239] ->192.168.0.2[23]
0000 68 - h
eth
proto: 080008:00:69:07:3e:db->00:e0:29:19:4a:68 192.168.0.1[1239] ->192.168.0.2[23]
eth
proto: 080008:00:69:07:3e:db->00:e0:29:19:4a:68 192.168.0.1[1239] ->192.168.0.2[23]
0000 6f - o
eth
proto: 080008:00:69:07:3e:db->00:e0:29:19:4a:68 192.168.0.1[1239] ->192.168.0.2[23]
eth
proto: 080008:00:69:07:3e:db->00:e0:29:19:4a:68 192.168.0.1[1239] ->192.168.0.2[23]
0000 0d 00 - ..
eth
proto: 080008:00:69:07:3e:db->00:e0:29:19:4a:68 192.168.0.1[1239] ->192.168.0.2[23]
eth
proto: 080008:00:69:07:3e:db->00:e0:29:19:4a:68 192.168.0.1[1239] ->192.168.0.2[23]
eth
proto: 080008:00:69:07:3e:db->00:e0:29:19:4a:68 192.168.0.1[1239] ->192.168.0.2[23]
0000 66 - f
eth
proto: 080008:00:69:07:3e:db->00:e0:29:19:4a:68 192.168.0.1[1239] ->192.168.0.2[23]
eth
proto: 080008:00:69:07:3e:db->00:e0:29:19:4a:68 192.168.0.1[1239] ->192.168.0.2[23]
0000 69 - i
eth
proto: 080008:00:69:07:3e:db->00:e0:29:19:4a:68 192.168.0.1[1239] ->192.168.0.2[23]
eth
proto: 080008:00:69:07:3e:db->00:e0:29:19:4a:68 192.168.0.1[1239] ->192.168.0.2[23]
0000 6e - n
eth
proto: 080008:00:69:07:3e:db->00:e0:29:19:4a:68 192.168.0.1[1239] ->192.168.0.2[23]
eth
proto: 080008:00:69:07:3e:db->00:e0:29:19:4a:68 192.168.0.1[1239] ->192.168.0.2[23]
0000 67 - g
eth
proto: 080008:00:69:07:3e:db->00:e0:29:19:4a:68 192.168.0.1[1239] ->192.168.0.2[23]
0000 65 - e
eth
proto: 080008:00:69:07:3e:db->00:e0:29:19:4a:68 192.168.0.1[1239] ->192.168.0.2[23]
eth
proto: 080008:00:69:07:3e:db->00:e0:29:19:4a:68 192.168.0.1[1239] ->192.168.0.2[23]
0000 72 - r
eth
proto: 080008:00:69:07:3e:db->00:e0:29:19:4a:68 192.168.0.1[1239] ->192.168.0.2[23]
可以看到,linux_sniffer提供了相對更詳細的內容。
4.hunt
hunt在你需要易于讀取的結果室的另外一種選擇。它具有直觀的命令追蹤和會話監錄功能。
??作者:Pavel Krauz
??條件: C, IP頭, Linux 2.0.35+, 支持LinuxThreads的GlibC 2.0.7
??配置文件:無
??位置:http://www.cri.cz/kra/index.html
??安全歷史:無
注:作者提供有動態鏈接和靜態連接的二進制發布。
hunt是以tar.gz的格式發布的,文件名為hunt-1_3bin.tgz。首先需要解壓縮:
??$tar xvfz hunt-1_3bin.tgz
則hunt被解壓縮到新創建的目錄hunt-1.3種,包括以下內容:
??-rw-r--r-- 1 206 users 1616 Apr 2 03:54 CHANGES
??-rw-r--r-- 1 206 users 17983 Oct 25 1998 COPYING
??-rw-r--r-- 1 206 users 312 Jan 16 04:54 INSTALL
??-rw-r--r-- 1 206 users 727 Feb 21 11:22 Makefile
??-rw-r--r-- 1 206 users 27373 Feb 15 12:44 README
??-rw-r--r-- 1 206 users 167 Dec 4 14:29 TODO
??-rw-r--r-- 1 206 users 5067 Feb 13 04:23 addpolicy.c
??-rw-r--r-- 1 206 users 7141 Feb 21 23:44 arphijack.c
??-rw-r--r-- 1 206 users 25029 Apr 2 03:26 arpspoof.c
??drwxr-xr-x 2 206 users 1024 Apr 9 02:03 c
??-rw-r--r-- 1 206 users 7857 Nov 9 1998 hijack.c
??-rw-r--r-- 1 206 users 5066 Dec 2 12:55 hostup.c
??-rwxr-xr-x 1 206 users 84572 Apr 9 02:03 hunt
??-rw-r--r-- 1 206 users 24435 Apr 2 03:26 hunt.c
??-rw-r--r-- 1 206 users 16342 Mar 30 01:56 hunt.h
??-rwxr-xr-x 1 206 users 316040 Apr 9 02:03 hunt_static
??-rw-r--r-- 1 root root 265 May 20 22:22 huntdir.txt
??-rw-r--r-- 1 root root 2517 May 20 22:19 huntlog.txt
??-rw-r--r-- 1 206 users 6249 Feb 21 11:21 macdisc.c
??-rw-r--r-- 1 206 users 12105 Feb 21 11:35 main.c
??-rw-r--r-- 1 206 users 12000 Feb 6 02:27 menu.c
??-rw-r--r-- 1 206 users 7432 Apr 2 03:53 net.c
??-rw-r--r-- 1 206 users 5799 Feb 11 04:21 options.c
??-rw-r--r-- 1 206 users 11986 Feb 14 04:59 resolv.c
??-rw-r--r-- 1 206 users 1948 Oct 25 1998 rst.c
??-rw-r--r-- 1 206 users 9545 Mar 30 01:48 rstd.c
??-rw-r--r-- 1 206 users 21590 Apr 2 03:58 sniff.c
??-rw-r--r-- 1 206 users 14466 Feb 21 12:04 synchijack.c
??-rw-r--r-- 1 206 users 2692 Feb 19 00:10 tap.c
??-rw-r--r-- 1 206 users 4078 Feb 15 05:31 timer.c
??-rw-r--r-- 1 206 users 2023 Oct 25 1998 tty.c
??-rw-r--r-- 1 206 users 7871 Feb 11 02:58 util.c
靜態二進制發布為hunt_static,推薦使用該版本,因為有時候從源代碼編譯可能會出現缺少一些庫的錯誤。使用下面命令來執行hunt:
??$hunt_static
運行hunt你將驚奇地發現hunt是基于curse的,因此有非常友好的交互界面。啟動以后菜單如下所示:
??--- Main Menu --- rcvpkt 0, free/alloc 63/64 ------
??l/w/r) list/watch/reset connections
??u) host up tests
??a) arp/simple hijack (avoids ack storm if arp used)
??s) simple hijack
??d) daemons rst/arp/sniff/mac
??o) options
??x) exit
??* >
在整個例子中,我將從GNSS登錄到linux.test.net中進行測試。
??GNSS 3% telnet 192.168.0.2
??Trying 192.168.0.2...
??Connected to 192.168.0.2.
??Escape character is '^]'.
??
??Caldera OpenLinux(TM)
??Version 1.3
??Copyright 1996-1998 Caldera Systems, Inc.
??
??login:
??[hapless@linux hapless]$ finger root
??Login: root Name: root
??Directory: /root Shell: /bin/bash
??On since Thu May 20 21:57 (PDT) on tty1 1 minute idle
??On since Thu May 20 22:02 (PDT) on tty2 7 minutes 19 seconds idle
??On since Thu May 20 21:59 (PDT) on tty3 15 seconds idle
??No mail.
??No Plan.
??[hapless@linux hapless]$ last root
??root tty2 Thu May 20 22:02 still logged in
??root tty3 Thu May 20 21:59 still logged in
??root tty1 Thu May 20 21:57 still logged in
??root tty2 Thu May 20 19:46 - down (00:26)
??root tty1 Thu May 20 19:44 - 20:12 (00:27)
??root tty3 Thu May 20 19:44 - down (00:28)
??root tty3 Thu May 20 19:42 - 19:44 (00:01)
??root tty1 Thu May 20 19:41 - 19:42 (00:00)
??root tty3 Thu May 20 19:28 - 19:41 (00:12)
??root tty2 Thu May 20 19:11 - 19:42 (00:31)
??root tty1 Thu May 20 19:07 - 19:40 (00:32)
??root tty1 Thu May 20 18:57 - 19:07 (00:09)
??root tty1 Mon May 17 22:32 - down (00:29)
最后檢查了/etc/passwd,在整個過程中都運行有hunt進行嗅探:
??--- Main Menu --- rcvpkt 0, free/alloc 63/64 ------
??l/w/r) list/watch/reset connections
??u) host up tests
??a) arp/simple hijack (avoids ack storm if arp used)
??s) simple hijack
??d) daemons rst/arp/sniff/mac
??o) options
??x) exit
??*> w
??0) 192.168.0.1 [1049] --> 192.168.0.2 [23]
??choose conn> 0
??dump [s]rc/[d]st/oth > b
注:上面的輸入(黑色字體部分)指示hunt來記錄0號連接,并輸出源和目的信息。
則hunt將顯示hapless的所有活動信息到終端屏幕上:
??22:18:43 up 21 min, 4 users, load average: 0.00, 0.01, 0.00
??TRL-C to break
??hhaapplleessss
??Password: unaware
??[hapless@linux2 hapless]$ cclleeaarr
??[hapless@linux2 hapless]$ wwhhoo
??root tty1 May 20 21:57
??ww
??22:18:43 up 21 min, 4 users, load average: 0.00, 0.01, 0.00
??
??[hapless@linux2 hapless]$ mmoorree //eettcc//ppaasssswwdd
??root:x:0:0:root:/root:/bin/bash
??bin:x:1:1:bin:/bin:
??daemon:x:2:2:daemon:/sbin:
??adm:x:3:4:adm:/var/adm:
??lp:x:4:7:lp:/var/spool/lpd:
??sync:x:5:0:sync:/sbin:/bin/sync
??shutdown:x:6:11:shutdown:/sbin:/sbin/shutdown
??halt:x:7:0:halt:/sbin:/sbin/halt
??mail:x:8:12:mail:/var/spool/mail:
??news:x:9:13:news:/var/spool/news:
??uucp:x:10:14:uucp:/var/spool/uucp:
??operator:x:11:0:operator:/root:
??games:x:12:100:games:/usr/games:
??gopher:x:13:30:gopher:/usr/lib/gopher-data:
??ftp:x:14:50:FTP User:/home/ftp:
??man:x:15:15:Manuals Owner:/:
??majordom:x:16:16:Majordomo:/:/bin/false
??postgres:x:17:17:Postgres User:/home/postgres:/bin/bash
??nobody:x:65534:65534:Nobody:/:/bin/false
??anon:x:100:100:Anonymous:/home/anon:/bin/bash
??hapless:x:500:500:Caldera OpenLinux User:/home/hapless:/bin/bash
??[hapless@linux2 hapless]$
可以的看到,hunt的輸出非常直觀明了,易于閱讀。然而hunt還提供有以下工具:
允許指定任意一個感興趣的連接,而不是記錄所有的東西。
允許指定任意一個連接,而不僅僅是以SYN剛剛開始的連接。It offers spoofing tools.
提供活動會話劫持。
其特有的特色功能和易于使用的界面,使得它對于linux入門者是一個非常好的選擇。
5.sniffit
sniffit是針對哪些需要了解更多信息的人的。
??作者:Brecht Claerhout
??條件:C, IP 頭文件
??配置文件:見后面的討論
??安全歷史:無
注:sniffit功能非常強大,但是不易學習使用。
??$tar xvfz sniffit_0_3_7.tar.gz
??$./configure (配置命令將檢測系統是否符合要求)
??$make (編譯源代碼)
??strip sniffit (精簡二進制代碼的大小)
現在就可以使用sniffit了(sniffit的配置我們最后討論)。
語法:
??sniffit [-xdabvnN] [-P proto ] [-A char ] [-p port ] [(-r|-R) recordfile ] [-l sniflen ] [-L logparam ] [-F snifdevice ] [-D tty ] [-M plugin ] [(-t Target-IP | -s Source-IP ) | (-i|-I) | -c config-file ]
sniffit是一個TCP/IP/ICMP協議數據報監聽器,其能給出關于這些協議數據報非常詳細的技術信息(SEQ,ACK,TTL,Windows,....)及符合監聽條件的數據報的各種不同的格式(hex或純文本)
sniffit缺省的可以處理以太和PPP設備。但是也可以用在其他的設備上(參見README.FIRST和sn_config.h)。sniffit可以進行方便的配置實現對接入的數據報進行過濾。而配置文件允許非常確定地指定需要處理的數據報。 sniffit同樣有一個交互式界面。
選項:
??-v
??顯示版本信息
??-t 目標地址
只處理目的地址為"目標地址"的數據,和 '-s' '-c' '-v' 選項不兼容
??源地址
只處理發送地址為"源地址"的數據,和'-t' '-c' '-v' 選項不兼容
??-c 配置文件
在配置文件中對包過濾規則進行定義,和-t' '-s' '-v'不兼容
??-R 文件
將輸出結果記錄到"文件"中(和'-v'不兼容)
??-n
關閉IP數據報校驗,使偽造的數據也可以顯示出來
??-x
打印TCP數據報的擴展信息到標準輸出中((SEQ,ACK, Flags等),往往用來跟蹤欺騙,包丟失及實現其他的網絡調試測試任務。和'-i' 'I' '-v'不兼容
??-d
輸出到缺省的文件中,一般文件名為源目的地址的組合如:192.168.0.232.1120-192.168.0.231.80
??-a
輸出ascII碼格式,不可打印的字符用”.”表示
??-P 協議
指定需要處理的數據的協議類型,IP,TCP,ICMP,UDP等。
??-p 端口
只處理目的端口為"端口"的數據。
??-l sniflen
在正常模式下,記錄的數據的總和(缺省為300字節),每次的連接的前sniflen個字節被記錄下來。
??-F device
指定監聽某個設備的數據如eth0,eth1等
??-D tty
所有的記錄信息都被輸出到指定的tty
舉例:
要監聽從192.168.0.233發往192.168.0.231的訪問WWW請求數據:
??[root@lix /tmp]#/usr/sbin/sniffit -p 80 -P TCP -s 192.168.0.233 -d ttyp1
??Packet ID (from_IP.port-to_IP.port): 192.168.0.233.1060-192.168.0.231.80
????45 00 00 2C 6D 0B 40 00 80 06 0A A0 C0 A8 00 E9 C0 A8 00 E7 04 24 00 50 00 4E
????89 2A 00 00 00 00 60 02 20 00 67 19 00 00 02 04 05 B4
注:192.168.0.231為一臺運行linux的服務器
如果希望將輸出定向到一個文件,則
??[root@lix /tmp]# /usr/sbin/sniffit -p 80 -P TCP -s 192.168.0.233 -R /tmp/wwwlog
如果希望查看從192.168.0.231返回給192.168.0.225的www頁面數據,并且將數據存儲在一個文件/tmp/wwwlog中:
??[root@lix /tmp]# /usr/sbin/sniffit -P TCP -t 192.168.0.225 -R /tmp/wwwlog
注:在225上不要開別的到231的連接,如telnet 否則 數據就回混雜在一起。
如果希望查看從192.168.0.233發給192.168.0.231的ICMP數據,并且將其顯示到控制臺上:
??[root@lix /tmp]# /usr/sbin/sniffit -P ICMP -t 192.168.0.233 -d ttyp1
sniffit支持配置文件,通過配置文件可以提供更強大的嗅探控制。配置文件格式包含五個不同的字段,意義分別如下:
字段 1—select 或 deselect。指示sniffit捕捉后面條件指定的數據或者不捕捉。
字段 2—from, to, 或 both。 H指示sniffit捕捉來自、發往或雙向的指定的主機的數據。
字段 3—host, port, or mhost。指定一個或多個目標主機。mhost可以用來指定多個主機,如192.168.0。
字段 4—hostname, port number, or multiple-host 列表。
字段 5—端口號。
例如:
??select from host 192.168.0.1
??select from host 192.168.0.1 80
??select both port 23
sniffit將捕捉來自兩個主機的telnet和www的所有信息。
??select both mhosts 100.100.12.
??deselect both port 80
??select both host 100.100.12.2
sniffit將捕捉100.100.12.*相關除www以外的所有數據,但是顯示100.100.12.2的www數據。

熱詞搜索:

上一篇:安全防范Linux嗅探器
下一篇:如何防御Sniffer攻擊

分享到: 收藏
国产一级一区二区_segui88久久综合9999_97久久夜色精品国产_欧美色网一区二区
国产精品一区亚洲| 欧美日韩亚洲一区二区三区在线 | 亚洲日本va午夜在线电影| 亚洲综合日韩中文字幕v在线| 午夜在线不卡| 欧美日本网站| 一区二区三区无毛| 国产日韩亚洲欧美综合| 午夜久久电影网| 国产美女精品视频免费观看| 亚洲午夜伦理| 国产一区二区三区免费在线观看| 欧美在线亚洲综合一区| 国产精品扒开腿爽爽爽视频| 亚洲国产综合在线看不卡| 美女精品视频一区| 一区二区三区日韩精品| 麻豆成人综合网| 国产精品女人毛片| 亚洲片国产一区一级在线观看| 国产精品麻豆欧美日韩ww| 中文精品视频| 亚洲国产另类久久精品| 日韩视频中文| 国产美女扒开尿口久久久| 久久午夜精品| 亚洲精选一区| 亚洲福利av| 久久综合国产精品| 一区二区自拍| 在线日韩av永久免费观看| 国产亚洲欧洲| 国产综合香蕉五月婷在线| 国产日韩亚洲欧美精品| 国产欧亚日韩视频| 久久婷婷久久一区二区三区| 精品99一区二区三区| 欧美日韩aaaaa| 久久久久国产精品午夜一区| 国产精品日韩一区| 国产亚洲a∨片在线观看| 欧美伦理视频网站| 亚洲欧美日韩一区二区在线 | 欧美在线免费观看| 国产亚洲精品久久久久婷婷瑜伽| 欧美亚洲一区二区在线| 亚洲国产精品久久久久久女王| 久久成人亚洲| 性视频1819p久久| 亚洲精品综合久久中文字幕| 国际精品欧美精品| 欧美日韩一区二区免费在线观看 | 久久亚洲综合色一区二区三区| 欧美一二三区在线观看| 另类尿喷潮videofree| 亚洲精选一区二区| 在线精品福利| 欧美91大片| 国产精品高潮久久| 欧美国产日韩一区| 亚洲欧美国产精品va在线观看| 亚洲国产精品久久91精品| 国产一区二区| 国产欧美一二三区| 国产精品成人免费| 国产精品久久一级| 欧美xx69| 制服丝袜激情欧洲亚洲| 欧美日韩免费高清一区色橹橹| 久久久久久亚洲精品中文字幕 | 久久国产主播精品| 在线精品福利| 一本在线高清不卡dvd| 最新精品在线| 国产精品久久久久久久久久免费看 | 欧美伊人影院| 欧美日韩久久| 欧美va天堂| 一区二区av在线| 欧美在线关看| 激情欧美一区二区| 欧美激情一区在线观看| 欧美午夜宅男影院在线观看| 亚洲一区免费看| 欧美日韩综合在线| 久久精品国产一区二区三| 欧美性生交xxxxx久久久| 国产午夜精品久久久久久久| 欧美日韩一区二区三区四区在线观看 | 国产欧美亚洲一区| 欧美韩国日本一区| 久久久99爱| 嫩草影视亚洲| 国产真实乱偷精品视频免| 亚洲欧美清纯在线制服| 国产精品国产馆在线真实露脸| 亚洲国产精品成人久久综合一区| 久久成人精品视频| 国产精品蜜臀在线观看| 欧美三级电影大全| 亚洲欧美日韩成人高清在线一区| 欧美激情中文不卡| 亚洲性人人天天夜夜摸| 久久亚洲精品网站| 麻豆精品视频在线观看| 欧美日韩精品福利| 亚洲免费小视频| 国产亚洲精品7777| 欧美激情五月| 欧美另类极品videosbest最新版本| 国产视频亚洲精品| 欧美顶级少妇做爰| 久久久国产成人精品| 性做久久久久久久久| 亚洲高清在线观看| 91久久一区二区| 久久亚洲影院| 在线综合亚洲| 国产视频欧美视频| 久久久久国色av免费观看性色| 亚洲欧美日韩在线播放| 国产精品每日更新在线播放网址| 欧美精品激情blacked18| 国产一区视频观看| 久久亚洲国产成人| 性伦欧美刺激片在线观看| 在线精品一区二区| 亚洲第一在线综合网站| 久久av资源网站| 亚洲一区欧美激情| 欧美在线亚洲| 欧美一区不卡| 狠狠色狠狠色综合日日小说| 国内精品视频在线观看| 国产精品国产a| 国产精品高潮视频| 欧美日本高清| 欧美日韩精品免费在线观看视频| 国产日韩精品视频一区| 在线观看欧美| 亚洲精品小视频| 亚洲欧美日本日韩| 欧美一区二区高清在线观看| 久久欧美肥婆一二区| 精品99视频| 国产欧美一级| 欧美系列一区| 亚洲国产导航| 欧美在线观看天堂一区二区三区| 久久激情婷婷| 欧美性猛交xxxx乱大交退制版| 国产一区二区三区久久悠悠色av| 国产精品www色诱视频| 亚洲国产婷婷综合在线精品 | 亚洲国产成人在线| 久久综合给合久久狠狠狠97色69| 老司机凹凸av亚洲导航| 国产久一道中文一区| 在线亚洲一区| 欧美一区二区三区精品电影| 久久久999精品| 国产精品入口尤物| 99国产精品视频免费观看| 亚洲欧洲在线观看| 免费成年人欧美视频| 国产在线播放一区二区三区| 欧美日韩久久久久久| 一本到12不卡视频在线dvd| 欧美.com| 一区二区三区欧美在线观看| 欧美精品一区二区三区视频| 在线精品视频一区二区| 国产亚洲激情在线| 欧美在线亚洲在线| 亚洲人成网站在线播| 欧美美女bb生活片| 亚洲免费网址| 国产日韩欧美三级| 亚洲欧美中文日韩v在线观看| 国产精品一区二区三区久久久| 欧美伊人精品成人久久综合97 | 久久久精品一品道一区| 在线视频日本亚洲性| 欧美一区二视频| 最近中文字幕日韩精品| 国产精品综合久久久| 欧美一区观看| 亚洲男人第一网站| 欧美日韩二区三区| 欧美好吊妞视频| 欧美影院午夜播放| 免费视频亚洲| 欧美一区二区网站| 亚洲精品一区二区在线观看| 欧美精品一区二区三区一线天视频| 久久久爽爽爽美女图片| 亚洲免费久久| 国产精品久久久久免费a∨大胸| 久久精品99国产精品日本 | 国产精品视频一二三|