Wireshark PCAP to Sequence Diagrams
Wireshark PCAP to Sequence Diagrams
Analyzer 7.2
WIRESHARK TO SEQUENCE DIAGRAMS.................................................................... 1
Convert Wireshark pcap to sequence diagrams ....................................................................... 1
Select messages and parameters to include in sequence diagrams ................................. 4
Bookmark messages for quick access ........................................................................................... 7
Use regular expressions for content based filter selection and styling ............................ 8
Use regular expression substitution to customize the displayed text .............................. 9
Specify a host file to map IP addresses to meaningful names ......................................... 10
Choose between port level and IP address level sequence diagrams ........................... 11
Filter out periodic and traffic messages .................................................................................... 14
Extract tunneled messages ............................................................................................................. 16
Specify the color and style for messages.................................................................................. 18
COLORS ....................................................................................................................... 33
VISUALETHER PROTOCOL ANALYZER 7.2
Wireshark to sequence
diagrams
Convert Wireshark pcap to sequence
diagrams
Wireshark PCAP to sequence diagrams
1 Save Wireshark
capture in a PCAP file.
1
VISUALETHER PROTOCOL ANALYZER 7.2
2
VISUALETHER PROTOCOL ANALYZER 7.2
5 VisualEther generates
a sequence diagram.
6 Click on any
message in the PDF file
to see field level details.
Professional Edition feature: Clicking on messages is not supported in the Community Edition.
7 See a detailed
dump of the message.
3
VISUALETHER PROTOCOL ANALYZER 7.2
4
VISUALETHER PROTOCOL ANALYZER 7.2
Define a FXT file with templates for messages you wish to include in the message.
5
VISUALETHER PROTOCOL ANALYZER 7.2
6
VISUALETHER PROTOCOL ANALYZER 7.2
<!-- Message Template for Domain Name System (DNS) Extraction -->
<!-- Capture DNS messages apply the greenkhaki style. Use the
“bookmark” attribute for quick navigation in the PDF file. -->
<udp-message style="greenkhaki" bookmark="true" >
<opcode regex-match="^Domain">dns</opcode>
<param>dns.qry.name</param>
<param>dns.resp.name</param>
<param>dns.Addr</param>
to be bookmarked.
</FXT>
7
VISUALETHER PROTOCOL ANALYZER 7.2
<!-- Other DNS messages are included but they are not bookmarked. -->
on the content of
<param>dns.qry.name</param>
<param>dns.resp.name</param>
<param>dns.Addr</param>
</udp-message> the captured field.
<!-- Template for Hypertext Transfer Protocol (HTTP) Request Extraction -->
<tcp-message style="redblue">
<opcode>http.request.method</opcode>
<param>http.request.uri</param>
<param>http.request.version</param>
<param>http.response.code</param>
<param>http.If-Modified-Since</param>
<param>tcp.len</param>
</tcp-message>
<!—more... -->
</FXT>
8
VISUALETHER PROTOCOL ANALYZER 7.2
1 By default, IP addresses
are used in sequence
diagram headings.
3 Generate diagrams.
Notice that the
sequence diagrams now
use the hosts file
translation.
10
VISUALETHER PROTOCOL ANALYZER 7.2
Sequence
diagram axis at IP
address level.
11
VISUALETHER PROTOCOL ANALYZER 7.2
Source and
destination ports
are displayed.
12
VISUALETHER PROTOCOL ANALYZER 7.2
Sequence
diagram axis are
at port level.
13
VISUALETHER PROTOCOL ANALYZER 7.2
A filter attribute can be added to filter out periodic and traffic flow messages. When the filter
attribute is set, only one message of the matching message type is displayed.
14
VISUALETHER PROTOCOL ANALYZER 7.2
<udp-message filter="true">
2 Add a filter for RTP
<opcode display="brief">rtp</opcode>
<param>rtp.p_type</param>
messages. This
removes out all but
<param>rtp.ssrc</param>
<param>rtp.seq</param>
<param>rtp.timestamp</param>
</udp-message>
one RTP message in
each direction.
15
VISUALETHER PROTOCOL ANALYZER 7.2
By default,
VisualEther will select
the fields from the
outer message
16
VISUALETHER PROTOCOL ANALYZER 7.2
<source>
<address>ip.src</address>
</source>
<destination>
<address>ip.dst</address>
</destination>
</message>
</FXT>
17
VISUALETHER PROTOCOL ANALYZER 7.2
<!-- Template for Hypertext Transfer Protocol (HTTP) Request Extraction -->
<tcp-message style="redblue">
<opcode>http.request.method</opcode>
<param>http.request.uri</param>
<param>http.request.version</param>
<!-- Default Message Template for Hypertext Transfer Protocol (HTTP) -->
<tcp-message style="bluegreen">
<opcode>http</opcode>
<param>http.request.uri</param>
<param>http.request.version</param>
<param>http.response.code</param>
<param>tcp.len</param>
</tcp-message>
</FXT>
18
VISUALETHER PROTOCOL ANALYZER 7.2
2 Regenerate documents
with selected styles.
19
VISUALETHER PROTOCOL ANALYZER 7.2
Sample styles
style redblue: textcolor=FIREBRICK, color=ROYALBLUE, paramcolor=SLATEBLUE
20
VISUALETHER PROTOCOL ANALYZER 7.2
Get started with examples that cover a range of protocols from ARP to X.509. The examples
include PCAP files, extraction template files (.FXT.XML).
Some examples include Hosts.txt file that allows you to substitute IP address axis headings with
host names.
My Documents\VisualEther Documents\Examples
21
VISUALETHER PROTOCOL ANALYZER 7.2
22
VISUALETHER PROTOCOL ANALYZER 7.2
Add the VisualEther installation directory to the default search path. Use the start /wait primitive in
batch files to invoke VisualEther via a command-line interface.
The run-all.bat sample batch file in the Examples directory generates diagrams from all the samples
included with VisualEther.
23
VISUALETHER PROTOCOL ANALYZER 7.2
FXT reference
Supported protocols
<?xml version="1.0" encoding="utf-8" ?>
<FXT>
<!-- Message Templates for Session Initiation Protocol (SIP) Extraction -->
<udp-message>
<opcode display="brief">sip.Request-Line</opcode>
<param display="brief">sip.from.addr</param>
<param display="brief">sdp.connection_info</param>
</udp-message>
UDP v4
<udp-message>
<opcode display="brief">sip.Request-Line</opcode>
<param display="brief">sip.from.addr</param>
<param display="brief">sdp.connection_info</param>
</udp-message>
UDP v6
<!-- Message Template for File Transfer Protocol (FTP) Extraction -->
<tcp-message>
<opcode display="brief">ftp</opcode>
<param display="brief">ftp.response.code</param>
<param display="brief">ftp.response.arg</param>
<param display="brief">ftp.request.command</param>
</tcp-message>
TCP v4
TCP v6
<tcpv6-message>
<opcode display="brief">ftp</opcode>
<param display="brief">ftp.response.code</param>
<param display="brief">ftp.response.arg</param>
<param display="brief">ftp.request.command</param>
</tcpv6-message>
24
VISUALETHER PROTOCOL ANALYZER 7.2
<opcode>tcap</opcode>
<param>tcap.oid</param>
<param>tcap.application_context_name</param>
<param>tcap.otid</param>
<param>tcap.msgtype</param>
</sctp-message>
<opcode>tcap</opcode>
<param>tcap.oid</param>
<param>tcap.application_context_name</param>
<param>tcap.otid</param>
<param>tcap.msgtype</param>
</sctpv6-message>
IPv4
<ipv6-message>
<opcode>icmp.type</opcode>
<param>icmp.seq</param>
</ipv6-message>
IPv6
<!-- Display the beacon message, but filter out duplicates -->
<wifi-message filter="true" style="grey">
<opcode regex-match="Type/Subtype: Beacon (.*)" regex-
replace="IEEE 802.11: Beacon $1">wlan.fc.type_subtype</opcode>
<param>wlan.seq</param>
<param regex-match="Tag interpretation: (.*)" regex-
replace="$1">wlan_mgt.tag.interpretation</param>
<param>data.len</param>
</wifi-message>
The following example demonstrates how the source and destination entities can be specified using
the source and destination tags. These address tag in source and destination identifies the node. The
port tag specifies the field that maps to the port number. Here the originating and destination point
codes are used as the source and destination nodes. The SLS field is used as the port number.
26
VISUALETHER PROTOCOL ANALYZER 7.2
Include remarks
<remark>
28
VISUALETHER PROTOCOL ANALYZER 7.2
Attributes
Bookmark messages
Color the messages in a Bookmark the
combination of Green message in PDF for
and Khaki colors. easy access.
<opcode regex-match="\(query\)$">dns</opcode>
<param>dns.qry.name</param>
<param>dns.resp.name</param> Only match DNS
<param>dns.Addr</param>
</udp-message>
messages that end
with the string
“(query)”
Substitute default Wireshark text with regular
expressions
<sctp-message style="redblue">
<opcode regex-match="procedureCode: id-(.*)"
regex-replace="RANAP $1">ranap.procedureCode</opcode>
<param>ranap.pLMNidentity</param>
<param>ranap.id</param>
<param>gsm_a.imsi</param>
29
VISUALETHER PROTOCOL ANALYZER 7.2
30
VISUALETHER PROTOCOL ANALYZER 7.2
Regular expressions
The samples included with VisualEther should be suitable for a large variety of matching and
searching scenarios. For more complicated needs we recommend:
31
VISUALETHER PROTOCOL ANALYZER 7.2
For example, the MP Reach NLRI fields do not have a field name (normally field name is displayed in
the status bar).
32
VISUALETHER PROTOCOL ANALYZER 7.2
Colors
A handy reference for predefined colors in EventStudio. Use these definitions to define your own
styles in VisualEther.fdl file.
BLACK "0.0,0.0,0.0"
DIMGRAY "0.41,0.41,0.41"
DIMGREY "0.41,0.41,0.41"
GRAY "0.50,0.50,0.50"
GREY "0.50,0.50,0.50"
DARKGREY "0.66,0.66,0.66"
DARKGRAY "0.66,0.66,0.66"
SILVER "0.75,0.75,0.75"
LIGHTGRAY "0.83,0.83,0.83"
LIGHTGREY "0.83,0.83,0.83"
GAINSBORO "0.86,0.86,0.86"
WHITESMOKE "0.96,0.96,0.96"
WHITE "1.00,1.00,1.00"
ROSYBROWN "0.74,0.56,0.56"
INDIANRED "0.80,0.36,0.36"
BROWN "0.65,0.16,0.16"
FIREBRICK "0.70,0.13,0.13"
LIGHTCORAL "0.94,0.50,0.50"
MAROON "0.50,0.0,0.0"
DARKRED "0.55,0.0,0.0"
RED "1.00,0.0,0.0"
SNOW "1.00,0.98,0.98"
SALMON "0.98,0.50,0.45"
MISTYROSE "1.00,0.89,0.88"
TOMATO "1.00,0.39,0.28"
DARKSALMON "0.91,0.59,0.48"
ORANGERED "1.00,0.27,0.0"
CORAL "1.00,0.50,0.31"
LIGHTSALMON "1.00,0.63,0.48"
33
VISUALETHER PROTOCOL ANALYZER 7.2
SIENNA "0.63,0.32,0.18"
CHOCOLATE "0.82,0.41,0.12"
SADDLEBROWN "0.55,0.27,0.7"
SEASHELL "1.00,0.96,0.93"
SANDYBROWN "0.96,0.64,0.38"
PEACHPUFF "1.00,0.85,0.73"
PERU "0.80,0.52,0.25"
LINEN "0.98,0.94,0.90"
DARKORANGE "1.00,0.55,0.0"
BISQUE "1.00,0.89,0.77"
TAN "0.82,0.71,0.55"
BURLYWOOD "0.87,0.72,0.53"
ANTIQUEWHITE "0.98,0.92,0.84"
NAVAJOWHITE "1.00,0.87,0.68"
BLANCHEDALMOND "1.00,0.92,0.80"
PAPAYAWHIP "1.00,0.94,0.84"
MOCCASIN "1.00,0.89,0.71"
WHEAT "0.96,0.87,0.70"
OLDLACE "0.99,0.96,0.90"
ORANGE "1.00,0.65,0.0"
FLORALWHITE "1.00,0.98,0.94"
GOLDENROD "0.85,0.65,0.13"
DARKGOLDENROD "0.72,0.53,0.4"
CORNSILK "1.00,0.97,0.86"
GOLD "1.00,0.84,0.0"
KHAKI "0.94,0.90,0.55"
LEMONCHIFFON "1.00,0.98,0.80"
PALEGOLDENROD "0.93,0.91,0.67"
DARKKHAKI "0.74,0.72,0.42"
BEIGE "0.96,0.96,0.86"
LIGHTGOLDENRODYELLOW "0.98,0.98,0.82"
OLIVE "0.50,0.50,0.0"
YELLOW "1.00,1.00,0.0"
LIGHTYELLOW "1.00,1.00,0.88"
IVORY "1.00,1.00,0.94"
OLIVEDRAB "0.42,0.56,0.14"
34
VISUALETHER PROTOCOL ANALYZER 7.2
YELLOWGREEN "0.60,0.80,0.20"
DARKOLIVEGREEN "0.33,0.42,0.18"
GREENYELLOW "0.68,1.00,0.18"
LAWNGREEN "0.49,0.99,0.0"
CHARTREUSE "0.50,1.00,0.0"
DARKSEAGREEN "0.56,0.74,0.56"
FORESTGREEN "0.13,0.55,0.13"
LIMEGREEN "0.20,0.80,0.20"
LIGHTGREEN "0.56,0.93,0.56"
PALEGREEN "0.60,0.98,0.60"
DARKGREEN "0.0,0.39,0.0"
GREEN "0.0,0.50,0.0"
LIME "0.0,1.00,0.0"
HONEYDEW "0.94,1.00,0.94"
SEAGREEN "0.18,0.55,0.34"
MEDIUMSEAGREEN "0.24,0.70,0.44"
SPRINGGREEN "0.0,1.00,0.50"
MINTCREAM "0.96,1.00,0.98"
MEDIUMSPRINGGREEN "0.0,0.98,0.60"
MEDIUMAQUAMARINE "0.40,0.80,0.67"
AQUAMARINE "0.50,1.00,0.83"
TURQUOISE "0.25,0.88,0.82"
LIGHTSEAGREEN "0.13,0.70,0.67"
MEDIUMTURQUOISE "0.28,0.82,0.80"
DARKSLATEGRAY "0.18,0.31,0.31"
DARKSLATEGREY "0.18,0.31,0.31"
PALETURQUOISE "0.69,0.93,0.93"
TEAL "0.0,0.50,0.50"
DARKCYAN "0.0,0.55,0.55"
AQUA "0.0,1.00,1.00"
CYAN "0.0,1.00,1.00"
LIGHTCYAN "0.88,1.00,1.00"
AZURE "0.94,1.00,1.00"
DARKTURQUOISE "0.0,0.81,0.82"
CADETBLUE "0.37,0.62,0.63"
POWDERBLUE "0.69,0.88,0.90"
35
VISUALETHER PROTOCOL ANALYZER 7.2
LIGHTBLUE "0.68,0.85,0.90"
DEEPSKYBLUE "0.0,0.75,1.00"
SKYBLUE "0.53,0.81,0.92"
LIGHTSKYBLUE "0.53,0.81,0.98"
STEELBLUE "0.27,0.51,0.71"
ALICEBLUE "0.94,0.97,1.00"
SLATEGREY "0.44,0.50,0.56"
SLATEGRAY "0.44,0.50,0.56"
LIGHTSLATEGREY "0.47,0.53,0.60"
LIGHTSLATEGRAY "0.47,0.53,0.60"
DODGERBLUE "0.12,0.56,1.00"
LIGHTSTEELBLUE "0.69,0.77,0.87"
CORNFLOWERBLUE "0.39,0.58,0.93"
ROYALBLUE "0.25,0.41,0.88"
MIDNIGHTBLUE "0.10,0.10,0.44"
LAVENDER "0.90,0.90,0.98"
NAVY "0.0,0.0,0.50"
DARKBLUE "0.0,0.0,0.55"
MEDIUMBLUE "0.0,0.0,0.80"
BLUE "0.0,0.0,1.00"
GHOSTWHITE "0.97,0.97,1.00"
DARKSLATEBLUE "0.28,0.24,0.55"
SLATEBLUE "0.42,0.35,0.80"
MEDIUMSLATEBLUE "0.48,0.41,0.93"
MEDIUMPURPLE "0.58,0.44,0.86"
BLUEVIOLET "0.54,0.17,0.89"
INDIGO "0.29,0.0,0.51"
DARKORCHID "0.60,0.20,0.80"
DARKVIOLET "0.58,0.0,0.83"
MEDIUMORCHID "0.73,0.33,0.83"
THISTLE "0.85,0.75,0.85"
PLUM "0.87,0.63,0.87"
VIOLET "0.93,0.51,0.93"
PURPLE "0.50,0.0,0.50"
DARKMAGENTA "0.55,0.0,0.55"
FUCHSIA "1.00,0.0,1.00"
36
VISUALETHER PROTOCOL ANALYZER 7.2
MAGENTA "1.00,0.0,1.00"
ORCHID "0.85,0.44,0.84"
MEDIUMVIOLETRED "0.78,0.08,0.52"
DEEPPINK "1.00,0.08,0.58"
HOTPINK "1.00,0.41,0.71"
PALEVIOLETRED "0.86,0.44,0.58"
LAVENDERBLUSH "1.00,0.94,0.96"
CRIMSON "0.86,0.08,0.24"
PINK "1.00,0.75,0.80"
LIGHTPINK "1.00,0.71,0.76"
37