analyzing-network-traffic-of-malware

analyzing-network-traffic-of-malware is a skill for Claude Code from killvxk/cybersecurity-skills-zh. It costs 101 tokens per session (3,444 once invoked), scanned A, original, Apache-2.0.

A guide to examining network traffic produced by malware, using packet captures and tools such as Wireshark, Zeek, and Suricata. A packet capture is a recorded copy of network communications.

In plain words
What is it for?
Use it to inspect PCAP files, DNS and other protocols, identify command-and-control patterns, extract files or credentials, and create network detection rules.
Why use it?
It helps show how malware contacts its control server, downloads payloads, steals data, or moves between systems, even when host-level evidence is limited.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the cybersecurity-skills-zh plugin — 58 skills shipped together

Good fit Use it to inspect PCAP files, DNS and other protocols, identify command-and-control patterns, extract files or credentials, and create network detection rules.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/killvxk/cybersecurity-skills-zh/analyzing-network-traffic-of-malware
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add killvxk/cybersecurity-skills-zh --skill analyzing-network-traffic-of-malware
Clone the repo
git clone --depth 1 https://github.com/killvxk/cybersecurity-skills-zh

Made for: Claude Code.

Or install cybersecurity-skills-zh, the plugin that ships this one along with the rest of its 58 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for analyzing-network-traffic-of-malware

README.md
[![agentmods](https://agentmods.dev/badge/skills/killvxk/cybersecurity-skills-zh/analyzing-network-traffic-of-malware/github.svg)](https://agentmods.dev/skills/killvxk/cybersecurity-skills-zh/analyzing-network-traffic-of-malware)
Your own site
<a href="https://agentmods.dev/skills/killvxk/cybersecurity-skills-zh/analyzing-network-traffic-of-malware"><img src="https://agentmods.dev/badge/skills/killvxk/cybersecurity-skills-zh/analyzing-network-traffic-of-malware/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for analyzing-network-traffic-of-malware

Your own site · 80×15
<a href="https://agentmods.dev/skills/killvxk/cybersecurity-skills-zh/analyzing-network-traffic-of-malware"><img src="https://agentmods.dev/badge/skills/killvxk/cybersecurity-skills-zh/analyzing-network-traffic-of-malware.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 101 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,444 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00101 $0.03444
Opus 5 $0.00051 $0.01722
Sonnet 5 $0.00020 $0.00689
Haiku 4.5 $0.00010 $0.00344

Measured 12d ago against content hash ac582d9e1faa, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

analyzing-network-traffic-of-malware scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/agent.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

result = subprocess.run(
skills/analyzing-network-traffic-of-malware/SKILL.md · 324 lines

How it starts

The opening of the file, as written. The whole thing — 324 lines — stays where its author put it; the contents beside it link to each section on GitHub.

分析恶意软件的网络流量

适用场景

  • 沙箱执行已捕获 PCAP 文件,需要详细分析网络行为
  • 识别 C2 协议结构,用于编写网络检测签名
  • 确定恶意软件泄露的数据及其目标外部基础设施
  • 分析 DNS 隧道、域名生成算法(DGA)或快速通量行为
  • 根据观察到的恶意软件网络模式创建 Suricata/Snort 签名

不适用于恶意软件行为的基于主机的分析;请使用 Cuckoo 沙箱报告或 Volatility 内存分析进行进程级活动分析。

前置条件

  • Wireshark 4.x,用于交互式 PCAP 分析
  • tshark(Wireshark CLI),用于脚本化数据包提取
  • Zeek,用于从 PCAP 自动生成元数据
  • Suricata,带 ET Open/ET Pro 规则集用于签名匹配
  • NetworkMiner,用于从 PCAP 中提取文件和检测凭据
  • Python 3.8+,安装 scapydpkt 用于程序化数据包分析

工作流程

步骤 1:PCAP 初步概览

获取网络流量的高层次理解:

# 捕获统计
capinfos malware.pcap

# 协议层次
tshark -r malware.pcap -q -z io,phs

# 端点统计(主要通信方)
tshark -r malware.pcap -q -z endpoints,ip

# 会话统计
tshark -r malware.pcap -q -z conv,tcp

# DNS 查询摘要
tshark -r malware.pcap -q -z dns,tree

步骤 2:分析 DNS 活动

检查 DNS 查询中的 DGA、隧道或 C2 域名解析:

# 提取所有 DNS 查询
tshark -r malware.pcap -T fields -e frame.time -e dns.qry.name -e dns.a \
  -Y "dns.flags.response == 1" | sort

# 检测 DGA 模式(高熵域名)
python3 << 'PYEOF'
import math
from collections import Counter

def entropy(s):
    p = [n/len(s) for n in Counter(s).values()]
    return -sum(pi * math.log2(pi) for pi in p if pi > 0)

# 从 tshark 输出解析 DNS 查询
import subprocess
result = subprocess.run(
    ["tshark", "-r", "malware.pcap", "-T", "fields", "-e", "dns.qry.name",
     "-Y", "dns.flags.response == 0"],
    capture_output=True, text=True
)

domains = set(result.stdout.strip().split('\n'))
print("可疑 DNS 查询(高熵):")
for domain in domains:
    if domain:
        subdomain = domain.split('.')[0]
        ent = entropy(subdomain)
        if ent > 3.5 and len(subdomain) > 10:
            print(f"  {domain}(熵值:{ent:.2f})")
PYEOF

# 检测 DNS 隧道(大型 TXT 响应)
tshark -r malware.pcap -T fields -e dns.qry.name -e dns.txt \
  -Y "dns.resp.type == 16 and dns.resp.len > 100"

步骤 3:分析 HTTP/HTTPS C2 通信

检查基于 Web 的命令与控制流量:

# 提取 HTTP 请求
tshark -r malware.pcap -T fields \
  -e frame.time -e ip.src -e ip.dst -e http.host \
  -e http.request.method -e http.request.uri -e http.user_agent \
  -Y "http.request"

# 提取 HTTP 响应体(潜在的载荷下载)
tshark -r malware.pcap -T fields \
  -e http.host -e http.request.uri -e http.content_type -e tcp.len \
  -Y "http.response and tcp.len > 1000"

# 提取 POST 数据(潜在的数据泄露)
tshark -r malware.pcap -T fields \
  -e http.host -e http.request.uri -e http.file_data \
  -Y "http.request.method == POST"

# TLS 分析(SNI、JA3 指纹)
tshark -r malware.pcap -T fields \
  -e tls.handshake.extensions_server_name \
  -e tls.handshake.ja3 \
  -Y "tls.handshake.type == 1"

# 提取 TLS 证书详情
tshark -r malware.pcap -T fields \
  -e x509ce.dNSName -e x509af.serialNumber \
  -e x509sat.utf8String \
  -Y "tls.handshake.type == 11"

# 导出 HTTP 对象(下载的文件)
tshark -r malware.pcap --export-objects http,exported_files/

Read the full file on GitHub · 324 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 12d ago First seen · 324 lines · 101 tokens per session scan A ac582d9e1faa

Subscribe to this mod's changes

analyzing-network-traffic-of-malware is a skill published in the GitHub repository killvxk/cybersecurity-skills-zh (45 stars, last pushed 4mo ago), licensed Apache-2.0. It adds 101 tokens to every session and 3,444 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

analyzing-network-traffic-of-malware

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…

mukul975/Anthropic-Cybersecurity-Skills · 81 tokens

analyzing-network-traffic-of-malware

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…

26zl/cybersec-toolkit · 81 tokens

analyzing-network-traffic-of-malware

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…

pinkpixel-dev/skills-collection-1 · 81 tokens

analyzing-network-traffic-of-malware

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…

marysatasselshaped667/skills-collection-1 · 81 tokens

analyzing-network-traffic-of-malware

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…

autohandai/community-skills · 81 tokens

analyzing-network-traffic-of-malware

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…

Youngmaidainon/Agent-Level-Up · 81 tokens