Skip to content

Instantly share code, notes, and snippets.

@kozmer
kozmer / ldapsearch_parser.py
Last active January 29, 2025 13:37
linux ldapsearch parser for bofhound
# linux ldapsearch parser for bofhound, useful for environments that have ldap signing/binding and require kerberos auth.
# add support for msDS-KeyCredentialLink
"""
$ ldapsearch -LLL -o ldif-wrap=no -E '!1.2.840.113556.1.4.801=::MAMCAQc=' -H ldap://dc.fake.com -Y GSSAPI -N -b "DC=fake,DC=com" "(&(objectClass=*))" > ldapsearch_out.txt
SASL/GSSAPI authentication started
SASL username: redacted@FAKE.COM
SASL SSF: 256
SASL data security layer installed.