使用Wireshark通过路由器抓其它设备的数据
准备
1、plink
PuTTY 的命令行版本:plink.exe
下载地址:https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html
找到: plink.exe
(a command-line interface to the PuTTY back ends)
直接下载链接:点我下载
2、Wireshark
Wireshark 下载地址:https://www.wireshark.org/#download
3、tcpdump
路由器支持 tcpdump 命令
可以通过 tcpdump --help
命令查看
抓取 http 包
格式
[plink.exe 的绝对路径] -ssh [路由器 ip 地址] -l [ssh 登录用户名] -pw [ssh 登录密码] -batch “/usr/sbin/tcpdump tcp(说明:只抓取 tcp 协议) and port not 22(说明:不抓 22 端口的数据) and src [需要抓取的设备 ip 地址] -s 0 -U -n -i any(说明:抓任何网卡) -w - “ | [Wireshark.exe 的绝对路径] -k -i -
例如以下命令
1 | D:\ShiGuang\Downloads\plink.exe -ssh 192.168.2.1 -l admin -pw shiguang -batch "/usr/sbin/tcpdump tcp and port not 22 and src 192.168.2.163 -s 0 -U -n -i any -w - " | D:\Green\Wireshark\App\Wireshark\Wireshark.exe -k -i - |
复制到 cmd 执行即可
最后
如何抓取并解密 https 的还不清楚,先记录这么多
本文采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 ShiGuang
评论