A skill for reading pcap / pcapng and progressing through grasping the overall picture, labeling IPs with meaning, PNG visualization, and Markdown reporting.
When To Use
pcapやpcapngWhen you are given and first want to understand what is happening- When you want to quickly grasp the major communication destinations, major conversations, and protocol composition
- When you want to attach evidence-backed labels to IPs using DNS, HTTP Host, TLS SNI, and RDAP
- When you want to create PNG graphs and Markdown reports as well
- When there is a lot of encrypted communication and you want to explain based on behavioral characteristics rather than payload
- When you want to use it for both security investigation and operational investigation
Core Principles
- First, check the capture quality. If there are problems with the snaplen, time series, count, or duration, lower the strength of your conclusions.
- The first 3 steps are fixed。
Protocol Hierarchy→Endpoints→Conversationsto build the overall picture. - Do not list IPs raw。
HTTP Host -> DNS 応答 -> TLS SNI / gQUIC SNI -> RDAP -> reverse DNSin that order. - Do not mix evidence sources。
hostnameとorganizationas a different kind of evidence should be kept separate. - Expert Information is an entry point, not a conclusion. Re-examine the surrounding conversation volume, direction, retransmissions, and reassembly.
- Explain encrypted communication by behavioral characteristics, not payload. Describe it in terms of destination, direction, volume, time period, and duration.
- Primary aggregation with CLI, derived aggregation with Python。
capinfos/tsharkand then pass it toscapy/matplotlib.
Default Workflow
-
Fix the investigation purpose
- Decide first what you want to know.
- Examples: the destination of large-volume communication, suspicious outbound transmissions, specific application communication, reporting.
-
Check the capture quality
- Check the duration, count, average rate, time series, snaplen, and
pcapngname resolution information. - If there are quality problems, downgrade subsequent conclusions to "more of a trend assessment."
- Check the duration, count, average rate, time series, snaplen, and
-
Build the overall picture
Protocol Hierarchy/Endpoints/Conversationsto build a baseline.- Here, do not go too deep into details; focus on dominant protocols, major communication destinations, and major conversations.
-
Label the major communication destinations with meaning
- Label them in order starting from the top N communication destinations.
- Avoid querying all of them at once; investigate only the candidates for the report.
- Leave things with weak evidence as
Unknown.
-
Organize behavioral characteristics and anomaly candidates
- If HTTP is visible, look at path / host / direction / response volume.
- If only TLS / QUIC is visible, explain in terms of destination, volume, time period, and duration.
- Organize anomaly candidates with
確認できたこと / 要再確認 / 未解決.
-
Perform visualization and reporting
- At minimum, produce one time-series chart and one ranking chart.
- Write the target period, aggregation unit, filter conditions, and top N criteria on the graphs.
- The report is organized in the order: summary → main tables/graphs → findings → unresolved points.
Tool Choice
Situations where CLI is preferred
- Initial triage
- Primary aggregation of large captures
Protocol Hierarchy/Endpoints/Conversations- Extraction of DNS / HTTP / TLS information
Situations where Python is preferred
- Secondary processing of CLI results
- Custom ranking and labeling
- PNG generation
- Markdown report generation
How to choose a plotting method
- If you want to complete it within Python,
matplotlib - If you want to plot with a lightweight CLI,
gnuplot
Minimum Outputs
- Short summary
- Top communication destination table
- Top conversation table
- IP labels with evidence
- At least 2 PNGs
- 1 time-series graph
- 1 ranking graph
確認できたこと / 要再確認 / 未解決organization
Anti-Patterns
- Confirming a failure based only on Expert Information
- Indiscriminately querying external services for all IPs
- Equating owner information with service names
- Forcing an explanation of encrypted traffic based on payload
- Not writing the time period, aggregation unit, and filter conditions on graphs
- Reading an entire large capture into Python from the start
Completion Checks
- Capture quality checks are complete
- The main protocols, main communication destinations, and main conversations can be explained
- Labels with evidence are attached to the top IPs or top conversations
- There is at least 1 time-series PNG and 1 ranking PNG
- Anomaly candidates are
確認できたこと / 要再確認 / 未解決organized into - The report states the graph conditions and labeling policy
- Even for encrypted traffic, an explanation based on behavioral characteristics is provided
References
- Wireshark
tsharkmanual: https://www.wireshark.org/docs/man-pages/tshark.html - Wireshark
capinfosmanual: https://www.wireshark.org/docs/man-pages/capinfos.html - Wireshark User's Guide: Conversations https://www.wireshark.org/docs/wsug_html_chunked/ChStatConversations.html
- Wireshark User's Guide: Endpoints https://www.wireshark.org/docs/wsug_html_chunked/ChStatEndpoints.html
- Wireshark User's Guide: Protocol Hierarchy https://www.wireshark.org/docs/wsug_html_chunked/ChStatHierarchy.html
- Wireshark User's Guide: I/O Graphs https://www.wireshark.org/docs/wsug_html_chunked/ChStatIOGraphs.html
- Wireshark User's Guide: Expert Information https://www.wireshark.org/docs/wsug_html_chunked/ChAdvExpert.html
- Wireshark User's Guide: Name Resolution https://www.wireshark.org/docs/wsug_html_chunked/ChAdvNameResolutionSection.html
- Wireshark User's Guide: Resolved Addresses https://www.wireshark.org/docs/wsug_html_chunked/ChStatResolvedAddresses.html
- Scapy Usage Guide https://scapy.readthedocs.io/en/latest/usage.html
- RFC 7482: RDAP Query Format https://datatracker.ietf.org/doc/html/rfc7482
- ICANN RDAP Overview https://www.icann.org/rdap/
- ARIN Whois / RDAP Guide https://www.arin.net/resources/registry/whois/rdap/