trustedsec / CS-Situational-Awareness-BOF

Situational Awareness commands implemented using Beacon Object Files
GNU General Public License v2.0
1.28k stars 220 forks source link

Tighten domain DN match to just the domainComponent RDN #96

Closed billm closed 1 year ago

billm commented 1 year ago

For a DN that ends in 'OU=DC,DC=example,DC=com' the strstr match in ldapSearch() will match the 'DC' value of the OU and will build a DN of 'DC,DC=example,DC=com' which is invalid. This naturally also applies to the letter sequence 'DC' anywhere in the DN.