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

Enumerating ACLs stalls OS #7

Open
soulemike opened this issue Oct 12, 2021 · 3 comments
Open

Enumerating ACLs stalls OS #7

soulemike opened this issue Oct 12, 2021 · 3 comments

Comments

@soulemike
Copy link

Enumerating ACLs in large environments can cause system resource exhaustion in large environments.

I have been able to update the Function Get-ADRACL to include -SearchBase $DnBase and $objSearcherPath.SearchRoot = "LDAP://$DnBase" using an additional property, but that isn't ideal.

The property could be brought into the helper Function Invoke-ADRecon or could be used to iterate through the subtrees as smaller chunks.

Let me know if you want me to merge the -SearchBase and SearchRoot as an example to test with.

@prashant3535
Copy link
Collaborator

That module has been on my todo list for refactor for a while :(

Go for it

@soulemike
Copy link
Author

I haven't had time to update this into the PR, but I think a quick optimization is to distribute the file writes within a single module. Currently it appears all writes are held in memory until a single write operation at the conclusion of the module.

Here is an example Gist using a subset of the DACL module that iterates over DN Bases and does appending writes. This may not be efficient from a disk IO perspective and may be better to modulo the write frequency.
https://gist.github.com/Snozzberries/028dec42f1a253c2ce556aeaedb556f7

prashant3535 added a commit that referenced this issue Mar 26, 2022
Added base DN filtering - Issue #7
@prashant3535
Copy link
Collaborator

I've merged the pull request. Will have a look through the gist and merge the changes when possible. Thank @Snozzberries :)

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