| name | pcap-analyst |
| description | Streaming PCAP/network capture analysis for IOC extraction. Parses DNS queries (UDP/53) and TLS SNI (TCP/443) from .pcap/.pcapng files using scapy's PcapReader generator (never loads full capture into RAM โ OOM-hardened with 50MB file gate). Extracts unique domains, IPs, and server names, deduplicated via set(). Output can chain directly to intel-skill for OSINT enrichment. Trigger when user asks to analyze a pcap, network capture, traffic dump, extract IOCs from a capture file, or asks what domains/IPs a PCAP contacted. |
| metadata | {"clawdbot":{"emoji":"๐ก","commands":["analyze","dns","sni","iocs"],"arg_template":"scripts/pcap_analyst.py {command} {args}","timeout":60,"requires":{"bins":["python"],"python_libs":["scapy"]},"install":[{"id":"pip-scapy","kind":"pip","packages":["scapy"],"label":"Install scapy for PCAP parsing"}],"commands_schema":{"analyze":{"properties":{"path":{"type":"string","description":"Path to .pcap or .pcapng file (max 50MB)"}},"required":["path"]},"dns":{"properties":{"path":{"type":"string","description":"Path to .pcap or .pcapng file (max 50MB)"}},"required":["path"]},"sni":{"properties":{"path":{"type":"string","description":"Path to .pcap or .pcapng file (max 50MB)"}},"required":["path"]},"iocs":{"properties":{"path":{"type":"string","description":"Path to .pcap or .pcapng file (max 50MB)"},"chain":{"type":"boolean","default":false,"description":"Format output as chainable IOC JSON for intel-skill enrichment"}},"required":["path"]}}}} |
PCAP Analyst โ Streaming network capture IOC extraction
ื ืืชืื ืงืืฆื ืชืขืืืจืช ืจืฉืช (.pcap/.pcapng) ืืฆืืจื ืืจืืื (streaming) ืืื ืื ืง ืืืืจืื.
ืืืืฅ ืจืง ืขืืื ืื ืืฉืืขืืชืืื: ืฉืืืืชืืช DNS ื-TLS SNI โ ืืืฉืจืฉืจ ืืืชื ื-intel-skill.
ืืืืืฆื OOM (ืงืจืืื)
- PcapReader ืืืื โ ืืฃ ืคืขื ืื
rdpcap(). ืงืจืืื ืคืงืื-ืคืงืื ื-generator.
- ืกืื ืื ืืฉืืืช ืืงืจืืื โ ืจืง UDP/53 (DNS) + TCP/443 (TLS) ืขืืืจืื. ืฉืืจ ืืคืงืืืช ื ืืจืงืืช.
- 50MB hard gate โ ืงืืฆืื ืืขื 50MB ื ืืืื ืืื ืขื ืืืืขื ื-LLM.
- Dedup ื-set() โ ืืืืืื ืฉืืืคืืข 500 ืคืขืืื ื ืกืคืจ ืคืขื ืืืช.
Quick start
python {baseDir}/scripts/pcap_analyst.py analyze --path ~/Downloads/capture.pcap
python {baseDir}/scripts/pcap_analyst.py dns --path ~/Downloads/capture.pcap
python {baseDir}/scripts/pcap_analyst.py sni --path ~/Downloads/capture.pcap
python {baseDir}/scripts/pcap_analyst.py iocs --path ~/Downloads/capture.pcap --chain
ืคืงืืืืช ื ืชืืืืช
| ืคืงืืื | ืชืืืืจ | ืคืื |
|---|
analyze | ืกืืืื ืืื: DNS + TLS SNI | ืืงืกื ืืคืืจืื |
dns | ืฉืืืืชืืช DNS + ืชืฉืืืืช ืืืื | ืืงืกื ืืคืืจืื |
sni | ืขืจืื TLS SNI ืืืื | ืืงืกื ืืคืืจืื |
iocs | ืืืืืฅ IOCs ืืืืื | JSON (ืขื --chain โ ืืื ื ื-intel-skill) |
ืฉืจืฉืืจ ื-intel-skill
ืืคืื ืฉื iocs --chain ืืื JSON ืืคืจืืืืงืื ืืืฉืืชืฃ:
{
"iocs": {"domains": ["..."], "ips": ["..."], "urls": [], "hashes": []},
"source": "pcap-analyst",
"chain_to": "intel-skill",
"stats": {"raw_domains": 47, "raw_ips": 12, "filtered_domains": 8, "filtered_ips": 5, "selected_total": 13},
"triage"
ืืขืืจ ืืช ื-domains/IPs ื-intel-skill sweep ืื intel-skill cluster ืืืขืฉืจืช OSINT.
Triage โ ืกืื ืื ืืืจืืื ืืกืื ืืคื ื ืืขืฉืจื
ืฉืืืช ืกืื ืื ืืืืืืืืช (skills/_shared/ioc_triage.py) ืคืืขืืช ืืคื ื ืื ืืืช ื-JSON:
- Private IPs โ RFC1918 (10.x, 192.168.x, 172.16.x) + loopback + link-local โ ืืืกืจืื
- Benign domains โ ืฉืืจืฉื ืืืืืื ืื ืืืืืืืืื (Microsoft, Google, AWS, Apple, Cloudflare, GitHub, Telegram ืืขืื ~25) โ ืืืกืจืื
- Top-K Selection โ ืืงืกืืืื 15 IOCs ืืืขืฉืจื (ืืืื ืืคื ืชืืจ ืืืจื)
ืืืจื: ืื ืืขืช ืงืจืืกืช intel-skill ื-Rate Limit (VT: 4 req/min) ื-Context Bloat ื-LLM.