這是歷史版本頁面 — 看 Wireshark (64-bit) 最新版本

網路卡頓找不到原因?Wireshark 抓封包看真相

Wireshark (64-bit) 軟體圖示 Wireshark (64-bit) 4.2.0 (64-bit) 資料更新 2023-11-17 閱讀約 6 分鐘

網路變慢、連線不穩、某個服務突然連不上,你第一個念頭是重開機、重插網路線,但問題還是反覆出現。你想知道到底是哪個環節出錯,是 DNS 沒回應、TCP 一直重傳,還是某支程式在背景偷傳資料,卻只能看著工作管理員的百分比猜。這種時候,你需要的是把網路上實際在跑的封包一層一層拆開來看。

一般人習慣先 ping 看看、開網頁測速,這些工具只能告訴你「通不通」「快不快」,無法告訴你「到底發生什麼事」。封包分析工具的切入點,是把你電腦進出的每一筆網路流量記錄下來,再用你能讀懂的方式呈現,讓你可以沿著封包內容去追問題的源頭。它不是拿來測速的,是拿來「看內容」的。

01Wireshark 到底能拿來做什麼?

它是一套網路封包分析工具,可以即時擷取電腦網路介面卡進出的流量,也可以讀取先前存下來的封包檔做離線分析。常見用途包含:找出連線緩慢或中斷的原因、確認某個協定是否正常運作、檢查是否有異常流量,以及作為學習網路協定的教材。它會把封包內容解碼成人類可讀的格式,例如 HTTP、DNS、TCP 等,方便你逐層檢視。

02抓了一堆封包,密密麻麻的看不懂怎麼辦?

這是剛開始最常遇到的障礙。它提供顯示過濾器,你可以輸入條件,例如只顯示某個 IP 位址、某個通訊埠或某種協定的封包,把不相關的流量暫時隱藏。介面本身是英文的,但過濾語法不難學,常見的像是 `ip.addr == 192.168.1.1` 或 `tcp.port == 443`。先從過濾單一協定開始,會比直接看全部流量容易上手。

03可以抓無線網路的封包嗎?

可以,但有限制。它支援從無線網路介面卡擷取封包,前提是你的無線網卡和驅動程式必須支援監聽模式,否則只能抓到自己的電腦進出的流量,無法看到網路上其他裝置的封包。如果你只是想分析自己這台電腦的連線問題,一般無線網卡就夠用;但若是要分析整個無線網路的流量,需要額外確認硬體是否支援。

04抓到的封包如果是加密的,還能看到內容嗎?

它可以把加密的流量完整記錄下來,但內容是亂碼,無法直接閱讀。除非你擁有加密金鑰,例如 SSL/TLS 的私鑰,才能夠在軟體中設定金鑰來解密。WPA/WPA2 的無線網路加密,也需要知道密碼才能解密。換句話說,它能告訴你「有加密流量在跑」,但看不到裡面的實際內容。

05抓下來的資料可以存下來或轉成其他格式嗎?

可以。擷取的封包可以存成檔案,之後隨時用這套軟體重新開啟分析。匯出方面,支援輸出成 XML、CSV、純文字等格式,方便你帶到其他工具處理,或是把特定封包片段貼到報告裡。如果你只需要命令列操作,它也附帶一個叫 TShark 的文字介面工具,可以在不開啟圖形介面的狀況下做同樣的擷取與分析。

06我沒學過網路概論,適合用這套軟體嗎?

它的學習曲線相當陡峭,使用前最好具備基本的網路概念,例如 IP、TCP、UDP、DNS 這些名詞的意義。如果你只是偶爾想查一下為什麼網路很慢,直接打開它可能會被大量技術細節淹沒。建議先從官方文件或教學文章學過一輪基礎過濾與常見協定,再拿實際問題來練習,會比較有方向。

07資安人員用這套軟體來做什麼?

它常被用於分析網路流量、偵測異常行為、調查資安事件。例如檢查是否有可疑的對外連線、確認惡意程式是否在背景傳輸資料,或是分析攻擊封包的特徵。由於它是免費且開源的工具,許多資安相關的教學與調查報告都會以它為範例。不過,它只是分析工具,不會主動跳出警報,需要你自己知道要找什麼。

08我只是想知道誰在佔用頻寬,有更簡單的選擇嗎?

如果你的目的只是「看哪台裝置或哪個程式用掉最多流量」,這套軟體對你來說可能過於複雜。它給的是封包層級的細節,不是流量統計儀表板。像 SmartSniff 或 Speedify 這類工具,介面更簡單,或是有不同的呈現方式,可能更符合你的需求。Wireshark 的強項是深入分析,不是快速看統計數字。

09電腦等級不夠好,跑得動嗎?

它本身是免費軟體,但擷取大量封包時會消耗不少記憶體和磁碟空間,官方說明也提到需要足夠的 RAM 和磁碟空間。如果你的電腦規格較舊,同時又抓取高流量的網路介面,可能會感到明顯延遲。建議先抓短時間、小流量的封包測試看看,再決定是否要擴大擷取範圍。

10介面是英文的,有中文版嗎?

這套軟體的介面語言是英文,沒有內建繁體中文介面。如果你對英文介面不熟悉,操作上會需要多花時間適應。不過,網路上有大量中文教學文章和影片,可以邊看邊學。若你完全無法接受英文介面,可以考慮其他有中文介面的網路工具,但功能深度可能不同。

11用這套軟體去抓別人的網路流量,合法嗎?

軟體本身是合法的開源工具,用於網路分析與除錯沒有問題。但未經授權攔截他人網路流量,在某些司法管轄區可能違法。如果你在公司或學校使用,最好先確認單位的網路使用政策;如果是家用網路,也建議只分析自己擁有的裝置。法律問題取決於使用情境,不在軟體本身。

12這套軟體還有人在維護嗎?

有,而且更新相當頻繁。它的版本紀錄從 2010 年至今收錄了超過一百五十個版本,近兩年內有十多次更新,屬於持續活躍開發的專案。它也是開放原始碼軟體,由全球的網路專家共同維護,功能會持續擴充。如果你需要長期依賴一套網路分析工具,它的更新狀況相對穩定。

下載與官方連結

前往官方網站 下載 Wireshark (64-bit)

Wireshark-4.2.0-x64.exe · 連結指向軟體原廠

版本紀錄

再看 5 筆

看完整版本清單

這一版改了什麼

What's new in this version:

- This is the first major Wireshark release under the Wireshark Foundation, a nonprofit which hosts Wireshark and promotes protocol analysis education. The foundation depends on your contributions in order to do its work. If you or your employer would like to contribute or become a sponsor, please visit wiresharkfoundation.org.
- Wireshark supports dark mode on Windows
- A Windows installer for Arm64 has been added
- Packet list sorting has been improved
- Wireshark and TShark are now better about generating valid UTF-8 output
- A new display filter feature for filtering raw bytes has been added
- Display filter autocomplete is smarter about not suggesting invalid syntax
- Tools › MAC Address Blocks can lookup a MAC address in the IEEE OUI registry
- The enterprises, manuf, and services configuration files have been compiled in for improved start-up times. These files are no longer available in the master branch in our source code repository. You can download the manuf file from our automated build directory.
- The installation target no longer installs development headers by default
- The Wireshark installation is relocatable on Linux (and other ELF platforms with support for relative RPATHs)
- Wireshark can be compiled on Windows using MSYS2. Check the Developer’s guide for instructions
- Wireshark can be cross-compiled for Windows using Linux. Check the Developer’s guide for instructions
- Tools › Browser (SSL Keylog) can launch your web browser with the SSLKEYLOGFILE environment variable set to the appropriate value
- Windows installer file names now have the format Wireshark-<version>-<architecture>.exe.
- Wireshark now supports the Korean language
- Many other improvements have been made. See the “New and Updated Features” section below for more details.

Fixed:
The following bugs have been fixed:
- Issue 18413 - RTP player do not play audio frequently on Windows builds with Qt6
- Issue 18510 - Playback marker does not move after resume with Qt6

Display filter syntax-related changes:
- It is now possible to filter on raw packet data for any field by using the syntax @some.field == <bytes…​>. This can be useful to filter on malformed UTF-8 strings, among other use cases where it is necessary to look at the field’s raw data.
- Negation (unary minus) now works with any display filter arithmetic expression.
- Using the slice operator with strings produces a string. Previously it would produce a byte array. This is useful to index/slice UTF-8 multibyte strings. String byte slices can still be obtained using the "@" (raw operator) prefix.
- Arithmetic expressions are allowed as set elements.
- Absolute date and time values can be written as Unix time.
- The limitation where a minus sign needed to be preceded by a space character has been removed.
- Added XOR logical operator.
- Fixed the implementation of all …​ in membership operator (#19188).
- When parsing absolute time values the display filter engine has learned to understand timezones as specified in strptime(3), including some common North American designations. Arbitrary timezone names are not supported however. Previously only ISO8601 offsets and the "UTC" designation was understood.
- Writing value strings without double quotes is deprecated and will generate a warning. Value strings are integer or boolean values that can be represented using a user-friendly textual format, such as "Set"/"Unset" instead of numerical values like 1 and 0. It is now a requirement that value strings need to be written enclosed in double-quotes.
- The deprecated ~≃ operator symbol has been removed. It was replaced by !== in version 4.0.
- Running the test suite requires the pytest Python module. The emulation layer that allowed running tests without pytest installed has been removed.
- When saving files or exporting packets after changing their time with the "Time Shift" dialog, the shifted time is written to the new file.
- TLS secrets used in decrypting packets can be embedded (or discarded) from the capture file via the GUI, similar to the options --inject-secrets and --discard-all-secrets in editcap.
- The text of any configured column (displayed or hidden) can be filtered anywhere that filters are used - in display filters, filters in taps, coloring rules, Wireshark read filters, and the -Y, -R, and -e options to TShark, the "Apply as Filter" GUI option, etc.
- The filter field names are prefixed by "_ws.col", followed by a lowercase version of the COL_ name found in epan/column-utils.h, e.g. "_ws.col.info" or "_ws.col.protocol"
- Using the column names as a filter is slower than other filter types because the columns must be constructed, so when the same filtering can be achieved via other fields, prefer that.
- The external name resolution text files "manuf", "enterprises" and "services" have been removed and replaced with static binary data. You can dump the respective internal data using tshark -G manuf|enterprises|services.
- The "manuf" file is now also read from the personal configuration folder, and is profile-based.
- The Lua console dialogs under the Tools menu were refactored and redesigned. It now consists of a single dialog window for input and output.
- Wireshark now shows byte units in the statistics in the user-selected language (uses the system default language by default).
- Packet list sorting has been improved:
- When sorting packet list with a filter applied, only the visible packets are sorted, which greatly increases sorting speed.
- The cache size for column text is limited to a default of 10000 rows, which limits the maximum memory usage. The maximum value can be changed in Preferences→Appearance→Layout
- Due to the above, columns that require packet dissection can only be sorted if the number of visible rows is less than the cache size. If there are more rows visible, a warning will appear. Columns that do not require packet dissection (those that calculated directly from the capture file frame headers, such as packet number, time, and frame length) can be sorted with any number of visible rows.
- Sorting can be interrupted.
- When changing the dissector via the "Decode As" table for values that have default dissectors registered, selecting "(none)" will select no dissection (while still allowing heuristic dissectors to attempt to dissect.) The previous behavior was to reset the dissector to the default. To facilitate resetting the dissector, the default dissector is now sorted at the top of the list of possible dissector options.
- The personal extcap plugin folder location on Unix has been changed to follow existing conventions for architecture-dependent files. The extcap personal folder is now $HOME/.local/lib/wireshark/extcap. Previously it was $XDG_CONFIG_HOME/wireshark/extcap.
- The "init.lua" file is now loaded from any of the Lua plugin directories. Previously it was loaded from the personal configuration directory. (For backward-compatibility this is still allowed; note that deprecated features may be removed in a future release).
- Installation of development headers must be done explicitly using the CMake command cmake --install <builddir> --component Development
- The Windows build has a new SpeexDSP external dependency. The speex code that was previously bundled has been removed.
- New --print-timers option added to TShark

Removed Features and Support:
- With the addition of the universal and consistent filtering support for column text, the previous support in the -e option to TShark for displaying column text via the column title has been removed in general. Those field names cannot be used elsewhere (as they may not be legal filter names) and create confusion if more than one column has the same title or if a column is renamed. Prefer the column format instead, e.g. "_ws.col.info" for "_ws.col.Info". However, for backwards compatibility with existing tools and scripts, the titles of the default columns can continue to be used with tshark -e (but not elsewhere.)
- The bundled script "dtd_gen.lua" that was disabled by default has been removed from the installation. It can be found in the Wireshark Wiki under "Contrib".
- The Wi-Fi NAN dissector filter name has been changed from 'nan' to 'wifi_nan'

New File Format Decoding Support:
- RTPDump

New Protocol Support:
- Aruba UBT, ASAM Capture Module Protocol (CMP), ATSC Link-Layer Protocol (ALP), DECT DLC protocol layer (DECT-DLC), DECT NWK protocol layer (DECT-NWK), DECT proprietary Mitel OMM/RFP Protocol (also named AaMiDe), Digital Object Identifier Resolution Protocol (DO-IRP), Discard Protocol, FiRa UWB Controller Interface (UCI), FiveCo’s Register Access Protocol (5CoRAP), Fortinet FortiGate Cluster Protocol (FGCP), GPS L1 C/A LNAV navigation messages, GSM Radio Link Protocol (RLP), H.224, High Speed Fahrzeugzugang (HSFZ), Hypertext Transfer Protocol version 3 (HTTP/3), ID3v2, IEEE 802.1CB (R-TAG), Iperf3, JSON 3GPP, Low Level Signalling (ATSC3 LLS), Management Component Transport Protocol (MCTP), Management Component Transport Protocol - Control Protocol (MCTP CP), Matter home automation protocol, Microsoft Delivery Optimization, Multi-Drop Bus (MDB), Non-volatile Memory Express - Management Interface (NVMe-MI) over MCTP, RDP audio output virtual channel Protocol (rdpsnd), RDP clipboard redirection channel Protocol (cliprdr), RDP Program virtual channel Protocol (RAIL), SAP Enqueue Server (SAPEnqueue), SAP GUI (SAPDiag), SAP HANA SQL Command Network Protocol (SAPHDB), SAP Internet Graphic Server (SAP IGS), SAP Message Server (SAPMS), SAP Network Interface (SAPNI), SAP Router (SAPROUTER), SAP Secure Network Connection (SNC), SBAS L1 Navigation Messages (SBAS L1), SINEC AP1 Protocol (SINEC AP), SMPTE ST2110-20 (Uncompressed Active Video), Train Real-Time Data Protocol (TRDP), UBX protocol of u-blox GNSS receivers (UBX), UDP Tracker Protocol for BitTorrent (BT-Tracker), UWB UCI Protocol, Video Protocol 9 (VP9), VMware HeartBeat, Windows Delivery Optimization (MS-DO), Z21 LAN Protocol (Z21), Zabbix, ZigBee Direct (ZBD), and Zigbee TLV
- Updated Protocol Support:
- JSON: The dissector now has a preference to enable/disable "unescaping" of string values. By default it is off. Previously it was always on.
- JSON: The dissector now supports "Display JSON in raw form".
- IPv6: The dissector has a new preference to show some semantic details about addresses (default off).
- IPv6: The dissector now supports dissecting the Application-aware IPv6 Networking (APN6) option in the Hop-by-Hop Options Header (HBH) and Destination Options Header (DOH), including all three types of APN ID, which are 32-bit, 64-bit and 128-bit in length.
- XML: The dissector now supports display character according to the "encoding" attribute of the XML declaration, and has a new preference to set default character encoding for some XML document without "encoding" attribute.
- SIP: The dissector now has a new preference to set default charset for displaying the body of SIP messages in raw text view.
- HTTP: The dissector now supports dissecting chunked data in streaming reassembly mode. Subdissectors of HTTP can register itself in "streaming_content_type" subdissector table for enabling streaming reassembly mode while transferring in chunked encoding. This feature ensures the server stream messages of GRPC-Web over HTTP/1.1 can be dissected even if the last chunk is absent.
- The media type dissector table now properly treats media types and subtypes as case-insensitive automatically, per RFC 6838. Media types no longer need to be lower cased before registering or looking up in the table.
- CFM: The dissector has been overhauled and updated to the level of IEEE std 802.1Q-2022 and ITU-T Rec. G.8013/Y.1371 (08/2015). This includes dissection of additional PDU types and TLVs as well as deeper dissection of existing PDUs and TLVs.
- Too many other protocol updates have been made to list them all here

New and Updated Codec support:
- Adaptive Multi-Rate (AMR), if compiled with opencore-amr

Major API Changes:
- Lua function "package.prepend_path" has been removed. If you need it please consider adding your own package.path customization code or installing your dependencies in Wireshark’s default paths.
- The reassemble_streaming_data_and_call_subdissector() API has been added to provide a simpler way to reassemble the streaming data of a high level protocol that is not on top of TCP.
- Some of the API now uses C99 types instead of GLib types