DNS Tunneling Log Analyzer
The firewall shows no outbound SSH, HTTPS or 8080 from a compromised server, yet data is still leaving. A common answer is DNS tunnelling: data hidden in the names a host looks up. Paste or drop your own DNS query logs and see which domains carry the signs (many unique, long, random-looking subdomains, TXT lookups, failed lookups, clock-like timing) and which host made the queries.
Everything is analysed in your browser: nothing is uploaded and no name in your log is looked up. For SOC analysts, threat hunters and incident responders.
Chapters (5)
Drop log files
Zeek dns.log (TSV or JSON), BIND query logs, dnsmasq / Pi-hole, Windows DNS debug logs, CSV exports, or any text with one query per line.
Up to 5 files, 20 MB each. Uncompressed text only: unzip .gz logs first.
Loading…
Sample report · illustrative data
Sample result: one hour of resolver logs, one domain stands out
A made-up Zeek dns.log of 212 queries from three workstations: ordinary browsing, plus a burst of TXT lookups from one host.
Summary
- Queries parsed
- 212 from 215 lines (Zeek dns.log, TSV), 3 base domains
- Verdicts
- 1 looks like tunnelling, 0 worth a look, 2 look normal
Domains, most suspicious first
| Base domain | Score | Queries | Unique subdomains | Mean length | Entropy | TXT etc. | Timing |
|---|---|---|---|---|---|---|---|
| example.net | 85 Looks like tunnelling | 120 | 120 | 88.1 | 4.67 | 100% | Fairly regular (0.36) |
| example.com | 0 Looks normal | 47 | 5 | 15.0 | 1.40 | 2% | Irregular (1.05) |
| example.org | 0 Looks normal | 45 | 4 | 16.4 | 1.56 | 0% | Irregular (0.99) |
Why example.net scored 85
| Signal | Points | Detail |
|---|---|---|
| Many unique subdomains | 20/20 | 120 unique subdomains; 100% of queries were for a name not seen before |
| Long names | 15/15 | mean name 88.1 characters, mean longest label 52.0 |
| Random-looking characters (entropy) | 15/15 | 4.67 bits per character |
| Encoded-looking labels | 15/15 | 100% of unique names (hex 0, base32 120, base64 0) |
| TXT, NULL, CNAME or MX lookups | 15/15 | 100% of 120 typed queries |
| Failed lookups (NXDOMAIN) | 0/10 | 17% of 120 answered queries |
| Regular timing (beacon-like) | 5/10 | coefficient of variation 0.36 |
Which hosts to look at
| Client | Queries | Suspicious domains |
|---|---|---|
| 192.0.2.23 | 120 | example.net (85) |
| 192.0.2.10 | 54 | None |
| 192.0.2.11 | 38 | None |
What to do
- Find the process on 192.0.2.23 that made the TXT lookups (EDR or process DNS telemetry) before acting.
- Sinkhole or block tunnel.example.net at your resolvers and keep the logs as evidence.
- Make sure hosts can only use your internal resolvers, and block outbound DNS and DNS over HTTPS to everything else.
Made-up example data. Your own run uses your inputs. Downloads of the full report need Pro.
TL;DRWhat this analyzer does
5 points
- Paste or drop your own DNS query logs (Zeek dns.log, BIND, dnsmasq / Pi-hole, Windows DNS debug log, CSV or any one-query-per-line text) and see which domains look like data is being carried inside DNS names.
- Every base domain gets a 0-100 score from seven documented signals: unique subdomains, name length, character entropy, encoded-looking labels, TXT/NULL/CNAME/MX share, NXDOMAIN share and regular timing.
- A per-client table shows which host to look at first, and each domain opens to its longest example names and the points behind its score.
- Runs entirely in your browser: nothing is uploaded, and no name in your log is looked up or contacted.
- A high score is a lead, not proof; a low score does not clear a domain. Confirm on the endpoint before acting.
How data leaves when 22, 443 and 8080 are blocked
Blocking outbound ports stops direct connections, but most hosts can still ask a resolver to look up a name, and the resolver will forward that question across the internet to whichever name server is responsible for the domain. If someone controls that name server, the question itself is the message: data is cut into pieces, encoded into letters and digits, and placed in the subdomain part of each lookup. Answers, often TXT records, can carry instructions back. From the firewall's point of view, the server only talked to your own DNS resolver.
The same trick works with ICMP where ping is allowed out: data rides in the payload of echo requests and replies. And DNS over HTTPS wraps lookups inside ordinary HTTPS to an outside resolver, so they never appear in your resolver logs at all. This analyzer covers the DNS case you can see in query logs. For the network controls that close these paths, use the egress checklist linked below.
What the analyzer looks at
| Signal | Points | How it is scored |
|---|---|---|
| Many unique subdomains | up to 20 | 50+ unique subdomains with at least half of all queries unique: 20. 20+: 12. 10+: 5. |
| Long names | up to 15 | Mean longest label 40+ characters or mean name 80+: 15. Label 25+ or name 52+: 10. Label 16+ or name 40+: 5. |
| Random-looking characters (entropy) | up to 15 | Mean Shannon entropy of the subdomain part 4.0+ bits per character: 15. 3.5+: 9. 3.0+: 4. |
| Encoded-looking labels | up to 15 | Half or more of unique subdomains carry a hex, base32 or base64-looking label of 16+ characters: 15. A fifth or more: 8. |
| TXT, NULL, CNAME or MX lookups | up to 15 | Half or more of queries (10+ queries, type known): 15. A fifth or more: 8. |
| Failed lookups (NXDOMAIN) | up to 10 | Half or more of answered queries NXDOMAIN (10+ queries, answer code known for half): 10. A fifth or more: 5. |
| Regular timing (beacon-like) | up to 10 | One client with 10+ timestamped queries whose gaps barely vary (coefficient of variation 0.25 or less): 10. 0.5 or less: 5. |
60 or more reads “Looks like tunnelling”, 30 to 59 “Worth a look”, under 30 “Looks normal”. Domains with fewer than 10 queries are capped at 49. These weights are PlayCISO's own heuristic, not an industry standard: tune your production detections against your own baseline.
What it cannot tell you
- Encrypted DNS is invisible here. Lookups sent with DNS over HTTPS or DNS over TLS to an outside resolver never reach your resolver's log.
- Low and slow can score low. A channel that sends a handful of short queries an hour looks a lot like an update check.
- A high score is a lead, not proof. Security products, CDNs, telemetry and DNS blocklist lookups also use long, random-looking names. Known noisy services are labelled, but that list is short and not exhaustive.
- Base domains are approximate. A small built-in list of two-part suffixes (co.uk, com.au and similar) is used, not the full Public Suffix List.
- The log decides what is scored. Without query types, answer codes or timestamps those signals stay at zero, and behind NAT or a forwarding resolver the “client” may be the resolver itself.
Where to get the logs
| Source | What to turn on and what you get |
|---|---|
| Zeek | dns.log on a sensor that sees DNS traffic: query, qtype_name, rcode_name, id.orig_h and ts are all used. |
| BIND | Query logging (the "queries" category). Gives client, name and type; no answer codes. |
| dnsmasq / Pi-hole | log-queries (Pi-hole writes pihole.log). Reply lines give the NXDOMAIN share. |
| Windows DNS Server | Debug logging with packet direction, details and the question section. Response lines give answer codes. |
| Firewall, proxy or SIEM | Any export with one query per line, or CSV with a header row naming the domain, client, type and status columns. |
Resolver query logs are the best single source: they hold the name, type, answer code, client and time of every lookup. Keep enough history to hunt back to when a suspected compromise began. Nothing you drop here leaves your browser.
Frequently asked questions
How can data leave a server when outbound 22, 443 and 8080 are blocked?
Often through DNS. Almost every network lets hosts look up names, and a lookup for a name under a domain the attacker controls reaches the attacker's name server through your own resolvers. Data can be encoded into the subdomain labels of the query and replies can carry data back, for example in TXT records. ICMP (ping) can be abused the same way where it is allowed out. This is why DNS query logs matter even when the firewall looks tight.
Does this tool upload my DNS logs or look up the domains?
No. The file or pasted text is read and analysed in your browser. Nothing is sent to PlayCISO or anyone else, and no domain in your log is resolved, fetched or contacted.
Which log formats does it read?
Zeek dns.log in tab-separated form (with its #fields header) or JSON lines, BIND query logs, dnsmasq and Pi-hole logs, Windows DNS Server debug logs (the (3)www(7)example(3)com(0) name form is decoded), AdGuard Home JSON, CSV exports with a header row, and a generic mode for any text with one domain name per line. It detects the format, or you can choose it.
Does a high score mean we are being attacked?
No. It means the domain's queries look like the patterns tunnelling produces. Security products, CDNs, telemetry and DNS blocklist lookups also use long, random-looking names; the tool labels well-known ones as known noisy services, but that list is short. Find the process on the host that made the queries before you decide.
What can this analysis miss?
Queries sent over DNS over HTTPS or DNS over TLS to an outside resolver never reach your resolver logs. A slow tunnel that sends a few short queries an hour may score low. Logs without query types, answer codes or timestamps leave some signals blank. Use it with resolver controls and endpoint telemetry, not instead of them.
More tools like this
Related tools and labs, with new picks every day.