with one click
pcap-reader
Reads DNS packets from existing PCAP/PCAPng files.
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Menu
Reads DNS packets from existing PCAP/PCAPng files.
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Merge Stage 2 DNS analysis scores and calculate final exfiltration verdicts.
Capture live DNS queries with tcpdump for a configurable duration, save the traffic to a PCAP file, and process it through the existing PCAP reader. Use when a user explicitly requests timed live DNS capture from a network interface.
Compute DGA probabilities using a pre-trained RandomForest model.
Score DNS queries for anomalies using the trained embedding similarity model.
Calculate DNS subdomain entropy scores for exfiltration and DGA detection.
Generate a Markdown security report from aggregated DNS exfiltration scores.
Based on SOC occupation classification
| name | pcap-reader |
| description | Reads DNS packets from existing PCAP/PCAPng files. |
Collect raw IPv4/IPv6 DNS packet metadata from an existing PCAP/PCAPng file
using Scapy's streaming PcapReader. It filters to UDP/TCP port 53 and
returns raw DNS payload metadata for downstream decoding.
read_pcap_file(filepath: str, max_packets: int = 10_000) -> list[dict] | dict
read_pcap_file when the input is a .pcap or .pcapng file path.capture_live_dns skill for live capture.dns_extractor_agent.read_pcap_file| Parameter | Type | Required | Description |
|---|---|---|---|
filepath | str | yes | Absolute or relative PCAP/PCAPng path |
max_packets | int | no | Max DNS packets to keep |
Returns a list of dicts. Each dict contains:
| Field | Type | Description |
|---|---|---|
packet_id | integer | Sequential index starting at 1 |
timestamp | float | Unix epoch seconds |
src_ip | string | Source IP address |
dst_ip | string | Destination IP address |
src_port | integer | Source port |
dst_port | integer | Destination port |
protocol | string | "UDP" or "TCP" |
dns_payload_length | integer | Byte length of DNS payload |
raw_payload | string | Hex-encoded DNS payload bytes |
Result is also written to data/output/raw_packets.json.
On failure, returns an error dict:
{"error": "capture_failed", "detail": "permission or interface error"}
scapy>=2.5.0
from tools.pcap_reader import read_pcap_file
packets = read_pcap_file("data/input/demo.pcap", max_packets=5000)
max_packets DNS messages
have been retained.capture_live_dns skill are read through this
same function.