CobblePot59 / ADcheck

Assess the security of your Active Directory with few or all privileges.
GNU General Public License v3.0
190 stars 22 forks source link

Exception: BIND first! or IndexError: list index out of range #13

Open Pescad0res opened 1 week ago

Pescad0res commented 1 week ago

used command adcheck -d 'DOMAIN.LOCAL' -u 'user' -H ':hash' --dc-ip dcIP

Traceback (most recent call last): File "/root/.local/bin/adcheck", line 8, in sys.exit(run_main()) ^^^^^^^^^^ File "/root/.local/share/pipx/venvs/adcheck/lib/python3.11/site-packages/adcheck/app.py", line 135, in run_main asyncio.run(main()) File "/root/.pyenv/versions/3.11.10/lib/python3.11/asyncio/runners.py", line 190, in run return runner.run(main) ^^^^^^^^^^^^^^^^ File "/root/.pyenv/versions/3.11.10/lib/python3.11/asyncio/runners.py", line 118, in run return self._loop.run_until_complete(task) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.pyenv/versions/3.11.10/lib/python3.11/asyncio/base_events.py", line 654, in run_until_complete return future.result() ^^^^^^^^^^^^^^^ File "/root/.local/share/pipx/venvs/adcheck/lib/python3.11/site-packages/adcheck/app.py", line 108, in main domain_sid = (await ad_client.get_ad_info())[0].objectSid ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.local/share/pipx/venvs/adcheck/lib/python3.11/site-packages/adcheck/libs/msldap/client.py", line 494, in get_ad_info async for entry, err in self.pagedsearch(ldap_filter, MSADInfo_ATTRS): File "/root/.local/share/pipx/venvs/adcheck/lib/python3.11/site-packages/adcheck/libs/msldap/client.py", line 179, in pagedsearch raise Exception('BIND first!') Exception: BIND first!

update after changing with account admin that can ldap

Traceback (most recent call last): File "/root/.local/bin/adcheck", line 8, in sys.exit(run_main()) ^^^^^^^^^^ File "/root/.local/share/pipx/venvs/adcheck/lib/python3.11/site-packages/adcheck/app.py", line 135, in run_main asyncio.run(main()) File "/root/.pyenv/versions/3.11.10/lib/python3.11/asyncio/runners.py", line 190, in run return runner.run(main) ^^^^^^^^^^^^^^^^ File "/root/.pyenv/versions/3.11.10/lib/python3.11/asyncio/runners.py", line 118, in run return self._loop.run_until_complete(task) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.pyenv/versions/3.11.10/lib/python3.11/asyncio/base_events.py", line 654, in run_until_complete return future.result() ^^^^^^^^^^^^^^^ File "/root/.local/share/pipx/venvs/adcheck/lib/python3.11/site-packages/adcheck/app.py", line 123, in main await adcheck.connect() File "/root/.local/share/pipx/venvs/adcheck/lib/python3.11/site-packages/adcheck/core/main.py", line 38, in connect await self.update_entries() File "/root/.local/share/pipx/venvs/adcheck/lib/python3.11/site-packages/adcheck/core/main.py", line 62, in update_entries self.root_entry = [domain for domain in (await self.ad_client.get_ADobjects(custom_filter='(objectClass=domain)')) if domain.get('distinguishedName') == self.base_dn][0]


IndexError: list index out of range
CobblePot59 commented 6 days ago

Hi, Can you try with this command : adcheck -d 'DOMAIN.LOCAL' -u 'user' -H 'lmhash:nthash' --dc-ip dcIP

Pescad0res commented 6 days ago

File "/root/.local/share/pipx/venvs/adcheck/lib/python3.11/site-packages/adcheck/app.py", line 123, in main await adcheck.connect() File "/root/.local/share/pipx/venvs/adcheck/lib/python3.11/site-packages/adcheck/core/main.py", line 38, in connect await self.update_entries() File "/root/.local/share/pipx/venvs/adcheck/lib/python3.11/site-packages/adcheck/core/main.py", line 62, in update_entries self.root_entry = [domain for domain in (await self.ad_client.get_ADobjects(custom_filter='(objectClass=domain)')) if domain.get('distinguishedName') == self.base_dn][0]


**IndexError: list index out of range**