PT0-001 · Question #62
A penetration tester has a full shell to a domain controller and wants to discover any user account that has not authenticated to the domain in 21 days. Which of the following commands would BEST…
The correct answer is C. dsquery user -inactive 3. Dsquery.exe is a command-line utility for finding information about various objects in the Active Directory domain. The utility is available in all Windows Server versions by default. The dsquery command allows you to query the LDAP directory to find objects that meet the…
Question
A penetration tester has a full shell to a domain controller and wants to discover any user account that has not authenticated to the domain in 21 days. Which of the following commands would BEST accomplish this?
Options
- Adsrm -users "DN=company.com; OU=hq CN=users"
- Bdsuser -name -account -limit 3
- Cdsquery user -inactive 3
- Ddsquery -o -rdn -limit 21
How the community answered
(39 responses)- A3% (1)
- B8% (3)
- C87% (34)
- D3% (1)
Explanation
Dsquery.exe is a command-line utility for finding information about various objects in the Active Directory domain. The utility is available in all Windows Server versions by default. The dsquery command allows you to query the LDAP directory to find objects that meet the specified criteria. As an attribute of the dsquery command, you need to specify the type of the AD object that you are searching for. In this scenario, you are looking for user accounts that have been inactive for the past 30 days, so you would use dsquery user -inactive < NumWeeks >.
Topics
Community Discussion
No community discussion yet for this question.