Mac OS X 苹果电脑如何查什么程序在偷跑流量

原创
2018/04/29 15:46
阅读数 5.8K

如果发现电脑有异常流量(通过little snitch可以直观看到),可用以下命令查找进程

netstat -vanp tcp (Linux系统可以使用netstat -anp来查进程)

然后再看进程或端口使用的详情

sudo lsof -i tcp:3000

sudo lsof -p <进程id>

这样分析下来发现苹果电脑一直连着一个美国IP 17.252.156.23.5223,原来是苹果的推送服务,一直要长连接,详细分析在这。这样一分析,还是能发现一些有趣的连接的。

5.2 update:确实有观察到后台服务nsurlsessiond在访问一些80端口,有可能是系统在做更新的判断(mac下自动同步,包括icloud,照片等,同步完成后就不会占用流量了)

主要访问的IP列表(大都是在福州机房的,也可能是蓝汛的CDN机房)

125.73.209.54
27.155.72.137
59.56.28.118
27.148.163.80
27.148.163.87
27.155.73.33
27.148.163.76
120.41.4.172
59.56.28.115

可以用以下命令关掉这些服务(该命令已经在新版系统失效!会提示 /System/Library/LaunchDaemons/com.apple.nsurlstoraged.plist: Operation not permitted while System Integrity Protection is engaged)

#!/bin/sh
launchctl unload /System/Library/LaunchDaemons/com.apple.nsurlstoraged.plist
launchctl unload /System/Library/LaunchAgents/com.apple.nsurlsessiond.plist
sudo launchctl unload /System/Library/LaunchDaemons/com.apple.nsurlsessiond.plist
sudo launchctl unload /System/Library/LaunchDaemons/com.apple.nsurlstoraged.plist

参考

https://discussions.apple.com/thread/6605949

展开阅读全文
加载中

作者的其它热门文章

打赏
0
0 收藏
分享
打赏
0 评论
0 收藏
0
分享
返回顶部
顶部