Skip to content
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

Issue while reading UAC flags in AD #2

Closed
lfortemps opened this issue Dec 11, 2018 · 3 comments
Closed

Issue while reading UAC flags in AD #2

lfortemps opened this issue Dec 11, 2018 · 3 comments

Comments

@lfortemps
Copy link

It seems that for some elements where a UAC is not defined , the script just stops.
Note: it has been seen while executing kerberoast but it seems to be a msldap related issue.

Traceback (most recent call last):
  File "c:\users\\appdata\local\programs\python\python37-32\lib\runpy.py",
 line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "c:\users\\appdata\local\programs\python\python37-32\lib\runpy.py",
 line 85, in _run_code
    exec(code, run_globals)
  File "C:\Users\\AppData\Local\Programs\Python\Python37-32\Scripts\kerberoast.exe\__main__.py", line 9, in 
  File "c:\users\\appdata\local\programs\python\python37-32\lib\site-packages\kerberoast\kerberoast.py", line 383, in run
    writer.writerow(user.get_row(attrs))
  File "c:\users\\appdata\local\programs\python\python37-32\lib\site-packages\msldap\ldap_objects\aduser.py", line 215, in get_row
    return [t.get(x) if x[:4]!='UAC_' else self.uac_to_textflag(x) for x in attrs]
  File "c:\users\\appdata\local\programs\python\python37-32\lib\site-packages\msldap\ldap_objects\aduser.py", line 215, in 
    return [t.get(x) if x[:4]!='UAC_' else self.uac_to_textflag(x) for x in attrs]
  File "c:\users\\appdata\local\programs\python\python37-32\lib\site-packages\msldap\ldap_objects\aduser.py", line 209, in uac_to_textflag
    if self.userAccountControl & attr:
TypeError: unsupported operand type(s) for &: 'NoneType' and 'MSLDAP_UAC'
@skelsec
Copy link
Owner

skelsec commented Dec 11, 2018

Please attach the integer/bytearray for the UAC that causes the error.

@lfortemps
Copy link
Author

The UAC field returned by the AD is blank (probably because of permissions issues)

@skelsec
Copy link
Owner

skelsec commented Mar 1, 2019

New version should fix this issue now, please let me know if you still have this issue

@skelsec skelsec closed this as completed Mar 14, 2019
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

No branches or pull requests

2 participants