[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6GZBVCHSMX8P62H9BJB9SRT":3,"skill-same:01M6GZBVCHSMX8P62H9BJB9SRT":85},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":38,"linkOnly":39,"markdownContent":40,"markdownBody":41,"frontMatter":42,"refName":47,"commitSha":48,"skillDirectory":49,"forksCount":50,"repositoryHtmlUrl":51,"repositoryHomepageUrl":6,"ownerHtmlUrl":52,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":53,"install":54,"resources":67},"01M6GZBVCHSMX8P62H9BJB9SRT","performing-network-forensics-with-wireshark",null,"Capture and analyze network traffic using Wireshark and tshark to reconstruct network events, extract artifacts, and identify malicious communications.","micsapp\u002Fmicstec-skills","micsapp","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F82411001?v=4","01M6GWCFQ6D3PV8EHNY62NN5VW","01M6GWCFVE1PA5HG0DKC7AMFJ3",4,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fmicsapp\u002Fmicstec-skills\u002Fblob\u002Fmaster\u002F_universal\u002Fcybersecurity-skills\u002Fskills\u002Fperforming-network-forensics-with-wireshark\u002FSKILL.md",[],[18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37],"performing","forensics","with","network","Wireshark","performing network forensics with wireshark","digital-forensics","traffic","communications","capture","analyze","tshark","analysis","malicious","traffic-analysis","pcap","packet-analysis","network-forensics","artifacts","cybersecurity","2026-11-10 10:12:30",false,"---\nname: performing-network-forensics-with-wireshark\ndescription: Capture and analyze network traffic using Wireshark and tshark to reconstruct network events, extract artifacts, and identify malicious communications.\ndomain: cybersecurity\nsubdomain: digital-forensics\ntags: [forensics, network-forensics, wireshark, pcap, packet-analysis, traffic-analysis]\nversion: \"1.0\"\nauthor: mahipal\nlicense: Apache-2.0\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":43,"author":45,"domain":37,"license":14,"version":46,"subdomain":24,"description":7},[19,35,44,33,34,32],"wireshark","mahipal","1.0","master","3f5d983eb4ef375b749adcd6b07ec03bd82ae8a8","_universal\u002Fcybersecurity-skills\u002Fskills\u002Fperforming-network-forensics-with-wireshark",0,"https:\u002F\u002Fgithub.com\u002Fmicsapp\u002Fmicstec-skills","https:\u002F\u002Fgithub.com\u002Fmicsapp","2026-03-20 11:24:18",{"source":8,"skillName":5,"commands":55,"prompt":65,"zipAvailable":66},[56,59,62],{"tool":57,"command":58},"npx","npx skills add micsapp\u002Fmicstec-skills --skill performing-network-forensics-with-wireshark",{"tool":60,"command":61},"bunx","bunx skills add micsapp\u002Fmicstec-skills --skill performing-network-forensics-with-wireshark",{"tool":63,"command":64},"pnpm","pnpm dlx skills add micsapp\u002Fmicstec-skills --skill performing-network-forensics-with-wireshark","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmicsapp\u002Fmicstec-skills\u002Fblob\u002Fmaster\u002F_universal\u002Fcybersecurity-skills\u002Fskills\u002Fperforming-network-forensics-with-wireshark\u002FSKILL.md",true,[68,73,79],{"path":69,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":71,"sourceHtmlUrl":72},"LICENSE","许可证",11255,"https:\u002F\u002Fgithub.com\u002Fmicsapp\u002Fmicstec-skills\u002Fblob\u002Fmaster\u002F_universal\u002Fcybersecurity-skills\u002Fskills\u002Fperforming-network-forensics-with-wireshark\u002FLICENSE",{"path":74,"resourceType":75,"resourceTypeDesc":76,"sizeBytes":77,"sourceHtmlUrl":78},"references\u002Fapi-reference.md","REFERENCE","参考文档",1630,"https:\u002F\u002Fgithub.com\u002Fmicsapp\u002Fmicstec-skills\u002Fblob\u002Fmaster\u002F_universal\u002Fcybersecurity-skills\u002Fskills\u002Fperforming-network-forensics-with-wireshark\u002Freferences\u002Fapi-reference.md",{"path":80,"resourceType":81,"resourceTypeDesc":82,"sizeBytes":83,"sourceHtmlUrl":84},"scripts\u002Fagent.py","SCRIPT","脚本",8077,"https:\u002F\u002Fgithub.com\u002Fmicsapp\u002Fmicstec-skills\u002Fblob\u002Fmaster\u002F_universal\u002Fcybersecurity-skills\u002Fskills\u002Fperforming-network-forensics-with-wireshark\u002Fscripts\u002Fagent.py",[86,113,135,155,173,198],{"skillNo":87,"name":88,"nameZh":6,"description":89,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":90,"licenseFileUrl":6,"sourceHtmlUrl":91,"categories":92,"keywords":93,"publishedAt":38},"01M6HBTJ02FXBFG9NYEHHYAP52","azure-apim-architecture","Analyzes and explains Azure API Management architecture decisions for enterprise API marketplace implementations using VNet Internal mode, Front Door, hybrid authentication, and multi-environment strategies. Use when discussing APIM component selection, network topology, cost optimization, or comparing alternatives like workspaces vs instances, VNet Internal vs External mode, or Front Door vs Application Gateway.","MIT","https:\u002F\u002Fgithub.com\u002Fmicsapp\u002Fmicstec-skills\u002Fblob\u002Fmaster\u002Fcopilot-cli\u002Fcopilot-agent-skills\u002F.github\u002Fskills\u002Fazure-apim-architecture\u002FSKILL.md",[],[94,95,96,97,98,99,100,101,21,102,103,104,105,106,107,108,109,110,111,112],"architecture","azure","azure apim architecture","component","authentication","gateway","topology","Optimization","api","team","environment","multi-environment","workspaces","instances","selection","strategies","azure api management","mode","for",{"skillNo":114,"name":115,"nameZh":6,"description":116,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":90,"licenseFileUrl":6,"sourceHtmlUrl":117,"categories":118,"keywords":119,"publishedAt":38},"01M6HBT7J4H082JEEA670B3EQ9","apiops-deployment","Guides deployment of Azure API Management infrastructure using Infrastructure as Code (Bicep\u002FTerraform), CI\u002FCD pipelines (GitHub Actions\u002FAzure DevOps), and APIOps workflows. Use when deploying APIM, creating pipelines, or implementing dev→test→prod promotion strategies.","https:\u002F\u002Fgithub.com\u002Fmicsapp\u002Fmicstec-skills\u002Fblob\u002Fmaster\u002Fcopilot-cli\u002Fcopilot-agent-skills\u002F.github\u002Fskills\u002Fapiops-deployment\u002FSKILL.md",[],[120,121,122,123,95,124,125,126,127,128,129,130,102,103,109,131,132,110,133,134],"deployment","apiops deployment","workflows","azure devops","infrastructure","code","infrastructure as code","actions","ci","github actions","github-actions","as","guides","CI\u002FCD","implementing",{"skillNo":136,"name":137,"nameZh":6,"description":138,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":90,"licenseFileUrl":6,"sourceHtmlUrl":139,"categories":140,"keywords":141,"publishedAt":38},"01M6HBT2HEA23THNE9E00GYQBE","apim-policy-authoring","Creates production-ready Azure API Management policy XML for authentication (OAuth 2.0, JWT validation, subscription keys), rate limiting, CORS configuration, error handling, and API transformations. Use when implementing API security, access control, or request\u002Fresponse processing logic.","https:\u002F\u002Fgithub.com\u002Fmicsapp\u002Fmicstec-skills\u002Fblob\u002Fmaster\u002Fcopilot-cli\u002Fcopilot-agent-skills\u002F.github\u002Fskills\u002Fapim-policy-authoring\u002FSKILL.md",[],[142,143,144,145,95,98,102,103,146,147,148,149,150,151,152,110,153,154,134,112],"policy","authoring","apim policy authoring","security","access","use","ready","api security","Access Control","error","processing","cors configuration","production-ready",{"skillNo":156,"name":157,"nameZh":6,"description":158,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":90,"licenseFileUrl":6,"sourceHtmlUrl":159,"categories":160,"keywords":161,"publishedAt":38},"01M6HBSY65SB29J9WE9KYD0K6T","api-security-review","Reviews Azure API Management configurations for security vulnerabilities, OWASP API Security Top 10 compliance, VNet Internal mode validation, Private Link verification, and Azure Security Benchmark alignment. Use when performing security audits, pre-deployment validation, or compliance reviews.","https:\u002F\u002Fgithub.com\u002Fmicsapp\u002Fmicstec-skills\u002Fblob\u002Fmaster\u002Fcopilot-cli\u002Fcopilot-agent-skills\u002F.github\u002Fskills\u002Fapi-security-review\u002FSKILL.md",[],[162,145,163,102,149,164,95,120,165,166,167,168,103,169,110,170,171,172,111,112],"review","security review","api security review","benchmark","verification","owasp","owasp-api","alignment","azure security","reviews","top",{"skillNo":174,"name":175,"nameZh":6,"description":176,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":90,"licenseFileUrl":6,"sourceHtmlUrl":177,"categories":178,"keywords":179,"publishedAt":38},"01M6HBSRW4PDFE6K4F8JYPZQ05","jira-cli","Interact with Jira from the command line to create, list, view, edit, and transition issues, manage sprints and epics, and perform common Jira workflows. Use when the user asks about Jira tasks, tickets, issues, sprints, or needs to manage project work items.","https:\u002F\u002Fgithub.com\u002Fmicsapp\u002Fmicstec-skills\u002Fblob\u002Fmaster\u002Fcopilot-cli\u002Fawesome-copilot-agents\u002Fskills\u002Fjira-cli\u002FSKILL.md",[],[180,181,182,122,183,184,185,186,102,187,188,189,190,191,192,193,194,195,196,197],"cli","jira","jira cli","init","tasks","create","issues","common","work","command","edit","list","view","project","project work","token","line","sprints",{"skillNo":199,"name":200,"nameZh":6,"description":201,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":90,"licenseFileUrl":6,"sourceHtmlUrl":202,"categories":203,"keywords":204,"publishedAt":38},"01M6HBSNS3JHMW603G47TWE31H","calculator","Performs arbitrary-precision arithmetic calculations including addition, subtraction, multiplication, division, and exponents. Use when the user asks to calculate, compute, or evaluate math expressions, or when precise decimal arithmetic is needed to avoid floating-point errors.","https:\u002F\u002Fgithub.com\u002Fmicsapp\u002Fmicstec-skills\u002Fblob\u002Fmaster\u002Fcopilot-cli\u002Fawesome-copilot-agents\u002Fskills\u002Fcalculator\u002FSKILL.md",[],[200,205,206,207,208,209,210,147,211,212],"npm","js","calculate","node","math","user","compute","errors"]