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

ACE parse #22

Closed
s0i37 opened this issue Dec 1, 2021 · 5 comments
Closed

ACE parse #22

s0i37 opened this issue Dec 1, 2021 · 5 comments

Comments

@s0i37
Copy link

s0i37 commented Dec 1, 2021

Hello.
Thanks for it! I've been looking for a tool to access AD ACL so much time...
But may be is it possible to implement dereference rules in ACL with your library https://github.com/skelsec/winacl ?

@skelsec
Copy link
Owner

skelsec commented Mar 29, 2022

hello! can you please define "dereference rules" ?

@s0i37
Copy link
Author

s0i37 commented Apr 1, 2022

I mean replace identifiers by "WRITE_OWNER" or "GENERIC_READ" for example.
It will make more simple ACL audit.

@s0i37
Copy link
Author

s0i37 commented Sep 29, 2022

I implemented canonical view of ACE with SIDs resolving like this:

pretty

And also grepable output:

grepabble

It may be very useful with combining power of GNU:

grepabble2

@s0i37
Copy link
Author

s0i37 commented Nov 28, 2022

#28
skelsec/winacl#8

@s0i37
Copy link
Author

s0i37 commented Oct 16, 2023

Merged and tested. Very good!
Thanks!

Tiny example how to grab the all ACL from CLI (in case Bloodhound is very noisy):

ldapsearch -o ldif-wrap=no -E pr=10000/noprompt -D username@domain -w password -x -H ldap://dc -b DC=company,DC=org '(&(objectClass=user)(!(objectClass=computer)))' sAMAccountName memberOf > dc-users.txt
ldapsearch -o ldif-wrap=no -E pr=10000/noprompt -D username@domain -w password -x -H ldap://dc -b DC=company,DC=org '(objectClass=computer)' dnshostname memberOf > dc-computers.txt
...
mkdir users computers groups gpo containers root
mkfifo stdin
mkfifo stdout
exec 3<> stdin
exec 4<> stdout
msldap "ldap+ntlm-password://company.com\username:s3cr3t@DC" < stdin > stdout &
cat dc-users.txt | grep ^dn: | perl -MMIME::Base64 -n -00 -e 's/\n +//g;s/(?<=:: )(\S+)/decode_base64($1)/eg;print' | while read _ dn
do echo "$dn"
  echo "getsd '$dn' g" >& 3
  timeout 1 cat <& 4 > users/$dn.txt
done
cat dc-computers.txt | ...
echo 'exit' >& 3

And analisys:

grep -r GENERIC_ALL
...

@s0i37 s0i37 closed this as completed Oct 16, 2023
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