Hey, I’ve finally gotten myself completely stuck for a day or so and am in need of assistance. The question is right after a section about DNS zone transfers, and is “Submit the FQDN of the nameserver for the “inlanefreight.htb” domain as the answer”
so far I have tried the following (with a variety of parameters and nameservers 1.1.1.1, 8.8.8.8 etc.):
host inlanefreight.htb
Host inlanefreight.htb not found: 2(SERVFAIL)
host
Host 158.72.129.10.in-addr.arpa. not found: 3(NXDOMAIN)
At this point I suspected the host being down, however I can successfully connect via firefox with the IP (get an apache2 default page) and the url (which I added to the /etc/hosts file) - though with the url I get a flag appear in firefox - a little wierd. I get a response when pinging both the IP and url too.
I also tried gobuster DNS enumeration and some basic service enumeration to explore for any other vectors, but didn’t find anything of note.
Please, any help would be greatly appreciated!!
EDIT: I needed to use the host IP as the source NS IP because it kept failing to find the record on my local DNS, or any public DNS’s because it isn’t publically facing. Hint: dig any targeturl @ns/IP
I can’t completely remember the details, but I think it threw me off because the name server is the same IP as the domain(s). In order to perform a zone transfer on it, use the generated IP address for both the domain and the name server. I’m no expert and I’m working off memory though so take it with a grain of salt haha
I get errors if I try that… it is clearly trying to use my DNS server as the server which I think is my problem. But if I manually set it to anything else I also get an error where it says it can’t resolve the name…
Firstly, make the /etc/hosts to add inlanefreight.htb
Secondly, find the name server (dig ns inlanefreight.htb @[IP ADDRESS GENERATED]
Third, add the name server to your /etc/hosts file so it can be resolved (i assume the host is using some sort of vhost routing)
Finally, perform zone transfer (dig axfr [domain] @[name server])
One other thing I just found out. At least in my case… I cannot get this to work properly at all from my own machine connected with a VPN. I get something along these lines ** Connection to 10.129.42.195#53(10.129.42.195) for inlanefreight.htb failed: connection re
fused.**. However, if I use the pwnbox I can get the commands to work.
I’ve already added the domain to the /etc/hosts with the given ip.
did the dig ns inlanefreight.htb @given_ip to find the Name Server and its ns.inlanefreight.htb.
added that to the /etc/hosts and then did the dig axfr inlanefreight.htb @ns.inlanefreight.htb.
Answered the first two questions where the name server is that one and the number of zones is 2. but then i cant find the TXT record and how to find out the FQDN of the Ips’s in the other answers.
thak you
Bro, please i really need to understand clearly the notion of zone transfer…
i understood it as … inlanefreight.htb is a zone once it has subdomains or a subdomain like internal.inlanefreight.htb is also a zone once it also has it’s owns subdomains ns.internal.inlanefreight.htb.