Skip to content

Fix conf base for child domains #4

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

lefayjey
Copy link

@lefayjey lefayjey commented Feb 6, 2023

Hello, I had an issue while running the tool against ADCS on a child domain. This fix is working for me (on child and parent domains). Please find details below.

└─$ certi.py list north.sevenkingdoms.local/hodor:hodor --dc-ip 192.168.56.11             
Traceback (most recent call last):
  File "/home/kali/.local/bin/certi.py", line 8, in <module>
    sys.exit(main())
  File "/home/kali/.local/pipx/venvs/certi/lib/python3.10/site-packages/certilib/main.py", line 245, in main
    return main_list(args)
  File "/home/kali/.local/pipx/venvs/certi/lib/python3.10/site-packages/certilib/main.py", line 450, in main_list
    templates = list(fetch_templates(
  File "/home/kali/.local/pipx/venvs/certi/lib/python3.10/site-packages/certilib/main.py", line 651, in fetch_templates
    resp = search_ldap(
  File "/home/kali/.local/pipx/venvs/certi/lib/python3.10/site-packages/certilib/ldap.py", line 69, in search_ldap
    return ldap_conn.search(
  File "/home/kali/.local/pipx/venvs/certi/lib/python3.10/site-packages/impacket/ldap/ldap.py", line 350, in search
    raise LDAPSearchError(
impacket.ldap.ldap.LDAPSearchError: Error in searchRequest -> noSuchObject: 0000208D: NameErr: DSID-0310028C, problem 2001 (NO_OBJECT), data 0, best match of:
        'DC=north,DC=sevenkingdoms,DC=local'

The error is caused by the config base conf_base = "CN=Configuration,{}".format(get_base_dn(domain)), which should be containing the root domain and not the full child domain:

image

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant