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

Added EditGroups.py script to add or remove a user from a specific group you have control over #1731

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

Fabrizzio53
Copy link

@Fabrizzio53 Fabrizzio53 commented Apr 11, 2024

A lot of this code is from https://github.com/ThePorgs/impacket/blob/master/examples/dacledit.py, stuff like pass the hash, ldap connetions and kerberos stuff (still trying to learn how a lot of those magic thing happen lol) and some from htb.

I'm not a coder so any modifications are more than welcome, I did this script because I saw that there was no impacket like script that modify and abuse any dacls related to Groups. (Maybe I'm wrong, anyways here is what I have)

============================

I'm dumb lol, after reading again what I wrote I did not said what was the point of the script, after using dacledit for lets say get FullAcess, AddMember, Write , etc... you can use this script to add / remove a user from a specific group

@Fabrizzio53 Fabrizzio53 changed the title Added EditGroups.py script to abuse anything related to dacls agains … Added EditGroups.py script to abuse anything related to dacls against groups Apr 11, 2024
@Zamanry
Copy link

Zamanry commented Apr 11, 2024

Howdy! The original dacledit script originated from #1291. The initial commits there only focused on Users/Computers, but later was modified to support OU manipulation either through manual modification or use of the ‘-inheritance’ parameter. I assume this would allow manipulation of a group (i.e., another container), but better to test it. Could you try that PR out and see if this parameter also works on groups? Cheers

@Fabrizzio53
Copy link
Author

Hello, tried here with dacledit but It doesn't seem to add the user to the group

@Fabrizzio53 Fabrizzio53 changed the title Added EditGroups.py script to abuse anything related to dacls against groups Added EditGroups.py script to add or remove a user from a specific group you have control over Apr 11, 2024
@Zamanry
Copy link

Zamanry commented Apr 12, 2024

I see now. So this PR has nothing to do with specific DACL modification, but instead AD LDAP Group manipulation? I know it's not in the root Examples folder, but does this do what you mean?

def do_add_user_to_group(self, line):

@Fabrizzio53
Copy link
Author

Fabrizzio53 commented Apr 12, 2024

Oh you are right, forgot that there is a "ldap_shell.py", I think the only difference is that a ldap_shell would need to be called from another script

@Fabrizzio53
Copy link
Author

any news regarding the status of this pr?

@anadrianmanrique
Copy link
Contributor

@Fabrizzio53 sorry for the late response. We will be prioritzing this one for 0.13 release

@Fabrizzio53
Copy link
Author

No problem, much thanks

@anadrianmanrique anadrianmanrique added in review This issue or pull request is being analyzed Examples labels Sep 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Examples in review This issue or pull request is being analyzed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants