[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M71FSYS48FRGDQJDBE91TV67":3,"skill-same:01M71FSYS48FRGDQJDBE91TV67":93},{"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":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":39,"linkOnly":40,"markdownContent":41,"markdownBody":42,"frontMatter":43,"refName":66,"commitSha":67,"skillDirectory":68,"forksCount":14,"repositoryHtmlUrl":69,"repositoryHomepageUrl":6,"ownerHtmlUrl":70,"ownerBlogUrl":6,"ownerDescription":71,"updatedAt":72,"install":73,"resources":86},"01M71FSYS48FRGDQJDBE91TV67","traffic-maltraffic-detect",null,"Analyzes network traffic generated by malware during sandbox execution or live incident response to identify C2 protocols, data exfiltration channels, payload downloads, and lateral movement patterns using Wireshark, Zeek, and Suricata. Activates for requests involving malware network analysis, C2 traffic decoding, malware PCAP analysis, or network-based malware detection.","DCx7C5\u002Fai-marketplace","DCx7C5","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F42419559?v=4","01M71C01G2AZV3NTNGWAWSHJPP","DC","01M71C01GQW6G50S2BYMS7PP3E",0,"MIT","https:\u002F\u002Fgithub.com\u002FDCx7C5\u002Fai-marketplace\u002Fblob\u002Fmain\u002Fskills\u002Fnetwork\u002Ftraffic\u002Fmaltraffic\u002Fdetect\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38],"traffic maltraffic detect","detect","traffic","malware","data","network","payload","read","lateral movement","de","malware detection","exfiltration","analysis","Bash","incident response","cybersecurity","generated","suricata","incident","cm","2026-11-10 10:12:30",false,"---\nname: traffic-maltraffic-detect\ndescription: Analyzes network traffic generated by malware during sandbox execution or live incident response to identify C2 protocols, data exfiltration channels, payload downloads, and lateral movement patterns using Wireshark, Zeek, and Suricata. Activates for requests involving malware network analysis, C2 traffic decoding, malware PCAP analysis, or network-based malware detection.\ndomain: cybersecurity\nsubdomain: malware-analysis\ntags:\n- malware\n- network-analysis\n- PCAP\n- Wireshark\n- C2-detection\nnist_csf:\n- DE.AE-02\n- RS.AN-03\n- ID.RA-01\n- DE.CM-01\nmodel: sonnet\nmaxTurns: 20\ntools: [Read, Bash, Glob, Grep]\nmitre_attack:\n- T1040\n- T1059\n- T1071\ncapec: []\n---\n\n# Analyzing Network Traffic of Malware\n\n## When to Use\n\n- Sandbox execution has captured a PCAP file and the network behavior needs detailed analysis\n- Identifying the C2 protocol structure for writing network detection signatures\n- Determining what data the malware exfiltrates and to which external infrastructure\n- Analyzing DNS tunneling, domain generation algorithms (DGA), or fast-flux behavior\n- Creating Suricata\u002FSnort signatures based on observed malware network patterns\n\n**Do not use** for host-based analysis of malware behavior; use Cuckoo sandbox reports or Volatility memory analysis for process-level activity.\n\n## Prerequisites\n\n- Wireshark 4.x installed for interactive PCAP analysis\n- tshark (Wireshark CLI) for scripted packet extraction\n- Zeek installed for automated metadata generation from PCAPs\n- Suricata with ET Open\u002FET Pro rulesets for signature matching\n- NetworkMiner for file extraction and credential detection from PCAPs\n- Python 3.8+ with `scapy` and `dpkt` for programmatic packet analysis\n\n## Workflow\n\n### Step 1: Initial PCAP Overview\n\nGet a high-level understanding of the network traffic:\n\n```bash\n# Capture statistics\ncapinfos malware.pcap\n\n# Protocol hierarchy\ntshark -r malware.pcap -q -z io,phs\n\n# Endpoint statistics (top talkers)\ntshark -r malware.pcap -q -z endpoints,ip\n\n# Conversation statistics\ntshark -r malware.pcap -q -z conv,tcp\n\n# DNS query summary\ntshark -r malware.pcap -q -z dns,tree\n```\n\n### Step 2: Analyze DNS Activity\n\nExamine DNS queries for DGA, tunneling, or C2 domain resolution:\n\n```bash\n# Extract all DNS queries\ntshark -r malware.pcap -T fields -e frame.time -e dns.qry.name -e dns.a \\\n  -Y \"dns.flags.response == 1\" | sort\n\n# Detect DGA patterns (high entropy domain names)\npython3 \u003C\u003C 'PYEOF'\nimport math\nfrom collections import Counter\n\ndef entropy(s):\n    p = [n\u002Flen(s) for n in Counter(s).values()]\n    return -sum(pi * math.log2(pi) for pi in p if pi > 0)\n\n# Parse DNS queries from tshark output\nimport subprocess\nresult = subprocess.run(\n    [\"tshark\", \"-r\", \"malware.pcap\", \"-T\", \"fields\", \"-e\", \"dns.qry.name\",\n     \"-Y\", \"dns.flags.response == 0\"],\n    capture_output=True, text=True\n)\n\ndomains = set(result.stdout.strip().split('\\n'))\nprint(\"Suspicious DNS queries (high entropy):\")\nfor domain in domains:\n    if domain:\n        subdomain = domain.split('.')[0]\n        ent = entropy(subdomain)\n        if ent > 3.5 and len(subdomain) > 10:\n            print(f\"  {domain} (entropy: {ent:.2f})\")\nPYEOF\n\n# Detect DNS tunneling (large TXT responses)\ntshark -r malware.pcap -T fields -e dns.qry.name -e dns.txt \\\n  -Y \"dns.resp.type == 16 and dns.resp.len > 100\"\n```\n\n### Step 3: Analyze HTTP\u002FHTTPS C2 Communication\n\nExamine web-based command-and-control traffic:\n\n```bash\n# Extract HTTP requests\ntshark -r malware.pcap -T fields \\\n  -e frame.time -e ip.src -e ip.dst -e http.host \\\n  -e http.request.method -e http.request.uri -e http.user_agent \\\n  -Y \"http.request\"\n\n# Extract HTTP response bodies (potential payload downloads)\ntshark -r malware.pcap -T fields \\\n  -e http.host -e http.request.uri -e http.content_type -e tcp.len \\\n  -Y \"http.response and tcp.len > 1000\"\n\n# Extract POST data (potential exfiltration)\ntshark -r malware.pcap -T fields \\\n  -e http.host -e http.request.uri -e http.file_data \\\n  -Y \"http.request.method == POST\"\n\n# TLS analysis (SNI, JA3 fingerprints)\ntshark -r malware.pcap -T fields \\\n  -e tls.handshake.extensions_server_name \\\n  -e tls.handshake.ja3 \\\n  -Y \"tls.handshake.type == 1\"\n\n# Extract TLS certificate details\ntshark -r malware.pcap -T fields \\\n  -e x509ce.dNSName -e x509af.serialNumber \\\n  -e x509sat.utf8String \\\n  -Y \"tls.handshake.type == 11\"\n\n# Export HTTP objects (downloaded files)\ntshark -r malware.pcap --export-objects http,exported_files\u002F\n```\n\n### Step 4: Detect Beaconing Patterns\n\nIdentify regular periodic communication indicating C2 beaconing:\n\n```python\n# Beacon detection from PCAP\nfrom scapy.all import rdpcap, IP, TCP\nfrom collections import defaultdict\nimport statistics\n\npackets = rdpcap(\"malware.pcap\")\n\n# Group connections by destination IP:port\nconnections = defaultdict(list)\nfor pkt in packets:\n    if IP in pkt and TCP in pkt:\n        if pkt[TCP].flags & 0x02:  # SYN flag\n            dst = f\"{pkt[IP].dst}:{pkt[TCP].dport}\"\n            connections[dst].append(float(pkt.time))\n\n# Analyze timing intervals for beaconing\nprint(\"Beacon Analysis:\")\nfor dst, times in connections.items():\n    if len(times) >= 5:\n        intervals = [times[i+1] - times[i] for i in range(len(times)-1)]\n        avg = statistics.mean(intervals)\n        stdev = statistics.stdev(intervals) if len(intervals) > 1 else 0\n        jitter = (stdev \u002F avg * 100) if avg > 0 else 0\n\n        if 10 \u003C avg \u003C 3600 and jitter \u003C 30:  # Regular interval with \u003C 30% jitter\n            print(f\"  [!] {dst}: {len(times)} connections\")\n            print(f\"      Interval: {avg:.1f}s ± {stdev:.1f}s (jitter: {jitter:.1f}%)\")\n            print(f\"      Pattern: LIKELY BEACONING\")\n```\n\n### Step 5: Generate Network Detection Signatures\n\nCreate Suricata\u002FSnort rules from observed traffic patterns:\n\n```bash\n# Run Suricata against the PCAP for existing signature matches\nsuricata -r malware.pcap -l suricata_output\u002F -c \u002Fetc\u002Fsuricata\u002Fsuricata.yaml\n\n# Review alerts\ncat suricata_output\u002Ffast.log\n\n# Create custom Suricata rule from observed patterns\ncat \u003C\u003C 'EOF' > custom_malware.rules\n# C2 beacon detection based on observed URI pattern\nalert http $HOME_NET any -> $EXTERNAL_NET any (\n    msg:\"MALWARE MalwareX C2 Beacon\";\n    flow:established,to_server;\n    http.method; content:\"POST\";\n    http.uri; content:\"\u002Fgate.php?id=\";\n    http.user_agent; content:\"Mozilla\u002F5.0 (compatible; MSIE 10.0)\";\n    sid:9000001; rev:1;\n)\n\n# DNS query for known C2 domain\nalert dns $HOME_NET any -> any any (\n    msg:\"MALWARE MalwareX C2 DNS Query\";\n    dns.query; content:\"update.malicious.com\";\n    sid:9000002; rev:1;\n)\n\n# JA3 hash match for malware TLS client\nalert tls $HOME_NET any -> $EXTERNAL_NET any (\n    msg:\"MALWARE MalwareX JA3 Match\";\n    ja3.hash; content:\"a0e9f5d64349fb13191bc781f81f42e1\";\n    sid:9000003; rev:1;\n)\nEOF\n```\n\n### Step 6: Extract Files and Artifacts from Traffic\n\nRecover transferred files and embedded data:\n\n```bash\n# Extract files using Zeek\nzeek -r malware.pcap \u002Fopt\u002Fzeek\u002Fshare\u002Fzeek\u002Fpolicy\u002Fframeworks\u002Ffiles\u002Fextract-all-files.zeek\nls extract_files\u002F\n\n# Extract files using NetworkMiner (GUI)\n# Or use tshark for specific protocol exports\ntshark -r malware.pcap --export-objects http,http_objects\u002F\ntshark -r malware.pcap --export-objects smb,smb_objects\u002F\ntshark -r malware.pcap --export-objects tftp,tftp_objects\u002F\n\n# Hash all extracted files\nsha256sum http_objects\u002F* smb_objects\u002F* 2>\u002Fdev\u002Fnull\n\n# Generate Zeek logs for comprehensive metadata\nzeek -r malware.pcap\n# Output: conn.log, dns.log, http.log, ssl.log, files.log, etc.\n```\n\n## Key Concepts\n\n| Term | Definition |\n|------|------------|\n| **Beaconing** | Regular periodic connections from malware to C2 server, identifiable by consistent time intervals and packet sizes |\n| **JA3\u002FJA3S** | TLS fingerprinting method creating a hash from ClientHello\u002FServerHello parameters to uniquely identify malware TLS implementations |\n| **DGA (Domain Generation Algorithm)** | Algorithm generating pseudo-random domain names that malware queries to locate C2 servers, evading static domain blocklists |\n| **DNS Tunneling** | Encoding data in DNS queries and responses to establish a C2 channel or exfiltrate data through DNS infrastructure |\n| **Fast Flux** | DNS technique rapidly rotating IP addresses for a domain to avoid takedown and distribute C2 across many compromised hosts |\n| **SNI (Server Name Indication)** | TLS extension revealing the hostname the client is connecting to; visible even in encrypted HTTPS connections |\n| **Network Signature** | Suricata\u002FSnort rule matching specific patterns in network traffic (headers, payloads, timing) to detect malicious communications |\n\n## Tools & Systems\n\n- **Wireshark**: Open-source packet analyzer for deep interactive inspection of network traffic at the protocol level\n- **Zeek**: Network analysis framework generating structured metadata logs (conn, dns, http, ssl) from live or captured traffic\n- **Suricata**: High-performance network IDS\u002FIPS for signature-based detection with Lua scripting for custom detection logic\n- **NetworkMiner**: Network forensic analysis tool for extracting files, images, and credentials from PCAP files\n- **Scapy**: Python packet manipulation library for programmatic packet analysis, beacon detection, and protocol decoding\n\n## Common Scenarios\n\n### Scenario: Decoding a Custom Binary C2 Protocol\n\n**Context**: Malware communicates with its C2 server using a custom binary protocol over TCP port 8443. Standard HTTP analysis yields no results. The protocol structure needs to be reverse engineered from the PCAP.\n\n**Approach**:\n1. Filter the PCAP for TCP port 8443 conversations and follow the TCP stream\n2. Identify the message framing (length prefix, delimiter, fixed-size headers)\n3. Compare multiple messages to identify static header fields vs variable data fields\n4. Cross-reference with reverse engineering findings from Ghidra (if the binary was analyzed)\n5. Write a Wireshark dissector or Scapy parser for the custom protocol\n6. Create Suricata rules matching the static header bytes for network detection\n7. Document the full protocol specification for threat intelligence sharing\n\n**Pitfalls**:\n- Analyzing only the first few packets; some C2 protocols change behavior after initial handshake\n- Not decrypting TLS traffic when the sandbox has MITM capabilities\n- Confusing legitimate CDN or cloud traffic with C2 (validate destination IPs)\n- Missing C2 traffic that uses DNS or ICMP instead of TCP\u002FUDP\n\n## Output Format\n\n```\nMALWARE NETWORK TRAFFIC ANALYSIS\n===================================\nPCAP File:        malware_sandbox.pcap\nDuration:         300 seconds\nTotal Packets:    12,847\nTotal Bytes:      4.2 MB\n\nDNS ACTIVITY\nTotal Queries:    47\nDGA Detected:     Yes (23 high-entropy queries to .com TLD)\nTunneling:        No\nResolved C2:      update.malicious[.]com -> 185.220.101[.]42\n\nC2 COMMUNICATION\nProtocol:         HTTPS (TLS 1.2)\nServer:           185.220.101[.]42:443\nSNI:              update.malicious[.]com\nJA3 Hash:         a0e9f5d64349fb13191bc781f81f42e1\nBeacon Interval:  60.2s ± 6.8s (11.3% jitter)\nTotal Sessions:   237\nData Sent:        147 MB\nData Received:    2.3 MB\nCertificate:      CN=update.malicious[.]com (self-signed, expired)\n\nPAYLOAD DOWNLOADS\nGET \u002Fpayload.dll from compromised-site[.]com\n  Size: 98,304 bytes\n  SHA-256: abc123def456...\n  Content-Type: application\u002Foctet-stream\n\nEXFILTRATION\nMethod:           HTTPS POST to \u002Fgate.php\nContent-Type:     application\u002Foctet-stream\nAverage Size:     15,432 bytes per request\nTotal Volume:     147 MB over 4 hours\n\nSURICATA ALERTS\n[1:2028401] ET MALWARE Generic C2 Beacon Pattern\n[1:2028500] ET POLICY Self-Signed Certificate\n\nGENERATED SIGNATURES\nSID 9000001: MalwareX HTTP beacon pattern\nSID 9000002: MalwareX DNS C2 domain\nSID 9000003: MalwareX JA3 TLS fingerprint\n```\n","# Analyzing Network Traffic of Malware\n\n## When to Use\n\n- Sandbox execution has captured a PCAP file and the network behavior needs detailed analysis\n- Identifying the C2 protocol structure for writing network detection signatures\n- Determining what data the malware exfiltrates and to which external infrastructure\n- Analyzing DNS tunneling, domain generation algorithms (DGA), or fast-flux behavior\n- Creating Suricata\u002FSnort signatures based on observed malware network patterns\n\n**Do not use** for host-based analysis of malware behavior; use Cuckoo sandbox reports or Volatility memory analysis for process-level activity.\n\n## Prerequisites\n\n- Wireshark 4.x installed for interactive PCAP analysis\n- tshark (Wireshark CLI) for scripted packet extraction\n- Zeek installed for automated metadata generation from PCAPs\n- Suricata with ET Open\u002FET Pro rulesets for signature matching\n- NetworkMiner for file extraction and credential detection from PCAPs\n- Python 3.8+ with `scapy` and `dpkt` for programmatic packet analysis\n\n## Workflow\n\n### Step 1: Initial PCAP Overview\n\nGet a high-level understanding of the network traffic:\n\n```bash\n# Capture statistics\ncapinfos malware.pcap\n\n# Protocol hierarchy\ntshark -r malware.pcap -q -z io,phs\n\n# Endpoint statistics (top talkers)\ntshark -r malware.pcap -q -z endpoints,ip\n\n# Conversation statistics\ntshark -r malware.pcap -q -z conv,tcp\n\n# DNS query summary\ntshark -r malware.pcap -q -z dns,tree\n```\n\n### Step 2: Analyze DNS Activity\n\nExamine DNS queries for DGA, tunneling, or C2 domain resolution:\n\n```bash\n# Extract all DNS queries\ntshark -r malware.pcap -T fields -e frame.time -e dns.qry.name -e dns.a \\\n  -Y \"dns.flags.response == 1\" | sort\n\n# Detect DGA patterns (high entropy domain names)\npython3 \u003C\u003C 'PYEOF'\nimport math\nfrom collections import Counter\n\ndef entropy(s):\n    p = [n\u002Flen(s) for n in Counter(s).values()]\n    return -sum(pi * math.log2(pi) for pi in p if pi > 0)\n\n# Parse DNS queries from tshark output\nimport subprocess\nresult = subprocess.run(\n    [\"tshark\", \"-r\", \"malware.pcap\", \"-T\", \"fields\", \"-e\", \"dns.qry.name\",\n     \"-Y\", \"dns.flags.response == 0\"],\n    capture_output=True, text=True\n)\n\ndomains = set(result.stdout.strip().split('\\n'))\nprint(\"Suspicious DNS queries (high entropy):\")\nfor domain in domains:\n    if domain:\n        subdomain = domain.split('.')[0]\n        ent = entropy(subdomain)\n        if ent > 3.5 and len(subdomain) > 10:\n            print(f\"  {domain} (entropy: {ent:.2f})\")\nPYEOF\n\n# Detect DNS tunneling (large TXT responses)\ntshark -r malware.pcap -T fields -e dns.qry.name -e dns.txt \\\n  -Y \"dns.resp.type == 16 and dns.resp.len > 100\"\n```\n\n### Step 3: Analyze HTTP\u002FHTTPS C2 Communication\n\nExamine web-based command-and-control traffic:\n\n```bash\n# Extract HTTP requests\ntshark -r malware.pcap -T fields \\\n  -e frame.time -e ip.src -e ip.dst -e http.host \\\n  -e http.request.method -e http.request.uri -e http.user_agent \\\n  -Y \"http.request\"\n\n# Extract HTTP response bodies (potential payload downloads)\ntshark -r malware.pcap -T fields \\\n  -e http.host -e http.request.uri -e http.content_type -e tcp.len \\\n  -Y \"http.response and tcp.len > 1000\"\n\n# Extract POST data (potential exfiltration)\ntshark -r malware.pcap -T fields \\\n  -e http.host -e http.request.uri -e http.file_data \\\n  -Y \"http.request.method == POST\"\n\n# TLS analysis (SNI, JA3 fingerprints)\ntshark -r malware.pcap -T fields \\\n  -e tls.handshake.extensions_server_name \\\n  -e tls.handshake.ja3 \\\n  -Y \"tls.handshake.type == 1\"\n\n# Extract TLS certificate details\ntshark -r malware.pcap -T fields \\\n  -e x509ce.dNSName -e x509af.serialNumber \\\n  -e x509sat.utf8String \\\n  -Y \"tls.handshake.type == 11\"\n\n# Export HTTP objects (downloaded files)\ntshark -r malware.pcap --export-objects http,exported_files\u002F\n```\n\n### Step 4: Detect Beaconing Patterns\n\nIdentify regular periodic communication indicating C2 beaconing:\n\n```python\n# Beacon detection from PCAP\nfrom scapy.all import rdpcap, IP, TCP\nfrom collections import defaultdict\nimport statistics\n\npackets = rdpcap(\"malware.pcap\")\n\n# Group connections by destination IP:port\nconnections = defaultdict(list)\nfor pkt in packets:\n    if IP in pkt and TCP in pkt:\n        if pkt[TCP].flags & 0x02:  # SYN flag\n            dst = f\"{pkt[IP].dst}:{pkt[TCP].dport}\"\n            connections[dst].append(float(pkt.time))\n\n# Analyze timing intervals for beaconing\nprint(\"Beacon Analysis:\")\nfor dst, times in connections.items():\n    if len(times) >= 5:\n        intervals = [times[i+1] - times[i] for i in range(len(times)-1)]\n        avg = statistics.mean(intervals)\n        stdev = statistics.stdev(intervals) if len(intervals) > 1 else 0\n        jitter = (stdev \u002F avg * 100) if avg > 0 else 0\n\n        if 10 \u003C avg \u003C 3600 and jitter \u003C 30:  # Regular interval with \u003C 30% jitter\n            print(f\"  [!] {dst}: {len(times)} connections\")\n            print(f\"      Interval: {avg:.1f}s ± {stdev:.1f}s (jitter: {jitter:.1f}%)\")\n            print(f\"      Pattern: LIKELY BEACONING\")\n```\n\n### Step 5: Generate Network Detection Signatures\n\nCreate Suricata\u002FSnort rules from observed traffic patterns:\n\n```bash\n# Run Suricata against the PCAP for existing signature matches\nsuricata -r malware.pcap -l suricata_output\u002F -c \u002Fetc\u002Fsuricata\u002Fsuricata.yaml\n\n# Review alerts\ncat suricata_output\u002Ffast.log\n\n# Create custom Suricata rule from observed patterns\ncat \u003C\u003C 'EOF' > custom_malware.rules\n# C2 beacon detection based on observed URI pattern\nalert http $HOME_NET any -> $EXTERNAL_NET any (\n    msg:\"MALWARE MalwareX C2 Beacon\";\n    flow:established,to_server;\n    http.method; content:\"POST\";\n    http.uri; content:\"\u002Fgate.php?id=\";\n    http.user_agent; content:\"Mozilla\u002F5.0 (compatible; MSIE 10.0)\";\n    sid:9000001; rev:1;\n)\n\n# DNS query for known C2 domain\nalert dns $HOME_NET any -> any any (\n    msg:\"MALWARE MalwareX C2 DNS Query\";\n    dns.query; content:\"update.malicious.com\";\n    sid:9000002; rev:1;\n)\n\n# JA3 hash match for malware TLS client\nalert tls $HOME_NET any -> $EXTERNAL_NET any (\n    msg:\"MALWARE MalwareX JA3 Match\";\n    ja3.hash; content:\"a0e9f5d64349fb13191bc781f81f42e1\";\n    sid:9000003; rev:1;\n)\nEOF\n```\n\n### Step 6: Extract Files and Artifacts from Traffic\n\nRecover transferred files and embedded data:\n\n```bash\n# Extract files using Zeek\nzeek -r malware.pcap \u002Fopt\u002Fzeek\u002Fshare\u002Fzeek\u002Fpolicy\u002Fframeworks\u002Ffiles\u002Fextract-all-files.zeek\nls extract_files\u002F\n\n# Extract files using NetworkMiner (GUI)\n# Or use tshark for specific protocol exports\ntshark -r malware.pcap --export-objects http,http_objects\u002F\ntshark -r malware.pcap --export-objects smb,smb_objects\u002F\ntshark -r malware.pcap --export-objects tftp,tftp_objects\u002F\n\n# Hash all extracted files\nsha256sum http_objects\u002F* smb_objects\u002F* 2>\u002Fdev\u002Fnull\n\n# Generate Zeek logs for comprehensive metadata\nzeek -r malware.pcap\n# Output: conn.log, dns.log, http.log, ssl.log, files.log, etc.\n```\n\n## Key Concepts\n\n| Term | Definition |\n|------|------------|\n| **Beaconing** | Regular periodic connections from malware to C2 server, identifiable by consistent time intervals and packet sizes |\n| **JA3\u002FJA3S** | TLS fingerprinting method creating a hash from ClientHello\u002FServerHello parameters to uniquely identify malware TLS implementations |\n| **DGA (Domain Generation Algorithm)** | Algorithm generating pseudo-random domain names that malware queries to locate C2 servers, evading static domain blocklists |\n| **DNS Tunneling** | Encoding data in DNS queries and responses to establish a C2 channel or exfiltrate data through DNS infrastructure |\n| **Fast Flux** | DNS technique rapidly rotating IP addresses for a domain to avoid takedown and distribute C2 across many compromised hosts |\n| **SNI (Server Name Indication)** | TLS extension revealing the hostname the client is connecting to; visible even in encrypted HTTPS connections |\n| **Network Signature** | Suricata\u002FSnort rule matching specific patterns in network traffic (headers, payloads, timing) to detect malicious communications |\n\n## Tools & Systems\n\n- **Wireshark**: Open-source packet analyzer for deep interactive inspection of network traffic at the protocol level\n- **Zeek**: Network analysis framework generating structured metadata logs (conn, dns, http, ssl) from live or captured traffic\n- **Suricata**: High-performance network IDS\u002FIPS for signature-based detection with Lua scripting for custom detection logic\n- **NetworkMiner**: Network forensic analysis tool for extracting files, images, and credentials from PCAP files\n- **Scapy**: Python packet manipulation library for programmatic packet analysis, beacon detection, and protocol decoding\n\n## Common Scenarios\n\n### Scenario: Decoding a Custom Binary C2 Protocol\n\n**Context**: Malware communicates with its C2 server using a custom binary protocol over TCP port 8443. Standard HTTP analysis yields no results. The protocol structure needs to be reverse engineered from the PCAP.\n\n**Approach**:\n1. Filter the PCAP for TCP port 8443 conversations and follow the TCP stream\n2. Identify the message framing (length prefix, delimiter, fixed-size headers)\n3. Compare multiple messages to identify static header fields vs variable data fields\n4. Cross-reference with reverse engineering findings from Ghidra (if the binary was analyzed)\n5. Write a Wireshark dissector or Scapy parser for the custom protocol\n6. Create Suricata rules matching the static header bytes for network detection\n7. Document the full protocol specification for threat intelligence sharing\n\n**Pitfalls**:\n- Analyzing only the first few packets; some C2 protocols change behavior after initial handshake\n- Not decrypting TLS traffic when the sandbox has MITM capabilities\n- Confusing legitimate CDN or cloud traffic with C2 (validate destination IPs)\n- Missing C2 traffic that uses DNS or ICMP instead of TCP\u002FUDP\n\n## Output Format\n\n```\nMALWARE NETWORK TRAFFIC ANALYSIS\n===================================\nPCAP File:        malware_sandbox.pcap\nDuration:         300 seconds\nTotal Packets:    12,847\nTotal Bytes:      4.2 MB\n\nDNS ACTIVITY\nTotal Queries:    47\nDGA Detected:     Yes (23 high-entropy queries to .com TLD)\nTunneling:        No\nResolved C2:      update.malicious[.]com -> 185.220.101[.]42\n\nC2 COMMUNICATION\nProtocol:         HTTPS (TLS 1.2)\nServer:           185.220.101[.]42:443\nSNI:              update.malicious[.]com\nJA3 Hash:         a0e9f5d64349fb13191bc781f81f42e1\nBeacon Interval:  60.2s ± 6.8s (11.3% jitter)\nTotal Sessions:   237\nData Sent:        147 MB\nData Received:    2.3 MB\nCertificate:      CN=update.malicious[.]com (self-signed, expired)\n\nPAYLOAD DOWNLOADS\nGET \u002Fpayload.dll from compromised-site[.]com\n  Size: 98,304 bytes\n  SHA-256: abc123def456...\n  Content-Type: application\u002Foctet-stream\n\nEXFILTRATION\nMethod:           HTTPS POST to \u002Fgate.php\nContent-Type:     application\u002Foctet-stream\nAverage Size:     15,432 bytes per request\nTotal Volume:     147 MB over 4 hours\n\nSURICATA ALERTS\n[1:2028401] ET MALWARE Generic C2 Beacon Pattern\n[1:2028500] ET POLICY Self-Signed Certificate\n\nGENERATED SIGNATURES\nSID 9000001: MalwareX HTTP beacon pattern\nSID 9000002: MalwareX DNS C2 domain\nSID 9000003: MalwareX JA3 TLS fingerprint\n```\n",{"name":5,"tags":44,"capec":49,"model":50,"tools":51,"domain":34,"maxTurns":55,"nist_csf":56,"subdomain":61,"description":7,"mitre_attack":62},[22,45,46,47,48],"network-analysis","PCAP","Wireshark","C2-detection",[],"sonnet",[52,32,53,54],"Read","Glob","Grep",20,[57,58,59,60],"DE.AE-02","RS.AN-03","ID.RA-01","DE.CM-01","malware-analysis",[63,64,65],"T1040","T1059","T1071","main","a91f1293287ffa9f4f1b8f486cd6e835a1568c84","skills\u002Fnetwork\u002Ftraffic\u002Fmaltraffic\u002Fdetect","https:\u002F\u002Fgithub.com\u002FDCx7C5\u002Fai-marketplace","https:\u002F\u002Fgithub.com\u002FDCx7C5","#Python","2026-09-01 11:21:00",{"source":8,"skillName":5,"commands":74,"prompt":84,"zipAvailable":85},[75,78,81],{"tool":76,"command":77},"npx","npx skills add DCx7C5\u002Fai-marketplace --skill traffic-maltraffic-detect",{"tool":79,"command":80},"bunx","bunx skills add DCx7C5\u002Fai-marketplace --skill traffic-maltraffic-detect",{"tool":82,"command":83},"pnpm","pnpm dlx skills add DCx7C5\u002Fai-marketplace --skill traffic-maltraffic-detect","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FDCx7C5\u002Fai-marketplace\u002Fblob\u002Fmain\u002Fskills\u002Fnetwork\u002Ftraffic\u002Fmaltraffic\u002Fdetect\u002FSKILL.md",true,[87],{"path":88,"resourceType":89,"resourceTypeDesc":90,"sizeBytes":91,"sourceHtmlUrl":92},"index.json","REFERENCE","参考文档",690,"https:\u002F\u002Fgithub.com\u002FDCx7C5\u002Fai-marketplace\u002Fblob\u002Fmain\u002Fskills\u002Fnetwork\u002Ftraffic\u002Fmaltraffic\u002Fdetect\u002Findex.json",[94,116,134,155,177,193],{"skillNo":95,"name":96,"nameZh":6,"description":97,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":98,"categories":99,"keywords":100,"publishedAt":39},"01M71HAPZ01KQ30RKTB0FFSQ05","services-wmi-persistence-detect","Detect WMI event subscription persistence by enumerating ActiveScriptEventConsumer, CommandLineEventConsumer, and permanent subscriptions in the WMI repository.","https:\u002F\u002Fgithub.com\u002FDCx7C5\u002Fai-marketplace\u002Fblob\u002Fmain\u002Fskills\u002Fwindows\u002Fservices\u002Fwmi\u002Fpersistence\u002Fdetect\u002FSKILL.md",[],[101,20,102,103,104,28,38,105,106,107,108,109,110,111,112,113,114,34,115],"services","services wmi persistence detect","wmi","persistence","process","activescript","event","subscriptions","commandline-consumer","repository","subscription","event-subscription","t1546.003","forensics","process-forensics",{"skillNo":117,"name":118,"nameZh":6,"description":119,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":120,"categories":121,"keywords":122,"publishedAt":39},"01M71HAK6JTTTS229T17WJMMCG","services-wmi-exec-exploit","Perform lateral movement across Windows networks using WMI-based remote execution techniques including Impacket wmiexec.py, CrackMapExec, and native WMI commands for stealthy post-exploitation during red team engagements.","https:\u002F\u002Fgithub.com\u002FDCx7C5\u002Fai-marketplace\u002Fblob\u002Fmain\u002Fskills\u002Fwindows\u002Fservices\u002Fwmi\u002Fexec\u002Fexploit\u002FSKILL.md",[],[123,101,124,103,125,126,21,34,32,31,127,128,129,130,28,131,27,26,132,133],"exploit","services wmi exec exploit","exec","remote","team","across","crackmapexec","native","command","lateral-movement","Impacket",{"skillNo":135,"name":136,"nameZh":6,"description":137,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":138,"categories":139,"keywords":140,"publishedAt":39},"01M71HAG6MHKNQV8KDZKMT4886","registry-artifact-extract","Extract and analyze Windows Registry hives to uncover user activity, installed software, autostart entries, and evidence of system compromise.","https:\u002F\u002Fgithub.com\u002FDCx7C5\u002Fai-marketplace\u002Fblob\u002Fmain\u002Fskills\u002Fwindows\u002Fregistry\u002Fartifact\u002Fextract\u002FSKILL.md",[],[141,142,143,144,145,146,34,32,147,31,148,149,28,26,150,151,152,153,154,50],"artifact","registry","registry artifact extract","extract","evidence-collection","artifact-analysis","collection","analyze","uncover","software","activity","digital-forensics","windows-registry","regripper",{"skillNo":156,"name":157,"nameZh":6,"description":158,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":159,"categories":160,"keywords":161,"publishedAt":39},"01M71HACR4A8XTWTTSXK4124AA","processes-token-impersonate-detect","Detect Windows token impersonation and privilege abuse including SeImpersonatePrivilege exploitation via Potato attacks and token stealing techniques.","https:\u002F\u002Fgithub.com\u002FDCx7C5\u002Fai-marketplace\u002Fblob\u002Fmain\u002Fskills\u002Fwindows\u002Fprocesses\u002Ftoken\u002Fimpersonate\u002Fdetect\u002FSKILL.md",[],[20,162,163,164,165,166,167,38,168,34,115,169,170,171,172,173,174,175,176,28],"processes token impersonate detect","token","processes","attacks","windows","escalation","techniques","privilege-escalation","seimpersonate","token-impersonation","printspoofer","exploitation","potato","impersonation","via",{"skillNo":178,"name":179,"nameZh":6,"description":180,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":181,"categories":182,"keywords":183,"publishedAt":39},"01M71HAABSB4Z6QFSXEG00R4RK","processes-thread-injection-detect","Detect Windows thread injection techniques including CreateRemoteThread, QueueUserAPC, NtCreateThreadEx, and thread hijacking via process memory analysis.","https:\u002F\u002Fgithub.com\u002FDCx7C5\u002Fai-marketplace\u002Fblob\u002Fmain\u002Fskills\u002Fwindows\u002Fprocesses\u002Fthread\u002Finjection\u002Fdetect\u002FSKILL.md",[],[184,185,20,186,164,166,187,38,188,168,34,115,31,189,190,191,192,176,28,105],"thread","processes thread injection detect","injection","memory","process-injection","api","apc-injection","thread-injection","nt-api",{"skillNo":194,"name":195,"nameZh":6,"description":196,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":197,"categories":198,"keywords":199,"publishedAt":39},"01M71HA7H311V5G14WMX58HQSS","processes-hollow-technique-detect","Detect process hollowing (RunPE) by identifying processes with mismatched image paths between PEB and VAD tree, or unmapped PE headers in memory.","https:\u002F\u002Fgithub.com\u002FDCx7C5\u002Fai-marketplace\u002Fblob\u002Fmain\u002Fskills\u002Fwindows\u002Fprocesses\u002Fhollow\u002Ftechnique\u002Fdetect\u002FSKILL.md",[],[200,20,164,201,187,38,202,203,34,115,204,205,206,207,208,209,28,105,210,211],"processes hollow technique detect","tree","memory-forensics","process-hollow","peb","runpe","image","pe-header","in memory","with","mismatched","headers"]