dirkjanm / ROADtools

A collection of Azure AD/Entra tools for offensive and defensive security purposes

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error for plugin policies

jurajsucik opened this issue · comments

When running "roadrecon plugin policies", I get:
Traceback (most recent call last):
File "/usr/local/bin/roadrecon", line 8, in
sys.exit(main())
File "/usr/local/lib/python3.9/site-packages/roadtools/roadrecon/main.py", line 124, in main
plugin_module.main(args)
File "/usr/local/lib/python3.9/site-packages/roadtools/roadrecon/plugins/policies.py", line 409, in main
plugin.main(args.print)
File "/usr/local/lib/python3.9/site-packages/roadtools/roadrecon/plugins/policies.py", line 352, in main
out['who'] = self._parse_who(conditions)
File "/usr/local/lib/python3.9/site-packages/roadtools/roadrecon/plugins/policies.py", line 273, in _parse_who
ot += self._parse_ucrit(icrit)
File "/usr/local/lib/python3.9/site-packages/roadtools/roadrecon/plugins/policies.py", line 184, in _parse_ucrit
raise Exception('Unmatched object(s): {0}'.format(','.join(clist)))
Exception: Unmatched object(s): 8c0c485c-ce78-49b2-b938-481e7b370dc9

in a different tenant I get the same error, just the unmatched object id is different.

this should not raise a fatal error right now, but instead emit a warning. regardless, if you know what type of object this is and if there is any reason roadrecon does not gather this, it'd be nice to know so I can fix it properly

It looks like a group that does not exist anymore.

however the group id is still present in the policy

actually there is this error message in the Azure portal:
1 group included or excluded in this policy have been deleted from the directory, but this doesn't affect the other users and groups in the policy. When you save the policy the deleted users and/or groups will be automatically removed.

ah yes, I've seen that before. It's a strange setup but at least you can parse the policies now :)