hunting-dns-tunneling-and-exfiltration
Detects DNS-based tunneling and data exfiltration in DNS logs: scoring high query
v1.0.03 installs+3 in 7 days24 StarsApache-2.0synced 10 hours ago
Install
No NotHoly CLI yet? Install it first.
$ curl -fsSL https://notholy.com/install.sh | sh$ notholy skills install meltedinhex/hunting-dns-tunneling-and-exfiltrationWrites to ~/.notholy/skills after checking the signature and the SHA-256.
SignatureSigned, ed25519
Packagefaa79df6…b7f4940f
faa79df65354…27f7b7f4940f4 files · 3.5 KBScanMedium2 findings
- Executable script shipped with the skillscripts/analyst.py
- Links to outside domains
Sourcegithub.com/meltedinhex/analyst-ai-pack/tree/main/skills/hunting-dns-tunneling-and-exfiltration@da7600a
On this page
When to Use
- You have DNS query logs (resolver, Zeek
dns.log, Windows DNS) and want to find tunneling or exfiltration over DNS. - You are testing a hypothesis that an implant uses DNS as a covert channel.
- You need to rank domains by tunneling indicators across many queries.
Do not use query length alone as a verdict — CDNs, antivirus lookups, and some SaaS use long encoded labels legitimately; combine entropy, volume, and record-type signals.
Prerequisites
- DNS logs with query name, query type, source, and timestamp, over a meaningful window.
- A way to whitelist known-benign high-volume domains (security vendors, CDNs).
Workflow
Step 1: Aggregate by registered domain
Group queries under their registered/parent domain so per-domain volume and subdomain diversity are visible.
Step 2: Score tunneling indicators
Weight: high unique-subdomain count, long average label length, high subdomain entropy (encoded
data), heavy TXT/NULL/CNAME usage, and high query rate to one domain.
python scripts/analyst.py hunt dns.jsonStep 3: Estimate exfiltration volume
Sum encoded bytes implied by query lengths per domain; sustained high volume to a single nameserver suggests data egress.
Step 4: Whitelist and pivot
Remove known-benign high-entropy domains; for survivors, check domain age/registration, the authoritative nameserver, and the originating host.
Step 5: Confirm and respond
Validate by decoding sampled labels where possible and correlating with host activity; escalate confirmed tunnels and write a detection.
Validation
- High-score domains combine multiple signals (entropy + volume + record type), not one alone.
- Benign high-volume domains are whitelisted, keeping the list reviewable.
- Confirmed tunnels tie to a specific host and a young/suspicious domain.
Pitfalls
- Flagging long labels from CDNs and AV telemetry as tunneling.
- Aggregating by full FQDN instead of registered domain, hiding subdomain diversity.
- Ignoring record type;
TXT/NULLcarry far more data thanArecords.
References
- See
references/api-reference.mdfor the DNS hunt scorer. - ATT&CK T1071.004 and T1048 (linked in frontmatter).
Files in this version
references/11.2 KB
- api-reference.md1.2 KB
scripts/13.4 KB
- analyst.py3.4 KB
- LICENSE340 B
- SKILL.md3.1 KB
Permissions
| Permission | Declared | Found by the scan |
|---|---|---|
| Reads files | No | No |
| Writes files | Yes | Yes |
| Runs shell commands | Yes | Yes |
| Uses the network | Yes | Yes |
| Uses connectors | No | No |
| Drives a browser | No | No |
Scan findings
Reviewed on Nov 13, 2026
- MediumFile · Executable script shipped with the skillscripts/analyst.py
- InfoLink · Links to outside domains
A clean scan lowers the risk but does not prove a package is safe. Read what you install.
| Version | Published | Commit | SHA-256 | Signature | Permission change |
|---|---|---|---|---|---|
| v1.0.0 | Nov 13, 2026 | da7600a | faa79df6 | Signed | – |
More from meltedinhex
All from this publisher- writing-yara-rules-from-reversed-codemeltedinhex/writing-yara-rules-from-reversed-code4
- validating-detections-with-atomic-testsmeltedinhex/validating-detections-with-atomic-tests4
- writing-suricata-and-snort-rulesmeltedinhex/writing-suricata-and-snort-rules3
- writing-sigma-detection-rulesmeltedinhex/writing-sigma-detection-rules3
More in Network, wireless and telecom
See the category- performing-network-packet-capture-analysismukul975/performing-network-packet-capture-analysis4
- network-segmentation-reviewsecurityskills/network-segmentation-review3
- performing-ssl-stripping-attackmukul975/performing-ssl-stripping-attack3
- implementing-next-generation-firewall-with-palo-altomukul975/implementing-next-generation-firewall-with-palo-alto3
- configuring-zscaler-private-access-for-ztnamukul975/configuring-zscaler-private-access-for-ztna3
- implementing-canary-tokens-for-network-intrusionmukul975/implementing-canary-tokens-for-network-intrusion3
Ask anything your scope allows.
Create an account, add credits and ask the first question in the chat or the terminal.
- 1/3
Create the account
Individual or company. You can switch to a company later without losing balance or keys.
IndividualCompany - 2/3
Add credits
By card. Pay per token, no subscription.
$5.00minimum deposit - 3/3
Ask
In the chat, or install the CLI and run notholy login in your terminal.
$ notholy login