Network Forensics, Automated
Point this tool at any pcap file and get severity-ranked findings with clear recommendations — in seconds. No more manually sifting through thousands of packets in Wireshark.
Two Modes. One Tool.
Choose connectivity troubleshooting to diagnose network problems, or security audit to find vulnerabilities and exposed data.
TCP Failure Detection
Detects incomplete handshakes, elevated RST rates, retransmissions, and half-open connections that indicate connectivity problems.
DNS Analysis
Identifies NXDOMAIN failures, SERVFAIL errors, REFUSED responses, potential DNS tunneling, and unencrypted DNS traffic.
Credential Detection
Finds passwords, API keys, tokens, HTTP Basic Auth, and session cookies transmitted in cleartext using 13+ regex patterns.
Cleartext Protocol Flags
Flags HTTP, FTP, Telnet, SMTP, POP3, IMAP, LDAP, SNMP, and VNC traffic with migration recommendations to encrypted alternatives.
ARP Spoofing Detection
Identifies multiple MAC addresses claiming the same IP — a telltale sign of man-in-the-middle attacks on local networks.
Sensitive Data Scanning
Detects Social Security numbers, credit card numbers, email addresses, private keys, and certificates in packet payloads.
Four Engines, One Pipeline
The tool chains four specialized modules: a Scapy-based packet parser extracts structured metadata from every packet, a heuristic AI engine runs 20+ checks to generate severity-ranked findings, an optional LLM analyzer adds deep contextual intelligence, and a Rich-powered renderer produces clean, color-coded terminal output.
- Parses TCP, UDP, ICMP, ARP, DNS, HTTP, FTP, Telnet, SMTP
- Severity levels: CRITICAL, HIGH, MEDIUM, LOW, INFO
- Each finding includes actionable remediation steps
- Supports .pcap and .pcapng file formats
What It Catches
Connectivity Troubleshooting
| Check | Severity |
|---|---|
| TCP Handshake Failures | CRITICAL |
| TCP Retransmissions | HIGH |
| TCP Reset Floods | HIGH |
| DNS NXDOMAIN/SERVFAIL | HIGH |
| ICMP Unreachable Messages | MEDIUM |
| Ping Loss Rate | MEDIUM |
| ARP Anomalies | HIGH |
| Traffic Black Holes | HIGH |
| One-Way Traffic | MEDIUM |
| Port Scan Patterns | INFO |
Security Audit
| Check | Severity |
|---|---|
| Cleartext Credentials | CRITICAL |
| Telnet Usage | CRITICAL |
| ARP Spoofing | CRITICAL |
| Sensitive Data (SSN, CC) | HIGH |
| FTP / SMTP Cleartext | HIGH |
| DNS Tunneling | HIGH |
| HTTP Basic Auth | HIGH |
| Unencrypted HTTP Traffic | MEDIUM |
| Suspicious Ports (C2) | MEDIUM |
| Unencrypted DNS | LOW |
Optional LLM Deep Analysis
Connect any LLM provider for root cause analysis, attack chain mapping, compliance impact assessment, and interactive follow-up Q&A. Zero extra dependencies needed — the provider layer uses only Python's built-in urllib.
Full OpenAI API support. Set OPENAI_API_KEY or pass inline with --llm-api-key.
APINative Anthropic Messages API. Uses x-api-key header authentication.
APIAccess hundreds of models through a single API. Great for comparing model performance.
APIRun analysis completely offline and free. Auto-detects Ollama on localhost:11434.
Free / LocalPoint to any local model running in LM Studio. Default port 1234.
Free / LocalSupports any OpenAI-compatible endpoint. Specify --llm-base-url to connect.
Free / LocalYour Packets Stay Private
The LLM never sees raw packet data. Only aggregated statistics, finding summaries, and metadata are sent. All actual packet payloads, IP addresses in raw form, and captured credentials stay on your machine.
- No raw packet payloads sent to LLM
- Works fully offline with local LLMs
- 100% open source — audit the code yourself
- MIT licensed, no telemetry, no tracking
Install in 30 Seconds
# One-line install from GitHub
pip install git+https://github.com/jph4cks/ai-packet-analyzer.git
# Run it
ai-packet-analyzer capture.pcap
git clone https://github.com/jph4cks/ai-packet-analyzer.git
cd ai-packet-analyzer
pip install -e .
# Run it
ai-packet-analyzer capture.pcap --mode security
# OpenAI
export OPENAI_API_KEY="sk-your-key"
ai-packet-analyzer capture.pcap --llm openai --interactive-llm
# Local with Ollama (free, offline)
ollama pull llama3
ai-packet-analyzer capture.pcap --llm ollama
# Ask a specific question
ai-packet-analyzer capture.pcap --llm anthropic --llm-question "Any signs of data exfiltration?"
Ready to automate your packet analysis?
AI Packet Analyzer is free, open source, and works on Linux, macOS, and Windows. Star it on GitHub or start using it today.