Active Information Gathering Flashcards
What is DNS?
The Domain Name System (DNS) is one of the most critical systems on the Internet and is a distributed database responsible for translating user-friendly domain names into IP addresses.
Example of TLD?
.com
How to control how long a server or client caches a DNS record?
Via TTL field of DNS record.
What is NS?
NS - Nameserver records contain the name of the authoritative servers hosting the DNS records for a domain.
What is A?
A - Also known as a host record, the “a record” contains the IP address of a hostname (such as www.megacorpone.com).
What is MX?
MX - Mail Exchange records contain the names of the servers responsible for handling email for the domain. A domain can contain multiple MX records.
What is PTR?
PTR - Pointer Records are used in reverse lookup zones and are used to find the records associated with an IP address.
What is CNAME?
CNAME - Canonical Name Records are used to create aliases for other host records.
What is TXT?
TXT - Text records can contain any arbitrary data and can be used for various purposes, such as domain ownership verification.
How to to find the A host record for www.megacorpone.com?
host www.megacorpone.com
How to find the MX records for megacorpone.com?
host -t mx megacorpone.com
How to find the TXT records for megacorpone.com?
host -t txt megacorpone.com
How to look up a valid host for megacorpone.com?
host www.megacorpone.com
How to use host to look up an invalid host?
host idontexist.megacorpone.com
What NXDOMAIN means?
Public DNS record does not exist for that hostname.
How to use bash to brute force forward DNS name lookups for megacorpone.com? You have a wordlist called “list.txt”.
kali@kali:~$ for ip in $(cat list.txt); do host $ip.megacorpone.com; done
How to use bash to bruteforce reverse DNS names? Let’s use a loop to scan IP addresses 38.100.193.50 through 38.100.193.100. We will filter out invalid results by showing only entries that do not contain “not found” (with grep -v).
for ip in $(seq 50 100); do host 38.100.193.$ip; done | grep -v “not found”
What “grep -v” do?
Select non-matching lines.
What is DNS zone transfer?
A zone transfer is basically a database replication between related DNS servers in which the zone file is copied from a master DNS server to a slave server. The zone file contains a list of all the DNS names configured for that zone. Zone transfers should only be allowed to authorized slave DNS servers but many administrators misconfigure their DNS servers, and in these cases, anyone asking for a copy of the DNS server zone will usually receive one.
How to use host to perform a DNS zone transfer?
host -l domain_name dns_server_address
How to attempt zone transfer on “megacorpone.com” and on ns1 subdomain?
kali@kali:~$ host -l megacorpone.com ns1.megacorpone.com
How to use host to do a DNS zone transfer on www.megacorpone.com and ns2 subdomain?
kali@kali:~$ host -l megacorpone.com ns2.megacorpone.com
How to use host to obtain DNS servers for a given domain name?
host -t ns megacorpone.com | cut -d “ “ -f 4
What ‘-t’ do in host command?
-t specifies the query type