meltedinhex/analyst-ai-pack / skills/hunting-dns-tunneling-and-exfiltration
hunting-dns-tunneling-and-exfiltration
VerifiedDetects DNS-based tunneling and data exfiltration in DNS logs: scoring high query volume to single domains, long/high-entropy subdomains, unusual record types, and encoded payload labels. Activates for requests to hunt DNS tunneling, detect DNS exfiltration, or analyze suspicious DNS query patterns.
| File | Kind | Size |
|---|---|---|
| LICENSE | other | 340 B |
| SKILL.md | skill md | 3.1 KB |
| references/api-reference.md | markdown | 1.2 KB |
| scripts/analyst.py | script | 3.4 KB |
references/api-reference.md
View on GitHub# API Reference: Hunting DNS Tunneling and Exfiltration
## Overview
`scripts/analyst.py` aggregates DNS queries by registered domain and scores tunneling signals:
unique-subdomain count, average label length, Shannon entropy of labels, and data-bearing record
types. It reads local JSON only and issues no DNS queries.
## Dependencies
| Package | Version | Purpose |
|---------|---------|---------|
| (stdlib) | — | math (entropy), JSON, file IO |
## Input format
```json
[
{"query": "a8f3kd9.tunnel.example.com", "qtype": "TXT", "src": "10.0.0.5"}
]
```
## Core functions
### `entropy(s)`
Shannon entropy (bits/char) of a label, used to detect encoded data.
### `registered(domain)`
Heuristic registered-domain extraction (last two labels).
### `hunt(queries)`
Aggregates by registered domain and returns candidates scoring >= 50.
## Usage
```bash
python scripts/analyst.py hunt dns.json
```
## Sources
- MITRE ATT&CK T1071.004 DNS — https://attack.mitre.org/techniques/T1071/004/
- MITRE ATT&CK T1048 Exfiltration Over Alternative Protocol —
https://attack.mitre.org/techniques/T1048/
- Subdomain entropy/length and TXT/NULL record abuse as DNS-tunnel indicators, established
network-hunting practice
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |