# DNS * [Root Servers](https://www.iana.org/domains/root/servers) * [Zones](https://www.cloudflare.com/learning/dns/glossary/dns-zone/) * [Records](https://www.cloudflare.com/learning/dns/dns-records/) ## Tunneling * [Tunnel IPv4 Data through DNS](https://github.com/yarrick/iodine.git) * Start server on an outside DNS server. This may be a evs. ```sh iodined -b 47110-f 10.0.0.1 tunnel.test.com ``` * Use client via ```sh iodine -f -r tunnel.test.com ``` * `NS` record of the owned domain should contain the subdomain, e.g. `tunnel.test.com` * Client gets a tunnel IP in the range of `10.0.0.0/8` * Check connection via ```sh ping ``` * Generate ssh-key and put in on the server * Dynamic port forwarding to server via ```sh ssh @10.0.0.1 -D 8080 ``` * User proxy server on the client's web server like `--proxy-server` or use a SOCKS proxy like FoxyProxy ## nslookup ```sh nslookup type=txt ``` ## Reverse lookup * Stored inside `PTR` record * Reverse IP may look like `.in-addr.arpa.`, but not via `drill` or `dig` ```sh drill -x +short ``` ## Exfiltration * Add data to UDP DNS requests * Capture traffic on an owned DNS server * `253` is the max length of a DNS name * Encode the payload to hide it ## Infiltration * Inside `TXT` or any other possible records