asmtlab / ADHunt

Tool for enumerating Active Directory environments
46 stars 8 forks source link

Error in delenum.py - KeyError: 'attribute' #5

Open DrorDvash opened 1 year ago

DrorDvash commented 1 year ago

Hi This is a python error i get when trying to run:

Delegation Enumeration
=========================

[+] Found: 6 AD Objects with Unconstrained Delegations
[+] Found: 0 AD Objects with Constrained Delegations
[+] Found: 0 AD Objects with Constrained Delegations with Protocol Transition
Traceback (most recent call last):
  File "/root/Tools/ADHunt/adhunt.py", line 280, in <module>
    adhunt.run()
  File "/root/Tools/ADHunt/adhunt.py", line 68, in run
    delenum.run()
  File "/root/Tools/ADHunt/modules/delenum.py", line 73, in run
    sd = ldaptypes.SR_SECURITY_DESCRIPTOR(data=bytes(self.c.response[i]["attribute"]["msDS-AllowedToActOnBehalfOfOtherIdentity"]))
                                                     ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
KeyError: 'attribute'
FL1GG commented 1 year ago

Could you provide a little more information on the environment you are running against and how you are running the program? It is possible that the c.response is empty which is causing the error.

DrorDvash commented 1 year ago

I'm running from Kali Linux 2023 aarch64 over socks5 (proxychains). The target (DC) is Windows Server 2012 R2

proxychains python3 adhunt.py --dc-ip 30.60.30.60 -u user -p pass123

and not too much important but the OS which hosts my socks5 - Windows Server 2016

Security-Champions-Beta commented 9 months ago

Hi This is a python error i get when trying to run:

Delegation Enumeration
=========================

[+] Found: 6 AD Objects with Unconstrained Delegations
[+] Found: 0 AD Objects with Constrained Delegations
[+] Found: 0 AD Objects with Constrained Delegations with Protocol Transition
Traceback (most recent call last):
  File "/root/Tools/ADHunt/adhunt.py", line 280, in <module>
    adhunt.run()
  File "/root/Tools/ADHunt/adhunt.py", line 68, in run
    delenum.run()
  File "/root/Tools/ADHunt/modules/delenum.py", line 73, in run
    sd = ldaptypes.SR_SECURITY_DESCRIPTOR(data=bytes(self.c.response[i]["attribute"]["msDS-AllowedToActOnBehalfOfOtherIdentity"]))
                                                     ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
KeyError: 'attribute'

+++ the same problem