跳到正文
Hacker News 熱門(buzzing.cc 中文翻譯)·· 8 小時前AI 評分49

PcapAnalyzer:一款自我託管的 PCAP 分析工具,內置 27 個問題檢測器

PcapAnalyzer——一款自托管的 PCAP 分析工具,内置 27 种问题检测器

AI 導讀

PcapAnalyzer 是一款免費開源的自我託管 PCAP 分析工具,會在每次擷取中執行 27 個檢測器,指出故障原因及建議檢查項目。工具可分析 TCP、網絡路徑、DNS、應用程式及安全問題,並提供 Wireshark 式檢視和 PDF 報告。AI 調查屬可選功能,使用者可提供自己的 Anthropic API key;擷取資料在本機分析,不會離開所在網絡。

正文

Versión en español: README.es.md.

Find the network fault in seconds, not hours. Upload a .pcap / .pcapng capture (gzip too) and PcapAnalyzer tells you what is failing, why, and what to check next. It runs on your own machine, so captures never leave your network.

Free and open source (Apache 2.0). Status: beta.

What it does

  • 27 detectors that run on every capture, each with a severity and a next step:
    • TCP: firewall blocks (SYN→RST), retransmissions, duplicate ACKs, loss and reordering, zero and full windows, resets after the handshake, slow handshakes.
    • Path: PMTUD black holes, low MSS, IP fragmentation, ICMP errors, routing loops.
    • Name and address services: unanswered or slow DNS, SERVFAIL, NXDOMAIN bursts, DHCP NAK / DECLINE / no answer, duplicate IPs, ARP storms.
    • Applications: HTTP 4xx / 5xx and slow responses, TLS alerts, SSL 3.0 / TLS 1.0 / 1.1.
    • Tunnels: IPsec (IKE and ESP), WireGuard, OpenVPN, GRE, L2TP and Teredo that are one-way, never answer a handshake or keep renegotiating.
    • Security: port scans and sweeps, cleartext logins (FTP, POP3, IMAP, SMTP AUTH, HTTP Basic; credentials are never stored or shown), Telnet / SMBv1 / SNMP v1-v2c, ARP spoofing, overlapping IP fragments.
  • Capture quality first. It warns when the capture itself limits the result: frames duplicated by a mirror port, traffic seen in one direction only, truncated packets, connections already open when the capture started.
  • Wireshark-style views: packet list with real Wireshark display filters over the whole capture, colouring, CSV export, expert info, HTTP / DNS / DHCP / TLS tables, response times and a flow diagram per conversation.
  • AI investigation (optional): an AI investigates the capture with tools (real filters, stream detail, statistics) and cites the packets behind every claim. You can then ask follow-up questions. It uses your own Anthropic API key; without one, a demo mode runs the full flow with text generated from the analysis, at no cost.
  • PDF report, Spanish and English interface, light and dark theme.

Quick start

You need Docker with Docker Compose. On Windows, run the script from Git Bash or WSL.

git clone https://github.com/sebaandrada-cell/PcapAnalyzer.git
cd PcapAnalyzer
./start.sh

The script creates a random access token (shown once, stored in .env) and starts the app. When the build finishes, open http://localhost:8080, paste the token into the "API token" field (top right) and upload a capture, or click "Try the sample capture".

The app listens on 127.0.0.1 only. Do not expose it on a network without an authenticated reverse proxy: the API can use your AI account. QUICKSTART.md has the details, the AI setup and troubleshooting.

Without Docker

You need Python 3.9+, Node 20+ and tshark (installed with Wireshark).

cd backend
python3 -m venv .venv
.venv/bin/pip install -r requirements-dev.txt
export API_TOKENS="$(openssl rand -hex 32)"
.venv/bin/uvicorn app.main:app --reload
cd frontend
npm install
npm run dev

Open http://localhost:5173 and paste the same token. If tshark is not on your PATH, set TSHARK_PATH to the binary.

Privacy

  • The capture is analysed on your machine. While an AI investigation lasts it is kept encrypted (60 minutes of inactivity, or until you press "Delete capture now") and is then deleted.
  • The AI is optional. It only sees what its tools return (packet metadata; packet content only if you switch it on for that session), never the pcap file.
  • No telemetry and no accounts for the self-hosted version.

Tests

cd backend && .venv/bin/python -m pytest -q    # needs tshark
cd frontend && npm test

Feedback

PcapAnalyzer is a beta. It has been tested with synthetic fixtures and public sample captures, and the most useful feedback is a capture where it misses a problem or reports one that is not real. Please open an issue at https://github.com/sebaandrada-cell/PcapAnalyzer/issues and describe the case. Do not attach captures that contain real credentials or customer data; anonymise them first or describe the pattern.

The technical reference (JSON schema, detector thresholds, limits, API errors) is in README.es.md, in Spanish.

License

Apache License 2.0. See NOTICE for third-party software: tshark / Wireshark (GPL) runs as a separate program and is not distributed with PcapAnalyzer.

來源:Hacker News 熱門(buzzing.cc 中文翻譯) · github.com