[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7AA4AX4JKME3TB355JJMKX1":3,"skill-same:01M7AA4AX4JKME3TB355JJMKX1":83},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":16,"sourceHtmlUrl":17,"categories":18,"keywords":19,"publishedAt":20,"linkOnly":21,"markdownContent":22,"markdownBody":23,"frontMatter":24,"refName":46,"commitSha":47,"skillDirectory":48,"forksCount":14,"repositoryHtmlUrl":49,"repositoryHomepageUrl":6,"ownerHtmlUrl":50,"ownerBlogUrl":6,"ownerDescription":51,"updatedAt":52,"install":53,"resources":66},"01M7AA4AX4JKME3TB355JJMKX1","performing-network-forensics-with-wireshark",null,"Capture and analyze network traffic using Wireshark and tshark to reconstruct network events from PCAP\u002FPCAPNG files, extract transferred files and credentials, and identify command-and-control communications. Use when analyzing captured traffic from a security incident, reconstructing data exfiltration, or finding network indicators of compromise during malware analysis.","NeelakshSaxena\u002FVayu","NeelakshSaxena","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F87892838?v=4","01M7A3B9YFS6F6N9DD1787DT86","Neelaksh Saxena","01M7A3B9ZKBT09MNMPX2XN69BY",0,"Apache-2.0","https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fperforming-network-forensics-with-wireshark\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fperforming-network-forensics-with-wireshark\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: performing-network-forensics-with-wireshark\ndescription: Capture and analyze network traffic using Wireshark and tshark to reconstruct network events from PCAP\u002FPCAPNG files, extract transferred files and credentials, and identify command-and-control communications. Use when analyzing captured traffic from a security incident, reconstructing data exfiltration, or finding network indicators of compromise during malware analysis.\ndomain: cybersecurity\nsubdomain: digital-forensics\ntags:\n- forensics\n- network-forensics\n- wireshark\n- pcap\n- packet-analysis\n- traffic-analysis\nversion: '1.0'\nauthor: mahipal\nlicense: Apache-2.0\nnist_csf:\n- RS.AN-03\n- DE.AE-02\n- RS.MA-01\nmitre_attack:\n- T1005\n- T1074\n- T1119\n- T1070\n- T1059\n---\n\n# Performing Network Forensics with Wireshark\n\n## When to Use\n- When analyzing captured network traffic (PCAP files) from a security incident\n- For identifying command-and-control (C2) communications in captured traffic\n- When reconstructing data exfiltration activities from packet captures\n- During malware analysis to identify network indicators of compromise\n- For extracting files, credentials, and artifacts transferred over the network\n\n## Prerequisites\n- Wireshark or tshark installed for packet analysis\n- PCAP\u002FPCAPNG files from network captures (tcpdump, Wireshark, network TAP)\n- NetworkMiner for automated artifact extraction\n- Sufficient RAM for large capture files (1GB+ PCAPs need 8GB+ RAM)\n- Understanding of TCP\u002FIP, HTTP, DNS, TLS protocols\n- GeoIP databases for IP geolocation\n\n## Workflow\n\n### Step 1: Prepare and Validate the Capture File\n\n```bash\n# Install Wireshark and tshark\nsudo apt-get install wireshark tshark\n\n# Verify the PCAP file\ncapinfos \u002Fcases\u002Fcase-2024-001\u002Fnetwork\u002Fcapture.pcap\n\n# Output includes: file type, packet count, capture duration, data size\n# Example output:\n# File name:           capture.pcap\n# File type:           Wireshark\u002Ftcpdump\u002F... - pcap\n# Number of packets:   1,245,678\n# File size:           856 MB\n# Data size:           823 MB\n# Capture duration:    3600.123456 seconds\n# First packet time:   2024-01-15 14:00:00.000000\n# Last packet time:    2024-01-15 15:00:00.123456\n\n# Hash the PCAP for integrity\nsha256sum \u002Fcases\u002Fcase-2024-001\u002Fnetwork\u002Fcapture.pcap \\\n   > \u002Fcases\u002Fcase-2024-001\u002Fnetwork\u002Fpcap_hash.txt\n\n# Get a protocol hierarchy statistics overview\ntshark -r \u002Fcases\u002Fcase-2024-001\u002Fnetwork\u002Fcapture.pcap -q -z io,phs\n```\n\n### Step 2: Filter and Identify Suspicious Traffic\n\n```bash\n# Extract conversation statistics\ntshark -r \u002Fcases\u002Fcase-2024-001\u002Fnetwork\u002Fcapture.pcap -q -z conv,tcp\n\n# Find top talkers by bytes transferred\ntshark -r \u002Fcases\u002Fcase-2024-001\u002Fnetwork\u002Fcapture.pcap -q -z endpoints,ip \\\n   | sort -t$'\\t' -k3 -rn | head -20\n\n# Filter for DNS queries (potential C2 or exfiltration)\ntshark -r \u002Fcases\u002Fcase-2024-001\u002Fnetwork\u002Fcapture.pcap \\\n   -Y \"dns.qr == 0\" \\\n   -T fields -e frame.time -e ip.src -e dns.qry.name \\\n   > \u002Fcases\u002Fcase-2024-001\u002Fanalysis\u002Fdns_queries.txt\n\n# Find DNS queries to unusual TLDs or long domain names (DNS tunneling)\ntshark -r \u002Fcases\u002Fcase-2024-001\u002Fnetwork\u002Fcapture.pcap \\\n   -Y \"dns.qr == 0 && dns.qry.name matches \\\"[a-z0-9]{30,}\\\"\" \\\n   -T fields -e frame.time -e ip.src -e dns.qry.name \\\n   > \u002Fcases\u002Fcase-2024-001\u002Fanalysis\u002Fsuspicious_dns.txt\n\n# Filter HTTP traffic\ntshark -r \u002Fcases\u002Fcase-2024-001\u002Fnetwork\u002Fcapture.pcap \\\n   -Y \"http.request\" \\\n   -T fields -e frame.time -e ip.src -e ip.dst -e http.request.method \\\n   -e http.host -e http.request.uri -e http.user_agent \\\n   > \u002Fcases\u002Fcase-2024-001\u002Fanalysis\u002Fhttp_requests.txt\n\n# Find connections to known malicious ports\ntshark -r \u002Fcases\u002Fcase-2024-001\u002Fnetwork\u002Fcapture.pcap \\\n   -Y \"tcp.dstport == 4444 || tcp.dstport == 8080 || tcp.dstport == 1337 || tcp.dstport == 6667\" \\\n   -T fields -e frame.time -e ip.src -e ip.dst -e tcp.dstport \\\n   > \u002Fcases\u002Fcase-2024-001\u002Fanalysis\u002Fsuspicious_ports.txt\n\n# Detect beaconing patterns (regular interval connections)\ntshark -r \u002Fcases\u002Fcase-2024-001\u002Fnetwork\u002Fcapture.pcap \\\n   -Y \"ip.dst == 185.0.0.1\" \\\n   -T fields -e frame.time_epoch \\\n   > \u002Ftmp\u002Fbeacon_times.txt\n```\n\n### Step 3: Extract Files and Objects from Traffic\n\n```bash\n# Export HTTP objects (files transferred over HTTP)\ntshark -r \u002Fcases\u002Fcase-2024-001\u002Fnetwork\u002Fcapture.pcap \\\n   --export-objects http,\u002Fcases\u002Fcase-2024-001\u002Fanalysis\u002Fhttp_objects\u002F\n\n# Export SMB objects\ntshark -r \u002Fcases\u002Fcase-2024-001\u002Fnetwork\u002Fcapture.pcap \\\n   --export-objects smb,\u002Fcases\u002Fcase-2024-001\u002Fanalysis\u002Fsmb_objects\u002F\n\n# Export DICOM objects (medical imaging)\ntshark -r \u002Fcases\u002Fcase-2024-001\u002Fnetwork\u002Fcapture.pcap \\\n   --export-objects dicom,\u002Fcases\u002Fcase-2024-001\u002Fanalysis\u002Fdicom_objects\u002F\n\n# Export FTP data transfers\ntshark -r \u002Fcases\u002Fcase-2024-001\u002Fnetwork\u002Fcapture.pcap \\\n   -Y \"ftp-data\" \\\n   -T fields -e ftp-data.data \\\n   --export-objects ftp-data,\u002Fcases\u002Fcase-2024-001\u002Fanalysis\u002Fftp_objects\u002F\n\n# Hash all extracted objects\nfind \u002Fcases\u002Fcase-2024-001\u002Fanalysis\u002Fhttp_objects\u002F -type f -exec sha256sum {} \\; \\\n   > \u002Fcases\u002Fcase-2024-001\u002Fanalysis\u002Fextracted_file_hashes.txt\n\n# Check extracted file hashes against VirusTotal\nwhile read hash filepath; do\n   echo \"Checking $filepath ($hash)\"\n   curl -s \"https:\u002F\u002Fwww.virustotal.com\u002Fapi\u002Fv3\u002Ffiles\u002F$hash\" \\\n      -H \"x-apikey: YOUR_API_KEY\" | python3 -c \"\nimport json,sys\ndata=json.load(sys.stdin)\nif 'data' in data:\n   stats=data['data']['attributes']['last_analysis_stats']\n   print(f'  Malicious: {stats[\\\"malicious\\\"]}, Undetected: {stats[\\\"undetected\\\"]}')\nelse:\n   print('  Not found on VT')\n\"\ndone \u003C \u002Fcases\u002Fcase-2024-001\u002Fanalysis\u002Fextracted_file_hashes.txt\n```\n\n### Step 4: Reconstruct TCP Streams and Sessions\n\n```bash\n# Follow a specific TCP stream (stream index 42)\ntshark -r \u002Fcases\u002Fcase-2024-001\u002Fnetwork\u002Fcapture.pcap \\\n   -q -z \"follow,tcp,ascii,42\" \\\n   > \u002Fcases\u002Fcase-2024-001\u002Fanalysis\u002Fstream_42.txt\n\n# Extract all HTTP request-response pairs for a suspicious host\ntshark -r \u002Fcases\u002Fcase-2024-001\u002Fnetwork\u002Fcapture.pcap \\\n   -Y \"http && ip.addr == 185.0.0.1\" \\\n   -T fields -e frame.time -e http.request.method -e http.host \\\n   -e http.request.uri -e http.response.code -e http.content_length \\\n   > \u002Fcases\u002Fcase-2024-001\u002Fanalysis\u002Fsuspicious_http.txt\n\n# Extract TLS\u002FSSL certificate information\ntshark -r \u002Fcases\u002Fcase-2024-001\u002Fnetwork\u002Fcapture.pcap \\\n   -Y \"tls.handshake.type == 11\" \\\n   -T fields -e ip.dst -e tls.handshake.certificate \\\n   > \u002Fcases\u002Fcase-2024-001\u002Fanalysis\u002Ftls_certs.txt\n\n# Extract TLS SNI (Server Name Indication) values\ntshark -r \u002Fcases\u002Fcase-2024-001\u002Fnetwork\u002Fcapture.pcap \\\n   -Y \"tls.handshake.extensions_server_name\" \\\n   -T fields -e frame.time -e ip.src -e ip.dst \\\n   -e tls.handshake.extensions_server_name \\\n   > \u002Fcases\u002Fcase-2024-001\u002Fanalysis\u002Ftls_sni.txt\n\n# Extract credentials from unencrypted protocols\ntshark -r \u002Fcases\u002Fcase-2024-001\u002Fnetwork\u002Fcapture.pcap \\\n   -Y \"ftp.request.command == \\\"USER\\\" || ftp.request.command == \\\"PASS\\\"\" \\\n   -T fields -e frame.time -e ip.src -e ftp.request.command -e ftp.request.arg\n\ntshark -r \u002Fcases\u002Fcase-2024-001\u002Fnetwork\u002Fcapture.pcap \\\n   -Y \"http.authorization\" \\\n   -T fields -e frame.time -e ip.src -e http.host -e http.authorization\n```\n\n### Step 5: Use NetworkMiner for Automated Analysis\n\n```bash\n# Install NetworkMiner (Mono required on Linux)\nsudo apt-get install mono-complete\nwget https:\u002F\u002Fwww.netresec.com\u002F?download=NetworkMiner -O NetworkMiner.zip\nunzip NetworkMiner.zip -d \u002Fopt\u002FNetworkMiner\u002F\n\n# Run NetworkMiner\nmono \u002Fopt\u002FNetworkMiner\u002FNetworkMiner.exe \u002Fcases\u002Fcase-2024-001\u002Fnetwork\u002Fcapture.pcap\n\n# NetworkMiner automatically extracts:\n# - Host inventory (OS fingerprinting, open ports)\n# - Files transferred over HTTP, FTP, SMB, TFTP\n# - Images from web traffic\n# - Credentials (plaintext and NTLM hashes)\n# - DNS records\n# - Session parameters\n# - Anomalies and alerts\n```\n\n### Step 6: Generate Network Forensics Report\n\n```bash\n# Compile findings\ncat \u003C\u003C 'EOF' > \u002Fcases\u002Fcase-2024-001\u002Fanalysis\u002Fnetwork_forensics_report.txt\nNETWORK FORENSICS ANALYSIS REPORT\n===================================\nCase: 2024-001\nCapture File: capture.pcap (856 MB, 1,245,678 packets)\nCapture Period: 2024-01-15 14:00 to 15:00 UTC\nAnalyst: [Examiner Name]\n\nTRAFFIC OVERVIEW:\n  Total packets: 1,245,678\n  Unique source IPs: 45\n  Unique destination IPs: 234\n  Protocols: TCP (78%), UDP (18%), ICMP (2%), Other (2%)\n\nC2 COMMUNICATION:\n  Destination: 185.0.0.1:443\n  Beaconing interval: ~60 seconds\n  Total connections: 58\n  Data transferred: 4.2 MB outbound, 12.3 MB inbound\n  TLS SNI: update-service.malware-c2.com\n\nEXFILTRATION:\n  Method: HTTPS POST to 185.0.0.1\n  Volume: 4.2 MB over 45 minutes\n  Files: 3 ZIP archives extracted from HTTP objects\n\nDNS TUNNELING:\n  Suspicious queries to: data.evil-dns.com\n  Average subdomain length: 45 characters\n  Query count: 1,234 (normal baseline: 50)\nEOF\n```\n\n## Key Concepts\n\n| Concept | Description |\n|---------|-------------|\n| PCAP\u002FPCAPNG | Packet capture file formats storing raw network traffic |\n| TCP stream | Complete bidirectional communication between two endpoints |\n| Deep packet inspection | Analysis of packet payload content beyond header information |\n| Beaconing | Regular-interval callbacks from malware to C2 servers |\n| DNS tunneling | Encoding data within DNS queries for covert exfiltration |\n| TLS\u002FSNI | Server Name Indication revealing the target hostname in encrypted connections |\n| Network flow | Summary of communication between endpoints (IPs, ports, bytes, duration) |\n| Protocol hierarchy | Statistical breakdown of protocols present in a capture |\n\n## Tools & Systems\n\n| Tool | Purpose |\n|------|---------|\n| Wireshark | GUI-based packet analyzer with deep protocol dissection |\n| tshark | Command-line version of Wireshark for scripted analysis |\n| NetworkMiner | Automated network forensic analysis and file extraction |\n| tcpdump | Command-line packet capture utility |\n| zeek (Bro) | Network security monitor generating structured connection logs |\n| ngrep | Network grep for pattern matching in packet content |\n| capinfos | PCAP file statistics and metadata utility |\n| mergecap | Merge multiple PCAP files into a single capture |\n\n## Common Scenarios\n\n**Scenario 1: Malware C2 Communication Analysis**\nLoad PCAP in Wireshark, identify beaconing patterns to external IPs, examine TLS certificates for self-signed or unusual issuers, extract HTTP POST data containing encoded commands, correlate C2 IPs with threat intelligence feeds.\n\n**Scenario 2: Data Exfiltration Detection**\nAnalyze traffic statistics for unusually large outbound transfers, examine DNS query lengths for DNS tunneling indicators, track FTP and HTTP file uploads to external servers, reconstruct exfiltrated files from packet data.\n\n**Scenario 3: Lateral Movement in Enterprise Network**\nFilter for SMB, RDP, WMI, and PSExec traffic between internal hosts, identify credential usage patterns across multiple systems, trace the propagation path of the attacker through the network, correlate with Windows Event Log authentication events.\n\n**Scenario 4: Web Application Attack Reconstruction**\nFilter HTTP traffic to the web server, identify SQL injection, XSS, and directory traversal attempts, follow the TCP stream of the successful exploit, extract uploaded webshells or payloads, document the attack chain for the incident report.\n\n## Output Format\n\n```\nNetwork Forensics Summary:\n  Capture: capture.pcap\n  Duration: 1 hour (14:00-15:00 UTC, 2024-01-15)\n  Packets: 1,245,678 | Size: 856 MB\n\n  Top Suspicious Connections:\n    192.168.1.50 -> 185.0.0.1:443   (C2, 58 connections, 4.2MB out)\n    192.168.1.50 -> 10.0.0.25:445   (SMB lateral movement)\n    192.168.1.50 -> 10.0.0.30:3389  (RDP lateral movement)\n\n  Extracted Artifacts:\n    Files:        23 (3 malicious per VT)\n    Credentials:  2 plaintext FTP logins\n    DNS Queries:  1,234 suspicious (possible tunneling)\n    TLS Certs:    5 self-signed certificates\n\n  IOCs Identified:\n    IPs:     185.0.0.1, 203.0.113.50\n    Domains: update-service.malware-c2.com, data.evil-dns.com\n    Hashes:  3 file hashes flagged as malware\n```\n","# Performing Network Forensics with Wireshark\n\n## When to Use\n- When analyzing captured network traffic (PCAP files) from a security incident\n- For identifying command-and-control (C2) communications in captured traffic\n- When reconstructing data exfiltration activities from packet captures\n- During malware analysis to identify network indicators of compromise\n- For extracting files, credentials, and artifacts transferred over the network\n\n## Prerequisites\n- Wireshark or tshark installed for packet analysis\n- PCAP\u002FPCAPNG files from network captures (tcpdump, Wireshark, network TAP)\n- NetworkMiner for automated artifact extraction\n- Sufficient RAM for large capture files (1GB+ PCAPs need 8GB+ RAM)\n- Understanding of TCP\u002FIP, HTTP, DNS, TLS protocols\n- GeoIP databases for IP geolocation\n\n## Workflow\n\n### Step 1: Prepare and Validate the Capture File\n\n```bash\n# Install Wireshark and tshark\nsudo apt-get install wireshark tshark\n\n# Verify the PCAP file\ncapinfos \u002Fcases\u002Fcase-2024-001\u002Fnetwork\u002Fcapture.pcap\n\n# Output includes: file type, packet count, capture duration, data size\n# Example output:\n# File name:           capture.pcap\n# File type:           Wireshark\u002Ftcpdump\u002F... - pcap\n# Number of packets:   1,245,678\n# File size:           856 MB\n# Data size:           823 MB\n# Capture duration:    3600.123456 seconds\n# First packet time:   2024-01-15 14:00:00.000000\n# Last packet time:    2024-01-15 15:00:00.123456\n\n# Hash the PCAP for integrity\nsha256sum \u002Fcases\u002Fcase-2024-001\u002Fnetwork\u002Fcapture.pcap \\\n   > \u002Fcases\u002Fcase-2024-001\u002Fnetwork\u002Fpcap_hash.txt\n\n# Get a protocol hierarchy statistics overview\ntshark -r \u002Fcases\u002Fcase-2024-001\u002Fnetwork\u002Fcapture.pcap -q -z io,phs\n```\n\n### Step 2: Filter and Identify Suspicious Traffic\n\n```bash\n# Extract conversation statistics\ntshark -r \u002Fcases\u002Fcase-2024-001\u002Fnetwork\u002Fcapture.pcap -q -z conv,tcp\n\n# Find top talkers by bytes transferred\ntshark -r \u002Fcases\u002Fcase-2024-001\u002Fnetwork\u002Fcapture.pcap -q -z endpoints,ip \\\n   | sort -t$'\\t' -k3 -rn | head -20\n\n# Filter for DNS queries (potential C2 or exfiltration)\ntshark -r \u002Fcases\u002Fcase-2024-001\u002Fnetwork\u002Fcapture.pcap \\\n   -Y \"dns.qr == 0\" \\\n   -T fields -e frame.time -e ip.src -e dns.qry.name \\\n   > \u002Fcases\u002Fcase-2024-001\u002Fanalysis\u002Fdns_queries.txt\n\n# Find DNS queries to unusual TLDs or long domain names (DNS tunneling)\ntshark -r \u002Fcases\u002Fcase-2024-001\u002Fnetwork\u002Fcapture.pcap \\\n   -Y \"dns.qr == 0 && dns.qry.name matches \\\"[a-z0-9]{30,}\\\"\" \\\n   -T fields -e frame.time -e ip.src -e dns.qry.name \\\n   > \u002Fcases\u002Fcase-2024-001\u002Fanalysis\u002Fsuspicious_dns.txt\n\n# Filter HTTP traffic\ntshark -r \u002Fcases\u002Fcase-2024-001\u002Fnetwork\u002Fcapture.pcap \\\n   -Y \"http.request\" \\\n   -T fields -e frame.time -e ip.src -e ip.dst -e http.request.method \\\n   -e http.host -e http.request.uri -e http.user_agent \\\n   > \u002Fcases\u002Fcase-2024-001\u002Fanalysis\u002Fhttp_requests.txt\n\n# Find connections to known malicious ports\ntshark -r \u002Fcases\u002Fcase-2024-001\u002Fnetwork\u002Fcapture.pcap \\\n   -Y \"tcp.dstport == 4444 || tcp.dstport == 8080 || tcp.dstport == 1337 || tcp.dstport == 6667\" \\\n   -T fields -e frame.time -e ip.src -e ip.dst -e tcp.dstport \\\n   > \u002Fcases\u002Fcase-2024-001\u002Fanalysis\u002Fsuspicious_ports.txt\n\n# Detect beaconing patterns (regular interval connections)\ntshark -r \u002Fcases\u002Fcase-2024-001\u002Fnetwork\u002Fcapture.pcap \\\n   -Y \"ip.dst == 185.0.0.1\" \\\n   -T fields -e frame.time_epoch \\\n   > \u002Ftmp\u002Fbeacon_times.txt\n```\n\n### Step 3: Extract Files and Objects from Traffic\n\n```bash\n# Export HTTP objects (files transferred over HTTP)\ntshark -r \u002Fcases\u002Fcase-2024-001\u002Fnetwork\u002Fcapture.pcap \\\n   --export-objects http,\u002Fcases\u002Fcase-2024-001\u002Fanalysis\u002Fhttp_objects\u002F\n\n# Export SMB objects\ntshark -r \u002Fcases\u002Fcase-2024-001\u002Fnetwork\u002Fcapture.pcap \\\n   --export-objects smb,\u002Fcases\u002Fcase-2024-001\u002Fanalysis\u002Fsmb_objects\u002F\n\n# Export DICOM objects (medical imaging)\ntshark -r \u002Fcases\u002Fcase-2024-001\u002Fnetwork\u002Fcapture.pcap \\\n   --export-objects dicom,\u002Fcases\u002Fcase-2024-001\u002Fanalysis\u002Fdicom_objects\u002F\n\n# Export FTP data transfers\ntshark -r \u002Fcases\u002Fcase-2024-001\u002Fnetwork\u002Fcapture.pcap \\\n   -Y \"ftp-data\" \\\n   -T fields -e ftp-data.data \\\n   --export-objects ftp-data,\u002Fcases\u002Fcase-2024-001\u002Fanalysis\u002Fftp_objects\u002F\n\n# Hash all extracted objects\nfind \u002Fcases\u002Fcase-2024-001\u002Fanalysis\u002Fhttp_objects\u002F -type f -exec sha256sum {} \\; \\\n   > \u002Fcases\u002Fcase-2024-001\u002Fanalysis\u002Fextracted_file_hashes.txt\n\n# Check extracted file hashes against VirusTotal\nwhile read hash filepath; do\n   echo \"Checking $filepath ($hash)\"\n   curl -s \"https:\u002F\u002Fwww.virustotal.com\u002Fapi\u002Fv3\u002Ffiles\u002F$hash\" \\\n      -H \"x-apikey: YOUR_API_KEY\" | python3 -c \"\nimport json,sys\ndata=json.load(sys.stdin)\nif 'data' in data:\n   stats=data['data']['attributes']['last_analysis_stats']\n   print(f'  Malicious: {stats[\\\"malicious\\\"]}, Undetected: {stats[\\\"undetected\\\"]}')\nelse:\n   print('  Not found on VT')\n\"\ndone \u003C \u002Fcases\u002Fcase-2024-001\u002Fanalysis\u002Fextracted_file_hashes.txt\n```\n\n### Step 4: Reconstruct TCP Streams and Sessions\n\n```bash\n# Follow a specific TCP stream (stream index 42)\ntshark -r \u002Fcases\u002Fcase-2024-001\u002Fnetwork\u002Fcapture.pcap \\\n   -q -z \"follow,tcp,ascii,42\" \\\n   > \u002Fcases\u002Fcase-2024-001\u002Fanalysis\u002Fstream_42.txt\n\n# Extract all HTTP request-response pairs for a suspicious host\ntshark -r \u002Fcases\u002Fcase-2024-001\u002Fnetwork\u002Fcapture.pcap \\\n   -Y \"http && ip.addr == 185.0.0.1\" \\\n   -T fields -e frame.time -e http.request.method -e http.host \\\n   -e http.request.uri -e http.response.code -e http.content_length \\\n   > \u002Fcases\u002Fcase-2024-001\u002Fanalysis\u002Fsuspicious_http.txt\n\n# Extract TLS\u002FSSL certificate information\ntshark -r \u002Fcases\u002Fcase-2024-001\u002Fnetwork\u002Fcapture.pcap \\\n   -Y \"tls.handshake.type == 11\" \\\n   -T fields -e ip.dst -e tls.handshake.certificate \\\n   > \u002Fcases\u002Fcase-2024-001\u002Fanalysis\u002Ftls_certs.txt\n\n# Extract TLS SNI (Server Name Indication) values\ntshark -r \u002Fcases\u002Fcase-2024-001\u002Fnetwork\u002Fcapture.pcap \\\n   -Y \"tls.handshake.extensions_server_name\" \\\n   -T fields -e frame.time -e ip.src -e ip.dst \\\n   -e tls.handshake.extensions_server_name \\\n   > \u002Fcases\u002Fcase-2024-001\u002Fanalysis\u002Ftls_sni.txt\n\n# Extract credentials from unencrypted protocols\ntshark -r \u002Fcases\u002Fcase-2024-001\u002Fnetwork\u002Fcapture.pcap \\\n   -Y \"ftp.request.command == \\\"USER\\\" || ftp.request.command == \\\"PASS\\\"\" \\\n   -T fields -e frame.time -e ip.src -e ftp.request.command -e ftp.request.arg\n\ntshark -r \u002Fcases\u002Fcase-2024-001\u002Fnetwork\u002Fcapture.pcap \\\n   -Y \"http.authorization\" \\\n   -T fields -e frame.time -e ip.src -e http.host -e http.authorization\n```\n\n### Step 5: Use NetworkMiner for Automated Analysis\n\n```bash\n# Install NetworkMiner (Mono required on Linux)\nsudo apt-get install mono-complete\nwget https:\u002F\u002Fwww.netresec.com\u002F?download=NetworkMiner -O NetworkMiner.zip\nunzip NetworkMiner.zip -d \u002Fopt\u002FNetworkMiner\u002F\n\n# Run NetworkMiner\nmono \u002Fopt\u002FNetworkMiner\u002FNetworkMiner.exe \u002Fcases\u002Fcase-2024-001\u002Fnetwork\u002Fcapture.pcap\n\n# NetworkMiner automatically extracts:\n# - Host inventory (OS fingerprinting, open ports)\n# - Files transferred over HTTP, FTP, SMB, TFTP\n# - Images from web traffic\n# - Credentials (plaintext and NTLM hashes)\n# - DNS records\n# - Session parameters\n# - Anomalies and alerts\n```\n\n### Step 6: Generate Network Forensics Report\n\n```bash\n# Compile findings\ncat \u003C\u003C 'EOF' > \u002Fcases\u002Fcase-2024-001\u002Fanalysis\u002Fnetwork_forensics_report.txt\nNETWORK FORENSICS ANALYSIS REPORT\n===================================\nCase: 2024-001\nCapture File: capture.pcap (856 MB, 1,245,678 packets)\nCapture Period: 2024-01-15 14:00 to 15:00 UTC\nAnalyst: [Examiner Name]\n\nTRAFFIC OVERVIEW:\n  Total packets: 1,245,678\n  Unique source IPs: 45\n  Unique destination IPs: 234\n  Protocols: TCP (78%), UDP (18%), ICMP (2%), Other (2%)\n\nC2 COMMUNICATION:\n  Destination: 185.0.0.1:443\n  Beaconing interval: ~60 seconds\n  Total connections: 58\n  Data transferred: 4.2 MB outbound, 12.3 MB inbound\n  TLS SNI: update-service.malware-c2.com\n\nEXFILTRATION:\n  Method: HTTPS POST to 185.0.0.1\n  Volume: 4.2 MB over 45 minutes\n  Files: 3 ZIP archives extracted from HTTP objects\n\nDNS TUNNELING:\n  Suspicious queries to: data.evil-dns.com\n  Average subdomain length: 45 characters\n  Query count: 1,234 (normal baseline: 50)\nEOF\n```\n\n## Key Concepts\n\n| Concept | Description |\n|---------|-------------|\n| PCAP\u002FPCAPNG | Packet capture file formats storing raw network traffic |\n| TCP stream | Complete bidirectional communication between two endpoints |\n| Deep packet inspection | Analysis of packet payload content beyond header information |\n| Beaconing | Regular-interval callbacks from malware to C2 servers |\n| DNS tunneling | Encoding data within DNS queries for covert exfiltration |\n| TLS\u002FSNI | Server Name Indication revealing the target hostname in encrypted connections |\n| Network flow | Summary of communication between endpoints (IPs, ports, bytes, duration) |\n| Protocol hierarchy | Statistical breakdown of protocols present in a capture |\n\n## Tools & Systems\n\n| Tool | Purpose |\n|------|---------|\n| Wireshark | GUI-based packet analyzer with deep protocol dissection |\n| tshark | Command-line version of Wireshark for scripted analysis |\n| NetworkMiner | Automated network forensic analysis and file extraction |\n| tcpdump | Command-line packet capture utility |\n| zeek (Bro) | Network security monitor generating structured connection logs |\n| ngrep | Network grep for pattern matching in packet content |\n| capinfos | PCAP file statistics and metadata utility |\n| mergecap | Merge multiple PCAP files into a single capture |\n\n## Common Scenarios\n\n**Scenario 1: Malware C2 Communication Analysis**\nLoad PCAP in Wireshark, identify beaconing patterns to external IPs, examine TLS certificates for self-signed or unusual issuers, extract HTTP POST data containing encoded commands, correlate C2 IPs with threat intelligence feeds.\n\n**Scenario 2: Data Exfiltration Detection**\nAnalyze traffic statistics for unusually large outbound transfers, examine DNS query lengths for DNS tunneling indicators, track FTP and HTTP file uploads to external servers, reconstruct exfiltrated files from packet data.\n\n**Scenario 3: Lateral Movement in Enterprise Network**\nFilter for SMB, RDP, WMI, and PSExec traffic between internal hosts, identify credential usage patterns across multiple systems, trace the propagation path of the attacker through the network, correlate with Windows Event Log authentication events.\n\n**Scenario 4: Web Application Attack Reconstruction**\nFilter HTTP traffic to the web server, identify SQL injection, XSS, and directory traversal attempts, follow the TCP stream of the successful exploit, extract uploaded webshells or payloads, document the attack chain for the incident report.\n\n## Output Format\n\n```\nNetwork Forensics Summary:\n  Capture: capture.pcap\n  Duration: 1 hour (14:00-15:00 UTC, 2024-01-15)\n  Packets: 1,245,678 | Size: 856 MB\n\n  Top Suspicious Connections:\n    192.168.1.50 -> 185.0.0.1:443   (C2, 58 connections, 4.2MB out)\n    192.168.1.50 -> 10.0.0.25:445   (SMB lateral movement)\n    192.168.1.50 -> 10.0.0.30:3389  (RDP lateral movement)\n\n  Extracted Artifacts:\n    Files:        23 (3 malicious per VT)\n    Credentials:  2 plaintext FTP logins\n    DNS Queries:  1,234 suspicious (possible tunneling)\n    TLS Certs:    5 self-signed certificates\n\n  IOCs Identified:\n    IPs:     185.0.0.1, 203.0.113.50\n    Domains: update-service.malware-c2.com, data.evil-dns.com\n    Hashes:  3 file hashes flagged as malware\n```\n",{"name":5,"tags":25,"author":32,"domain":33,"license":15,"version":34,"nist_csf":35,"subdomain":39,"description":7,"mitre_attack":40},[26,27,28,29,30,31],"forensics","network-forensics","wireshark","pcap","packet-analysis","traffic-analysis","mahipal","cybersecurity","1.0",[36,37,38],"RS.AN-03","DE.AE-02","RS.MA-01","digital-forensics",[41,42,43,44,45],"T1005","T1074","T1119","T1070","T1059","main","7540bbccf0c1ded6156a467b02c95b61ad62413f",".agents\u002Fskills\u002Fperforming-network-forensics-with-wireshark","https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu","https:\u002F\u002Fgithub.com\u002FNeelakshSaxena","Currently exploring the intersection of tech","2026-09-11 03:02:31",{"source":8,"skillName":5,"commands":54,"prompt":64,"zipAvailable":65},[55,58,61],{"tool":56,"command":57},"npx","npx skills add NeelakshSaxena\u002FVayu --skill performing-network-forensics-with-wireshark",{"tool":59,"command":60},"bunx","bunx skills add NeelakshSaxena\u002FVayu --skill performing-network-forensics-with-wireshark",{"tool":62,"command":63},"pnpm","pnpm dlx skills add NeelakshSaxena\u002FVayu --skill performing-network-forensics-with-wireshark","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fperforming-network-forensics-with-wireshark\u002FSKILL.md",true,[67,71,77],{"path":68,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":70,"sourceHtmlUrl":16},"LICENSE","许可证",11255,{"path":72,"resourceType":73,"resourceTypeDesc":74,"sizeBytes":75,"sourceHtmlUrl":76},"references\u002Fapi-reference.md","REFERENCE","参考文档",1630,"https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fperforming-network-forensics-with-wireshark\u002Freferences\u002Fapi-reference.md",{"path":78,"resourceType":79,"resourceTypeDesc":80,"sizeBytes":81,"sourceHtmlUrl":82},"scripts\u002Fagent.py","SCRIPT","脚本",8077,"https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fperforming-network-forensics-with-wireshark\u002Fscripts\u002Fagent.py",[84,91,98,105,112,119],{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":20},"01M7ACCCVNCFKMA9X6D15X6G98","runpodctl","Runpod CLI for managing GPU\u002FCPU workloads from the terminal — pods, serverless endpoints, templates, network volumes, Hub deploys, models, SSH, and file transfer (send\u002Freceive). Use for terminal\u002FCI\u002Fscripting, Hub browse\u002Fdeploy, SSH setup, `doctor`, or when the Runpod MCP tools are not connected. For structured tool calls in an MCP-enabled session, prefer runpod-mcp.","https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Frunpodctl\u002FSKILL.md",[],[],{"skillNo":92,"name":93,"nameZh":6,"description":94,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":95,"categories":96,"keywords":97,"publishedAt":20},"01M7ACC63SRHEA5KMCHSMZK2TC","runpod","Start here for any Runpod task — running GPU\u002FCPU pods, deploying serverless endpoints, templates, network volumes, building images, or understanding how Runpod works. Routes to the right skill (runpod-mcp, runpodctl, flash, companion-clis, runpod-usage, runpod-templates, runpod-migrate) and indexes two dozen live-verified end-to-end examples (golden paths) — use it when the lane is unclear, and for any multi-step or provisioning task even when it is not.","https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Frunpod\u002FSKILL.md",[],[],{"skillNo":99,"name":100,"nameZh":6,"description":101,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":102,"categories":103,"keywords":104,"publishedAt":20},"01M7ACC0Q1C89N9BZBV91CTQTF","runpod-usage","How Runpod works and how to work it — pods vs serverless, GPU\u002FVRAM selection, storage, building a container, networking, plus the agentic pod development loop (provision → ssh-exec → set up → poll readiness) and on-pod install hygiene (uv\u002Fapt). Use to answer \"how does X work\", \"which GPU\", \"how do I build a container\", or \"how do I stand up a workload on a pod\". Guidance, not a tool — execute with runpodctl, runpod-mcp, or flash.","https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Frunpod-usage\u002FSKILL.md",[],[],{"skillNo":106,"name":107,"nameZh":6,"description":108,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":109,"categories":110,"keywords":111,"publishedAt":20},"01M7ACBRPE345GF5GM5B8P8RRC","runpod-templates","Runpod's official prebuilt pod templates (ComfyUI, PyTorch, and others): what each image ships, which ports and paths it uses, how to pick one, how to pin a version, and what is missing on first boot. Use when a task says \"run \u003CX> on a pod\" and an official template already covers it, instead of building an image — and when a user needs help with or wants to fix something about a Runpod template they are already running (won't boot, can't reach the UI, missing models, wrong CUDA line, broken ComfyUI workflow metadata on imported workflows): start here and route onward. Deploy with runpodctl or runpod-mcp; end-to-end walkthroughs live in the runpod router's golden paths.","https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Frunpod-templates\u002FSKILL.md",[],[],{"skillNo":113,"name":114,"nameZh":6,"description":115,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":116,"categories":117,"keywords":118,"publishedAt":20},"01M7ACBJATHKVX1TWES2F44GY8","runpod-migrate","Migrate a codebase from the Runpod GraphQL API or REST v1 to REST v2 — inventory which parts use which API version, rewrite the call sites, flag breaking changes, and verify. Use when someone asks to move to v2, asks what v2 would change, or asks which Runpod API their code is on. For managing infrastructure rather than migrating code, use runpod-mcp or runpodctl.","https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Frunpod-migrate\u002FSKILL.md",[],[],{"skillNo":120,"name":121,"nameZh":6,"description":122,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":123,"categories":124,"keywords":125,"publishedAt":20},"01M7ACBC7GHVH6T9YEAPCG2AP8","runpod-mcp","Manage Runpod infrastructure — pods, serverless endpoints, jobs, templates, network volumes, container-registry auth, GPU\u002FCPU catalog, and billing — via the Runpod MCP server's structured tool calls. Use when the Runpod MCP tools (create-pod, list-endpoints, …) are connected in this session, or to connect them (hosted OAuth or local npx). Prefer this over runpodctl for plain infra CRUD when MCP is available; use runpodctl for the terminal, file transfer, or SSH setup.","https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Frunpod-mcp\u002FSKILL.md",[],[]]