/traffic-analysis-pcap
Traffic analysis and PCAP forensics playbook. Use when analyzing network captures including Wireshark filters, protocol analysis (HTTP/DNS/FTP/SMTP/USB/WiFi), data extraction, covert channel detection, PCAP repair, TLS decryption, and tshark command-line analysis.
$ npx -y skills add yaklang/hack-skills --skill traffic-analysis-pcap --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/traffic-analysis-pcap
Context preview
The summary Claude sees to decide when to auto-load this skill.
Traffic analysis and PCAP forensics playbook. Use when analyzing network captures including Wireshark filters, protocol analysis (HTTP/DNS/FTP/SMTP/USB/WiFi), data extraction, covert channel detection, PCAP repair, TLS decryption, and tshark command-line analysis.
SKILL.md
traffic-analysis-pcap.SKILL.mdname: traffic-analysis-pcap
description: >-
Traffic analysis and PCAP forensics playbook. Use when analyzing network captures including Wireshark filters, protocol analysis (HTTP/DNS/FTP/SMTP/USB/WiFi), data extraction, covert channel detection, PCAP repair, TLS decryption, and tshark command-line analysis.
SKILL: Traffic Analysis & PCAP — Expert Analysis Playbook
> **AI LOAD INSTRUCTION**: Expert traffic analysis and PCAP forensics techniques. Covers PCAP repair, Wireshark essential filters, protocol-specific analysis (HTTP, HTTPS/TLS, DNS, FTP, SMTP, USB HID, WiFi, ICMP), data extraction (file carving, credential harvesting, covert channels), NetworkMiner, and tshark CLI analysis. Base models miss USB keyboard decode patterns, DNS tunneling detection heuristics, and TLS decryption workflows.
0. RELATED ROUTING
Before going deep, consider loading:
- [memory-forensics-volatility](../memory-forensics-volatility/SKILL.md) for correlating memory artifacts with network traffic
- [steganography-techniques](../steganography-techniques/SKILL.md) for analyzing files extracted from traffic captures
- [network-protocol-attacks](../network-protocol-attacks/SKILL.md) for understanding attack patterns visible in captures
- [reverse-shell-techniques](../reverse-shell-techniques/SKILL.md) for identifying shell traffic in captures
---
1. PCAP REPAIR
pcapfix corrupted.pcap -o fixed.pcap # repair corrupted PCAP
# Magic bytes: d4c3b2a1=pcap(LE), a1b2c3d4=pcap(BE), 0a0d0d0a=pcapng
editcap -F pcap capture.pcapng capture.pcap # convert pcapng→pcap
mergecap -w merged.pcap file1.pcap file2.pcap # merge captures
---
2. WIRESHARK ESSENTIAL FILTERS
IP / Host Filters
ip.addr == 10.0.0.1 # source or destination
ip.src == 10.0.0.1 # source only
ip.dst == 10.0.0.1 # destination only
ip.addr == 10.0.0.0/24 # subnet
!(ip.addr == 10.0.0.1) # exclude host
Protocol Filters
http # all HTTP
dns # all DNS
tcp # all TCP
ftp # all FTP
smtp # all SMTP
tls # all TLS/SSL
icmp # all ICMP
arp # all ARP
TCP / Stream
tcp.stream eq 5 # follow specific TCP stream
tcp.port == 80 # traffic on port 80
tcp.flags.syn == 1 && tcp.flags.ack == 0 # SYN packets (connection starts)
tcp.analysis.retransmission # retransmitted packets
tcp.len > 0 # packets with payload
HTTP
http.request.method == "POST" # POST requests
http.request.method == "GET" # GET requests
http.response.code == 200 # successful responses
http.response.code >= 400 # error responses
http.request.uri contains "login" # URI contains string
http.host contains "target.com" # specific host
http.content_type contains "json" # JSON responses
http.cookie contains "session" # session cookies
http.request.full_uri # show full URIs (column)
DNS
dns.qry.name contains "evil.com" # specific domain queries
dns.qry.type == 1 # A records
dns.qry.type == 28 # AAAA records
dns.qry.type == 16 # TXT records
dns.flags.response == 1 # DNS responses only
dns.resp.len > 100 # large DNS responses
TLS
tls.handshake.type == 1 # Client Hello
tls.handshake.type == 2 # Server Hello
tls.handshake.extensions.server_name # SNI (hostname)
tls.handshake.type == 11 # Certificate
Content Search
frame contains "password" # search in raw bytes
frame contains "flag{" # CTF flag pattern
tcp contains "admin" # search in TCP payload---
3. PROTOCOL ANALYSIS
HTTP — Follow Stream & Extract
Right-click packet → Follow → TCP Stream
# Shows full HTTP request/response conversation
# File extraction:
# File → Export Objects → HTTP → Save All
# Useful filters for credential hunting:
http.request.method == "POST" && frame contains "password"
http.request.method == "POST" && frame contains "login"
http.authbasic # Basic auth (base64 encoded)
HTTPS / TLS Decryption
# Method 1: SSLKEYLOGFILE (pre-master secrets from browser)
# Set environment variable BEFORE opening browser:
export SSLKEYLOGFILE=/tmp/sslkeys.log
firefox https://target.com
# Wireshark: Edit → Preferences → Protocols → TLS
# → (Pre)-Master-Secret log filename: /tmp/sslkeys.log
# Method 2: Server private key (for RSA key exchange only)
# Wireshark: Edit → Preferences → Protocols → TLS → RSA keys list
# → Add: IP, Port, Protocol, Key file (.pem)
DNS — Tunneling Detection
# Indicators of DNS tunneling:
# 1. Unusually long subdomain names (>30 chars)
# 2. High volume of TXT record queries/responses
# 3. Consistent query patterns to same domain
# 4. Base32/Base64-like subdomain strings
# 5. High query frequency from single host
# Wireshark filter for suspicious DNS:
dns.qry.name.len > 50 # long query names
dns.qry.type == 16 # TXT records (common for tunneling)
dns.resp.len > 512 # large DNS responses
# tshark extraction:
tshark -r capture.pcap -Y "dns.qry.type==16" -T fields -e dns.qry.name
FTP — Credential & File Extraction
# FTP credentials (plaintext)
# Filter: ftp.request.command == "USER" || ftp.request.command == "PASS"
# FTP file transfer reconstruction:
# FTP uses separate data channel (usually port 20 or dynamic)
# Follow TCP stream of data connection to extract file
# tshark:
tshark -r capture
Read more
name: traffic-analysis-pcap description: >- Traffic analysis and PCAP forensics playbook. Use when analyzing network captures including Wireshark filters, protocol analysis (HTTP/DNS/FTP/SMTP/USB/WiFi), data extraction, covert channel detection, PCAP repair, TLS decryption, and tshark command-line analysis.
SKILL: Traffic Analysis & PCAP — Expert Analysis Playbook
> **AI LOAD INSTRUCTION**: Expert traffic analysis and PCAP forensics techniques. Covers PCAP repair, Wireshark essential filters, protocol-specific analysis (HTTP, HTTPS/TLS, DNS, FTP, SMTP, USB HID, WiFi, ICMP), data extraction (file carving, credential harvesting, covert channels), NetworkMiner, and tshark CLI analysis. Base models miss USB keyboard decode patterns, DNS tunneling detection heuristics, and TLS decryption workflows.
0. RELATED ROUTING
Before going deep, consider loading:
- [memory-forensics-volatility](../memory-forensics-volatility/SKILL.md) for correlating memory artifacts with network traffic
- [steganography-techniques](../steganography-techniques/SKILL.md) for analyzing files extracted from traffic captures
- [network-protocol-attacks](../network-protocol-attacks/SKILL.md) for understanding attack patterns visible in captures
- [reverse-shell-techniques](../reverse-shell-techniques/SKILL.md) for identifying shell traffic in captures
---
1. PCAP REPAIR
pcapfix corrupted.pcap -o fixed.pcap # repair corrupted PCAP # Magic bytes: d4c3b2a1=pcap(LE), a1b2c3d4=pcap(BE), 0a0d0d0a=pcapng editcap -F pcap capture.pcapng capture.pcap # convert pcapng→pcap mergecap -w merged.pcap file1.pcap file2.pcap # merge captures
---
2. WIRESHARK ESSENTIAL FILTERS
IP / Host Filters
ip.addr == 10.0.0.1 # source or destination ip.src == 10.0.0.1 # source only ip.dst == 10.0.0.1 # destination only ip.addr == 10.0.0.0/24 # subnet !(ip.addr == 10.0.0.1) # exclude host
Protocol Filters
http # all HTTP dns # all DNS tcp # all TCP ftp # all FTP smtp # all SMTP tls # all TLS/SSL icmp # all ICMP arp # all ARP
TCP / Stream
tcp.stream eq 5 # follow specific TCP stream tcp.port == 80 # traffic on port 80 tcp.flags.syn == 1 && tcp.flags.ack == 0 # SYN packets (connection starts) tcp.analysis.retransmission # retransmitted packets tcp.len > 0 # packets with payload
HTTP
http.request.method == "POST" # POST requests http.request.method == "GET" # GET requests http.response.code == 200 # successful responses http.response.code >= 400 # error responses http.request.uri contains "login" # URI contains string http.host contains "target.com" # specific host http.content_type contains "json" # JSON responses http.cookie contains "session" # session cookies http.request.full_uri # show full URIs (column)
DNS
dns.qry.name contains "evil.com" # specific domain queries dns.qry.type == 1 # A records dns.qry.type == 28 # AAAA records dns.qry.type == 16 # TXT records dns.flags.response == 1 # DNS responses only dns.resp.len > 100 # large DNS responses
TLS
tls.handshake.type == 1 # Client Hello tls.handshake.type == 2 # Server Hello tls.handshake.extensions.server_name # SNI (hostname) tls.handshake.type == 11 # Certificate
Content Search
frame contains "password" # search in raw bytes
frame contains "flag{" # CTF flag pattern
tcp contains "admin" # search in TCP payload---
3. PROTOCOL ANALYSIS
HTTP — Follow Stream & Extract
Right-click packet → Follow → TCP Stream # Shows full HTTP request/response conversation # File extraction: # File → Export Objects → HTTP → Save All # Useful filters for credential hunting: http.request.method == "POST" && frame contains "password" http.request.method == "POST" && frame contains "login" http.authbasic # Basic auth (base64 encoded)
HTTPS / TLS Decryption
# Method 1: SSLKEYLOGFILE (pre-master secrets from browser) # Set environment variable BEFORE opening browser: export SSLKEYLOGFILE=/tmp/sslkeys.log firefox https://target.com # Wireshark: Edit → Preferences → Protocols → TLS # → (Pre)-Master-Secret log filename: /tmp/sslkeys.log # Method 2: Server private key (for RSA key exchange only) # Wireshark: Edit → Preferences → Protocols → TLS → RSA keys list # → Add: IP, Port, Protocol, Key file (.pem)
DNS — Tunneling Detection
# Indicators of DNS tunneling: # 1. Unusually long subdomain names (>30 chars) # 2. High volume of TXT record queries/responses # 3. Consistent query patterns to same domain # 4. Base32/Base64-like subdomain strings # 5. High query frequency from single host # Wireshark filter for suspicious DNS: dns.qry.name.len > 50 # long query names dns.qry.type == 16 # TXT records (common for tunneling) dns.resp.len > 512 # large DNS responses # tshark extraction: tshark -r capture.pcap -Y "dns.qry.type==16" -T fields -e dns.qry.name
FTP — Credential & File Extraction
# FTP credentials (plaintext) # Filter: ftp.request.command == "USER" || ftp.request.command == "PASS" # FTP file transfer reconstruction: # FTP uses separate data channel (usually port 20 or dynamic) # Follow TCP stream of data connection to extract file # tshark: tshark -r capture
Master Entry → Category Entries → Deep Topic Skills One master entry, six category entries, and 101 deep topic skills across 14 security domains.
Repo: yaklang/hack-skills
Other skills on hack-skills.
- /401-403-bypass-techniques
401/403 bypass playbook. Use when encountering access-denied responses on admin panels, API endpoints, or restricted paths. Covers path manipulation, HTTP method tampering, header injection, protocol downgrade, and automated bypass tools.
Open skill - /active-directory-acl-abuse
Active Directory ACL abuse playbook. Use when exploiting misconfigured AD permissions including GenericAll, WriteDACL, DCSync rights, shadow credentials, LAPS reading, GPO abuse, and BloodHound-guided attack paths.
Open skill - /active-directory-certificate-services
AD Certificate Services attack playbook. Use when targeting misconfigured AD CS for privilege escalation via ESC1-ESC13 template abuse, NTLM relay to enrollment, CA officer abuse, and certificate-based persistence.
Open skill - /active-directory-kerberos-attacks
Kerberos attack playbook for Active Directory. Use when targeting AD authentication via AS-REP roasting, Kerberoasting, golden/silver/diamond tickets, delegation abuse, or pass-the-ticket attacks.
Open skill - /ai-ml-security
AI/ML security playbook. Use when assessing model supply chain attacks (pickle RCE, poisoned weights), adversarial examples, model poisoning, model stealing, data privacy attacks (membership inference, model inversion), and autonomous agent security risks.
Open skill - /android-pentesting-tricks
Android pentesting playbook. Use when testing Android applications for SSL pinning bypass, exported component abuse, WebView vulnerabilities, intent redirection, root detection bypass, tapjacking, and backup extraction during authorized mobile security assessments.
Open skill

