36
Module 36

Wireshark lab: reading real telecom captures

Seven Wireshark labs on real captures (SMPP, MAP USSD, CAMEL, Iu-CS call, SIP, SCTP, Abis) with solutions.

On this page · 10 sections

Theory becomes skill only when you read real traffic. This module gives seven labs on public sample captures. Every result shown was produced by actually running tshark (Wireshark 4.6.9) on the file; each lab has questions with collapsible solutions — try first, then open the solution.

Privacy note. Some sample captures contain real-looking numbers and names. In this module phone numbers, IMSI-like values and account names are masked (shown as …). Do the same when you share your own captures.

0. Setup and safety

Tools

Tool What How to get it
tshark Command-line Wireshark: best for repeatable, scriptable analysis macOS: brew install wireshark; Debian/Ubuntu: sudo apt install tshark
Wireshark (GUI) Graphical analyser with flow graphs, VoIP and expert tools macOS: brew install --cask wireshark, or the installer from wireshark.org
Sample captures Public examples for learning Wireshark wiki page SampleCaptures (see References)

Safety rules (follow them)

  1. Download captures only from sources you trust (the Wireshark wiki is the usual one) and keep them in a separate folder; never run anything from that folder.
  2. Check before opening: file name.pcap should say pcap capture file; the sizes in this lab are small (258 B to 111 KB).
  3. Keep Wireshark updated. Protocol dissectors have had security bugs; a hostile capture could exploit an old version. Prefer tshark for untrusted files, and do not enable Lua scripts or plug-ins you do not know.
  4. Capture only where you are authorised. Capturing other people's traffic without permission can be illegal. Telecom traces contain personal data (numbers, IMSI, locations) — handle them under GDPR (Module 22).

tshark cheat sheet

Goal Command
Show packets tshark -n -r file.pcap (-n = no name resolution)
Display filter tshark -n -r file.pcap -Y 'smpp'
Print chosen fields tshark -n -r file.pcap -Y sip -T fields -e frame.number -e sip.Method -e sip.Status-Code
Full packet detail tshark -n -r file.pcap -V -Y 'frame.number==9'
Protocol hierarchy tshark -n -r file.pcap -q -z io,phs
Conversations -q -z conv,tcp (or conv,sctp, conv,udp)
RTP streams -q -z rtp,streams
Force a decoder -d sccp.ssn==200,tcap or -d tcp.port==9000,smpp
Set a preference -o lapd.use_gsm_sapi_values:TRUE
Find field names tshark -G fields \| grep 'smpp\.'

Display filter vs capture filter. A capture filter (tcp port 2775) limits what is recorded and uses a different, simpler syntax. A display filter (smpp.command_id == 4) only hides packets already recorded. In the GUI: Statistics → Protocol Hierarchy / Conversations / Flow Graph, Telephony → VoIP Calls / SIP Flows / RTP Streams, Analyze → Decode As… / Expert Information, right-click → Follow → Stream.

Lab 1 — An SMPP session (A2P SMS submission)

File: smpp.cap (1.4 KB) · Layers: Ethernet / IP / TCP / SMPP · Module 1, 23

Run:

tshark -n -r smpp.cap
tshark -n -r smpp.cap -Y smpp -T fields -e frame.number -e smpp.command_id -e smpp.command_status -e smpp.sequence_number

What you should see (17 packets, 8 are SMPP):

Frame Time Direction Message Detail
1–3 0 s client → server TCP SYN, SYN/ACK, ACK Client port 1770 → server port 9000
4 0.0007 s client → server Bind_transmitter (0x00000002), seq 1 Carries the account (system_id)
5 0.0073 s server → client Bind_transmitter_resp (0x80000002), status 0 (Ok) system_id = "SMSC"
7–8 28.91 s both Enquire_link (0x15) / response, seq 2 Keep-alive
9 28.91 s client → server Submit_sm (0x04), seq 3 source 100 (TON 0, NPI 1), destination …7890 (TON 1), data coding 0, message bytes 74657374
10 28.92 s server → client Submit_sm_resp, status 0 message_id = 47c8c77a
12–13 30.95 s both Unbind (0x06) / response, seq 4 Session ends
14–17 30.95 s both TCP FIN/ACK

Questions

  1. Which TCP port does the SMSC listen on, and why does Wireshark still decode SMPP?
  2. How are a request and its response linked in SMPP?
  3. What text was sent? (Convert the hex.)
  4. Did this capture prove that the message reached the phone?
  5. After how many seconds into the session was the message submitted?
Solutions
  1. 9000, not the default SMPP port 2775 (IANA, Module 23). Wireshark recognises the SMPP structure heuristically (the packet starts with a valid command_length/command_id), and you can also force it with -d tcp.port==9000,smpp.
  2. By sequence_number (same value in both) and by the command ID: the response's ID is the request's ID OR 0x80000000 (0x00000004 → 0x80000004). Also check command_status (0 = ESME_ROK).
  3. 74657374 = "test" (0x74 t, 0x65 e, 0x73 s, 0x74 t), in the default alphabet (data coding 0).
  4. No. Submit_sm_resp with status 0 only means the SMSC accepted the message and gave it the ID 47c8c77a. Delivery would appear later as a deliver_sm delivery receipt (stat:DELIVRD) — there is none in this capture (Module 1 and 23).
  5. About 28.9 seconds (first Enquire_link and Submit_sm at 28.91 s).

Lab 2 — A MAP USSD request over SIGTRAN

File: gsm_map_with_ussd_string.pcap (258 B, one packet) · Layers: IP / SCTP / M2UA / MTP3 / SCCP / TCAP / GSM MAP · Modules 3, 4, 23

Run:

tshark -n -r gsm_map_with_ussd_string.pcap -q -z io,phs
tshark -n -r gsm_map_with_ussd_string.pcap -V | less

What you should see (decoded values):

Layer Observation
SCTP Destination port 2904 (M2UA), PPID 2 (M2UA)
SCCP Called party GT (international, 9 digits, masked 27829…), SSN 147 = gsmSCF (MAP); calling party GT (11 digits, masked), SSN 6 = HLR
TCAP Message begin, one invoke component
Application context networkUnstructuredSsContext-v2 (0.4.0.0.1.0.19.2)
Operation processUnstructuredSS-Request (59)
USSD data coding 0x0f (GSM 7-bit alphabet, language unspecified)
USSD string (decoded from 7-bit packing) *140*…# (masked number)
MSISDN (E.164) a 11-digit number starting 27… (masked)

Questions

  1. Draw the protocol stack from the bottom up.
  2. Which SSNs are used, and what do they mean?
  3. Which MAP operation is this, and what is its opcode?
  4. Why does the USSD string need decoding?
  5. Which identifier tells the receiver which MAP "dialogue type" this is?
Solutions
  1. Ethernet / IP / SCTP (port 2904) / M2UA / MTP3 / SCCP / TCAP / MAP. M2UA carries the MTP2 user layer (signalling link) over IP, so MTP3 sits on top of it (Module 4).
  2. Called SSN 147 = gsmSCF (a service-control application) and calling SSN 6 = HLR (Module 4: HLR 6, VLR 7, MSC 8; the tshark decode lists 147 as gsmSCF/IM-SSF).
  3. processUnstructuredSS-Request, opcode 59 — consistent with the table in Module 23 and the MAP value table used by Wireshark.
  4. Because USSD strings travel in the GSM 7-bit packed alphabet (8 characters in 7 bytes); the DCS 0x0f tells the receiver the alphabet. Raw bytes aa180da6… become readable text only after unpacking.
  5. The application-context-name in the TCAP dialogue portion (networkUnstructuredSsContext-v2).

Lab 3 — A CAMEL prepaid call (CAP over TCAP/SCCP/MTP3/M2UA)

File: camel.pcap (1 KB) · Layers: IP / SCTP / M2UA / MTP3 / SCCP / TCAP / CAP · Modules 4, 29

Wireshark does not know the proprietary SSNs, so tell it which layer to use:

tshark -n -r camel.pcap -d sccp.ssn==200,tcap -d sccp.ssn==152,tcap
tshark -n -r camel.pcap -d sccp.ssn==200,tcap -d sccp.ssn==152,tcap -V | grep -i -E "opcode|serviceKey|eventTypeBCSM|application-context"

What you should see (5 packets):

Frame Time MTP3 OPC → DPC Message
1 0 s 10 → 100 InitialDP (opcode 0): service key 42, eventTypeBCSM = collectedInfo (2), calling party number and IMSI (masked)
2 0 s 100 → 10 Three operations in one TCAP message: RequestReportBCSMEvent (23), ApplyCharging (35), Continue (31)
3 1 s 10 → 100 EventReportBCSM (24) with oAnswer (7)
4 75 s 10 → 100 TCAP Continue
5 75 s 100 → 10 TCAP End

Application context: CAP-v2-gsmSSF-to-gsmSCF-AC (0.4.0.0.1.0.50.1). The armed events in frame 2 are routeSelectFailure (4), oCalledPartyBusy (5), oNoAnswer (6), oAnswer (7), oDisconnect (9, two legs) and oAbandon (10).

Questions

  1. Which node is the SSP (switch) and which is the SCP (service control)?
  2. What did the switch do at call setup and what did the SCP answer?
  3. Why did the SCP ask for oAnswer and oDisconnect events?
  4. Roughly how long did the call last?
  5. Where in this flow does charging start?
Solutions
  1. Point code 10 sends InitialDP, so it is the SSP/gsmSSF (the MSC); point code 100 answers with control operations, so it is the SCP/gsmSCF.
  2. The switch suspended the call and sent InitialDP (who is calling, service key 42). The SCP replied with RequestReportBCSMEvent (tell me about events), ApplyCharging (charging instructions, e.g. maximum duration) and Continue (carry on with the call).
  3. To be notified when the call is answered (start of billable time) and when it ends (to stop and settle the balance) — exactly what prepaid needs (Module 29: reserve, then confirm).
  4. About 74 seconds: the answer was reported at 1 s and the dialogue ended at 75 s.
  5. After oAnswer: the SCP knows the call began when the EventReportBCSM (oAnswer) arrives; the ApplyCharging operation tells the switch how to charge/limit time.

Lab 4 — A 3G Iu-CS mobile-originated call (RANAP / DTAP / RTP)

File: Mobile-Originating-Call(AMR).pcap (28 KB, 299 packets) · Layers: IP / SCTP / M3UA / SCCP / RANAP / DTAP (MM, CC) and UDP / RTP · Modules 3, 9, 10, 28

Run:

tshark -n -r Mobile-Originating-Call\(AMR\).pcap -q -z io,phs
tshark -n -r Mobile-Originating-Call\(AMR\).pcap -Y 'ranap || sccp'
tshark -n -r Mobile-Originating-Call\(AMR\).pcap -q -z rtp,streams
tshark -n -r Mobile-Originating-Call\(AMR\).pcap -Y 'rtp && ip.src==50.2.1.0' -T fields -e udp.length | sort | uniq -c

Signalling timeline (point codes 4096 = RNC side, 8192 = core side; M3UA over SCTP port 2905):

Time Message Meaning
5.198 s InitialUE-Message with DTAP CM Service Request Phone asks the MSC for a service (a call)
5.200 s SCCP CC (connection confirm) SCCP connection ready
5.250 s RANAP CommonID Core tells the RNC the IMSI/identity
5.301 s DTAP CM Service Accept Core accepts
5.351 s DTAP Setup Called number (BCD, NPI = E.164, TON unknown) and bearer capability
5.402 s DTAP Call Proceeding Network is routing the call
5.453 s RAB-AssignmentRequest Core asks the RNC for a radio bearer: traffic class conversational, max and guaranteed bit rate 12,200 bit/s (AMR 12.2)
6.144 s RAB-AssignmentResponse Bearer ready
6.194 s DTAP Alerting Ringing
6.294 s DTAP Connect Answered
6.345 s DTAP Connect Acknowledge Call established → voice flows
16.822 s DTAP Disconnect User hangs up
16.873 s DTAP Release / Release Complete Call control cleared
16.924 s Iu-ReleaseCommand / Iu-ReleaseComplete Radio resources released
17.024 s SCCP RLSD / RLC SCCP connection cleared

Voice (RTP): two streams (50.2.1.0:50000 ⇄ 50.3.1.0:40000), 127 packets each, payload type 96 (a dynamic type negotiated elsewhere, here AMR), no loss.

Questions

  1. Name the three signalling "planes" visible: radio network (RANAP), call control and mobility.
  2. Which message corresponds to "the call is answered" and how long did the conversation last?
  3. What quality-of-service class and speed does the RAB request, and what does 12.2 kbit/s mean?
  4. The RTP packet count is much lower than 10.5 s / 20 ms ≈ 520. Why? (Hint: look at udp.length values.)
  5. What is the role of SCCP connection setup/release here?
Solutions
  1. RANAP (RNC ⇄ core: connection and bearer management), DTAP-MM (mobility management: CM Service Request/Accept) and DTAP-CC (call control: Setup … Release). DTAP messages are carried inside RANAP DirectTransfer messages (they are phone-to-core NAS messages).
  2. Connect (6.294 s) and Connect Acknowledge (6.345 s). Disconnect arrived at 16.822 s, so conversation time was about 10.5 seconds. Billing normally starts at Connect/answer (Module 9).
  3. Conversational class (real-time voice) at 12,200 bit/s maximum and guaranteed. 12.2 kbit/s is the top AMR narrowband codec rate (Module 9).
  4. The stream uses DTX (discontinuous transmission): UDP length 55 bytes = a speech frame (64 packets), UDP length 29 bytes = a small comfort-noise (SID) update (62 packets, sent about every 160 ms) and one 24-byte first packet. Silence is not sent, so the average packet gap is about 86 ms although speech packets are 20 ms apart.
  5. SCCP connection-oriented service (CR/CC … RLSD/RLC) gives the call a dedicated signalling connection between RNC and core; it is set up with the first message and released after Iu-Release (Module 4).

Lab 5 — SIP registration, authentication and failed calls

File: aaa.pcap (111 KB, 691 packets; 81 SIP) · Layers: UDP / SIP (+ SDP) / RTP · Modules 9, 23

The capture is a real softphone with a registration problem and several failed calls (mixed with DNS/NetBIOS noise).

Run:

tshark -n -r aaa.pcap -Y sip
tshark -n -r aaa.pcap -Y sip -T fields -e sip.Method -e sip.Status-Code | sort | uniq -c | sort -rn
tshark -n -r aaa.pcap -q -z rtp,streams

Counts of SIP messages: 18 REGISTER · 14 × 401 · 11 INVITE · 11 CANCEL · 7 ACK · 7 × 100 Trying · 3 × 407 · 3 × 403 · 3 × 200 OK · 2 × 408 · 1 × 183 · 1 × 480.

Key episodes:

Time What happens
32.00 s REGISTER → 401 Unauthorized (digest challenge, realm, nonce, MD5)
49.42 s REGISTER with credentials → 100 Trying → 403 "Wrong password"
156–1273 s More attempts: 401 "nonce has changed" (stale nonce → retry with the new one) … finally 200 OK (registered) at 415.6 s and again at 1273.5 s
508.35 s INVITE sent, retransmitted at +0.51 s and +1.00 s (no answer) → a 100 Trying arrives only at 510.57 s
542–575 s CANCEL sent repeatedly: gaps 0.51, 1.01, 2.01, 4.02, 4.01 s … (capped at 4 s) → 408 Request Timeout
692.96 s INVITE to another server → 407 authentication required (proxy challenge) → ACK
727.08 s INVITE with credentials → 403 "Wrong password or domain"
1443.02 s INVITE → 100 Trying → 183 "In band info available" (early media) → 480 (temporarily unavailable) → ACK
1444.5 s RTP, G.711 A-law (payload 8), 9 packets: the early-media announcement

Questions

  1. Why does the first REGISTER always get 401?
  2. What is the difference between 401 and 407?
  3. The INVITE at 508 s was sent three times within 1.5 s. Why, and what timer explains the gaps?
  4. Why does the same pattern (0.5, 1, 2, 4 s) appear for the CANCELs?
  5. What does a 183 with SDP followed by RTP and then a 480 tell you?
  6. Give two possible causes of the repeated "403 Wrong password".
Solutions
  1. SIP digest authentication is challenge–response: the client does not know the server's nonce, so it sends an unauthenticated REGISTER, gets 401 with WWW-Authenticate: Digest realm=…, nonce=…, algorithm=MD5, then repeats it with an Authorization header (the same pattern as IMS-AKA but with a password, Module 9).
  2. 401 = the registrar/UAS asks for credentials (WWW-Authenticate); 407 = a proxy asks (Proxy-Authenticate).
  3. SIP over UDP is unreliable, so the client retransmits an INVITE until it gets any response. The first intervals are T1 = 500 ms, then doubling: the capture shows +0.508 s and +1.002 s. (RFC 3261 timers T1 = 0.5 s, T2 = 4 s.)
  4. The same retransmission timers apply to non-INVITE requests: the interval doubles up to T2 = 4 s (0.5, 1, 2, 4, 4 …) until a final response arrives.
  5. 183 Session Progress with SDP opens an early media path (announcements, ringback, "number unavailable") before answer; the 480 then says the callee is temporarily unavailable (e.g. unreachable or not registered). The RTP in between is the network's announcement.
  6. Wrong password or username, a domain/realm mismatch, an expired or cached nonce used incorrectly, or an account disabled at the provider (check realm, username, and the nonce/opaque values).

Lab 6 — An SCTP association (the transport under SIGTRAN, S1AP, NGAP, Diameter)

File: sctp-test.cap (69 KB, 74 packets) · Layers: IP / SCTP · Modules 4, 11, 12, 23

Run:

tshark -n -r sctp-test.cap | head -14
tshark -n -r sctp-test.cap -T fields -e frame.number -e sctp.chunk_type -e sctp.verification_tag | head -8

What you should see:

Frame Chunk Detail
1 INIT Verification tag 0x00000000 (not yet known)
2 INIT_ACK Carries a state cookie; header tag 0x43232544 (the client's own tag, echoed back)
3 COOKIE_ECHO Client returns the cookie; header tag 0x00000eb0 (the server's tag)
4 COOKIE_ACK Association established (four-way handshake)
5–… DATA (TSN 0, 1 …) and SACK (cumulative TSN ack, Arwnd) Data in order; both ends send at once

Both ports are 7 (echo test); in real telecom the ports are 2905 (M3UA), 36412 (S1AP), 38412 (NGAP), 3868 (Diameter).

Questions

  1. Why does SCTP need a four-way handshake and what does the cookie protect against?
  2. What is the verification tag for?
  3. What do TSN and SACK do?
  4. Name two reasons telecom signalling prefers SCTP over TCP.
Solutions
  1. The server does not allocate state until the COOKIE_ECHO returns, so a flood of fake INITs (SYN-flood style) cannot exhaust memory — the cookie carries the state and is authenticated. (Module 25: SIGTRAN transport attacks.)
  2. Each packet carries the peer's verification tag; packets with a wrong tag are dropped, which protects against blind injection and stale packets.
  3. TSN (Transmission Sequence Number) numbers each DATA chunk; SACK acknowledges the highest in-order TSN and reports gaps and the receiver window (Arwnd) — reliable, ordered delivery.
  4. Multi-streaming (no head-of-line blocking between streams), multi-homing (several IP addresses per endpoint for redundancy), message-oriented transfer and built-in keep-alive (heartbeats).

Lab 7 — A GSM location update on the Abis interface

File: abis-accept-network.pcap (4.9 KB, 85 frames) · Layers: LAPD / A-bis OML & RSL / DTAP (MM, SMS) · Modules 2, 10, 28

Tell Wireshark to use GSM SAPI values for LAPD:

tshark -n -r abis-accept-network.pcap -o lapd.use_gsm_sapi_values:TRUE | grep -i -E "Location|Identity|TMSI|SMS|RELease|IMMEDIATE"

What you should see (selected frames):

Frame Message Meaning
22 OML Establish TEI BTS management link setup (earlier frames set up the site)
70 IMMEDIATE ASSIGN COMMAND (RR) Network assigns a dedicated channel to the phone
72 ESTablish INDication (DTAP-MM) Location Updating Request Phone reports its new location area
73–74 Identity Request (twice) Network asks for identities
76–77 Identity Response (twice) Phone replies with the identity requested each time
78 Location Updating Accept Network accepts the phone
80 DTAP-SMS CP-DATA / RP-DATA (network → MS) An SMS delivered during the same connection
81 TMSI Reallocation Complete New temporary identity acknowledged
83 CP-DATA / RP-ACK (MS → network) Phone confirms the SMS
84–85 RF CHANnel RELease and its ACK Dedicated channel released

Questions

  1. Which procedure from Module 28 does frames 72–78 correspond to, and which network nodes behind the BSC would be involved?
  2. Why does the network ask for identities twice?
  3. How can an SMS be delivered right after the location update?
  4. Where does the TMSI come from and why is it used?
Solutions
  1. The 2G/3G location update (Module 28 §3a): the MSC/VLR receives the request, authenticates, and tells the HLR with MAP UpdateLocation; the HLR answers with InsertSubscriberData and cancels the old VLR. This capture only shows the radio-side (Abis) half.
  2. A typical network asks for different identities (for example IMSI and IMEI); the exact types are in the Identity Request's "identity type" field — check them with -V.
  3. The radio connection is still open; the SMSC/MSC can use the same dedicated channel to send a pending message (e.g. a welcome or network message) before the channel is released.
  4. The network allocates a new TMSI with the accept (or a reallocation) so the real IMSI need not be sent again over the air (Module 14: privacy); the phone confirms with TMSI Reallocation Complete.

8. A reading method that works on any capture

  1. Hierarchy first: -z io,phs tells you which protocols are present and what is missing (expected layers absent often means a decode problem, as in the ISUP draft‑6 note below).
  2. Conversations: who talks to whom, how many packets and bytes, in which direction.
  3. Timeline: read messages in time order and write the story in plain words (like the tables above).
  4. Identify the procedure: is it registration, call setup, handover, session, SMS?
  5. Find the first failure: the first error response, reject cause or timeout (Module 23 checklist).
  6. Check the timers: compare gaps with known timers (SIP T1/T2, TCP/SCTP retransmission, keep-alives).
  7. Cross-check identities: numbers, point codes, TEIDs, Call-IDs.
  8. Use the lookup tool: the Calculators & lookup page translates cause and error codes from verified tables.

A decoding trap I met while writing this lab

isup.cap (also on the sample page) is encoded with an old "draft‑6" M3UA that current Wireshark releases no longer decode (the parameters appear as unknown). When a capture shows only the outer layers, check the Wireshark wiki note for that file and the protocol preferences before assuming the traffic is wrong.

9. Build your own practice

  • Replay your own lab: set up an open-source core (Open5GS, free5GC, Kamailio) and capture attach, registration and SIP calls — Module 23 lists the tools.
  • Filters to memorise: sip, smpp, diameter, gtpv2, s1ap, ngap, pfcp, http2, sctp, m3ua, isup, gsm_map.
  • Always mask numbers before sharing a capture, and delete captures when you no longer need them.

Remember this: a capture is a story with timestamps. Learn the handful of messages of each procedure, read the first error, and compare gaps with the protocol's timers — most "mysteries" turn out to be a challenge not answered, a timer expiring, or an identity in the wrong format.

Sources for this module

How this module was written: from general knowledge of the field, not copied from these documents. They are the primary sources where each topic can be checked and studied further.

✓ page opened and title confirmed during writing   ◐ found via web search results   ○ official link only (titles from memory; content not read). Always check the latest version and release.