Ubuntu下安装和使用wireshark

Ubuntu Software Center安装wireshark还是很容易的,在教育网下使用ipv6的软件源速度也很好。

但是安装完后如果不进行任何设置的话,wireshark还是不能使用。这时打开wireshark会提示“thereare no interfaces on which a capture can be done”

这是因为在默认情况下,普通用户没有截取网络数据的权限。

当然,可以通过运行sudowireshark,这样可以正常使用wireshark,但这并不是一个好方法,正如wireshark提示的那样:

“Running as user "root" andgroup "root".

This could be dangerous.

If you're running Wireshark this way inorder to perform live capture, you may want to be aware that there isa better way documented at

/usr/share/doc/wireshark-common/README.Debian”

参照/usr/share/doc/wireshark-common/README.Debian和网络上的资料:

wireshark利用了优先级分离(privilegeseparation)的策略,不同的进程会有不同的优先级。

Role

PrivilegeLevel

Description

Capture

OS-dependent

Readslive capture data

Dissection

Non-privilegeduser, possibly chrooted

Dissectspacket data. The majority of Wireshark's security-related bugshave been in its dissection code.

Filesystem

Normaluser

Normalfile-handling, e.g. reading and writing capture files,preferences, etc.

抓取实时数据的dumpcap进程就需要超级用户的权限。如果想让普通用户也能正常使用wireshark,建议的方法是把用户加入wireshark组,这样当用户运行wireshark时,dumpcap进程会以有高优先级,而其他相关进程仍然只有普通用户的权限。

运行sudo dpkg-reconfigurewireshark-common会创建wireshark用户组。

把需要运行wireshark的用户加入wireshark组:

sudo usermod -a -G wireshark $USER

之后,重新以该用户身份重新登录即可。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值