impacket
impacket copied to clipboard
[ntlmrelayx] Dump ADCS: bug fixes
Hi !
This commit fixes 2 issues with the LDAP attack dumping ADCS info.
- For some reason unknown to me, some ACEs can have neither a valid
ObjectType
norInheritedObjectType
. The current check will try to parseInheritedObjectType
ifObjectType
is empty, resulting in an error asInheritedObjectType
will also be empty. The right way to check this seems to be checking theFlags
field: a value of0
indicates neither of these fields are valid, and the ACE can be ignored. - If a SID cannot be translated, the
self.client.response
object will still contain some information (but not the expected result object), and as such thelen(self.client.response)
will not be empty, resulting in an error when trying to accessself.client.response[0]["attributes"]
. I am replacing this check withself.client.entries
object which will behave as wanted.
Thanks !