Linux环境下黑客常用嗅探器分析

    [晴 November 30, 2007 15:46 | by ]
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。

linux_sniffer

linux_sniffer提供相对更复杂的探测结果

Tags: , ,
Technology | Comments(0) | Trackbacks(0) | Reads(6434)
Add a comment
Emots
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
Enable HTML
Enable UBB
Enable Emots
Hidden
Nickname   Password   Optional
Site URI   Email   [Register]
               

Security code Case insensitive