You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When values are not found, ad-ldap-enum sometimes outputs rows with different numbers of columns, instead of outputting a consistent number of columns with empty strings for values that aren't found. This causes problems when passing ad-ldap-enum output files to other tools.
I'm not sure if this applies to just Domain Group Membership, but many (though not all) members of the groups Domain Admins, Domain Computers, Domain Controllers, and Domain Users did not have a Distinguished Name returned. Additionally, all computer account members of Domain Users and Domain Computers were missing both Member Status and Group Distinguished name values.
The problem is not that the values were not present, but the output did not contain empty strings in their place. Instead, entries missing the Distinguished Name contained 3 columns instead of 4. I believe entries missing both Member Status and Group Distinguished Name contained only 2 columns. This problem was limited to the Domain Group Membership file in my case but may also apply to other files, apologies for the lack of detail. Further testing is required.
For the time being I am using the following function to normalize the number of columns in output files, but ideally a fix should be implemented to output empty strings in place of values (such as Group Distinguished Name) ad-ldap-enum can't retrieve.
defnormalize_csv(file_path):
""" Normalize a CSV file by adding empty columns to each row as necessary. Args: file_path (str): The path to the CSV file. Returns: None """# Read the CSV filewithopen(file_path, 'r') asfile:
reader=csv.reader(file)
rows=list(reader)
# Find the maximum number of columns in the CSVmax_columns=max(len(row) forrowinrows)
# Normalize the rows by adding empty columnsnormalized_rows= [row+ [''] * (max_columns-len(row)) forrowinrows]
# Write the normalized rows back to the CSV filewithopen(file_path, 'w', newline='') asfile:
writer=csv.writer(file)
writer.writerows(normalized_rows)
The text was updated successfully, but these errors were encountered:
When values are not found, ad-ldap-enum sometimes outputs rows with different numbers of columns, instead of outputting a consistent number of columns with empty strings for values that aren't found. This causes problems when passing ad-ldap-enum output files to other tools.
I'm not sure if this applies to just Domain Group Membership, but many (though not all) members of the groups Domain Admins, Domain Computers, Domain Controllers, and Domain Users did not have a Distinguished Name returned. Additionally, all computer account members of Domain Users and Domain Computers were missing both Member Status and Group Distinguished name values.
The problem is not that the values were not present, but the output did not contain empty strings in their place. Instead, entries missing the Distinguished Name contained 3 columns instead of 4. I believe entries missing both Member Status and Group Distinguished Name contained only 2 columns. This problem was limited to the Domain Group Membership file in my case but may also apply to other files, apologies for the lack of detail. Further testing is required.
For the time being I am using the following function to normalize the number of columns in output files, but ideally a fix should be implemented to output empty strings in place of values (such as Group Distinguished Name) ad-ldap-enum can't retrieve.
The text was updated successfully, but these errors were encountered: