adrecon / ADRecon

ADRecon is a tool which gathers information about the Active Directory and generates a report which can provide a holistic picture of the current state of the target AD environment.
GNU Affero General Public License v3.0
695 stars 101 forks source link

Fix retrieval of NetBIOS name via LDAP #26

Closed ausbails closed 2 weeks ago

ausbails commented 9 months ago

A minor bug fix.

Get-ADRDomain retrieves NetBIOS name from the "dc" property for the domain DirectoryEntry object ($objDomain).

This seems to be an unreliable source when the NetBIOS name is not the same as the nth level domain name.

Credit to Edward Wilde for this write up on retrieving NetBIOS name via Directory Services (https://blogs.edwardwilde.com/2009/12/14/lookup-the-netbios-name-of-a-domain-using-directory-services/).