PISA Pakistan β€” Community CERT

← βš™οΈ Blue Team & Defense Engineering

3. Network Traffic Analysis with Wireshark for Incident Investigation

⏱ 10 min

Fundamentals of Packet Analysis in Pakistani Enterprise Networks

When a Pakistani bank's SOC receives an alert about suspicious JazzCash transactions, Wireshark becomes the primary tool for reconstructing the attack timeline. Packet analysis transforms fragmented logs into coherent evidence.

Setting Up Your Analysis Environment

Deploy Wireshark on a dedicated analysis workstation with sufficient RAM (minimum 16GB) for large captures. For enterprise environments monitoring NADRA verification systems:

  1. Configure port mirroring on switches to capture traffic spanning critical segments
  2. Use tcpdump for CLI captures: tcpdump -i eth0 -w capture.pcap host 192.168.1.100
  3. Apply BPF (Berkeley Packet Filter) syntax to reduce noise: tcpdump -i eth0 not broadcast and not multicast

Critical Filters for Pakistani Threat Scenarios

For easypaisa/JazzCash fraud investigation, apply these Wireshark display filters:

  • Suspicious DNS queries: dns.qry.name contains "easypaisa" and not dns.qry.name contains "easypaisa.com.pk"
  • Unencrypted credential transmission: http.request.method == "POST" and http contains "password"
  • Malicious callback domains: ip.addr == 103.x.x.x and tcp.port == 443

Reconstructing the OLX/Daraz Marketplace Attack Chain

Using Wireshark's Follow TCP Stream feature, trace the complete attack sequence:

  1. Initial phishing link from WhatsApp forward β†’ HTTP GET request to malicious URL
  2. Malware download via compromised JavaScript β†’ TCP stream showing executable payload
  3. C2 communication β†’ TLS handshake anomalies indicating rogue certificate
  4. Data exfiltration β†’ Large outbound POST requests to external IP

Apply MITRE ATT&CK mapping: T1566 (phishing), T1189 (drive-by compromise), T1071 (C2 channel)

Statistical Analysis for Anomaly Detection

Use Wireshark's Statistics menu for baseline establishment:

  • IO Graph: Identify traffic spikes during off-hours (potential unauthorized access)
  • Conversations: Spot unexpected peer-to-peer connections
  • Expert Information: Highlight warnings about malformed packets or protocol violations

Do / Don't

| Do | Don't | |-----|-------| | Use WPA2-enterprise where possible to encrypt WiFi captures | Capture in monitor mode without legal authorization | | Correlate packet timestamps with ELK SIEM logs | Analyze raw PCAPs without first filtering traffic | | Document every finding with frame numbers | Delete original PCAP files after analysis |

Takeaway: Capture a 10-minute baseline PCAP of your organization's normal traffic using tcpdump and load it in Wireshark. Practice applying DNS and HTTP filters until this workflow becomes automatic. When real incidents occur, you'll have muscle memory for rapid packet forensics.

← PrevNext β†’