Windows XP Windows 7 Windows 2003 Windows Vista Windows 綜合教學 Linux 系統教學
Windows 10 Windows 8 Windows 2008 Windows NT Windows Server 電腦軟體教學
您现在的位置: Windows教程網 >> Windows教程 >  >> Linux 系統教學 >> Linux 教學

Linux 使用 Wireshark/tshark 進行封包擷取與 SIP/RTP 分析

編輯:Linux 教學
 

Linux 環境下進行網路封包分析,推薦使用 Wireshark (圖形介面) 或 tshark (命令列) 搭配 tcpdump。

安裝

Ubuntu/Debian: apt-get install wireshark tshark tcpdump
CentOS/RHEL:   yum install wireshark tshark tcpdump

指令列擷取 (tshark)

# 擷取 eth0 介面 port 6060 的封包
tshark -i eth0 -f "port 6060" -w capture.pcapng

tcpdump 擷取 (適合無圖形環境)

tcpdump -i eth0 -s 0 -w /tmp/test.cap

離線分析

  1. 將 .cap / .pcapng 檔案下載至本機。
  2. 使用 Windows/Linux/macOS 版 Wireshark 開啟分析。
  3. Wireshark 官網:https://www.wireshark.org/

SIP/RTP 封包解碼技巧

Wireshark 預設以 UDP/TCP 顯示。若知曉 SIP/RTP 使用的埠號,右鍵該封包 → Decode As... → 選擇 SIP 或 RTP 協定,即可正確解析語音訊號與媒體流。

Copyright © Windows教程網 All Rights Reserved