53 - DNS
DNS(๋๋ฉ์ธ ์ด๋ฆ ์์คํ )๋ ์ธํฐ๋ท์ ์ ํ๋ฒํธ๋ถ์ ๋๋ค. ์ฌ๋๋ค์ nytimes.com ๋๋ espn.com๊ณผ ๊ฐ์ ๋๋ฉ์ธ ์ด๋ฆ์ ํตํด ์จ๋ผ์ธ ์ ๋ณด์ ์ก์ธ์คํฉ๋๋ค. ์น ๋ธ๋ผ์ฐ์ ๋ ์ธํฐ๋ท ํ๋กํ ์ฝ(IP) ์ฃผ์๋ฅผ ํตํด ์ํธ ์์ฉํฉ๋๋ค. DNS๋ ๋ธ๋ผ์ฐ์ ์์ ์ธํฐ๋ท ๋ฆฌ์์ค๋ฅผ ๋ก๋ํ ์ ์๋๋ก ๋๋ฉ์ธ ์ด๋ฆ์ IP ์ฃผ์๋ก๋ณํํฉ๋๋ค
dig axfr @10.10.10.175 sauna.htb #์์ญ ์ ์ก
dig any victim.com @<DNS_IP>
#DNS ์ด๋ฆ์ ์ฌ์ฉํ ๋ ๋ค๋ฅธ ํ์ ๋๋ฉ์ธ ์ฐพ์๋ ์ฐ๋ ๋ช
๋ น์ด
wfuzz -u https://streamio.htb -H "Host: FUZZ.streamio.htb" -w /usr/share/seclists/Discovery/DNS/subdomains-top1million-5000.txt --hh 315 #-H : HTTP ํค๋๋ฅผ ์ค์ , FUZZ๋ wfuzz๊ฐ ๋์ฒดํ ํค์๋, --hh : HTTP ์ํ ์ฝ๋๋ฅผ ํํฐ๋งํ๋ ์ต์
, ์ฌ๊ธฐ์๋ 315 ์ํ ์ฝ๋๋ฅผ ํํฐ๋งํ์ฌ ์ถ๋ ฅ
// DNS
dig ns <domain.tld> @<nameserver> NS request to the specific nameserver.
dig any <domain.tld> @<nameserver> ANY request to the specific nameserver.
dig axfr <domain.tld> @<nameserver> AXFR request to the specific nameserver.
dnsenum --dnsserver <nameserver> --enum -p 0 -s 0 -o found_subdomains.txt -f ~/subdomains.list <domain.tld> Subdomain brute forcing.
#enum DNS record
A Returns an IPv4 address of the requested domain as a result.
AAAA Returns an IPv6 address of the requested domain.
MX Returns the responsible mail servers as a result.
NS Returns the DNS servers (nameservers) of the domain.
TXT This record can contain various information. The all-rounder can be used, e.g., to validate the Google Search Console or validate SSL certificates. In addition, SPF and DMARC entries are set to validate mail traffic and protect it from spam.
CNAME This record serves as an alias. If the domain www.hackthebox.eu should point to the same IP, and we create an A record for one and a CNAME record for the other.
PTR The PTR record works the other way around (reverse lookup). It converts IP addresses into valid domain names.
SOA Provides information about the corresponding DNS zone and email address of the administrative contact.
Last updated