| 域名空间 下载中心 社区论坛 信息公告 my小屋 |
![]() |
联系我们 设为首页 加入收藏 |
|
首页 | 新闻资讯 | 编程开发 | 网页设计 | 图形图象 | 网络媒体 | 网站模板 | 数 据 库 | 投稿 论坛 | 操作系统 | 系统优化 | 网络安全 | 黑客技术 | 硬件学堂 | 硬件报价 | 服 务 器 | 地图 专题 | 应用软件 | 聊天通讯 | q q 专栏 | 建站经验 | 在线工具 | 站长club | 注 册 表 | 旧版 社会 | 游戏娱乐 | 设计欣赏 | 疑难解答 | 社区论坛 | 韩国素材 | 素材图库 | 广告服务 | 服务 |
| 新版上线![旧版] | |||||
注:打开慢时请稍等
linux环境下黑客常用嗅探器分析http://www.iyit.net 日期:2006-5-29 13:33:14 来源:网络转载 点击: |
---------------------------------------------------------------------- 1.概述 本文对linux环境下黑客常常使用的几种嗅探器进行详细的分析,这些嗅探器往往被入侵者完成入侵以后种植在受害者服务器当中。这些嗅探器各自有不同的特点,有的只是简单的用来捕捉用户名和密码,有的则非常强大可记录所有的网络数据流。本文将对下面几种嗅探器进行分析: linsniffer linuxsniffer hunt iffit 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 roto: 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 roto: 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 roto: 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 roto: 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 roto: 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 roto: 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 roto: 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 roto: 080008:00:69:07:3e:db->00:e0:29:19:4a:68 192.168.0.1[1239] ->192.168.0.2[23] eth roto: 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 roto: 080008:00:69:07:3e:db->00:e0:29:19:4a:68 192.168.0.1[1239] ->192.168.0.2[23] eth roto: 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 roto: 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 roto: 080008:00:69:07:3e:db->00:e0:29:19:4a:68 192.168.0.1[1239] ->192.168.0.2[23] eth roto: 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 roto: 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 roto: 080008:00:69:07:3e:db->00:e0:29:19:4a:68 192.168.0.1[1239] ->192.168.0.2[23] eth roto: 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 roto: 080008:00:69:07:3e:db->00:e0:29:19:4a:68 192.168.0.1[1239] ->192.168.0.2[23] eth roto: 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 roto: 080008:00:69:07:3e:db->00:e0:29:19:4a:68 192.168.0.1[1239] ->192.168.0.2[23] eth roto: 080008:00:69:07:3e:db->00:e0:29:19:4a:68 192.168.0.1[1239] ->192.168.0.2[23] eth roto: 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 roto: 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 roto: 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 roto: 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 roto: 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 roto: 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 roto: 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 roto: 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 roto: 080008:00:69:07:3e:db->00:e0:29:19:4a:68 192.168.0.1[1239] ->192.168.0.2[23] eth roto: 080008:00:69:07:3e:db->00:e0:29:19:4a:68 192.168.0.1[1239] ->192.168.0.2[23] eth roto: 080008:00:69:07:3e:db->00:e0:29:19:4a:68 192.168.0.1[1239] ->192.168.0.2[23] eth roto: 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 roto: 080008:00:69:07:3e:db->00:e0:29:19:4a:68 192.168.0.1[1239] ->192.168.0.2[23] eth roto: 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 roto: 080008:00:69:07:3e:db->00:e0:29:19:4a:68 192.168.0.1[1239] ->192.168.0.2[23] eth roto: 080008:00:69:07:3e:db->00:e0:29:19:4a:68 192.168.0.1[1239] ->192.168.0.2[23] eth roto: 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 roto: 080008:00:69:07:3e:db->00:e0:29:19:4a:68 192.168.0.1[1239] ->192.168.0.2[23] eth roto: 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 roto: 080008:00:69:07:3e:db->00:e0:29:19:4a:68 192.168.0.1[1239] ->192.168.0.2[23] eth roto: 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 roto: 080008:00:69:07:3e:db->00:e0:29:19:4a:68 192.168.0.1[1239] ->192.168.0.2[23] eth roto: 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 roto: 080008:00:69:07:3e:db->00:e0:29:19:4a:68 192.168.0.1[1239] ->192.168.0.2[23] eth roto: 080008:00:69:07:3e:db->00:e0:29:19:4a:68 192.168.0.1[1239] ->192.168.0.2[23] eth roto: 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 roto: 080008:00:69:07:3e:db->00:e0:29:19:4a:68 192.168.0.1[1239] ->192.168.0.2[23] eth roto: 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 roto: 080008:00:69:07:3e:db->00:e0:29:19:4a:68 192.168.0.1[1239] ->192.168.0.2[23] eth roto: 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 roto: 080008:00:69:07:3e:db->00:e0:29:19:4a:68 192.168.0.1[1239] ->192.168.0.2[23] eth roto: 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 roto: 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 roto: 080008:00:69:07:3e:db->00:e0:29:19:4a:68 192.168.0.1[1239] ->192.168.0.2[23] eth roto: 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 roto: 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 iffit是针对哪些需要了解更多信息的人的。 作者: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 ] iffit是一个tcp/ip/icmp协议数据报监听器,其能给出关于这些协议数据报非常详细的技术信息(seq,ack,ttl,windows,....)及符合监听条件的数据报的各种不同的格式(hex或纯文本) iffit缺省的可以处理以太和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 iffit支持配置文件,通过配置文件可以提供更强大的嗅探控制。配置文件格式包含五个不同的字段,意义分别如下: 字段 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 iffit将捕捉来自两个主机的telnet和www的所有信息。 select both mhosts 100.100.12. deselect both port 80 select both host 100.100.12.2 iffit将捕捉100.100.12.*相关除www以外的所有数据,但是显示100.100.12.2的www数据。 编辑:黑鹰 [发送给好友] [打印本页] [关闭窗口] [返回顶部] 上一篇:交换环境下的sniffer 下一篇:用sniffer诊断linux网络故障 转载请注明来源:www.iyit.net 特别声明: 本站除部分特别声明禁止转载的专稿外的其他文章可以自由转载,但请务必注明出处和原始作者。文章版权归文章原始作者所有。对于被本站转载文章的个人和网站,我们表示深深的谢意。如果本站转载的文章有版权问题请联系编辑人员,我们尽快予以更正。 |
| 最新更新 | 热点排行 | 推荐新闻 | |||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||
| 友情链接 | ||||||
| 设置首 页 - 版权声明 - 广告服务 - 关于我们 - 联系我们 - 友情连接 |
| |||||||