Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1236925
  • 博文数量: 177
  • 博客积分: 1528
  • 博客等级: 上尉
  • 技术积分: 1891
  • 用 户 组: 普通用户
  • 注册时间: 2010-12-15 18:03
文章分类

全部博文(177)

文章存档

2020年(1)

2018年(19)

2017年(4)

2016年(21)

2015年(40)

2014年(13)

2013年(26)

2012年(16)

2011年(37)

我的朋友

分类: LINUX

2011-03-23 17:21:22

1.监听所有非echo requests/replies的ICMP数据包 //ICMP ECHO(Type 8) 和ECHO Reply (Type 0)

#tcpdump "icmp[0] != 8 and icmp[0] != 0"

2.监听非本地网络的每次TCP会话开始和结束数据包

#tcpdump 'tcp[13] & 3 != 0 and not src and dst net localnet'

3.监听网关snup上长度大于576字节的IP数据包

#tcpdump 'gateway snup and ip[2:2] > 576'

4.监听不经过以太网的广播或多播数据包

#tcpdump 'ether[0] & 1 = 0 and ip[16] >= 224'

5.监视通过指定网关的数据包

#tcpdump -i eth0 gateway Gatewayname

6.监听网卡eth0的TCP数据

#tcpdump –i eth0 tcp

7.监听网卡网卡eth0是否有IP地址为 192.168.0.1 端口为80的数据

#tcpdump –i eth0 host 192.168.0.1 port 80

8.监听网卡网卡eth0是否有源IP地址为192.168.0.1且源端口为80的数据

#tcpdump –i eth0 src 192.168.0.1 and src port 80

9.监听网卡网卡eth0是否有目的IP地址为192.168.0.1且目的端口为80的数据

#tcpdump –i eth0 dst 192.168.0.1 and dst port 80

10.将网卡eth0的数据存入到文件aaaa.dmp中

#tcpdump –i eth0 –s 1600 –w aaaa.dmp

11.将得到的数据存入tcpcap.txt文件中

#tcpdump -l >tcpcap.txt

12.监听除192.168.30.69和192.168.30.69主机的ssh数据包以外的数据包

#tcpdump -c 5 -x host \(192.168.30.69 or 192.168.30.64 \) and port ! \(ssh or 22\)
阅读(4977) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~