Skip to content
Agentmart
Submit a tool

analyzing-network-traffic-with-wireshark

使用 Wireshark 和 tshark 捕获并分析网络数据包,识别恶意流量模式、诊断协议问题、提取工件, 并支持对授权网络分段进行事件响应调查。

Skill by killvxk

IndexedApache-2.0★ 57
Write a review

Chalk Labs

Need help deploying analyzing-network-traffic-with-wireshark?

Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.

Book a call

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-with-wireshark

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 和 tshark 捕获并分析网络数据包,识别恶意流量模式、诊断协议问题、提取工件, 并支持对授权网络分段进行事件响应调查。

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-with-wireshark

What's inside

Skill name
analyzing-network-traffic-with-wireshark
Description
使用 Wireshark 和 tshark 捕获并分析网络数据包,识别恶意流量模式、诊断协议问题、提取工件, 并支持对授权网络分段进行事件响应调查。
License
Apache-2.0
Instructions
206 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)

# 使用 Wireshark 分析网络流量

## 适用场景

- 通过检查命令与控制(command-and-control)流量、数据外泄或横向移动(lateral movement)的数据包级证据,调查疑似网络入侵
- 诊断网络性能问题,如重传、分片或 DNS 解析失败
- 通过捕获沙盒或隔离主机的流量,分析恶意软件的通信模式
- 通过确认实际穿越网络分段的流量,验证防火墙(firewall)和入侵检测系统(IDS)规则
- 从捕获的网络会话中提取文件、凭据或失陷指标(IOC)

**不适用于**:在未经授权的网络上捕获流量、在没有法律授权的情况下拦截私人通信,或作为生产监控中全功能 SIEM 平台的替代品。

## 前置条件

- 已安装 Wireshark 4.0+ 和 tshark 命令行工具
- 进行实时数据包捕获需要 root/sudo 权限或隶属于 `wireshark` 组
- 访问受监控网段的网络接口(物理网卡、SPAN 端口或网络分路器)
- 足够的磁盘空间用于数据包捕获文件(繁忙的千兆链路估计每分钟 1 GB)
- 熟悉 TCP/IP 协议、HTTP、DNS、TLS 和 SMB 的数据包层级细节

## 工作流程

### 步骤 1:配置捕获环境

设置捕获接口和过滤器,锁定相关流量:

```bash
# 列出可用接口
tshark -D

# 在 eth0 上启动捕获,使用捕获过滤器限制范围
tshark -i eth0 -f "host 10.10.5.23 and (port 80 or port 443 or port 445)" -w /tmp/capture.pcapng

# 使用环形缓冲区捕获以管理磁盘占用(10 个文件,每个 100MB)
tshark -i eth0 -b filesize:102400 -b files:10 -w /tmp/rolling_capture.pcapng

# 同时在多个接口上捕获
tshark -i eth0 -i eth1 -w /tmp/multi_interface.pcapng
```

对于 Wireshark GUI,在开始捕获前在"Capture Options"对话框中设置捕获过滤器。

### 步骤 2:应用显示过滤器进行针对性分析

```bash
# 过滤包含可疑 User-Agent 的 HTTP 流量
tshark -r capture.pcapng -Y "http.user_agent contains \"curl\" or http.user_agent contains \"Wget\""

# 查找指向可疑顶级域名的 DNS 查询
tshark -r capture.pcapng -Y "dns.qry.name contains \".xyz\" or dns.qry.name contains \".top\" or dns.qry.name contains \".tk\""

# 识别表明网络问题的 TCP 重传
tshark -r capture.pcapng -Y "tcp.analysis.retransmission"

# 过滤用于横向移动检测的 SMB 流量
tshark -r capture.pcapng -Y "smb2.cmd == 5 or smb2.cmd == 3" -T fields -e ip.src -e ip.dst -e smb2.filename

# 查找明文凭据传输
tshark -r capture.pcapng -Y "ftp.request.command == \"PASS\" or http.authbasic"

# 检测信标模式(规律间隔的连接)
tshark -r capture.pcapng -Y "ip.dst == 203.0.113.50" -T fields -e frame.time_relative -e ip.src -e tcp.dstport
```

### 步骤 3:协议专项深度分析

```bash
# 跟踪 TCP 流以重建对话
tshark -r capture.pcapng -q -z follow,tcp,ascii,0

# 分析 HTTP 请求/响应对
tshark -r capture.pcapng -Y "http" -T fields -e frame.time -e ip.src -e ip.dst -e http.request.method -e http.request.uri -e http.response.code

# 提取 DNS 查询/响应统计
tshark -r capture.pcapng -q -z dns,tree

# 分析 TLS 握手以检测弱密码套件
tshark -r capture.pcapng -Y "tls.handshake.type == 2" -T fields -e ip.src -e ip.dst -e tls.handshake.ciphersuite

# SMB 文件访问枚举
tshark -r capture.pcapng -Y "smb2" -T fields -e frame.time -e ip.src -e ip.dst -e smb2.filename -e smb2.cmd
```

### 步骤 4:提取工件和 IOC

```bash
# 导出 HTTP 对象(通过 HTTP 传输的文件)
tshark -r capture.pcapng --export-objects http,/tmp/http_objects/

# 导出 SMB 对象(通过 SMB 传输的文件)
tshark -r capture.pcapng --export-objects smb,/tmp/smb_objects/

# 提取所有唯一目标 IP 用于威胁情报查询
tshark -r capture.pcapng -T fields -e ip.dst | sort -u > unique_dest_ips.txt

# 提取 SSL/TLS 证书信息
tshark -r capture.pcapng -Y "tls.handshake.type == 11" -T fields -e x509sat.uTF8String -e x509ce.dNSName

# 提取所有访问的 URL
tshark -r capture.pcapng -Y "http.request" -T fields -e http.host -e http.request.uri | sort -u > urls.txt

# 对提取的文件进行哈希,用于 IOC 匹配
find /tmp/http_objects/ -type f -exec sha256sum {} \; > extracted_file_hashes.txt
```

### 步骤 5:统计分析与异常检测

```bash
# 协议层级统计
tshark -r capture.pcapng -q -z io,phs

# 按字节数排序的对话统计
tshark -r capture.pcapng -q -z conv,tcp -z conv,udp

# 识别最活跃主机
tshark -r capture.pcapng -q -z endpoints,ip

# IO 图数据(每秒数据包数)
tshark -r capture.pcapng -q -z io,stat,1,"COUNT(frame) frame"

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

Done for you

Rather not set it up yourself?

Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.

See how we build AI agents →Read the case studies

Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.

launches shipped
50+
launches shipped
media placements
500+
media placements
founders on every account
2
founders on every account

Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block

Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.

Get analyzing-network-traffic-with-wireshark running in your business

Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.

Goes to the Chalk Labs founders, not the newsletter. Privacy

Need help deploying analyzing-network-traffic-with-wireshark?

CallGet help
Cite this page

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