Concepts / Reconnaissance and exfiltration

Reconnaissance and exfiltration

DNS tunneling and exfiltration

Also called dns exfiltration, covert channel, data exfiltration, dns tunnel

Smuggling data in and out of a network by encoding it inside DNS queries, which firewalls usually let through.

The data leaves inside the name being looked up
The data leaves inside the name being looked up

Direct uploads are blocked but DNS is let through. The stolen data is the first label of the name, and the query ends at the attacker's own name server, which logs it.

DNS tunneling hides data inside DNS queries to get it out of a network. Even a network that blocks direct outbound traffic usually lets DNS resolve, so an attacker encodes stolen data into names under a domain they control (<base32-data>.exfil.example) and reads it from their authoritative server's log. The tell: many long, random-looking, unique subdomains of one domain. Defences block the domain and force DNS through an inspected resolver.

See it on real machines

Read next

Learn it on real machines.

Every lab is a small network of real Linux machines in your browser. Sign in with Google or email to start.

Start this lab