Last active
November 22, 2021 12:14
-
-
Save crypt0rr/29ed56a74c73f95f2ba0b99f1b675c1c to your computer and use it in GitHub Desktop.
LDAPDomainDump High-Priv filter
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
GROUPLIST=("Domain Admins" "Enterprise Admins" "Administrators" "Schema Admins" "Backup Operators" "Account Operators" "DNS Admins") | |
for GROUP in ${!GROUPLIST[*]} | |
do | |
printf "%s\n" "${GROUPLIST[$GROUP]} contains:" | |
grep -w "${GROUPLIST[$GROUP]}" domain_users.grep | grep -v ACCOUNT_DISABLED | awk -F ';' '{print $3}' | sort && echo "" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment