312-50V10 · Question #725
You are performing a penetration test for a client and have gained shell access to a Windows machine on the internal network. You intend to retrieve all DNS records for the internal domain. If the DNS
The correct answer is B. Is -d accorp.local. In nslookup interactive mode, the 'ls -d' command initiates a DNS zone transfer by requesting all records for the specified domain from the target DNS server.
Question
You are performing a penetration test for a client and have gained shell access to a Windows machine on the internal network. You intend to retrieve all DNS records for the internal domain. If the DNS server is at 192.168.10.2 and the domain name is abccorp.local, what command would you type at the nslookup prompt to attempt a zone transfer?
Options
- Alist domain=abccorp.local type=zone
- BIs -d accorp.local
- Clist server=192.168.10.2 type=all
- DIserver 192.168.10.2 -t all
How the community answered
(68 responses)- A18% (12)
- B74% (50)
- C6% (4)
- D3% (2)
Why each option
In nslookup interactive mode, the 'ls -d' command initiates a DNS zone transfer by requesting all records for the specified domain from the target DNS server.
'list domain=abccorp.local type=zone' is not valid nslookup syntax - the nslookup ls subcommand does not accept key=value style parameters.
The 'ls -d <domain>' command entered at the nslookup prompt requests a full zone transfer, instructing the DNS server to list every record in the zone; the '-d' flag includes all record types rather than just A records. This is the correct nslookup syntax for enumerating internal DNS records during a penetration test, and the server is set beforehand using the 'server 192.168.10.2' command.
'list server=192.168.10.2 type=all' is not a valid nslookup command - server switching uses the standalone 'server' command and zone listing uses 'ls', not 'list'.
'lserver' switches the default DNS server but is unrelated to zone transfers, and '-t all' is not a valid flag for listing zone records in nslookup.
Concept tested: DNS zone transfer enumeration via nslookup ls command
Source: https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/nslookup-ls
Topics
Community Discussion
No community discussion yet for this question.