Wireshark Network Monitoring for macOS | AIMF Security

🦈 Wireshark Network Monitoring

Packet Capture & Deep Traffic Analysis

Install Wireshark to capture and analyze every packet on your network. Detect suspicious connections, malware beaconing, and data exfiltration in real-time.

⏱️ 45 minutes 🔴 Advanced 🆓 Free & Open Source

What is Wireshark?

Wireshark is the world's most popular network protocol analyzer. It lets you capture and inspect network traffic at the packet level.

  • See every connection your Mac makes to the internet
  • Detect malware beaconing to command-and-control servers
  • Identify data exfiltration attempts
  • Analyze suspicious DNS queries
  • Verify encryption is working properly

⚠️ Advanced Tool Warning

Wireshark is a professional-grade tool. The interface can be overwhelming at first. This guide teaches the essentials for security monitoring.

Legal & Ethical Considerations

🚨 Important Legal Notice

Only capture traffic on networks you own or have explicit permission to monitor. Never intercept other people's communications.

Installation

1 Download Wireshark

  1. Go to wireshark.org/download.html
  2. Click macOS Arm 64-bit (M1/M2/M3) or Intel 64-bit
  3. Wait for download (~100MB)

2 Install Wireshark

  1. Open the downloaded .dmg file
  2. Drag Wireshark to Applications
  3. Important: Also install ChmodBPF package
  4. Double-click Install ChmodBPF.pkg
  5. Enter admin password when prompted

3 Grant Capture Permissions

  1. After installing ChmodBPF, restart your Mac
  2. Open Wireshark from Applications
  3. You should see network interfaces listed

⚠️ No Interfaces?

Run in Terminal: sudo dseditgroup -o edit -a $(whoami) -t user access_bpf then restart.

Network Interfaces

InterfaceDescription
en0Primary network (usually Wi-Fi)
en1Secondary (Ethernet or Wi-Fi)
lo0Loopback (localhost)
utun*VPN tunnel interfaces

Your First Capture

  1. Open Wireshark
  2. Double-click en0 (or your primary interface)
  3. Packets start appearing immediately
  4. Click red square to stop capture
  5. File → Save As to save capture

Essential Display Filters

Wireshark filter cheat sheet showing protocol, IP, and port filters

Protocol Filters

FilterShows
httpHTTP traffic (unencrypted)
dnsDNS queries
tlsTLS/SSL encrypted traffic
tcpAll TCP traffic
udpAll UDP traffic

IP & Port Filters

FilterShows
ip.addr == 192.168.1.100Traffic to/from IP
tcp.port == 443HTTPS traffic
tcp.port == 80HTTP traffic
udp.port == 53DNS queries

Combination Filters

http or dns                    # HTTP and DNS
ip.addr == 192.168.1.100 and tcp   # TCP from specific host
dns.qry.name contains "evil"       # DNS for specific domain
http.request.method == "POST"      # HTTP uploads

Following TCP Streams

Network packet flow diagram showing traffic between Mac and server
  1. Click on an interesting packet
  2. Right-click → Follow → TCP Stream
  3. See the entire conversation reconstructed
  4. Red = sent, Blue = received

Detecting Suspicious Traffic

Suspicious network traffic patterns including DNS anomalies, beaconing, and unusual ports

🚩 Unusual DNS Queries

Filter: dns — Look for random-looking domains, high volume to same domain, very long subdomains.

🚩 Beaconing Behavior

Regular, periodic connections to same IP (every 30s, 60s). Small data transfers at intervals.

🚩 Unencrypted Sensitive Data

Filter: http — Passwords or credentials in plain text over HTTP.

🚩 Unusual Ports

Traffic on non-standard ports. Encrypted traffic hiding on unusual ports.

Useful Statistics

  • Statistics → Conversations: All IP pairs, sorted by data volume
  • Statistics → Endpoints: All IPs your Mac contacted
  • Statistics → Protocol Hierarchy: Protocol breakdown
  • Statistics → DNS: All DNS queries summary

Quick Reference Filters

# DNS queries
dns

# HTTP traffic
http

# Traffic to/from IP
ip.addr == 192.168.1.100

# Exclude local traffic
!(ip.addr == 192.168.0.0/16)

# HTTP POST requests
http.request.method == "POST"

# Failed connections
tcp.flags.reset == 1

# Large packets
frame.len > 1400

Summary

  • ✅ Wireshark installed with capture permissions
  • ✅ Essential display filters for security analysis
  • ✅ Ability to follow TCP streams
  • ✅ Knowledge of suspicious traffic patterns
  • ✅ Statistics views for traffic analysis

🎉 You're Now a Network Detective

With Wireshark, you can see exactly what's happening on your network. Use this power responsibly and ethically.