Skip to content
Agentmart
Submit a tool

analyzing-network-traffic-of-malware

分析恶意软件在沙箱执行或实时事件响应期间生成的网络流量, 使用 Wireshark、Zeek 和 Suricata 识别 C2 协议、数据泄露信道、 载荷下载和横向移动模式。适用于恶意软件网络分析、C2 流量解码、 恶意软件 PCAP 分析或基于网络的恶意软件检测相关请求。

Skill by killvxk

IndexedApache-2.0★ 57
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/killvxk-analyzing-network-traffic-of-malware

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

分析恶意软件在沙箱执行或实时事件响应期间生成的网络流量, 使用 Wireshark、Zeek 和 Suricata 识别 C2 协议、数据泄露信道、 载荷下载和横向移动模式。适用于恶意软件网络分析、C2 流量解码、 恶意软件 PCAP 分析或基于网络的恶意软件检测相关请求。

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found
Runs as
Python package

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/analyzing-network-traffic-of-malware

What's inside

Skill name
analyzing-network-traffic-of-malware
Description
分析恶意软件在沙箱执行或实时事件响应期间生成的网络流量, 使用 Wireshark、Zeek 和 Suricata 识别 C2 协议、数据泄露信道、 载荷下载和横向移动模式。适用于恶意软件网络分析、C2 流量解码、 恶意软件 PCAP 分析或基于网络的恶意软件检测相关请求。
License
Apache-2.0
Instructions
310 lines in SKILL.md · view on GitHub

Before installing

  • Ships executable scripts

Files (4)

  • LICENSE
  • SKILL.md
  • api-reference.md · references/
  • agent.py · scripts/

SKILL.md (first lines)

# 分析恶意软件的网络流量

## 适用场景

- 沙箱执行已捕获 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+,安装 `scapy` 和 `dpkt` 用于程序化数据包分析

## 工作流程

### 步骤 1:PCAP 初步概览

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

```bash
# 捕获统计
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 域名解析:

```bash
# 提取所有 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 的命令与控制流量:

```bash
# 提取 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 对象(下载的文件)

From killvxk/cybersecurity-skills-zh, Apache-2.0.

More from killvxk/cybersecurity-skills-zh

Signals

Stars
57
Forks
14
Open issues
1
Last commit (this folder)
Mar 17, 2026 (7 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
Apache-2.0
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from killvxk

Cite this page

analyzing-network-traffic-of-malware skill. Agent Mart. https://agentmart.dev/skills/killvxk-analyzing-network-traffic-of-malware (last updated 2026-10-24)