DNS in Detail — [TryHackMe]

gr33nm0nk2802
4 min readJun 12, 2021

In this room we are going to discuss how the DNS system works and take a look at how we can view the DNS records. Our tool of interest for this module is going to be dig.

Difficulty: Easy

Link: https://tryhackme.com/room/dnsindetail

Task #1: What is DNS?

Q. What does DNS Stand for?

Domain Name System

Task #2: Domain Hierarchy

TLD (Top-Level Domain)

A TLD is the most right hand part of a domain name. So, for example, the tryhackme.com TLD is .com. There are two types of TLD, gTLD (Generic Top Level) and ccTLD (Country Code Top Level Domain). Historically a gTLD was meant to tell the user the domain name’s purpose; for example, a .com would be for commercial purposes, .org for an organisation, .edu for education and .gov for government. And a ccTLD was used for geographical purposes, for example, .ca for sites based in Canada, .co.uk for sites based in the United Kingdom and so on. Due to such demand, there is an influx of new gTLDs ranging from .online , .club , .website , .biz and so many more. For a full list of over 2000 TLDs click here.

Second-Level Domain

Taking tryhackme.com as an example, the .com part is the TLD, and tryhackme is the Second Level Domain. When registering a domain name, the second-level domain is limited to 63 characters + the TLD and can only use a-z 0–9 and hyphens (cannot start or end with hyphens or have consecutive hyphens).

Subdomain

A subdomain sits on the left-hand side of the Second-Level Domain using a period to separate it; for example, in the name admin.tryhackme.com the admin part is the subdomain. A subdomain name has the same creation restrictions as a Second-Level Domain, being limited to 63 characters and can only use a-z 0–9 and hyphens (cannot start or end with hyphens or have consecutive hyphens). You can use multiple subdomains split with periods to create longer names, such as jupiter.servers.tryhackme.com. But the maximum length must be kept below 253 characters. There is no limit to the number of subdomains you can create for your domain name.

Q. What is the maximum length of a subdomain?

63

Q. Which of the following characters cannot be used in a subdomain

( 3 b _ - )?

Answer: _

Q. What is the maximum length of a domain name?

253

Q. What type of TLD is .co.uk?

ccTLD

Task #3: Record Types

Q. What type of record would be used to advise where to send email?

MX

Q. What type of record handles IPv6 addresses?

AAAA

Task #4: Making a Request

Q. What field specifies how long a DNS record should be cached for?

TTL

Q. What type of DNS Server is usually provided by your ISP?

Recursive

Q. What type of server holds all the records for a domain?

Authoritative

Task #5: Practical

Q. What is the CNAME of shop.website.thm?

Also we can use dig for the same,

dig shop.website.thm CNAME

Q. What is the value of the TXT record of website.thm?

dig website.thm TXT

Q. What is the numerical priority value for the MX record?

dig website.thm MX

Q. What is the IP address for the A record of www.website.thm?

dig website.thm A

or

dig website.thm

Peace Out

--

--

gr33nm0nk2802

A cybersecurity enthusiast interested in Reverse Engineering. Love to Code