A few words
2024 about to come to an end, this likely to be the last note of the year. Something that I have always wanted to do but kept forgetting. A Wireshark Cheat Sheet for Digital Forensics and Incident Response (DFIR).
Initial Triage
# General overview of protocols
Statistics > Protocol Hierarchy
# Check conversations & endpoints
Statistics > Conversations
Statistics > Endpoints
Essential Wireshark Filters
Suspicious Activities
# HTTP POST Requests (potential data exfiltration)
http.request.method == "POST"
# File Downloads
http.request.method == "GET" && http.content_type contains "application"
# Command & Control Traffic
tcp.flags.syn == 1 && tcp.flags.ack == 0
dns.qry.type == 1 && dns.qry.name.len > 15
# Suspicious Ports
tcp.port == 4444 || udp.port == 4444
!(tcp.port == 80 || tcp.port == 443)
# Data Transfer
ftp || smb || http.request.method == "PUT"
SSL/TLS Analysis
# Certificate Handshakes
ssl.handshake.type == 11
# Certificate Errors
ssl.alert.description == 48 || ssl.alert.description == 62
# View Certificates
tls.handshake.certificate
# All HTTPS Traffic
tcp.port == 443 || ssl
DNS Analysis
# All DNS Traffic
dns
# DNS Queries Only
dns.flags.response == 0
# DNS with Large Queries (possible tunneling)
dns.qry.name.len > 15
# DNS TXT Records (possible C2)
dns.txt
File Extraction Methods
HTTP Objects
- File > Export Objects > HTTP
- Filter relevant objects
- Save suspicious files
From Stream
- Right-click packet
- Follow > TCP/HTTP/SSL Stream
- Show data as: Raw
- Save content
Hash Verification
Certificate Analysis Steps
- Filter for certificates:
ssl.handshake.type == 11
- Look for:
- Issuer = Subject (self-signed)
- Validity periods
- Common Name (CN)
- Locality Name
- Organization
Data Exfiltration Indicators
- Large data transfers
- Unusual destination IPs
- Base64 encoded content
- DNS tunneling patterns
- Irregular protocol behavior
Quick Investigation Steps
-
Initial Access
- Sort by time
- Look for first suspicious connections
- Check initial HTTP/HTTPS requests
-
Malware Analysis
- Export suspicious files
- Calculate hashes
- Check file metadata
- Look for C2 traffic patterns
-
Lateral Movement
- Check internal communications
- Look for scanning activity
- Monitor SMB/RDP traffic
-
Data Exfiltration
- Large outbound transfers
- Unusual protocols
- Encoded data
- Abnormal DNS activity
Useful Statistics Views
Statistics > Protocol Hierarchy
Statistics > Conversations
Statistics > Endpoints
Statistics > HTTP > Requests
Statistics > Flow Graph
Follow Stream Options
- Right-click > Follow > TCP Stream
- Right-click > Follow > UDP Stream
- Right-click > Follow > HTTP Stream
- Right-click > Follow > SSL Stream
Timeline Analysis
- Use Time Display Format:
- View > Time Display Format
- Choose UTC for standardization
- Use Time References:
- Right-click packet > Set/Unset Time Reference