配置Wireshark远端接口,抓取远程Linux服务器tcp包

linux 服务器上抓包

首先,root用户 在Linux中安装rpcapd包,使用的命令如下:

安装
 # yum install glibc-static
 下载到当前的目录下
 # wget http://www.winpcap.org/install/bin/WpcapSrc_4_1_2.zip
 解压缩
 # unzip WpcapSrc_4_1_2.zip
 # cd winpcap/wpcap/libpcap/
 # chmod +x configure runlex.sh
 # CFLAGS=-static ./configure
 # make
 # cd rpcapd/
 # make
 # sudo ./rpcapd -4 -n -p 16666

运行./configure 时出错
configure: error: Your operating system’s lex is insufficient to compile
libpcap. flex is a lex replacement that has many advantages, including
being able to compile libpcap. For more information, see
.
原因可能是系统的flex版本太低,解决办法
yum -y install flex
在这里插入图片描述
通过最后一条命令 sudo ./rpcapd -4 -n -p 16666

启动rpcapd,端口为16666后,开始使用Wireshark连接该服务器,ctrl+c停止服务。
在这里插入图片描述
抓捕->选项->manage Interface

win10环境 出错
在这里插入图片描述
下载npcap解决
http://www.downza.cn/soft/332774.html
在这里插入图片描述

然后开始抓包,结果服务器出错如下
内存溢出(一启动wireshark 就报这个错)
Error in `./rpcapd’: free(): invalid next size (fast): 0x0000000000ec2810 ***
在这里插入图片描述

Not enough space in the temporary send buffer
临时发送缓冲区空间不足导致
在这里插入图片描述
在这里插入图片描述
wireshark 使用的是最新版4.0.1 怀疑 版本太高不兼容导致,下载
3.6.9依然有内存泄漏问题。

解决:sudo ./rpcapd -n -p 16666 把-4 去掉,会稳定很多。

  • 0
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值