This repository has been archived by the owner on Dec 6, 2023. It is now read-only.
Add the new daclread.py LDAP module and the msada_guids.py library #610
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
daclread.py
is a new LDAP module that permits to read and export the DACLs of one or mulitple objects. It is mainly inspired from the dacledit.py Impacket script that we have coauthored, @_nwodtuhs and me.Here are the main improvements:
LDAPConnection
session of CrackMapExec, instead of a new ldap3 session like the original scriptTODO : the LDAPConnection class of Impacket doesn't permit to write in LDAP, for the moment only ldap3 permits it. As a result, all the write functions (write, remove, restore) have been removed, waiting for a future development (wink wink).
The
msada_guids.py
file is a library containing most (maybe all ?) of the right GUIDs created by Microsoft. This file has been added to Impacket during the creation ofdacledit.py
, but since the PR has not been merged for the moment, I add it here.It can be deleted when it is merged in Impacket and only the import has to be modified in
daclread.py
.Examples
All the Security Descriptors have been exported, but it looks like a target doesn't exist, she will be ignored.