TryHackMe - Dig Dug (easy)

Published on by logoseq


This machine will teach you how to query a DNS server

Walkthrough


Summary:

You have to query the DNS server using nslookup or dig command to get the information needed.

In this challange you'll learn how to query a DNS server. After I did once again the Passive Reconnaissance room, it was quite straightforward.

Description:

First of all, I added givemetheflag.com to the /etc/hosts file, as the description was saying.

I added givemetheflag.com to /etc/hosts file

I did a basic scan with nmap and I found 53 as open port, I searched and found out that usually port 53 is used for DNS servers:
nmap scan result - 53 was open which is the DNS server

Then, I got the flag with this with this command:
dig @10.10.26.77 givemetheflag.com and the flag was in the result

Result from querying the DNS server using this command: dig @10.10.26.77 givemetheflag.com

As always, I was curious and I tried nslookup to see if I could get the flag using another command and I got it:
nslookup -type=A givemetheflag.com 10.10.26.77

I got the falg using nslookup